Harden the compression hook and refresh the published numbers - #5
Merged
Conversation
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>
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.
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.mjsanswers an unusable input by leaving the original result standing. An exception escapingmain()did the opposite: non-zero exit, error in the agent's transcript.It is reachable in practice — a
.orvix/symbols.jsonwritten by another version of orvix parses as JSON but need not hold the shape this version expects:The hook runs on every tool call. It now fails the way the rest of the file already does.
orvix initwas silent about the saved choiceApplying an answer given in another repository months ago, with no indication of where it came from, reads as the tool guessing:
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.
measurebenchscaleAll four commands re-run, not copied.
benchmarkand the 31% hot-cache share were unchanged —benchmarks/results/synthetic.jsondiffers 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 behindipcMain.handle('settings:get'). This gap is larger than the ones the section already listed.AGENTS.mdalso 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 passnpm run benchmark— ratio 0.699, success_delta 0, both fixtures preservedTypeError, the init test with output that mentioned neither the agent nor the config fileorvix initrun for real against the global config, not only under testNot in this PR
The
PostToolUse:Grep hook warningis still undiagnosed. Every successful Grep compression produces one; the Bash compression produces none. Until that is settled, the Grep share oforvix gainis unverified — 88% of the total on the session where it was observed.