Skip to content

fix(resolve): render base branch in summaries and repair BRANCH_INFO phase DAG - #309

Merged
dean0x merged 1 commit into
mainfrom
fix/resolve-branch-info-dag
Aug 28, 2026
Merged

fix(resolve): render base branch in summaries and repair BRANCH_INFO phase DAG#309
dean0x merged 1 commit into
mainfrom
fix/resolve-branch-info-dag

Conversation

@dean0x

@dean0x dean0x commented Aug 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • Resolution summaries were rendering a literal {base} token instead of the actual base branch name — every resolution-summary.md ever produced by /resolve contained the unresolved placeholder.
  • Four phase-dependency annotation defects in resolve.mds repaired 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 declared base_branch as an output variable. Every generated resolution-summary.md rendered {base} literally. Fixed by extracting base_branch in Step 0b and renaming the template token to {base_branch}.

Sibling-file evidence: bug-analysis.mds:247 carries the byte-identical template line and works correctly because its Step 0b already extracts base_branch. The Git agent's validate-branch op returns **Base**: {base_branch} (src/assets/agents/git.md:177-181) — the value was available and being discarded.

2. Dangling PR_INFO requirement (PF-024 class)

Phases 1b and 9c declared **Requires:** PR_INFO, but PR_INFO has no producer anywhere in resolve.mds or its MDS partials. Renamed to BRANCH_INFO, which Step 0b does produce and which already bundles pr_number (matching bug-analysis.mds).

3. Over-declaration of BRANCH_INFO

Phases 2 and 4 declared BRANCH_INFO but consume no branch value: triage.md declares no branch input, and Phase 4 Code spawns with CREATE_PR: false + PUSH: false, making code.md's only BASE_BRANCH use unreachable. Removed from both.

4. Under-declaration at real consumption sites

Phases 5 and 10 consume BRANCH_INFO (Phase 5 also consumes TARGET_DIR) without declaring it in **Requires:**. Both declarations added, ordered to match code-review.mds:274 and bug-analysis.mds:239.

Net effect

BRANCH_INFO is 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.
  • 597 tests across 23 files passing (tests/resolve/, tests/ambient.test.ts, tests/build-mds.test.ts, tests/agent-name-guards.test.ts, tests/decisions/, tests/bug-analysis/).
  • No test pins any of the changed literals.

Related Issues

None.

…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>
@dean0x
dean0x merged commit 61c5b24 into main Aug 28, 2026
2 checks passed
@dean0x
dean0x deleted the fix/resolve-branch-info-dag branch August 28, 2026 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant