Skip to content

Add ARX2 tuple-envelope compression and benchmark gating#44

Merged
baanish merged 1 commit into
mainfrom
codex/implement-arx2-tuple-overlay
May 8, 2026
Merged

Add ARX2 tuple-envelope compression and benchmark gating#44
baanish merged 1 commit into
mainfrom
codex/implement-arx2-tuple-overlay

Conversation

@baanish
Copy link
Copy Markdown
Owner

@baanish baanish commented Apr 24, 2026

Summary

  • Add arx2 with tuple-envelope transport, overlay substitution, and shared ARX dictionary support
  • Replace split/join substitution with a trie scanner and add a capped Brotli decompression path for oversized payloads
  • Add a committed codec benchmark harness plus updated docs, skills, and test coverage for arx2 round-trips and viewer rendering

Testing

  • npm run check
  • Focused Playwright coverage for an arx2 fragment in the exported viewer
  • Expanded unit tests for arx/arx2 round-trips, tuple edge cases, trie parity, and decompression limit handling

Open in Devin Review

Summary by CodeRabbit

  • Chores
    • Updated internal repository configuration.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 24, 2026

Deploying agent-render with  Cloudflare Pages  Cloudflare Pages

Latest commit: 514f840
Status: ✅  Deploy successful!
Preview URL: https://1180331e.agent-render.pages.dev
Branch Preview URL: https://codex-implement-arx2-tuple-o.agent-render.pages.dev

View logs

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 24, 2026

Warning

Rate limit exceeded

@baanish has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 51 minutes and 29 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b9fdfdfa-7444-4e69-8417-29bb1222b609

📥 Commits

Reviewing files that changed from the base of the PR and between 0e677d1 and 514f840.

📒 Files selected for processing (20)
  • AGENTS.md
  • README.md
  • docs/architecture.md
  • docs/dependency-notes.md
  • docs/payload-format.md
  • docs/testing.md
  • package.json
  • public/arx2-dictionary.json
  • scripts/bench-baseline.json
  • scripts/bench-codecs.mjs
  • scripts/codec-poc.mjs
  • skills/agent-render-linking/SKILL.md
  • skills/selfhosted-agent-render/SKILL.md
  • src/lib/payload/arx-codec.ts
  • src/lib/payload/examples.ts
  • src/lib/payload/fragment.ts
  • src/lib/payload/schema.ts
  • tests/arx-codec.test.ts
  • tests/e2e/viewer.spec.ts
  • tests/fragment.test.ts
📝 Walkthrough

Walkthrough

This pull request adds a Git submodule pointer for .claude/worktrees/blissful-hodgkin-7f636e, registering the tracked commit as a88b6eec937f4a62ac1c60d75efb873352721756. The change is a single-line configuration addition with no impact on exported entities.

Changes

Cohort / File(s) Summary
Submodule Configuration
.gitmodules
Added submodule entry referencing .claude/worktrees/blissful-hodgkin-7f636e with pinned commit hash.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A whisker's worth of change today,
A submodule pointer finds its way,
One line added, crisp and clean,
The smallest diff I've ever seen! 🌿

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title 'Add ARX2 tuple-envelope compression and benchmark gating' describes major features (ARX2, compression, benchmarks), but the actual changeset only adds a Git submodule pointer with one line changed, not the implementation described in the title. Update the PR title to accurately reflect that this commit adds a submodule pointer (e.g., 'Add submodule pointer for ARX2 implementation'), or ensure the implementation changes are included in this PR.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/implement-arx2-tuple-overlay

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.claude/worktrees/blissful-hodgkin-7f636e:
- Line 1: The commit accidentally added local git worktree metadata at
.claude/worktrees/blissful-hodgkin-7f636e; remove that path from the repository
history/index and stop tracking it, then add .claude/worktrees/ to .gitignore so
it isn't re-added. Specifically, untrack/remove the
.claude/worktrees/blissful-hodgkin-7f636e entry from the index and commit that
removal (or amend the offending commit if appropriate), add .claude/worktrees/
to .gitignore and commit the .gitignore change, and if needed rebase/amend to
clean the PR history so no local worktree metadata remains in the branch.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 961397eb-fa23-43fd-9fe5-1abd17012e9a

📥 Commits

Reviewing files that changed from the base of the PR and between a88b6ee and 0e677d1.

📒 Files selected for processing (1)
  • .claude/worktrees/blissful-hodgkin-7f636e

@@ -0,0 +1 @@
Subproject commit a88b6eec937f4a62ac1c60d75efb873352721756
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Remove accidental worktree/submodule pointer from repository.

This introduces local .claude/worktrees git metadata into version control, which can create unintended submodule behavior for contributors and CI. Please remove this tracked file from the PR (and consider ignoring .claude/worktrees/ going forward).

