Repository navigation
fix(#960): /loop's orchestrated Step 1A trusts embedded promptContext instead of re-fetching from GitHub - #962
Merged
admarble merged 4 commits intoAug 24, 2026
Conversation
…ing GitHub getPhasePrompt() now wraps appended promptContext in a SEQUANT_PROMPT_CONTEXT sentinel; /loop's Step 1A checks its own invocation for that sentinel first and skips the gh issue view fetch when present, falling back to the fetch only when absent. Standalone Step 1B (log file) is unchanged.
…asePrompt's own The sentinel's JSDoc had been inserted between getPhasePrompt's docstring and the function itself, leaving that docstring describing the wrong symbol. Found in self-review.
3 tasks
… recommendations - Gate test now builds its sentinel assertions from the imported PROMPT_CONTEXT_SENTINEL constant instead of hardcoded literals, so a rename of the TS constant fails the gate until the skill text follows (#871-class TS<->prose drift). - Step 1A now states the embedded block's gap list IS the recommendations (the QA-comment parsing greps extract nothing from the block shape) and scopes the 'already filtered' claim to the gap list only — batch-executor's Suggestions:/Last output: sections are raw, unfiltered context.
admarble
deleted the
feature/960-bug-loop-orchestrated-step-1a-re-fetches-qa-fi
branch
August 24, 2026 05:57
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
/loop's orchestrated Step 1A unconditionally re-fetched QA findings viagh issue view, ignoring thepromptContextblockready-gate.ts/batch-executor.tsalready embed into loop's own invocation prompt — undersequant ready, QA defers comment-posting to the orchestrator, so the fetch found nothing and silently fell back to a stale/unrelated comment (reproduced live dogfooding feat(qa/loop/ready): structured gap findings — finite taxonomy with required evidence, replacing the lossy prose-scrape gap channel #937 against fix(fullsolve): Phase 5.3 auto-merges the PR — the skill's own stop-list says to halt at the final summary #958/PR fix(#958): gate /fullsolve's PR merge behind --auto-merge, off by default #959).getPhasePrompt(src/lib/workflow/phase-executor.ts) now wraps the appendedpromptContextin a<!-- SEQUANT_PROMPT_CONTEXT -->/<!-- /SEQUANT_PROMPT_CONTEXT -->sentinel;/loop's Step 1A (all 3 skill mirrors) checks its own invocation for that sentinel first and skips the GitHub fetch when present, falling back to the fetch only when absent./loop <N>(noSEQUANT_ORCHESTRATOR) — Step 1B, log-file mode — is unchanged.Pre-PR AC Verification
/loopwith an embeddedpromptContextparses it and skipsgh issue viewsrc/lib/workflow/phase-executor.ts(PROMPT_CONTEXT_SENTINEL,getPhasePrompt),.claude/skills/loop/SKILL.md§Step 1A (step-1a-context-source (#960)), gate testsrc/lib/__tests__/loop-context-source-skill.test.ts, unit testphase-executor.test.tssequant readydogfood run with a genuinefix_nowgap shows/loopreflecting fresh QA datafix_nowgap undersequant readyto dogfood against — not reproducible synthetically inside this PR's implementation. Recommend running as a follow-up dogfood pass against the next qualifying issue and posting the transcript to #960./loop <N>unaffected — still fetches from GitHub/log fileSEQUANT_PROMPT_CONTEXT/gh issue viewreferences (mutation-verified: leaking a sentinel mention into Step 1B breaks the AC-3 test)Mutation Verification
Mutation-verified: AC-1 — replaced "Check your own invocation first" sentinel-check phrase in Step 1A; 2 AC-1 assertions in
loop-context-source-skill.test.tsfailed; restored.Mutation-verified: AC-1 — removed the sentinel wrap in
getPhasePrompt'sbasePrompt +=line; the new sentinel unit test inphase-executor.test.tsfailed; restored.Mutation-verified: AC-3 — inserted a stray "check for SEQUANT_PROMPT_CONTEXT" line into Step 1B; the AC-3 guard test failed; restored.
Test plan
npx vitest run src/lib/workflow/phase-executor.test.ts -t "getPhasePrompt"— 10/10 passnpx vitest run src/lib/__tests__/loop-context-source-skill.test.ts— 21/21 passnpm run build,npm run lint— cleannpm test(full suite) — 273 test files, 5626 passed, 1 pre-existing expected-fail, 2 skipped (no regressions)npm run lint:skill-sync— 44 synced, 0 divergedCloses #960
🤖 Generated with Claude Code
Follow-up (validation pass)
PROMPT_CONTEXT_SENTINELconstant instead of hardcoded literals — a rename of the TS constant's value now fails the gate until the skill text follows.recommendations, and scopes the "already filtered" claim to the gap list only (batch-executor'sSuggestions:/Last output:are raw, unfiltered context).Mutation-verified: AC-1 — renamed the TS sentinel constant's value; 9 gate assertions failed across all 3 skill mirrors (previously this rename passed both suites — the drift hole this commit closes); restored.
Mutation-verified: AC-1 — deleted the gap-list-to-recommendations bullet from Step 1A; the new mapping assertion failed; restored.