Add literal search for archived observations - #14
Open
aalvsz wants to merge 1 commit into
Open
Conversation
gaoanze888
approved these changes
Sep 11, 2026
gaoanze888
left a comment
There was a problem hiding this comment.
Reviewed the literal-search semantics, UTF-8/chunk boundaries, overlapping matches, continuation, output limits, cancellation, and file guards. I ran npm run check locally: typecheck, 17 test files / 142 tests, and package dry-run all passed.
I also integration-merged this with #13 because both touch Observation Pack; the merge was clean and the combined suite passed 17 files / 144 tests. The PR size is justified by the streaming search boundary work plus substantial tests and a reproducible benchmark, rather than unrelated production scope. I did not find a blocking correctness issue. Nice discipline around reporting returned bytes/calls without overclaiming model accuracy or billed cost.
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.
Summary
obs_recallfor archived large tool results.queryis omitted.Validation
npm run check— 17 test files, 142 tests, typecheck, and package dry run passed.npm audit --audit-level=high— passed at the requested severity; two pre-existing moderate Vitest advisories remain.node scripts/check-pi-compat.mjs— passed.npx --no-install vitest run tests/all-mechanisms.test.ts— 4 tests passed.Real-output benchmark
Five real
rgcommands from the repository produced 30–166 KiB archived outputs. In a 50-case targeted benchmark (eight observed literals with at most 20 occurrences plus two misses per artifact):All 50 cases were source-oracle verified, including offsets, line numbers, contexts, and continuation. A separate dense stress run is retained: queries matching nearly every line required more output than paging, which documents the feature's workload boundary.
These are retrieval measurements over real command output. They do not claim improved model-answer accuracy, provider-token usage, or billed cost. Timings are descriptive local wall times.