Suggested cleanup
-Subproject commit a88b6eec937f4a62ac1c60d75efb873352721756
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/worktrees/blissful-hodgkin-7f636e at line 1, The commit accidentally
added local git worktree metadata at .claude/worktrees/blissful-hodgkin-7f636e;
remove that path from the repository history/index and stop tracking it, then
add .claude/worktrees/ to .gitignore so it isn't re-added. Specifically,
untrack/remove the .claude/worktrees/blissful-hodgkin-7f636e entry from the
index and commit that removal (or amend the offending commit if appropriate),
add .claude/worktrees/ to .gitignore and commit the .gitignore change, and if
needed rebase/amend to clean the PR history so no local worktree metadata
remains in the branch.

Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

🐛 1 issue in files not directly in the diff

🐛 Accidental commit of orphaned gitlink (submodule without .gitmodules) (.claude/worktrees/blissful-hodgkin-7f636e:1)

This PR commits a git submodule entry (mode 160000) at .claude/worktrees/blissful-hodgkin-7f636e pointing to commit a88b6ee, but there is no corresponding .gitmodules file to define the submodule's remote URL. This is an orphaned gitlink — an accidental commit of a local Claude Code worktree reference. It will cause git submodule operations to emit warnings or errors for anyone cloning the repo, and it pollutes the repository with a local development artifact that should have been gitignored.

View 1 additional finding in Devin Review.

Open in Devin Review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0e677d15c9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@@ -0,0 +1 @@
Subproject commit a88b6eec937f4a62ac1c60d75efb873352721756
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Remove accidental gitlink pointer from repository

This commit adds a 160000 gitlink at .claude/worktrees/... instead of actual source changes, which records a local worktree/submodule pointer rather than portable project content. In a normal clone this path cannot be resolved (there is no matching .gitmodules entry), and because this is the only diff in the commit, the intended ARX2 implementation/docs/tests are not actually delivered by this change.

Useful? React with 👍 / 👎.

@kilo-code-bot
Copy link
Copy Markdown

kilo-code-bot Bot commented Apr 24, 2026

Code Review Summary

Status: 1 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
N/A N/A Missing .gitmodules file for submodule
Other Observations (not in diff)

Issues found in unchanged code that cannot receive inline comments:

File Line Issue
N/A N/A The PR adds a submodule entry (.claude/worktrees/blissful-hodgkin-7f636e) but does not include the required .gitmodules file. Without this file, the submodule will not be initialized properly when others clone the repository, causing setup failures.
Files Reviewed (1 files)
  • .claude/worktrees/blissful-hodgkin-7f636e - 1 issues

@kilo-code-bot
Copy link
Copy Markdown

kilo-code-bot Bot commented Apr 24, 2026

Code Review Summary

Status: 1 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
scripts/bench-codecs.mjs 35 Extended slot mapping offset mismatch (0x20 vs index+1)
Other Observations (not in diff)
  • The previous warning about missing .gitmodules is resolved: the submodule entry was removed.
Files Reviewed (14 files)
  • AGENTS.md
  • README.md
  • docs/architecture.md
  • docs/dependency-notes.md
  • docs/payload-format.md
  • docs/testing.md
  • package.json
  • public/arx2-dictionary.json (new)
  • scripts/bench-baseline.json (new)
  • scripts/bench-codecs.mjs (new)
  • src/lib/payload/arx-codec.ts
  • src/lib/payload/examples.ts
  • src/lib/payload/fragment.ts
  • src/lib/payload/schema.ts
  • tests/arx-codec.test.ts
  • tests/e2e/viewer.spec.ts
  • tests/fragment.test.ts

Fix these issues in Kilo Cloud


Reviewed by step-3.5-flash · 2,201,416 tokens

@baanish baanish force-pushed the codex/implement-arx2-tuple-overlay branch from 0e677d1 to 514f840 Compare May 8, 2026 01:54
Comment thread scripts/bench-codecs.mjs
const v1Pairs = buildPairs(v1Dictionary);
const overlayPairs = [
...buildPairs({ singleByteSlots: overlayDictionary.singleByteSlots, extendedSlots: [] }, [0x1e, 0x7f]),
...overlayDictionary.extendedSlots.map((slot, index) => [slot, "\x1f" + String.fromCharCode(0x20 + index)]),
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Extended slot mapping uses offset 0x20, but the production code uses i + 1 for arx2 overlay extended codes.

This mismatch means the benchmark's arx2 compression simulation uses different substitution bytes than the actual codec, producing inaccurate compression ratios and potentially invalid regression gate results.

Fix by changing 0x20 + index to index + 1 to match src/lib/payload/arx-codec.ts:

Suggested change
...overlayDictionary.extendedSlots.map((slot, index) => [slot, "\x1f" + String.fromCharCode(0x20 + index)]),
...overlayDictionary.extendedSlots.map((slot, index) => [slot, "\x1f" + String.fromCharCode(index + 1)]),

@baanish baanish merged commit dc1499e into main May 8, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant