mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-23 08:31:44 +01:00
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:
1 parent
b3323f47b8
commit
596ff8a7cc
6 files changed
+337
-10
No files matched your search
@@ -0,0 +1 @@
|
||||
**The prompt router stops sending feature requests to your bug-fix skill.** A request whose title asks for something new ("[Feature]: …", "Support …", "Add …") no longer counts as a bug report because its body mentions an error, unless the title itself names a defect, the body asks for a fix, or the body follows an issue template (steps to reproduce, expected or actual behavior). On 34 fixed probes, 15 of 16 feature requests no longer name the bug-fix skill (3 did before), and all 18 bug reports still do.
|
||||
@@ -40,14 +40,14 @@ The off switch is for people. The text the Stop hook shows the model never menti
|
||||
The hook scores the prompt against the `triggers:` list in each installed `SKILL.md` (`~/.claude/skills/*/SKILL.md`, or `$CLAUDE_CONFIG_DIR/skills`). It makes no model call and no network request, and the same prompt always gets the same answer.
|
||||
|
||||
- A trigger scores 1 when its whole phrase appears in the prompt. Otherwise it scores the share of its content words (common words dropped, light stemming, so "failing" matches "fails") that the prompt contains. A trigger with one content word counts only on its whole phrase, unless that word has five or more letters and is not a question word.
|
||||
- A bug report is full of everyday words (find, test, run, site) and defect words, so they never add up to a request by themselves. A trigger only partly present needs one of its five-letter-or-longer words, other than the defect word, among the words it shares: "pip cannot find the package and the install fails" no longer matches "find bugs on site". A trigger made only of shorter everyday words, with no defect word, needs them within 8 words of each other: a report that mentions a "call site" and, much later, "regression tests" no longer matches "test the site" (GST-3123).
|
||||
- A bug report is full of everyday words (find, test, run, site) and defect words, so they never add up to a request by themselves. A trigger only partly present needs one of its five-letter-or-longer words, other than the defect word, among the words it shares: "pip cannot find the package and the install fails" no longer matches "find bugs on site". A trigger made only of shorter everyday words, with no defect word, needs them within 8 words of each other, and the defect word counts as everyday unless the prompt reads as a bug report: a report that mentions a "call site" and, much later, "regression tests" no longer matches "test the site" (GST-3123).
|
||||
- Of gstack's own skills, only /review, /qa and /verify route (/investigate did too until it was cut, GST-1717). In the d7 check (PR #3912), scoring every gstack skill's triggers sent 17 of 32 non-fit Terminal-Bench prompts to some skill at 0.66; routing only the four routed skills of that time sent 4. The other gstack skills wait for their own trigger review.
|
||||
- Any other installed skill that lists `triggers:` in its own SKILL.md routes too (GST-3123). No host but gstack reads that field, so writing it is how a skill asks gstack to route it. A skill is gstack's own when its directory holds `.gstack-owned`, its SKILL.md links into gstack's checkout, or its name is one gstack generates or installs as an alias. A skill built from a gstack-style template, with the same generated-file banner, is not gstack's own.
|
||||
- An installed skill's triggers are used only when its name is letters, digits, `_`, `:` and `-`, it lists at most 12 triggers of at most 200 characters, and every trigger is letters, digits, spaces and `. , ' ? ! / -`. Otherwise the whole skill is skipped and named in `gstack-skill-route --explain` and the routing log, so trigger text cannot leave its quotes or add markup or shell characters to the hook's line. The quoted trigger is still the skill author's own words, so install only skills you trust.
|
||||
- Another installed skill's trigger needs at least two content words; a defect word counts as one word however it is spelled, so "error", "the crash" and "error exception" are each one. Shorter triggers are skipped and named the same way, and the skill keeps its others (GST-3142): a lone defect word would otherwise claim most bug reports.
|
||||
- The skills that reach the threshold, 0.66 (both words of a two-word trigger, or two of three), are ranked by score; at the same score gstack's own skill comes first, then the trigger with more matched words, then the name. The line names the top skill, or the top two different skills: "this request fits /verify or /notes. Run the one that fits better ...".
|
||||
- A bug report goes to the installed skill that claims bug reports, named alone, whatever the other triggers score (GST-3237). A skill claims bug reports when one of its triggers names the defect and fixing it, and nothing else ("fix this bug", "reproduce the bug in a test"); a trigger that names its own target ("fix lint errors", "fix postgres bugs") claims only that kind of fix. gstack's own routed skills only check work, so they never claim one, and /verify is never named ahead of the bug-fix skill. A prompt that holds one of /review's or /qa's own triggers as a phrase, its words in order with only common words such as "my" or "the" added between them ("review this pr for bugs", "find bugs on my site"), and never asks for a fix keeps that skill, since finding bugs is not fixing one; a report that only shares a trigger's words ("the site crashes during the smoke test", "a PR review page throws TypeError") does not. With none installed, a report of a defect still routes on triggers, but never to /review or /qa unless it holds such a phrase or one of their triggers' words in the same order with other small words in place of the trigger's ("review my PR, the login page is broken" keeps /review): three long first-draft reports that said "we test the site" or "find" and "broken" went to /qa (GSTA-759). "Test the site and fix what you find" reports no defect and keeps /qa. When the bug-fix skill reaches the threshold beside a gstack skill on a prompt that is not read as a bug report, it is named first, because an agent follows the first name: in GEVA-562's Codex run, Sol loaded /verify on all 7 tasks where /verify was named before prove-it, and prove-it on none. In B1d's in-sample run (gstack-evals #385), Opus 5.5 loaded prove-it in 29 of 33 sessions when the line named it alone and in none of the 20 where it was not named, and took /verify in 4 of the 7 where /verify came first. On B1's 60 in-sample prompts the line now names prove-it alone on all 46 bug reports; before, it named prove-it on 40 of the 60 and put /verify first on 7 of those (the labelled prompts are eval material and no longer live in this repository; gstack's router tests use 60 synthetic prompts of the same shape, `test/fixtures/skill-route-synthetic-prompts.json`).
|
||||
- A prompt reads as a bug report on one strong sign: a word for what went wrong (bug, crash, hang, stuck, leak, wrong, incorrect, unexpected, regression and the like), an exception name such as `ValueError`, the verb fix, an issue template's expected or actual heading ("expected behavior", "steps to reproduce", "correct output"), a failure verb ("fails", "failed to", "doesn't work"), a "should X, not Y" or "should X, but Y" correction, a regression ("started with 0.19", "used to work", "no longer"), a security hole or lost data. Feature requests use error, exception and failure as nouns ("add error handling", "a custom exception class"), so those words, a negated verb or "never", "should" or "must", "instead of" and a word for an unwanted outcome (lost, ignored, dropped, twice) are weak signs, and it takes two different ones. None of the 60 plain prompts in `test/fixtures/skill-route-plain-prompts.txt` reads as a bug report. On the 60 first-draft synthetic prompts (`test/fixtures/skill-route-synthetic-first-draft.json`, held in: the rules above were written after reading them), 42 of the 46 bug reports name prove-it alone, up from 32, and 1 of the 14 feature requests does.
|
||||
- A prompt reads as a bug report on one strong sign: a word for what went wrong (bug, crash, hang, stuck, leak, wrong, incorrect, unexpected, regression and the like), an exception name such as `ValueError`, the verb fix, an issue template's expected or actual heading ("expected behavior", "steps to reproduce", "correct output"), a failure verb ("fails", "failed to", "doesn't work"), a "should X, not Y" or "should X, but Y" correction, a regression ("started with 0.19", "used to work", "no longer"), a security hole or lost data. Feature requests use error, exception and failure as nouns ("add error handling", "a custom exception class"), so those words, a negated verb or "never", "should" or "must", "instead of" and a word for an unwanted outcome (lost, ignored, dropped, twice) are weak signs, and it takes two different ones. A request whose title (its first line, or the first line inside its first tag such as `<task>` when nothing outside that tag names a defect, standing alone) starts with a word that asks for something new ("[Feature]", "feat:", "Enhancement", "Add", "Support", "Allow", "Implement", "Introduce", "Provide", "Expose", "New") is not a bug report, whatever errors its body mentions, unless the title itself names a defect (any strong or weak sign, the verb fix, or an error status such as "returns 404"), the body asks for a fix, or the body follows an issue template (steps to reproduce, expected or actual behavior). A title whose feature word leads a noun phrase and a verb that says what happens ("Support page shows a blank screen", "New users see a blank dashboard", "New tab is empty") states a symptom, so it is no feature title. That is how gstack-evals draws its non-fit tasks, and 13 of its 27 such tasks routed to the bug-fix skill before (GEVA-558). On the 34 probes in `test/fixtures/skill-route-feature-title-probes.json`, fixed before the rule was written, 15 of the 16 feature requests no longer name the bug-fix skill and all 18 bug reports still name it first; before this rule, 3 of the 16 and 18 of the 18 did (on main, 4 of the 16 and 16 of the 18). The miss, a feature title that says "no longer", is listed in the test. None of the 60 plain prompts in `test/fixtures/skill-route-plain-prompts.txt` reads as a bug report. On the 60 first-draft synthetic prompts (`test/fixtures/skill-route-synthetic-first-draft.json`, held in: the rules above were written after reading them), 42 of the 46 bug reports name prove-it alone, up from 32, and 1 of the 14 feature requests does.
|
||||
- Words a bug report uses for the defect (error, exception, traceback, crash, fails, failure, broken, regression, incorrect, wrong, defect, and exception names such as `ValueError`) score as "bug", so "parse_one raises ValueError, please fix" matches a "fix this bug" trigger. Paths and identifiers stay whole (`site-packages`, `src/review.ts`, `max_retries`), so a traceback's paths never match a trigger's words.
|
||||
- Triggers and the bug-report signs read only the prompt's prose. Markdown code, meaning inline code in backticks and fenced code blocks as CommonMark reads them, is left out, so a command quoted in backticks never routes a prompt (#4564): "Run `mycli check` now" no longer matches "run the checks", "Run `gh pr review 123`" no longer matches "review this pr", and a `--fix` flag or the word broken in a pasted log is not a bug report. The prose around the code still routes ("run the checks, then `git push`"). One sign still reads the code: an exception name as code writes it (`KeyError`, `NullPointerException`), since a quoted error or a pasted traceback reports a bug.
|
||||
- When a trigger ties with another of the same skill on score and words, a whole-phrase match wins.
|
||||
|
||||
+56
-8
@@ -277,9 +277,10 @@ const PARAGRAPH_BREAK = /(\n[ \t]*\n)/;
|
||||
* A prompt split into its prose and its Markdown code, as CommonMark reads them: fenced code blocks (an unclosed fence
|
||||
* runs to the end) and inline code spans (a backtick run closed by the next run of the same length in its paragraph; an
|
||||
* unmatched run is prose). A command quoted in backticks names the command; it does not ask for anything, so triggers
|
||||
* match the prose only (#4564). Each run looks up its closer once, so a long prompt full of unmatched runs stays linear.
|
||||
* match the prose only (#4564). Each run looks up its closer once, so a long prompt full of unmatched runs stays linear. An inline
|
||||
* span that matches keep stays in the prose as plain text.
|
||||
*/
|
||||
export function splitCode(prompt: string): { prose: string; code: string } {
|
||||
export function splitCode(prompt: string, keep?: RegExp): { prose: string; code: string } {
|
||||
const prose: string[] = [];
|
||||
const code: string[] = [];
|
||||
let fence = '';
|
||||
@@ -288,7 +289,7 @@ export function splitCode(prompt: string): { prose: string; code: string } {
|
||||
if (fence) {
|
||||
if (m && m[1][0] === fence[0] && m[1].length >= fence.length && !m[2].trim()) fence = '';
|
||||
else code.push(line);
|
||||
prose.push('');
|
||||
prose.push(m === null && keep?.test(line) ? line : '');
|
||||
} else if (m && !(m[1][0] === '`' && m[2].includes('`'))) {
|
||||
fence = m[1];
|
||||
prose.push('');
|
||||
@@ -308,8 +309,9 @@ export function splitCode(prompt: string): { prose: string; code: string } {
|
||||
const close = closer[i];
|
||||
if (close === undefined) continue;
|
||||
const open = runs[i];
|
||||
code.push(part.slice(open.index + open[0].length, runs[close].index));
|
||||
out += `${part.slice(at, open.index)} `;
|
||||
const inner = part.slice(open.index + open[0].length, runs[close].index);
|
||||
code.push(inner);
|
||||
out += `${part.slice(at, open.index)}${keep?.test(inner) ? inner : ' '}`;
|
||||
at = runs[close].index + runs[close][0].length;
|
||||
i = close;
|
||||
}
|
||||
@@ -392,6 +394,7 @@ export function scorePrompt(prompt: string, skills: InstalledSkill[]): RouteCand
|
||||
const seq = tokens(scored);
|
||||
const promptSeq = ` ${seq.join(' ')} `;
|
||||
const promptSet = new Set(contentTokens(scored));
|
||||
const reported = bugReport(prompt);
|
||||
const out: RouteCandidate[] = [];
|
||||
for (const skill of skills) {
|
||||
let best: RouteCandidate | null = null;
|
||||
@@ -404,7 +407,7 @@ export function scorePrompt(prompt: string, skills: InstalledSkill[]): RouteCand
|
||||
const phrase = promptSeq.includes(` ${tokens(trigger).join(' ')} `);
|
||||
const weakSingle = content.length === 1 && !SPECIFIC_WORD.test(content[0]);
|
||||
const thinPartial = matched < content.length && !shared.some(w => w !== 'bug' && SPECIFIC_WORD.test(w));
|
||||
const everyday = !content.some(w => w === 'bug' || SPECIFIC_WORD.test(w));
|
||||
const everyday = !content.some(w => (w === 'bug' && reported) || SPECIFIC_WORD.test(w));
|
||||
const scattered = matched === content.length && everyday && !within(seq, content, EVERYDAY_SPAN);
|
||||
const score = phrase ? 1 : weakSingle || thinPartial || scattered ? 0 : Math.round((matched / content.length) * 100) / 100;
|
||||
const tie = !!best && score === best.score && (matched > best.matched || (matched === best.matched && phrase && !bestPhrase));
|
||||
@@ -452,6 +455,49 @@ const WEAK_SIGNS = [/\b(?:errors?|exceptions?|failures?|failed)\b/,
|
||||
const defectSign = (text: string) => words(text).some(w => SYMPTOM_STEMS.has(stem(w)) || /^[a-z]{3,}(?:error|exception)$/.test(w))
|
||||
|| STRONG_SIGN.test(text);
|
||||
|
||||
/**
|
||||
* A feature request's title: the prose's first line, or the first line inside the prose's first lone opening tag such as <task>
|
||||
* when the prose outside that tag names no defect, standing alone (a blank line, the prompt's edge or a lone tag on each side),
|
||||
* whose first word, after any leading #, asks for something new and is followed by a space or a colon, the way gstack-evals
|
||||
* draws its non-fit tasks. Its body may name an error or a failing case (GEVA-558: 13 of 27 feature-titled tasks routed as bug
|
||||
* reports), so it is no bug report unless the title names a defect (any strong or weak sign, the verb fix, or an error status
|
||||
* it returns), the body asks for a fix, or the body follows an issue template (steps to reproduce, expected or actual behavior).
|
||||
* A title whose feature word leads a noun phrase and a statement verb (NOUN_LED: "Support page shows a blank screen", "New users
|
||||
* see a blank dashboard") states a symptom and asks for nothing.
|
||||
*/
|
||||
const FEATURE_TITLE = /^(?:\[?feature(?: request)?\]?|feat(?:\([^)]*\))?:|enhancement|add|adds|adding|support|allow|implement|introduce|provide|expose|new)(?=[\s:]|$)/i;
|
||||
const NOUN_LED = new RegExp(String.raw`^(?:feature|support|new|add|allow|expose)\s+(?!(?:a|an|the|for|us)\s)(?:to\s+)?`
|
||||
+ String.raw`(?:(?!(?:that|which|who|whose|where|when|if|so|to)\s)[\w-]+\s+){1,3}(?:(?:is|are|was|were|has|have|had|do|does|did|sees?|shows?|loads?`
|
||||
+ String.raw`|returns?|redirects?|displays?|renders?|opens?|closes?|stays?|appears?|disappears?|keeps?|looks?|says?|prints?|takes?|goes|gets?)\b`
|
||||
+ String.raw`|[a-z]+(?:[^s\W]s|ed)\s+(?:a|an|the|no|nothing)\b)`, 'i');
|
||||
const LONE_TAG = /^\s*<\/?[A-Za-z][\w-]*>\s*$/;
|
||||
const ERROR_STATUS = /\b(?:returns?|returning|gives?|giving|throws?|responds? with)\s+(?:an?\s+)?(?:http\s+)?[45]\d\d\b/;
|
||||
const TEMPLATE_SIGN = /\b(?:steps to reproduce|(?:expected|actual) (?:behaviou?r|result|output))\b|(?:^|\n)\s*(?:expected|actual):/;
|
||||
const lowered = (text: string) => text.toLowerCase().replace(/[\u2019`]/g, "'").replace(/\s+/g, ' ');
|
||||
function featureTitled(prose: string): boolean {
|
||||
if (TEMPLATE_SIGN.test(prose.toLowerCase())) return false;
|
||||
const lines = prose.split('\n');
|
||||
const edge = (l: string | undefined) => l === undefined || !l.trim() || LONE_TAG.test(l);
|
||||
const namesDefect = (raw: string) => {
|
||||
const text = lowered(raw);
|
||||
return defectSign(text) || WEAK_SIGNS.some(re => re.test(text)) || words(text).some(w => FIX_WORD.test(w)) || ERROR_STATUS.test(text);
|
||||
};
|
||||
const titled = (i: number) => {
|
||||
const line = lines[i];
|
||||
if (line === undefined || LONE_TAG.test(line) || !edge(lines[i - 1]) || !edge(lines[i + 1])) return false;
|
||||
const title = line.trim().replace(/^#+\s*/, '');
|
||||
return FEATURE_TITLE.test(title) && !NOUN_LED.test(title) && !namesDefect(title);
|
||||
};
|
||||
const first = lines.findIndex(l => l.trim());
|
||||
if (first < 0) return false;
|
||||
if (titled(first)) return true;
|
||||
const open = lines.findIndex(l => LONE_TAG.test(l));
|
||||
if (open < 0 || lines[open].trim().startsWith('</')) return false;
|
||||
const close = lines.findIndex((l, i) => i > open && l.trim() === `</${lines[open].trim().slice(1)}`);
|
||||
const outside = [...lines.slice(0, open), ...(close < 0 ? [] : lines.slice(close + 1))].join('\n');
|
||||
return titled(lines.findIndex((l, i) => i > open && l.trim())) && !namesDefect(outside);
|
||||
}
|
||||
|
||||
/** The verb fix, as a prompt asks for one. */
|
||||
const FIX_WORD = /^(?:re-)?fix(?:es|ing)?$/;
|
||||
|
||||
@@ -460,16 +506,18 @@ const EXCEPTION_NAME = /\b[A-Z][A-Za-z0-9]*(?:Error|Exception)\b/;
|
||||
|
||||
/**
|
||||
* What the window (promptWindow) of the prompt's prose (splitCode) reports: a defect (one strong sign or two different weak
|
||||
* ones) and whether it asks for a fix (the verb fix). Its code counts only
|
||||
* ones) and whether it asks for a fix (the verb fix), both false under a feature title (featureTitled). Its code counts only
|
||||
* for an exception name, since a pasted traceback or a quoted `KeyError` reports one; a flag such as `--fix` or the word
|
||||
* broken in a log does not.
|
||||
*/
|
||||
function reportSigns(prompt: string): { defect: boolean; fix: boolean } {
|
||||
const { prose, code } = splitCode(prompt);
|
||||
const text = promptWindow(prose).toLowerCase().replace(/[\u2019`]/g, "'").replace(/\s+/g, ' ');
|
||||
const fix = words(text).some(w => FIX_WORD.test(w));
|
||||
if (!fix && featureTitled(promptWindow(splitCode(prompt, EXCEPTION_NAME).prose))) return { defect: false, fix: false };
|
||||
return {
|
||||
defect: EXCEPTION_NAME.test(promptWindow(code)) || defectSign(text) || WEAK_SIGNS.filter(re => re.test(text)).length >= 2,
|
||||
fix: words(text).some(w => FIX_WORD.test(w)),
|
||||
fix,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
+244
@@ -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."
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -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'],
|
||||
|
||||
@@ -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]);
|
||||
|
||||
Reference in new issue
Block a user