Repository navigation
feat(brief): find the origin of an error message the question describes without quoting it - #1210
Merged
Merged
Conversation
…dget score_brief.py gains freeze-home (the probes a binary built at a commit embeds, hashed), --probe-home, and pinned (two binaries or two probe sets on frozen homes, then compare). report.json records the probe identity, the route and the question SHA-256; compare flags runs that differ in more than one input. The default route is now the prompt-submit hook's brief-only payload (3 s window, probe floor, all parts): the brief command gave probes 750 ms and no floor, and config-registry timed out on one run and not the next. Refs #906
A test-bodies probe (append, kind tests or a prompt naming tests) quotes the test cases whose name or body carries the prompt's subject: Python def test_*, JS it/test, Rust fn under #[test] including inline modules. Candidates are the test files the brief names, then those whose path names the subject; word weights come from how many cases carry a word, not from a word list. Registered in bundled_probes.rs; the install tests derive their counts from the allowlist. Closes #1196
…es without quoting it error-origin ran only on a quoted message, and none of the seven error-origin questions of the public bench quotes one. It now also takes the short string literal that carries the most of the prompt's words, each weighed by how few source lines carry it, with the call and function that emit the string counted beside it. A string longer than the window is a manual, not a message; a JSON catalogue entry is followed to the code that names its key; inline test modules are skipped. CI installs ripgrep for the probes' own tests. Closes #1197
A run on daemons left in the clones by pixel calls outside the harness answered 7 of 56 briefs differently from its two replays (an op left unanswered, flow-rank empty). activate now stops the clone's daemon before prepare-repo, so every run is served by a daemon it started. Refs #1201
This was referenced Oct 18, 2026
# Conflicts: # docs/bench/brief-public-acceptance-2026-10-17/README.md
CodeQL flagged string_part's pattern: an escape and a plain character could both match a backslash, so an unclosed string of escapes backtracked exponentially (the new test hit a 20 s timeout before the fix, under 1 s after). A plain character now excludes the backslash. Refs #1197
This was referenced Oct 18, 2026
LivioGama
pushed a commit
that referenced
this pull request
Nov 25, 2026
…es without quoting it (#1210) * chore(bench): freeze the probe home and score briefs on the hook's budget score_brief.py gains freeze-home (the probes a binary built at a commit embeds, hashed), --probe-home, and pinned (two binaries or two probe sets on frozen homes, then compare). report.json records the probe identity, the route and the question SHA-256; compare flags runs that differ in more than one input. The default route is now the prompt-submit hook's brief-only payload (3 s window, probe floor, all parts): the brief command gave probes 750 ms and no floor, and config-registry timed out on one run and not the next. Refs #906 * feat(brief): quote the bodies of the tests a tests question asks about A test-bodies probe (append, kind tests or a prompt naming tests) quotes the test cases whose name or body carries the prompt's subject: Python def test_*, JS it/test, Rust fn under #[test] including inline modules. Candidates are the test files the brief names, then those whose path names the subject; word weights come from how many cases carry a word, not from a word list. Registered in bundled_probes.rs; the install tests derive their counts from the allowlist. Closes #1196 * docs(bench): record the test-bodies pack on the frozen-probe harness Refs #1196 * feat(brief): find the origin of an error message the question describes without quoting it error-origin ran only on a quoted message, and none of the seven error-origin questions of the public bench quotes one. It now also takes the short string literal that carries the most of the prompt's words, each weighed by how few source lines carry it, with the call and function that emit the string counted beside it. A string longer than the window is a manual, not a message; a JSON catalogue entry is followed to the code that names its key; inline test modules are skipped. CI installs ripgrep for the probes' own tests. Closes #1197 * docs(bench): record the error-origin pack on the frozen-probe harness Refs #1197 * chore(bench): stop a clone's leftover daemon before scoring on it A run on daemons left in the clones by pixel calls outside the harness answered 7 of 56 briefs differently from its two replays (an op left unanswered, flow-rank empty). activate now stops the clone's daemon before prepare-repo, so every run is served by a daemon it started. Refs #1201 * test(setup): list the test-bodies probe in the setup goldens and agents data Refs #1196 * fix(brief): read string literals in linear time in error-origin CodeQL flagged string_part's pattern: an escape and a plain character could both match a backslash, so an unclosed string of escapes backtracked exponentially (the new test hit a 20 s timeout before the fix, under 1 s after). A plain character now excludes the backslash. Refs #1197
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.
Closes #1197
Stack (L7, #906): #1208 (#1201 harness) ← #1209 (#1196 test bodies) ← this PR (#1197). Base:
brief/1196-test-bodies. GitHub linksCloses #1197only once the PR targetsmain.Summary
error-originalready existed, but it ran only when the prompt quoted the message, and none of the sevenerror-originquestions of the public bench quotes one ("where does the runtime error about working outside of application context come from"). The probe now also finds a message described in words: the short string literal that carries the most of the prompt's words. From there it is the same flow as before: the raising function, its callers over two levels, one test.Evidence
Before → after, frozen-probe harness, same binary (
main7887b9e6). Probes frozen at77f565ba(brief: quote the bodies of the tests that exercise the target (tests oracle 2%) #1196) vsfce305a2, so this probe is the only change:error-originfile_recallerror-originline coverage /region_covfile_recall/region_cov50/56 briefs identical, no category or session worse. Origins found: ripgrep
crates/core/main.rs:424ineprint_nothing_searched; flasksrc/flask/globals.py:34(the_no_app_msgtext); fdsrc/cli.rs; requestssrc/requests/adapters.py:204; excalidrawApp.tsx.express-07gets nothing: "Cannot GET" lives in a dependency, not in the repository.Prototype iterations (scratchpad, offline on the saved hook briefs), kept or dropped. The first cut excluded words on more than 400 lines:
file/searchvanished on ripgrep, so it was dropped for IDF weighting. Ranking by IDF sum chose a manual page over the message: dropped for whole-string spans, the ±8-line manual cutoff and the emitter's words. A 2-letter prefix (noinnot) inflated a doc string: words of 3 letters or fewer now must equal a token. A context-only match picked an import line: dropped, the string itself must carry one word.Tests that fail without the change.
probes/error-origin/tests/test_probe.py(5 cases: an emitted message beats a manual sharing more words, a Python triple-quoted message, a catalogue key followed to code, a doc-length string never chosen, an inline test module skipped). Against the previous probe:The two others guard against false origins, so they pass on the old probe too. CI now installs
ripgrepbefore the probes' own tests, which need it.probe-test.py error-origin:… | coverage 5% -> 6% | OK.--guardpasses on the 7error-originprompts with their oracle paths: the old docstring'striggersandcannotwere reworded, and they would have failed it too.--check-all: ok.Not run: the live Codex A/B. The call replay predicts 24 → 24 (it cannot credit quoted ranges).
Merge Danger
Door: one-way for installs:
pixel setuprewrites~/.pixel/plugins/error-origin/on its next run. A revert ships the old copy back on the run after.Blast radius: low to medium. The probe now runs on any prompt naming an error, message, warning, alert, panic or text: 9/56 bench prompts, 2 of them outside
error-origin, with no session worse. It costs up to 7rgcalls inside its 2 s budget, fails open, and appends.Docs touched
.github/changelog.d/error-origin-described.changed.md,docs/bench/brief-public-acceptance-2026-10-17/README.md(pack table),.github/workflows/ci.yml(ripgrep for probe tests).ARCHITECTURE.md: unchanged, since the probe count and the shipped set's description are the same.Need help on this PR? Tag
@codesmith-botwith what you need.