feat: docs/prds/ci-auto-retry.md#102
Conversation
DiffGuard AI AnalysisAI Review Summary🏆 Overall Score: 88/100 This PR implements a CI auto-retry feature for the Night Watch executor, enabling automatic resumption of ready-review PRs with failed CI checks. The implementation is well-structured with comprehensive test coverage and clear documentation. ✅ Key Strengths
|
| Issue Type | Issue Name | Affected Components | Description | Impact/Severity |
|---|---|---|---|---|
| Maintainability | Complex jq Filter | scripts/night-watch-helpers.sh |
The failed-CI detection jq filter is complex and difficult to reason about, with nested definitions and transformations. | Medium |
| Testing | Missing Edge Case Tests | Test file | Tests don't cover edge cases like mixed CI states (some checks failed, some pending) or API rate limiting scenarios. | Low |
| Security | Potential Concurrent Runs | scripts/night-watch-cron.sh |
The SKIP_PRD_CLAIM=1 path bypasses the claim mechanism, potentially allowing duplicate work on the same failed-CI PR. |
Low |
🔚 Conclusion
This is a well-implemented feature with solid test coverage and clear documentation. The main follow-ups are maintainability concerns around complex jq logic and a potential race condition in the skip-claim path. Consider addressing the concurrency concern before merge, but other improvements can be follow-ups.
Analyzed using z-ai/glm-5
DiffGuard AI AnalysisAI Review Summary🏆 Overall Score: 82/100 This PR implements CI auto-retry functionality for executor PRs with a well-structured PRD, comprehensive test coverage for the selection logic, and clean integration into the existing cron workflow. A few maintainability concerns and potential edge cases around environment variables and missing PRD files warrant attention. ✅ Key Strengths
|
| Issue Type | Issue Name | Affected Components | Description | Impact/Severity |
|---|---|---|---|---|
| Maintainability | Undocumented Env Vars | scripts/night-watch-helpers.sh |
NW_EXECUTOR_READY_REVIEW_LABEL and NW_PR_RESOLVER_READY_LABEL are used but not defined in the diff. |
Medium |
| Testing | Missing Integration Coverage | scripts/night-watch-cron.sh |
No tests for the full failed-CI repair workflow in the cron script, relying on manual verification per Phase 3. | Low |
| Maintainability | Synthetic PRD Name Usage | scripts/night-watch-cron.sh |
When RESUME_WITHOUT_PRD_FILE=1, ELIGIBLE_PRD is set to a non-existent filename used in logging/tracking. |
Low |
🔚 Conclusion
This is a solid implementation of the CI auto-retry feature with good test coverage and thoughtful handling of edge cases. The primary follow-up is ensuring the environment variables are properly documented or defaulted. The PR is merge-ready with minor documentation improvements recommended.
Analyzed using z-ai/glm-5
DiffGuard AI AnalysisAI Review Summary🏆 Overall Score: 83/100 This PR implements CI auto-retry for Night Watch executor PRs with comprehensive test coverage for the helper function. The implementation follows existing patterns well, though the cron script logic has grown complex with multiple conditional branches for handling different resume scenarios. ✅ Key Strengths
|
| Issue Type | Issue Name | Affected Components | Description | Impact/Severity |
|---|---|---|---|---|
| Performance | Duplicate API Calls | night-watch-helpers.sh |
Two sequential gh pr list calls increase API rate consumption and latency. |
Low |
| Maintainability | Complex Conditional Branching | night-watch-cron.sh |
Multiple interleaved conditionals for RESUME_FAILED_CI and ISSUE_NUMBER combinations make logic harder to follow. |
Medium |
| Testing | No Cron Script Coverage | night-watch-cron.sh |
The CI repair workflow paths (lines 695-740, 937-970, 1201-1231) lack automated test coverage. | Medium |
🔚 Conclusion
This is a solid implementation that follows existing patterns and includes good helper-level tests. The feature logic appears correct for the defined contracts. Consider adding integration tests for the cron workflow branches before or shortly after merge, and monitor for opportunities to refactor the conditional complexity.
Analyzed using z-ai/glm-5
|
Overnight Night Watch sweep: merge conflicts in are too risky to auto-resolve (orchestration script). Left detailed resolution plan in PR body. Needs manual rebase. |
|
a1dddc7 to
bcc67f7
Compare
Status
This PR is currently blocked by merge conflicts in
scripts/night-watch-cron.shagainstorigin/master.Conflict summary
night-watch/98-docs-prds-ci-auto-retry-mdis 23 commits behindorigin/master.scripts/night-watch-cron.shbecause master introduced the audit-triage workflow (is_audit_board_issue,is_tiny_audit_board_issue,build_audit_triage_prompt, etc.) in the same region where this PR adds the failed-CI retry prompt logic.Next step
Manual rebase + conflict resolution required. The correct resolution should:
skip_if_job_paused, audit-triage helpers, and lean-audit workflow.RESUME_FAILED_CI/RESUME_FAILED_CI_SUMMARYvariables and the failed-CI retry prompt, but place them after the audit-triage branch so both paths coexist.Do not merge until
yarn verifypasses in a clean worktree