Complete Wan overnight optimization pack - #6
Conversation
|
Warning Review limit reached
Next review available in: 40 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: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughAdds an unattended, resumable campaign runner with CLI controls and durable reports, plus Wan gated-residual and modulated LayerNorm specifications, corpora, Triton starters, and expanded correctness tests. ChangesOvernight campaign runner
Wan fusion pack
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant CLI as campaign.py
participant Runner as run_campaign
participant Agent
participant Orchestrator as orchestrate.py
participant Workspace as workspace/
CLI->>Runner: run campaign with budget and resume options
Runner->>Workspace: write prompt and initial receipt
Runner->>Agent: execute campaign prompt with timeout
Agent->>Workspace: write overnight_agent.log and summary
Runner->>Orchestrator: collect campaign report
Orchestrator->>Workspace: update orchestration_state.json
Runner->>Workspace: write morning_report.md and final receipt
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
autokernel/campaign/runner.py (1)
259-296: 🩺 Stability & Availability | 🔵 TrivialConsider a lock/guard against concurrent
run_campaigninvocations.Two overnight runs launched against the same
repo_root/workspace(e.g. a stray cron plus a manual retry) would race oncampaign_receipt.json, the log file, and the agent's workspace, since there is no lock file or PID guard. Worth a lightweight safeguard (e.g. a PID lock file checked before_reset_runtime_files).🤖 Prompt for 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. In `@autokernel/campaign/runner.py` around lines 259 - 296, The run_campaign workflow needs a lightweight per-workspace concurrency guard before any reset or preparation occurs. Add a PID lock for workspace around the existing fresh_run/_reset_runtime_files flow, reject concurrent invocations with a clear CampaignError, and ensure the lock is released when run_campaign exits while preserving normal resume and cleanup behavior.
🤖 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 `@autokernel/campaign/runner.py`:
- Around line 277-286: Require explicit spec trust before campaign execution:
update run_campaign() in autokernel/campaign/runner.py to accept and propagate a
trust_specs value instead of hardcoding True; add a --trust-specs flag to the
run subparser in campaign.py and pass it to run_campaign(), failing closed when
absent; update README.md to document the run command’s Python spec-locator trust
and code-execution requirement alongside prepare.
- Around line 337-355: Guard the subprocess.Popen call in run_campaign with
handling for OSError, including FileNotFoundError, so launch failures do not
escape after the receipt is marked running. On failure, record the clean
terminal failure status and associated error/report through the existing receipt
and morning-report mechanisms, then return using the established run_campaign
failure path.
In `@campaign.py`:
- Around line 121-137: Update the CLI flow surrounding run_campaign and the
receipt["status"] handling so terminal non-success statuses, especially
"agent_failed", print a failure verdict and return a nonzero exit code instead
of always printing CAMPAIGN_RUN: PASS and returning 0. Preserve the existing
success behavior for completed campaigns and the CampaignError handling, and use
the receipt status to distinguish the outcomes.
---
Nitpick comments:
In `@autokernel/campaign/runner.py`:
- Around line 259-296: The run_campaign workflow needs a lightweight
per-workspace concurrency guard before any reset or preparation occurs. Add a
PID lock for workspace around the existing fresh_run/_reset_runtime_files flow,
reject concurrent invocations with a clear CampaignError, and ensure the lock is
released when run_campaign exits while preserving normal resume and cleanup
behavior.
🪄 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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: db972da0-cda3-46b6-8e58-8b9efe5c88e2
📒 Files selected for processing (15)
CHANGELOG.mdREADME.mdautokernel/campaign/__init__.pyautokernel/campaign/runner.pyautokernel/campaign/types.pycampaign.pykernels/wan_gated_residual.pykernels/wan_modulated_layer_norm.pymodels/wan_gated_residual.pymodels/wan_gated_residual_corpus.jsonmodels/wan_modulated_layer_norm.pymodels/wan_modulated_layer_norm_corpus.jsontests/test_campaign.pytests/test_gpu_smoke.pytests/test_wan_additional_targets.py
- Require explicit --trust-specs before campaign.py run loads Python spec locators, matching the prepare gate - Record a terminal agent_launch_failed receipt and morning report when the agent process cannot be spawned - Map non-success terminal statuses to CAMPAIGN_RUN: FAIL with a non-zero exit code so unattended callers can gate on the CLI Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015dGTVqeg1AohwtT6PN1nYe
Summary
Validation
387 passed, 10 deselectedcampaign.py run --dry-runDetailed results are in
docs/WAN_KERNEL_RESULTS.md.