fix: scope automatic DRC re-runs to non-terminal shuttles (#270) - #276
fix: scope automatic DRC re-runs to non-terminal shuttles (#270)#276mithro wants to merge 5 commits into
Conversation
|
Warning Review limit reached
Next review available in: 41 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
WalkthroughAdds a shuttle-status exclusion method, applies it to automatic DRC requeue candidate selection, and adds tests covering the exclusion contract, scoped requeueing, and the manual DRC update path. ChangesDRC requeue shuttle scope
Estimated code review effort: 3 (Moderate) | ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
aaabf73 to
f0c57e7
Compare
0181f91 to
c2bb4fc
Compare
…#270) Automatic DRC re-runs currently re-check every design regardless of shuttle status. Spec restricts the automatic requeue task to skip designs whose shuttle is in production/completed/cancelled, while keeping no-shuttle drafts and all pre-fab states in scope. The manual "Recheck with Latest" path stays unrestricted. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YbruzLzKewfcCUHVoyFnSq
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YbruzLzKewfcCUHVoyFnSq
…270) Single source of truth for the shuttle states (production/completed/cancelled) that should be skipped by AUTOMATIC DRC re-runs. Mirrors the existing ManufacturabilityCheck.Status.active()/.terminal() classmethod pattern. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YbruzLzKewfcCUHVoyFnSq
checks_drc_update_requeue now excludes designs whose shuttle is in production/completed/cancelled via Shuttle.Status.drc_recheck_excluded(). Uses .exclude() so no-shuttle drafts (NULL status) and any future shuttle status stay in scope. The shared create_check_drc_update() model method is untouched, so the manual "Recheck with Latest" path is unaffected. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YbruzLzKewfcCUHVoyFnSq
Locks in the requirement that create_check_drc_update() (the shared method behind the manual "Recheck with Latest" button) succeeds regardless of shuttle status, so the scope filter never leaks out of the automatic task. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YbruzLzKewfcCUHVoyFnSq
c2bb4fc to
a03c11f
Compare
Summary
Fixes #270. The automatic DRC re-run task (
checks_drc_update_requeue, Celery beat every 60s) re-checked every design on every precheck-version bump, regardless of shuttle status — wasting Docker capacity re-running DRC on designs already in fabrication, manufactured, or on cancelled shuttles, and letting those re-runs compete for the dedicated 25%-capacity DRC-update pool.This scopes only the automatic task to skip designs whose shuttle is
production/completed/cancelled. Designs with no shuttle (drafts) and all pre-fab states (planning/open/full/locked) stay in scope.The manual "Recheck with Latest" button is deliberately left fully usable in every shuttle state — the shared
create_check_drc_update()model method is untouched, so a human can always re-check.Changes
Shuttle.Status.drc_recheck_excluded()(wafer_space/shuttles/models.py) — single source of truth returning[IN_PRODUCTION, COMPLETED, CANCELLED]; mirrors the existingManufacturabilityCheck.Status.active()/.terminal()pattern.checks_drc_update_requeue(wafer_space/projects/tasks_checks.py) — one.exclude(project_file__project__shuttle__status__in=...)clause on the candidate queryset..exclude()(not.filter(status__in=included)) is required so NULL-shuttle drafts and any future shuttle status stay in scope.Design docs
docs/superpowers/specs/2026-06-25-drc-requeue-shuttle-scope-design.mddocs/superpowers/plans/2026-06-25-drc-requeue-shuttle-scope.mdTest plan
test_scopes_by_shuttle_status— parametrized over all 7 shuttle states + no-shuttle draft; asserts only{no-shuttle, planning, open, full, locked}are re-queued and{production, completed, cancelled}are skipped (one candidate per run, so the throttle can't mask which design was chosen).test_not_blocked_by_terminal_shuttle_status—create_check_drc_update()still succeeds forproduction/completed/cancelleddesigns (manual path unaffected).Shuttle.Status.drc_recheck_excluded()contract test.make lintclean,make type-checkclean (278 files), affected suites: 283 passed; full projects + shuttles sweep: 967 passed.🤖 Generated with Claude Code
https://claude.ai/code/session_01YbruzLzKewfcCUHVoyFnSq
Summary by CodeRabbit