Skip to content

Harden the compression hook and refresh the published numbers - #5

Merged
lightningpixel merged 1 commit into
mainfrom
chore/pre-release
Aug 9, 2026
Merged

Harden the compression hook and refresh the published numbers#5
lightningpixel merged 1 commit into
mainfrom
chore/pre-release

Conversation

@lightningpixel

Copy link
Copy Markdown
Owner

Pre-release pass. Everything here came from running orvix against a real project rather than against its fixtures.

The hook could fail a turn

Every guard inside orvix-compress.mjs answers an unusable input by leaving the original result standing. An exception escaping main() did the opposite: non-zero exit, error in the agent's transcript.

It is reachable in practice — a .orvix/symbols.json written by another version of orvix parses as JSON but need not hold the shape this version expects:

TypeError: ids.map is not a function
    at compressRead (hooks/orvix-compress.mjs:187:6)
    at main (hooks/orvix-compress.mjs:56:23)

The hook runs on every tool call. It now fails the way the rest of the file already does.

orvix init was silent about the saved choice

Applying an answer given in another repository months ago, with no indication of where it came from, reads as the tool guessing:

using saved choice: claude (C:\Users\MaXx_\.orvix\config.json — override with --agent)
created CLAUDE.md
…

The published numbers had drifted

The README opens on "Every number below comes from a command in this repository. Re-run them." That makes stale figures the one defect a reader finds without trying.

was now
index (README:29) 389 symbols, 1 127 edges 395 symbols, 1 150 edges
measure ~1,912 / ~33,254 / ~1,990 ~2,000 / ~33,630 / ~1,998
bench 37.4 / 17.2 / 54.6 ms 34.7 / 16.7 / 51.4 ms
scale 274 / 790 / 2 825 ms 285 / 746 / 2 547 ms
tests (README:91) 362 370
tests (AGENTS.md:11) 246 370

All four commands re-run, not copied. benchmark and the 31% hot-cache share were unchanged — benchmarks/results/synthetic.json differs only by its timestamp, so compression behaviour is byte-identical to before the recent fixes.

Newly documented

Calls dispatched through a string are invisible to the call graph — an Electron IPC channel, an event name, a route table, a DI container. Found by watching an agent ask who-calls getSettings, get the 9 main-process callers, and then correctly fall back to grep for the renderer half behind ipcMain.handle('settings:get'). This gap is larger than the ones the section already listed.

AGENTS.md also now records the language-family constraint as an invariant, so it is not removed by someone who does not know why it is there.

Verification

  • npm run build, npx tsc --noEmit, npm test — 370 tests pass
  • npm run benchmark — ratio 0.699, success_delta 0, both fixtures preserved
  • Both new tests written first and watched fail: the hook test with the real TypeError, the init test with output that mentioned neither the agent nor the config file
  • orvix init run for real against the global config, not only under test

Not in this PR

The PostToolUse:Grep hook warning is still undiagnosed. Every successful Grep compression produces one; the Bash compression produces none. Until that is settled, the Grep share of orvix gain is unverified — 88% of the total on the session where it was observed.

Three things, all found by running orvix against a real project rather than
against its fixtures.

The compression hook could exit non-zero and put an error in the agent's
transcript. Every guard inside it answers an unusable input by leaving the
original result standing; an exception escaping main() did the opposite. A
symbols.json written by another version of orvix reaches it — `ids.map is not
a function`. It runs on every tool call, so it now fails the way the rest of
the file already does: silently, original result intact.

`orvix init` applied a saved agent choice without a word about where it came
from. Not asking again is the point of a global install, but acting on an
answer given in another repository months ago reads as guesswork. It now names
the choice and the file, and says how to override it.

The README's figures had drifted, and AGENTS.md still claimed 246 tests
against an actual 370. For a README that opens on "every number below comes
from a command in this repository", stale numbers are the one defect a reader
finds without trying. All four commands re-run; the benchmark and the 31%
hot-cache share were unchanged, the rest updated.

Also documented: calls dispatched through a string — an IPC channel, an event
name, a route table — are invisible to the call graph. That gap is larger than
the ones already listed, and we only found it by watching an agent hit it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@lightningpixel
lightningpixel merged commit 82adf31 into main Aug 9, 2026
11 checks passed
@lightningpixel
lightningpixel deleted the chore/pre-release branch August 9, 2026 11:35
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