research: stage frozen ARX6 codec, conformance tests, and production-baseline harness - #117
Draft
baanish wants to merge 1 commit into
Draft
research: stage frozen ARX6 codec, conformance tests, and production-baseline harness#117baanish wants to merge 1 commit into
baanish wants to merge 1 commit into
Conversation
Import the evaluated browser-safe codec without changing the viewer or legacy transport. Add standalone/Vitest checks, historical benchmark qualifications, and an unexecuted full-production-auto comparison runner. Keep application, Worker, and live transport integration as explicit draft deployment gates.
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scope
Import the executable general ARX6 research prototype as a draft, with reproducible conformance checks and a benchmark entry point against the complete production auto-selector.
This is not viewer integration. No codec registry, default auto-selection, UI, historical decoder, shipped dictionary, dependency, or deployment configuration changes. The experimental
#g1L...wire is not supported by the current viewer and must not be distributed as a working share link.The second-pass numeric reconstruction-program / dependency-order experiments are intentionally excluded. Their specialist wins did not justify adding them to the general codec.
Included
experiments/arx6/src/: raw WTF-8 tuples; causal lexical/character-class contexts; residual syntax mixer; earlier match discovery; base64url framing; CRC32; immutable SHA-256-pinned copies of the existing three 16 KiB priors. The evaluated core files are copied unchanged.experiments/arx6/check.mjs: 16 dependency-free checks using the repository's existing assets. The same cases are registered intests/arx6-core.test.tsfor Vitest.experiments/arx6/bench.mts: a new corpus-driven comparison with the entire productionencodeEnvelopeAsyncauto pool, the real Markdown formatter, round-trip assertions, complete link lengths, and exact legacy fallback. It emits measurements/hashes rather than unsupported viewer links.docs/arx6-research.md.The Node-only runtime contains a laboratory copy of the ARX2 tuple mapping. Production integration should expose/reuse the canonical helpers rather than preserve this duplication.
What the earlier research actually established
Across 93 held-out software-text proxies from 47 disjoint source groups: 7.41% aggregate full-link savings with fallback; 7.36% standalone; 90/93 strict wins; 3 standalone regressions; worst regression 2.77%. Entire artifacts fitting 2,000 characters went from 75 to 76.
That historical baseline was the shorter of exact ARX5 entropy/base64url and ARX2 with Node Brotli q11, not the full production portfolio and not a byte-identical brotli-wasm validation. Do not describe those numbers as results from the newly added production-baseline runner.
The existing report fixture was a separate diagnostic, not held-out evidence: the whole link shrank 2,616 → 2,301 characters and still did not fit. Exhaustive complete-line prefixes increased fitting source text 5,867 → 7,158 characters at the same 1,996-character link length. The 22% capacity gain is fixture-specific.
Verification
Executed in the authoring environment:
node experiments/arx6/check.mjs: 16/16 checks passed, including source hashes, every UTF-16 code unit, lone surrogates, exact whitespace/control preservation, prior identity/ownership, metadata, corruption/truncation, hostile lengths, and fallback.Not executed there:
The environment could run Node against the attached prototype but could not clone the repository or obtain its npm dependencies. The draft status is deliberate; local core checks are not being presented as full application CI.
Before production integration / enablement
#, unlike the app's body-only budget.Reproduce
node experiments/arx6/check.mjs npx vitest run tests/arx6-core.test.ts node --import tsx experiments/arx6/bench.mts corpus.json > arx6-comparison.jsonThe corpus format is a JSON array of
{ "id": "...", "envelope": ... }samples satisfying the existing payload schema. Third-party corpus text and its large license bundle are not silently republished as MIT application fixtures.