Plan #607 (Beta) — Wave-pattern feature MCP additions (sdlc-server side)#421
Merged
Plan #607 (Beta) — Wave-pattern feature MCP additions (sdlc-server side)#421
Conversation
#417) wave_finalize returned `no_artifacts` during Plan #581 because the per-wave cleanup that runs as part of `wave_complete` correctly wiped the wavebus directory the finalize handler depended on for body assembly. The kahuna→main MR could not be opened autonomously and the operator had to fall back to a hand-rolled `gh pr create`. This change keeps cleanup aggressive but adds a fallback: when the bus dir contains no flight artifacts, the handler re-derives the MR body from `<project>/.claude/status/{phases-waves.json,state.json}` — the durable wave-status state files, which survive cleanup. The bus is still preferred when present; durable state is the post-cleanup safety net. Trade-off: durable state has no per-flight grouping (mr_urls is keyed by issue#, not flight), so the fallback body groups by wave only, with one bullet per issue under each `### <wave-id>` heading. For Plan #581-shaped campaigns where most flights are single-issue, the rendered shape is the same. Three regression tests added: - bus empty + state intact → finalize succeeds with state-derived body - bus empty + state empty → still returns `no_artifacts` (legitimate) - bus present + state present → bus wins (precedence preserved) Closes #415 Co-authored-by: Baker B <bakerb@users.noreply.github.com>
Sanctioned idle-wait tool for wave-pattern Orchestrators (and Primes)
blocking on filesystem-bus completion artifacts. Polls signal_path
every 5s until min_count matches exist or timeout_sec elapses. Accepts
literal paths or Bun.Glob patterns. Returns matched paths + elapsed_sec
on success, or timed_out + partial_matches on timeout.
Replaces ad-hoc Bash(sleep) loops and the agent-anxiety failure mode
where idle loops are exited prematurely (pattern_sanctioned_fidget_tool).
- handlers/wave_wait_for_signal.ts — handler with __runWithDeps test seam
- tests/wave_wait_for_signal.test.ts — schema + matchSignal + loop semantics
- tests/integration/orchestrator-wait-on-flights.test.ts — real-fs scenario
- docs/tools.md — per-tool reference (seeded)
- docs/wave-pattern-orchestration.md — canonical Orchestrator-wait example
Implementation uses Bun.Glob (not node:fs) to remain immune to
mock.module('fs') leakage from sibling tests
(lesson_bun_native_apis.md).
Closes #414
Co-authored-by: Baker B <bakerb@users.noreply.github.com>
When the head ref has no required status checks, return at t=0 with
{ status: 'no_checks_required', elapsed_sec, mergeable, blocker? }
instead of polling to timeout. Mergeable PRs return mergeable=true with
no blocker; obstructed PRs (draft/closed/conflicts/...) return
mergeable=false with a typed blocker.
Polling-loop behavior for non-empty rollups is unchanged.
Closes #416
Co-authored-by: Baker B <bakerb@users.noreply.github.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.
Plan #607 (Beta) — sdlc-server side
3 mcp-server-sdlc issues from Plan #607 (Beta), all merged into kahuna/607-beta. Companion to claudecode-workflow's kahuna→main MR.
Wave 1a — Reliability fixes
Wave 4a — Wave-pattern feature completion
Closes Wave-Engineering/claudecode-workflow#607 (PM-side; this MR delivers the sdlc-server portion of that Plan)