Repository navigation
Conversation
Add a warn-by-default content pre-flight that runs at chain start, before the first worktree is provisioned. It surfaces four cheap problems over the chained issues: - missing/empty Acceptance Criteria section - a declared blocker (`Blocked by #N` / `depends on #N`) that runs AFTER the issue in the CLI order - a predicted file-overlap (reusing assess-collision-detect) whose CLI order contradicts the ascending land order - an issue that is CLOSED on GitHub (#305-consistent; #592 gap noted) Per #604, warnings never block by default; the new `--strict-preflight` flag makes any warning fatal before provisioning. Checks compare against the RAW CLI order (not the dep-sorted order) so `run 39 38 --chain` where #39 is blocked by #38 still warns. A gh fetch failure warn-degrades rather than aborting the run. New module src/lib/workflow/chain-preflight.ts (pure compute + gh fetch), invoked from RunOrchestrator.run(); adds strictPreflight to RunOptions and --strict-preflight to bin/cli.ts. Unit tests cover each warning class against verbatim issue-body fixtures. Entire-Checkpoint: c69c1388ccf5
This was referenced Jul 15, 2026
…eflight QA gap fixes on the #762 pre-flight. Prose false positive: parseDeclaredBlockers matched the marker anywhere in a body, so #762's own issue parsed as blockers=[38, 36] — both from prose examples ("...when #39 says blocked by #38", 'real markers like "Blocked by #36"'). Under --strict-preflight a bogus warning hard-aborts a legitimate chain, which is precisely the false inference #604 calls worse than none. The marker is now anchored to line start (allowing list-item and bold forms), inline code spans are stripped alongside fences and HTML comments, and the "#" is required so "Blocked by 5 days of review" cannot parse as issue #5. Verified against the real corpus: the three genuine declarations still parse (#155 -> 107, #188 -> 187, #223 -> 219), #31's in-fence example stays ignored, and #762 now yields no blockers. Also adds --strict-preflight to the two flag tables that list every comparable run flag (run-command.md, cheat-sheet.md); it previously existed only in --help and the CHANGELOG. Tests: 21 pass (4 new, incl. a verbatim-#762-prose regression); the two rewritten cases encoded the mid-line matching being fixed.
This was referenced Jul 15, 2026
admarble
added a commit
that referenced
this pull request
Jul 15, 2026
PR #764 added --strict-preflight to the flag tables, but nothing documented what the pre-flight actually does. Users see up to four warning classes printed at chain start with no reference explaining what triggered them or whether to act. Adds a "Chain Pre-flight" section to run-command.md next to Chain Mode and QA Gate Mode, matching how --qa-gate is documented (flag row plus narrative): the four warning classes and their triggers, the warn-by-default rule, why the checks run against the typed order rather than the sorted one, the line-leading marker rule, and --strict-preflight for CI. Claims verified against the shipped code: the chain && length > 1 gate, exit code 1, the four warning kinds, the fetch-degrade note, and the sample warning text quoted verbatim from the message template. Table/line-length style matches the file's existing tables (markdownlint is not wired to CI; this file already carries 46 MD060 and 37 MD013 of the same kind). Entire-Checkpoint: 6331fb4954a3
6 tasks
6 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
Adds a lightweight, warn-by-default content pre-flight for
sequant run --chain(#762). Chain validation previously checked only flag combinations; nothing inspected the content of the issues being chained, so a mis-ordered or unready chain (the #133 downstream-staleness class) sailed through to worktree provisioning.The pre-flight runs once at chain start, before the first worktree is provisioned, and surfaces four cheap problems:
Blocked by #N/depends on #N) whose target runs after it in the CLI order.assess-collision-detect— no new heuristics) whose CLI order contradicts the ascending land order.Per the #604 philosophy (suggest, never auto-decide), warnings never block by default; the new
--strict-preflightflag turns any warning into a hard stop before provisioning. Checks compare against the raw CLI order (not the dep-sorted order), sorun 39 38 --chainwhere #39 declaresBlocked by #38still warns rather than being silently pre-fixed bysortByDependencies. Aghfetch failure warn-degrades (that issue's checks are skipped) so the pre-flight never breaks a run.Key files
src/lib/workflow/chain-preflight.ts— new module: purecomputePreflightWarnings(unit surface) +ghfetch inrunChainPreflight.src/lib/workflow/run-orchestrator.ts— invoke pre-flight inrun()before worktree setup; threads raw CLI order via newResolvedRun.rawIssueOrder.src/lib/workflow/types.ts+bin/cli.ts—strictPreflightoption +--strict-preflightflag.src/lib/workflow/chain-preflight.test.ts— 17 tests, one per warning class, verbatim fixtures.Pre-PR AC Verification
computePreflightWarnings; "all three classes at once" test asserts exactly 3 warningsrun-orchestrator.ts); unit tests cover warn-only. See known gap belowassess-collision-detect(extractPathsFromIssueBody+detectFileCollisions) — no new heuristicsstate === "CLOSED"warning; message cites #592; closed-issue testBlocked by #38, real## Acceptance Criteriaheadings; no synthetic combined fixtureDerived AC
run 39 38 --chainwhere #39 depends-on #38 still warns)rawIssueOrderthreaded through; regression test at[39, 38]Known gap
ensureWorktreesChainpath is verified by code inspection + type-check, not a fullrun()integration test — no orchestrator run-harness withgh/state/worktree mocking exists, and building one would be brittle for marginal value. The abort logic is a plain early-return placed above the worktree block; the pure warning computation is fully unit-tested.Test plan
npm run build— passesnpm run lint— passes (0 warnings)npx vitest run src/lib/workflow/— 976 pass, 2 skippednpx vitest run src/lib/workflow/chain-preflight.test.ts— 17 passnode dist/bin/cli.js run --helpshows--strict-preflightCloses #762