Repository navigation
Conversation
parseDependencies matched its 'depends on' marker anywhere in an issue body with an optional #, so prose mentions, in-fence examples, and lines describing other issues parsed as real declarations — and sortByDependencies silently reordered the run on them. Extract the hardened pre-flight mechanics (line anchoring, required #, code/comment stripping) from chain-preflight.ts into a shared dependency-markers.ts parser, keeping the marker set per-caller: the pre-flight honors 'depends on' and 'blocked by'; the sorter honors only 'depends on' so it does not start reordering on 'blocked by'. Label parsing is untouched. Tests use the verbatim issue bodies from #767's evidence table. Closes #767 Entire-Checkpoint: 2255710168b5
6 tasks
QA follow-ups on the shared-parser extraction. 1. Moving `stripCodeAndComments` out of `chain-preflight.ts` stranded the cross-reference PR #770 added an hour earlier: `assess-collision-detect.ts` still warned "Do NOT unify this with `chain-preflight.ts:stripCodeAndComments`" — a function that no longer exists there. That note is the only guard against a silent-empty-set bug: unifying the two strip helpers deletes every path PATH_REGEX matches. A dev who follows the pointer, finds nothing, and concludes the note is stale is the exact failure #770 exists to prevent. Repointed to `dependency-markers.ts`. Moving a function has to carry its prose references, not just its call sites. 2. `stripCodeAndComments` was exported but has no consumer outside its module — it was private in `chain-preflight.ts`. An exported symbol implies a public API that #770's note is warning people away from. Restored to private. Swept for other stale references to the moved symbols: `BLOCKER_MARKER_REGEX` is gone everywhere, and the surviving `chain-preflight.ts:parseDeclaredBlockers` pointer is still accurate. Comment/visibility only — no behavior change. Build, lint clean; 48 files / 1092 tests pass.
Closed
9 tasks
4 tasks
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.
Summary
parseDependencies(batch-executor.ts) matched itsdepends onmarker anywhere in an issue body with an optional#and no code/comment stripping, so prose (Issue 14 depends on 12+13), in-fence examples, quoted tool output, and lines describing other issues all parsed as real declarations — andsortByDependenciessilently reordered the run on them (5/7 false positives against a real 36-issue corpus).#, fence/inline-code/HTML-comment stripping) fromchain-preflight.tsinto one shareddependency-markers.tsparser, so the two regexes cannot drift.depends on+blocked by; the sorter honors onlydepends on— sharing the parser does not make the sorter start reordering onblocked by(a new silent-reorder class; feat: lightweight content pre-flight for --chain (AC presence, dependency-order sanity) #762 Open Q Doctor: Add Claude Code CLI check #3). Label parsing (depends-on/123) is untouched.Pre-PR AC Verification
Depends on: #Nstill parsesdependency-markers.test.ts— verbatim #19/#31/#111/#325 negatives →[], #188/#223 positives →[187]/[219]depends on 12+13no longer parses as #12 (the#is required)buildMarkerRegexuses mandatory#(\d+); explicit test + #19 fixturedepends-on/123parsing unchangedbatch-executor.tsuntouched;parseDependencieslabel tests (mockedgh)dependency-markers.ts:parseBodyDependencyMarkers, imported bybatch-executor.ts+chain-preflight.ts__fixtures__/dependency-markers/, loaded in testsDesign decision (Open Q #1)
Shared the hardened mechanics but kept the marker set per-caller (
parseBodyDependencyMarkers(body, markers)). Making the sorter honorblocked bywould be a real, unrequested behavior change (new silent reorders) — deferred as out of scope, consistent with #762 Open Q #3. Open Q #2 (announce reorders) is a separate UX follow-up, not bundled here.Test plan
npm run build— passesnpm run lint— passes (0 warnings)npm test(targeted:dependency-markers,chain-preflight,batch-executor) — 84 passedCloses #767
🤖 Generated with Claude Code