Repository navigation
Router tests use synthetic prompts instead of real benchmark tasks (GST-3402) - #4642
Merged
Merged
Conversation
…ST-3402) Every gstack install is a clone of this repository, so the 63 SWE-rebench task prompts in the router fixtures sat in each user's home and in every eval run that installed gstack. They are replaced with 60 synthetic B1-shaped prompts (46 bug, 14 feature) and 4 synthetic long bug reports that share words with /qa's triggers, the real task ids are gone from the tests, and the fixture inventory test now fails if a SWE-bench-style task id appears under test/ or browse/test/. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
Review-Finding: p1/red-team#1 reader=red-team Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Review-Finding: p1/outside-voice#1 reader=outside-voice Review-Finding: p1/outside-voice#2 reader=outside-voice Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Merged
3 tasks done
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.
gstack's current files no longer contain real benchmark tasks: the router tests' 63 SWE-rebench prompts are replaced with synthetic ones covering the same routes.
Why: every install is a clone of this repository, so those tasks sat in each user's home and in every eval run that installed gstack, contaminating any eval that uses them.
Nothing to do; a new check fails if a SWE-bench-style task id appears under
test/orbrowse/test/again.What changed
Eval runs install gstack, and an install is a clone, so the router tests' real SWE-rebench prompts were sitting next to the agents being measured. Those prompts are gone from the current tree, the router tests run on made-up projects and issues instead, and a free test now stops any SWE-bench-style task id from coming back.
test/fixtures/skill-route-b1-in-sample.json(60 B1 in-sample prompts built from SWE-rebench tasks) andtest/fixtures/skill-route-bug-reports.json(3 SWE-rebench bug reports), and removed the three real task ids fromtest/skill-route.test.ts.test/fixtures/skill-route-synthetic-prompts.json: made-up projects and issues only. The B1 wrapper around each task is kept, since that is the text the router sees in those runs.test/free-fixtures.test.tsnow scans every file undertest/andbrowse/test/for an id shaped like a SWE-bench or SWE-rebench task, with a negative control that uses invented ids. A file too large to scan is reported instead of skipped.docs/skill-routing-and-contracts.mdpoints at the new fixture, anddocs/TESTING_INTERNALS.mddescribes the new check.git log. Removing them from history would need a rewrite, which this PR does not do.Coverage, before and after
The task-id check fails on main, naming both deleted fixtures and
test/skill-route.test.ts.Router gaps the first draft found
My first draft of the synthetic reports was written without looking at the detector. 14 of the 46 bug reports did not read as bug reports, and one routed to /verify first. Three of the 4 long reports routed to /qa, because a long report containing "find", a defect word and "site" anywhere matches the "find bugs on site" trigger, and one contained the phrase "test the site". I reworded those prompts to state their symptom plainly, so this PR keeps the router's behavior and its tests as they were. The gaps are recorded for a follow-up.
Why
Real benchmark tasks in the repository meant every gstack install carried them into the user's home and into every eval arm that installed gstack. An agent under test could find the very task it was being scored on. Now the current tree holds only synthetic prompts, and a free test keeps it that way.
Blast radius
Only tests, test fixtures, one changelog entry and two docs change; no product code, skill text, setup or install path is touched. The deleted fixtures had no other readers (a tree-wide search for both file names finds none), and CI's full free suite passed at this tree (run 44964526303).
Pre-Landing Review
Two review rounds, plus one quick recheck of the first fix. The first round's Red Team found the changelog overclaimed (full-history installs still hold the old prompts), and that wording was fixed. The second-model review (GPT-6.2 Astra) found two real problems in the new check, both fixed and rechecked by the second round: the negative control spelled two real task ids in pieces (it now uses invented ids), and files over 8 MB were skipped silently (they are now reported). Nothing above the blocking floor is open.
Review notes
Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.
sf-0f9be970b67dsecurity finding, details recorded privatelytest/free-fixtures.test.ts:178The task-id scan checks file contents but not file paths, so a task stored under a folder named after its id with no id in the text would pass.test/fixtures/skill-route-synthetic-prompts.json:1The synthetic fixture's about text says no text comes from a real task, but every prompt keeps B1's prompt wrapper (task content is all synthetic).test/free-fixtures.test.ts:159The scan's pattern misses an id glued to a word character, such as one prefixed with instance_.changelog.d/synthetic-skill-route-fixtures.md:4Clones made before this change keep the old prompts in their git history after upgrading; only a fresh shallow install is clean.test/skill-route.test.ts:77The bug-report-is-not-a-QA-request router test never produces a /qa candidate with these prompts (also true on main), so it passes without exercising the overlap.test/free-fixtures.test.ts:177No test covers the new branch that reports a file over 8 MB as too large to scan.Exploratory QA
No runtime surface changed: this PR touches tests, fixtures and docs only. The reviewers ran the two affected test files themselves (44 pass, 0 fail at the reviewed tree), and the new check's negative control proves it catches a planted id.
Design Review
No frontend files changed — design review skipped.
Eval Results
No prompt-related files changed — evals skipped.
Plan Completion
Plan completion audit: not run (no plan is bound to this branch; bug fixes need no plan).
TODOS
No TODO items completed in this PR.
Documentation
Status: updated. One factual doc edit; no blockers.
Scope: base c8641cc to HEAD 78a1c6c (4 commits, 8 files), with no staged, unstaged or untracked changes. The changes swap the real SWE-rebench router fixtures for synthetic prompts and add a free test that scans for task ids.
Documentation health:
docs/skill-routing-and-contracts.md: current (the branch already points it at the synthetic fixture; 60 prompts, 46 bug reports, checked against the file)docs/TESTING_INTERNALS.md: updated (documents the task-id scan intest/free-fixtures.test.ts)changelog.d/fix-synthetic-skill-route-fixtures.md: reviewed, owned by shipCoverage debt: the task-id scan now has reference coverage only. There is no how-to for contributors on adding router fixtures safely (common gap). No architecture diagram drift.
Tests
bun test test/free-fixtures.test.tsafter the review fixes: 13 pass, 0 failbun test test/changelog-fragments.test.tsafter the changelog edit: 15 pass, 0 failAgent notes
GSTA-759 for GST-3402, replacing #4638 (closed) on GStack Minder's ruling. The deleted originals are kept in the org drive under handoffs/GEVA-562/skill-route-fixtures/; gstack-evals' B1 route table holds the task ids and prompt hashes but not the prompt text or labels.
Refs GST-3402
CI note: Free Tests run 44963661037 on e000e18 hit a tree mismatch because main moved; the first attempt was also cancelled when its free-plan runner setup took 4m44s against a 5-minute job timeout (infra). Free Tests was dispatched on the branch as run 44964526303, which is green and carries the test results.
REVIEW_LOOP: passes=2 blocking_found=2 deferred=0 noted=7 fixed=3 scope=frozen unbound=2 ledgers_read=4 fix_checks=1 dispatches=4
Gate edits: none detected (0 listed, 0 read)
Second-model review: openai/gpt-6.2-astra (host subagent), completed, outside the certified configuration (openai/gpt-6.1-sol at medium)
Approvals
No approvals recorded for branch fix/synthetic-skill-route-fixtures.
Plan: exempt: bug fix (test fixtures only), no plan review per R4
Plan check: exempt bug fix