fix(resolve): render base branch in summaries and repair BRANCH_INFO phase DAG - #309
Merged
Conversation
…phase DAG
Four seam defects in the /resolve command's phase-dependency annotations
and one user-visible rendering bug:
1. Unrendered template token (user-visible): resolution-summary.md wrote
`{base}` literally because Step 0b never extracted base_branch. Fixed
by extracting base_branch and updating the template token to
{base_branch}, matching the byte-identical line in bug-analysis.mds:247.
The Git agent's validate-branch op already returns the value
(git.md:177-181); it was being returned and discarded.
2. Dangling requirement: Phases 1b and 9c declared `Requires: PR_INFO`
but PR_INFO has no producer anywhere in resolve.mds or its partials.
Renamed to BRANCH_INFO, which Step 0b produces and which bundles
pr_number (matching bug-analysis.mds).
3. Over-declaration: Phases 2 and 4 declared BRANCH_INFO but consume no
branch value — triage.md declares no branch input, and Phase 4 Code
spawn passes CREATE_PR: false + PUSH: false making code.md's only
BASE_BRANCH use unreachable. Removed.
4. Under-declaration: Phases 5 and 10 consume BRANCH_INFO (and Phase 5
also TARGET_DIR) without declaring it. Added, ordered to match
code-review.mds:274 and bug-analysis.mds:239.
Net: BRANCH_INFO is produced once (Step 0b) and required at five genuine
consumption sites. PF-024 class — untyped, unchecked command→agent
boundary.
Verified: npm run build:mds (13 compiled, 0 errors/warnings); 597 tests
across 23 files passing.
Co-Authored-By: Claude <noreply@anthropic.com>
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
{base}token instead of the actual base branch name — everyresolution-summary.mdever produced by/resolvecontained the unresolved placeholder.resolve.mdsrepaired so the command's internal DAG is self-consistent and matches the sibling commands (bug-analysis.mds,code-review.mds).What Was Broken
1. Unrendered template token (user-visible)
The resolution-summary template contained
**Branch**: {branch} -> {base}, but Step 0b's extract list never declaredbase_branchas an output variable. Every generatedresolution-summary.mdrendered{base}literally. Fixed by extractingbase_branchin Step 0b and renaming the template token to{base_branch}.Sibling-file evidence:
bug-analysis.mds:247carries the byte-identical template line and works correctly because its Step 0b already extractsbase_branch. The Git agent'svalidate-branchop returns**Base**: {base_branch}(src/assets/agents/git.md:177-181) — the value was available and being discarded.2. Dangling
PR_INFOrequirement (PF-024 class)Phases 1b and 9c declared
**Requires:** PR_INFO, butPR_INFOhas no producer anywhere inresolve.mdsor its MDS partials. Renamed toBRANCH_INFO, which Step 0b does produce and which already bundlespr_number(matchingbug-analysis.mds).3. Over-declaration of
BRANCH_INFOPhases 2 and 4 declared
BRANCH_INFObut consume no branch value:triage.mddeclares no branch input, and Phase 4 Code spawns withCREATE_PR: false+PUSH: false, makingcode.md's onlyBASE_BRANCHuse unreachable. Removed from both.4. Under-declaration at real consumption sites
Phases 5 and 10 consume
BRANCH_INFO(Phase 5 also consumesTARGET_DIR) without declaring it in**Requires:**. Both declarations added, ordered to matchcode-review.mds:274andbug-analysis.mds:239.Net effect
BRANCH_INFOis now produced once (Step 0b) and required at exactly five genuine consumption sites. The DAG is internally consistent. This is a PF-024-class seam fix — the command→agent boundary is an untyped, unchecked call site where annotation rot is the only guardrail.Verification
npm run build:mds— 13 commands compiled, 0 errors, 0 warnings.tests/resolve/,tests/ambient.test.ts,tests/build-mds.test.ts,tests/agent-name-guards.test.ts,tests/decisions/,tests/bug-analysis/).Related Issues
None.