Prompt router stops sending feature requests to your bug-fix skill (#4694)

The prompt hook no longer treats a feature request as a bug report just
because its body mentions an error, so your bug-fix skill isn't named
for "Add …", "Support …" or "[Feature]: …" requests.

Why: in our eval runs, 13 of 27 feature-titled tasks were routed to the
bug-fix skill, so the model started a bug-fix workflow on a feature.

Nothing to do: the change is in the hook's scoring. This builds on #4674
and should land after it.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Review-Finding: p1/specialist-batched#1 reader=red-team
Review-Finding: v1/outside-voice#1 reader=outside-voice
Review-Finding: v1/outside-voice#2 reader=outside-voice
Review-Finding: v1/outside-voice#6 reader=outside-voice
Review-Finding: v1/adversarial-native#1 reader=adversarial-native
Review-Finding: v1/adversarial-native#2 reader=adversarial-native
This commit is contained in:
Garry Tanandcapy-ai[bot] authored and GitHub committed 2026-11-22 12:47:36 +00:00
1 parent b3323f47b8
commit 596ff8a7cc
6 files changed
+337 -10

No files matched your search

+244
View File
@@ -0,0 +1,244 @@
{
"description": "Fixed probe set for the feature-title guard (GSTA-794 follow-up to #4674). Frozen before any guard code was written. label=bug: the bug-fix skill must be named first. label=feature: the bug-fix skill must not be named. wrapped=true: the prompt is placed inside the B1 task wrapper from skill-route-synthetic-prompts.json. Synthetic text only.",
"frozen": "2026-11-22",
"probes": [
{
"id": "f01",
"label": "feature",
"wrapped": true,
"origin": "geva-558",
"prompt": "[Feature]: support a user-defined network in the compose deployment\n\nToday the compose file always creates its own network, and joining an existing one fails with \"network not found\". Please let users name a network to join."
},
{
"id": "f02",
"label": "feature",
"wrapped": true,
"origin": "geva-558",
"prompt": "Support `Optional[T]` syntax in the field filler\n\nThe filler raises TypeError when a field is annotated `Optional[int]`. It should accept it like the `Union[int, None]` spelling."
},
{
"id": "f03",
"label": "feature",
"wrapped": true,
"origin": "geva-558",
"prompt": "feature: Group CLI options into categories\n\nThe help output lists 40 options in one block, and users miss the --retry flag, which leads to failed uploads. Group them into sections."
},
{
"id": "f04",
"label": "feature",
"wrapped": true,
"origin": "geva-558",
"prompt": "Enhancement: richer typed handling for the AI.* scalar functions\n\nThese functions come back untyped, so later casts raise an error. Type their results."
},
{
"id": "f05",
"label": "feature",
"wrapped": true,
"origin": "geva-558",
"prompt": "Allow us to pass a JSON file to complicated parameters\n\nPassing a nested dict on the command line is error-prone and often fails with a parse error. Accept a path to a JSON file instead."
},
{
"id": "f06",
"label": "feature",
"wrapped": true,
"origin": "geva-558",
"prompt": "# Introduce a PROJECT_ROOT setting to replace the cloud-mode path checks\n\nThe current checks throw an exception for any path outside the cloud root, which is wrong for local installs. Replace them with one setting."
},
{
"id": "f07",
"label": "feature",
"wrapped": false,
"origin": "new",
"prompt": "Add a --dry-run flag to the deploy command\n\nRight now a typo in the config only shows up as an error after the upload starts. A dry run would catch it first."
},
{
"id": "f08",
"label": "feature",
"wrapped": false,
"origin": "new",
"prompt": "Implement retries for the webhook sender\n\nWhen the receiver is down the send fails once and the event is lost. Retry three times with backoff."
},
{
"id": "f09",
"label": "feature",
"wrapped": false,
"origin": "new",
"prompt": "Expose the parser's error positions in the API\n\nToday a parse error only says \"invalid input\". Return the line and column too."
},
{
"id": "f10",
"label": "feature",
"wrapped": false,
"origin": "new",
"prompt": "Provide a way to cancel a running export\n\nLong exports can't be stopped and time out after an hour with an error."
},
{
"id": "f11",
"label": "feature",
"wrapped": false,
"origin": "new",
"prompt": "New: dark mode for the settings page\n\nUsers report eye strain; the page crashes nobody's browser but it is very bright."
},
{
"id": "f12",
"label": "feature",
"wrapped": false,
"origin": "finding-4",
"prompt": "feat(cli): group options\n\nThe help display fails on narrow screens."
},
{
"id": "f13",
"label": "feature",
"wrapped": false,
"origin": "new",
"prompt": "Adding support for Postgres 18\n\nConnecting to 18 currently fails with an unsupported-version error."
},
{
"id": "f14",
"label": "feature",
"wrapped": true,
"origin": "new",
"prompt": "Introduce a cache for the auth token so users no longer have to log in every time\n\nEach restart throws them back to the login screen."
},
{
"id": "b01",
"label": "bug",
"wrapped": true,
"origin": "geva-558-control",
"prompt": "Support for TOML configs is broken since 2.0\n\nLoading any .toml file raises KeyError."
},
{
"id": "b02",
"label": "bug",
"wrapped": true,
"origin": "geva-558-control",
"prompt": "Add a check for empty input; parse() crashes on it\n\nSee the traceback."
},
{
"id": "b03",
"label": "bug",
"wrapped": false,
"origin": "finding-apostrophe",
"prompt": "Add-to-cart button doesn’t work on Safari"
},
{
"id": "b04",
"label": "bug",
"wrapped": false,
"origin": "finding-hyphen",
"prompt": "Add-to-cart button on Safari\n\nClicking it throws TypeError."
},
{
"id": "b05",
"label": "bug",
"wrapped": false,
"origin": "finding-two-weak",
"prompt": "New checkout drops orders it should keep.\n\nIt crashes after payment."
},
{
"id": "b06",
"label": "bug",
"wrapped": false,
"origin": "finding-template",
"prompt": "Add to cart button does nothing on Safari\n\nExpected behavior: it adds the item.\nActual behavior: nothing happens."
},
{
"id": "b07",
"label": "bug",
"wrapped": false,
"origin": "regression-3",
"prompt": "New `ValueError` on launch"
},
{
"id": "b08",
"label": "bug",
"wrapped": false,
"origin": "regression-2",
"prompt": "The uploader crashes\n\n<steps>\nAdd a file\n</steps>"
},
{
"id": "b09",
"label": "bug",
"wrapped": false,
"origin": "finding-noun-title",
"prompt": "New users cannot sign up\n\nThe form returns a 500 error since yesterday's deploy."
},
{
"id": "b10",
"label": "bug",
"wrapped": false,
"origin": "new",
"prompt": "Allow list ignores the last entry\n\nThe final hostname in ALLOWED_HOSTS is never matched, so requests from it are rejected."
},
{
"id": "b11",
"label": "bug",
"wrapped": true,
"origin": "new",
"prompt": "Support page link returns 404\n\nThe footer link to /support is broken on every page."
},
{
"id": "b12",
"label": "bug",
"wrapped": false,
"origin": "new",
"prompt": "Implementing the fix from #120 broke uploads\n\nSince that change, every upload fails with a timeout."
},
{
"id": "b13",
"label": "bug",
"wrapped": false,
"origin": "round-1",
"prompt": "parse() crashes on empty input\n\nNew users hit this on their first run.\n\nPlease fix it."
},
{
"id": "b14",
"label": "bug",
"wrapped": true,
"origin": "round-1",
"prompt": "Upload fails with KeyError\n\nSteps to reproduce:\n\nAdd a file named a.toml\n\nRun mycli upload."
},
{
"id": "b15",
"label": "bug",
"wrapped": true,
"origin": "geva-558-control",
"prompt": "sandglass: adding a day across a DST change gives 23:00\n\nThe result is incorrect for every zone with daylight saving time."
},
{
"id": "c01",
"label": "bug",
"wrapped": false,
"origin": "regression-1",
"prompt": "The site crashes during the smoke test."
},
{
"id": "c02",
"label": "bug",
"wrapped": false,
"origin": "regression-1",
"prompt": "Opening a PR review page throws TypeError: cannot read property 'id' of undefined."
},
{
"id": "c03",
"label": "bug",
"wrapped": false,
"origin": "control",
"prompt": "The export returns an empty file. This started with 2.2."
},
{
"id": "c04",
"label": "feature",
"wrapped": false,
"origin": "control",
"prompt": "Please make the sidebar collapsible and remember its state."
},
{
"id": "c05",
"label": "feature",
"wrapped": false,
"origin": "control",
"prompt": "Write a migration guide for the 3.0 config format."
}
]
}
+1
View File
@@ -256,6 +256,7 @@ export const FREE_FIXTURES: Readonly<Record<string, readonly string[]>> = {
'test/fixtures/skill-contract/**': ['test/skill-contract-codex.test.ts', 'test/skill-contract-stop-hook.test.ts', 'test/skill-contract.test.ts'],
'test/fixtures/skill-evals/**': ['test/skill-eval-checks.test.ts', 'test/skill-eval-tasks.test.ts'],
'test/fixtures/skill-md-size-allowlist.json': ['test/skill-md-size-guard.test.ts'],
'test/fixtures/skill-route-feature-title-probes.json': ['test/skill-route.test.ts'],
'test/fixtures/skill-route-plain-prompts.txt': ['test/skill-route.test.ts'],
'test/fixtures/skill-route-synthetic-first-draft.json': ['test/skill-route.test.ts'],
'test/fixtures/skill-route-synthetic-prompts.json': ['test/skill-route.test.ts'],
+33
View File
@@ -385,6 +385,39 @@ describe('installed skills beside gstack (GST-3123)', () => {
}
});
test('a request titled as a feature is not a bug report though its body names an error; a title or template that names a defect still is (GEVA-558)', () => {
const proveIt = other('prove-it', ['fix this bug', 'prove the fix', 'reproduce the bug in a test']);
const b1 = JSON.parse(fs.readFileSync(path.join(ROOT, 'test', 'fixtures', 'skill-route-synthetic-prompts.json'), 'utf8')) as { prompts: { prompt: string }[] };
const wrap = (task: string) => b1.prompts[0].prompt.replace(/<task>[\s\S]*<\/task>/, () => `<task>\n${task}\n</task>`);
const probes = JSON.parse(fs.readFileSync(path.join(ROOT, 'test', 'fixtures', 'skill-route-feature-title-probes.json'), 'utf8')) as { probes: { id: string; label: string; wrapped: boolean; prompt: string }[] };
const misses = probes.probes.filter(p => {
const d = routePrompt(p.wrapped ? wrap(p.prompt) : p.prompt, [...routed, proveIt]);
const names = d.route ? d.routes.map(r => r.skill) : [];
return p.label === 'bug' ? names[0] !== 'prove-it' : names.includes('prove-it');
}).map(p => p.id);
expect(misses).toEqual(['f14']);
});
test('a bug title led by a noun such as "Support page" or "New tab" is still a bug report when its body names an exception; a feature title is not', () => {
for (const report of ['Support page shows a blank screen\n\nOpening /support renders nothing and the console shows TypeError.',
'New tab opens a blank page\n\nThe console shows TypeError: x is undefined.',
'Add button is greyed out on Safari\n\nClicking it logs a ReferenceError.']) expect(bugReport(report)).toBe(true);
for (const request of ['Support custom headers\n\nToday a request with a custom header fails with a 400 error.',
'Add a retry for uploads\n\nWhen an upload fails we get no error detail.']) expect(bugReport(request)).toBe(false);
});
test('a statement verb after the noun a feature word leads, a fix asked for in the body, or an exception in fenced code outside the tag keeps a bug report one', () => {
const fence = '`'.repeat(3);
for (const report of ['New users see a blank dashboard\n\nOpening it logs TypeError: x is undefined. Please fix.',
'Add to cart button does nothing\n\nClicking it throws an error. It used to work.',
'Support tickets page loads forever\n\nThe request hangs and then crashes the worker.',
'New install shows blank screen\n\nThe log has a ValueError traceback and it crashes. Run the checks after.',
'Expose metrics endpoint returns empty body\n\nThe handler crashes with KeyError.',
'New checkout redirects to login\n\nEvery payment fails with TypeError.',
'Add retry support\n\nUploads crash with ConnectionResetError; please fix that.',
`The app breaks on startup\n\nThe console prints this on startup:\n\n${fence}\nKeyError: user\n${fence}\n\n<steps>\nAdd a file\n</steps>`]) expect([report, bugReport(report)]).toEqual([report, true]);
});
test('the installed bug-fix skill leads when it reaches the threshold beside a gstack skill: an agent runs the first one named (GEVA-562)', () => {
const proveIt = other('prove-it', ['fix this bug', 'prove the fix', 'reproduce the bug in a test']);
const d = routePrompt('Write a test that reproduces the timeout in the upload path, then make the tests pass.', [...routed, proveIt]);