gate 3: stop listing backticked prose as files in scope - #22
Conversation
The files_in_scope extraction matched any backticked span containing a slash, so a backlog entry writing prose like 'contains `/`' produced a work package claiming that prose was a file in scope. A Garden proposing work must describe the work accurately; a package naming files that do not exist is worse than one naming none. Delivered by the drive loop with its test, and the test was CONFIRMED TO FAIL against the previous code before being trusted: × does not treat backticked prose containing a slash as a file in scope This is the first run tonight to both deliver the test its DoD required and have that test genuinely catch the bug. The two before it reported their DoD met and shipped no test at all; the difference here was the brief demanding the fail-first check explicitly. Verified: sdk 161 passed across 12 files. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedNext included review available in 49 minutes. View limit detailsLimit details: You’ve used the included review currently available. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (3)
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe file-scope extraction pattern now requires filename-like paths. An integration test runs ChangesBacklog file-scope extraction
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The change narrows file-scope extraction so backticked prose containing a slash is no longer reported as a file, with a test covering the regression. No actionable merge-blocking risk remains after normal checks and review. Poem
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/settings/billing. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b36226606e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| dependsOn: [select-entry] | ||
| command: >- | ||
| node -e 'const fs=require("node:fs");const entry=JSON.parse(fs.readFileSync(".relayflow/backlog-picker-entry.json","utf8"));const text=entry.title+" "+entry.body;const files=[...new Set([...text.matchAll(/`([^`\s]*\/[^`]*)`/g)].map(match=>match[1]))];const gate=text.match(/\bgate[ -]?(\d+)\b/i);process.stdout.write(JSON.stringify({title:entry.title,description:entry.body,files_in_scope:files,gate:gate?Number(gate[1]):null}))' | ||
| node -e 'const fs=require("node:fs");const entry=JSON.parse(fs.readFileSync(".relayflow/backlog-picker-entry.json","utf8"));const text=entry.title+" "+entry.body;const files=[...new Set([...text.matchAll(/`([A-Za-z._][A-Za-z0-9._-]*(?:\/[A-Za-z0-9._-]+)*\/[A-Za-z0-9_-]+\.[A-Za-z0-9._-]+)`/g)].map(match=>match[1]))];const gate=text.match(/\bgate[ -]?(\d+)\b/i);process.stdout.write(JSON.stringify({title:entry.title,description:entry.body,files_in_scope:files,gate:gate?Number(gate[1]):null}))' |
There was a problem hiding this comment.
Regenerate the canonical backlog-picker spec
When testdata/backlog-picker.spec.canonical.json is checked or consumed directly, it still executes the old permissive matcher because this commit updates only the YAML source. The repository explicitly supports canonical JSON specs, so the checked-in compiled artifact continues emitting backticked prose such as / in files_in_scope; regenerate the canonical file alongside this command change.
Useful? React with 👍 / 👎.
| dependsOn: [select-entry] | ||
| command: >- | ||
| node -e 'const fs=require("node:fs");const entry=JSON.parse(fs.readFileSync(".relayflow/backlog-picker-entry.json","utf8"));const text=entry.title+" "+entry.body;const files=[...new Set([...text.matchAll(/`([^`\s]*\/[^`]*)`/g)].map(match=>match[1]))];const gate=text.match(/\bgate[ -]?(\d+)\b/i);process.stdout.write(JSON.stringify({title:entry.title,description:entry.body,files_in_scope:files,gate:gate?Number(gate[1]):null}))' | ||
| node -e 'const fs=require("node:fs");const entry=JSON.parse(fs.readFileSync(".relayflow/backlog-picker-entry.json","utf8"));const text=entry.title+" "+entry.body;const files=[...new Set([...text.matchAll(/`([A-Za-z._][A-Za-z0-9._-]*(?:\/[A-Za-z0-9._-]+)*\/[A-Za-z0-9_-]+\.[A-Za-z0-9._-]+)`/g)].map(match=>match[1]))];const gate=text.match(/\bgate[ -]?(\d+)\b/i);process.stdout.write(JSON.stringify({title:entry.title,description:entry.body,files_in_scope:files,gate:gate?Number(gate[1]):null}))' |
There was a problem hiding this comment.
Preserve valid directory and extensionless paths
For backlog entries that scope a directory such as regressions/ or an extensionless file such as src/Dockerfile, this matcher now silently omits the path because it requires the final component to contain a dot. Both are valid repository scopes, so work packages for those inputs lose actionable scope information; reject the standalone-slash prose case without restricting paths to extension-bearing filenames.
Useful? React with 👍 / 👎.
…(PR #22 P2s) Two review findings, the first more serious than its label. The canonical spec is what the KERNEL consumes, and PR #22 fixed the path matcher in the flow yaml while leaving the canonical spec carrying the old permissive one. The fix did not reach the thing that runs. That divergence is silent by nature: both files are valid, tests over the yaml pass, and the kernel keeps executing the stale command. There is now a test asserting every step's command matches between the two, and it was confirmed to FAIL against the stale spec: × backlog-picker canonical spec > stays in sync with the flow yaml The matcher also dropped legitimate scopes — a directory like regressions/ or an extensionless file like src/Dockerfile — while still needing to reject prose such as 'contains `/`'. It now accepts both and rejects both prose and malformed paths; seven cases are covered by a test. Verified: sdk 164 passed across 12 files. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Recording immediately after the merge. All four of the picker's properties now have tests confirmed to fail without their fixes, which is the standard the two remaining open PRs are measured against. Worth keeping visible: property 3 exists because a fix landed in the flow yaml while the canonical spec — the thing the kernel actually consumes — kept the old command. That class of divergence is silent: both files valid, tests over the yaml green, stale behaviour in production. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Closes the last open finding from PR #21.
The bug
The
files_in_scopeextraction matched any backticked span containing a slash. A backlog entry writing prose like ``contains `/``` produced a work package claiming that prose was a file in scope.For the component whose job is proposing the system's next task, a package naming files that do not exist is worse than one naming none — it sends whoever picks it up looking for something that was never there.
Verified, in the direction that matters
Against the previous code:
With the fix: passes.
sdk: Test Files 12 passed (12) / Tests 161 passed (161).A note on how this one was produced
This is the first drive run tonight that both delivered the test its definition of done required and produced a test that genuinely catches the bug. The two runs before it reported their DoD met and shipped no test at all — the code was right, the claim was not.
The only thing that changed was the brief, which said every new test must be confirmed to fail against current code before being claimed as passing. That is a prompt, not a gate, so it can be ignored — but it is worth knowing it worked once before building the heavier fix (making the DoD executable so verify runs it, and a missing test fails because the command naming it does not exist). That change is recorded in
ops/BACKLOG.mdand wants a human's view first.🤖 Generated with Claude Code