fix(sdd-dispatch): unwedge cascade on task-close and at sdd:review#139
Conversation
Two companion blockers that stall the dispatch cascade: 1. Re-dispatch-on-close walked 0 hops. The route job seeded the task->Unit->tracker walk from `payload.issue.parent_issue_url`, which the `issues.closed` webhook leaves empty even for native sub-issues. The walk broke on the first hop, logged "walked 0 hops; ignoring", and the cascade never re-fired on a task PR merge. Re-fetch the closed issue via REST (which populates parent_issue_url) to seed the walk; the upward hops already re-fetch each parent. (#133) 2. The tracker advances to sdd:review while open, unstarted task sub-issues remain (sdd-execute moves it there once the first layer of impl PRs opens). The compute precondition then refused /dispatch at sdd:review with refuse_late, and close-triggered re-dispatch had nothing to resume. Accept sdd:review as a valid /dispatch precondition: arm sdd:dispatched and fan out the remaining ready tasks, leaving the lifecycle label to sdd-execute. Only sdd:done now refuses as late. (#134) Contract doc and lock regenerated to match (gh aw compile). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe PR refines the sdd-dispatch cascade to handle webhook payload gaps and expands Changessdd-dispatch cascade and precondition fixes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/sdd-dispatch.md:
- Around line 116-129: The paragraph describing preconditions is
self-contradictory: it allows the `/dispatch` command at sdd:review but still
states that sdd:dispatched is only applied alongside sdd:in-progress; update the
text to reflect that sdd:dispatched can also be set from sdd:review (when the
dispatcher arms sdd:dispatched and fans out tasks) or rephrase to say that
sdd:dispatched is normally applied with sdd:in-progress except on the cascade
path from sdd:review; adjust the sentence mentioning sdd:dispatched and
sdd:in-progress to reference the cascade exception and/or sdd:review and
sdd:execute so the invariant is no longer contradictory.
In `@wrappers/sdd-dispatch.yml`:
- Around line 346-350: Update the stale precondition comment for /dispatch in
wrappers/sdd-dispatch.yml so it matches the implemented behavior: change the
note that "sdd:dispatched is only applied alongside sdd:in-progress" to state
that sdd:dispatched may be applied alongside sdd:in-progress or sdd:review
(because this PR can arm dispatched from review), and clarify that a cascade
fire skips the tracking-issue label check for those cases; apply the same
wording fix to the other occurrence around lines 359-361.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: a02e236e-5cd6-4c9f-a708-ddfb7d8402bf
📒 Files selected for processing (3)
.github/workflows/sdd-dispatch.lock.yml.github/workflows/sdd-dispatch.mdwrappers/sdd-dispatch.yml
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Root cause
#133 — re-dispatch-on-close walks 0 hops. The route job seeds the
task → Unit → tracker walk with
cursor = payload.issue, then readscursor.parent_issue_url. Theissues.closedwebhook payload does notpopulate
parent_issue_urlon the closed issue (GitHub omits thechild → parent pointer from the event body), so the walk breaks on the
first hop,
walkedstays 0, the route logs "walked 0 hops; ignoring",and
compute/dispatchare skipped. Closing a task PR never re-fires thecascade.
#134 — tracker advances to sdd:review while tasks remain.
sdd-executemoves the feature to
sdd:reviewonce the first layer of impl PRs opens,before later-layer task sub-issues are dispatched. The
computeprecondition then refused
/dispatchatsdd:review(refuse_late), andclose-triggered re-dispatch had nothing to resume.
compute()can derivereadiness from the graph; only the lifecycle-state gate blocked fan-out.
Fix
#133 — re-fetch the closed issue via
github.rest.issues.getbeforewalking, which populates
parent_issue_url, then seedcursorfrom that.The upward hops already re-fetch each parent, so only the seed needed the
explicit fetch. Lowest-cost reliable approach (one extra GET on the closed
task), matching the existing
sdd-validatewrapper pattern.#134 — accept
sdd:reviewas a valid/dispatchprecondition(option b): arm
sdd:dispatchedand fan out the remaining ready tasks,leaving the lifecycle label to
sdd-execute. Onlysdd:donenow refusesas late. The cascade path already skipped the precondition check, so this
unblocks both
/dispatchand close-triggered re-dispatch fromsdd:review.Edited the wrapper
wrappers/sdd-dispatch.yml(the runtime source of truthfor this deterministic agent) and the
sdd-dispatch.mdcontract doc, thenran
gh aw compileto regeneratesdd-dispatch.lock.yml.Acceptance
compute+dispatchand arms every newlyunblocked task within one cycle; a multi-Unit feature drains to
sdd:donewith no manual/dispatch.sdd:review:/dispatchon atracker with remaining ready tasks fans out regardless of
sdd:review.References
Closes #133
Closes #134
🤖 Generated with Claude Code