Repository navigation
[3593 by Claude Opus 5.5] Ultrafix stop notices: report the real last score and a consistent cycle count - #3614
Conversation
…each. The affected suites pass: 482 tests in the root ultrafix suites and 193 in core status/webhook, with no failures. Typecheck and the zero-warning lint pass for the root, `packages/core` and `packages/shared`. 1. `Last score` is now the real score. The loop usually stops right after a fix step, and a fix step has no score, so the notice always said `unknown`. - The loop state now remembers the score of each review that reports one (`lastReviewScore`). - When the loop stops, that score is used if the final step had none. It goes into the stop notice, the stored final score and the status line's `at 6/10`. - The notice now prints `Last score: 6/10`. It says `unknown` only when no review in the loop produced a score. - The CI-timeout stop notice uses the same score. It shares one header builder with the regular stop notice, in the new `src/jobs/ultrafixStopNotice.ts`. 2. One cycle count everywhere. Cycle counting is defined once in `packages/shared/src/ultrafixCycle.ts`: cycle N holds the Nth review and the Nth fix. - While the loop runs, the status line shows the cycle of the step running or due next. This is the same number as before. - When the loop stops, it records the cycle it stopped in. Normally that is the last completed step's cycle. For a fix that hit a blocker, or a review held back by CI, it is the cycle that step would have had. - The stop notice now says `Stopped in cycle 5 of 10.`. The status line after the stop uses the same number: `Ultrafix stopped after 5 cycles at 6/10`, where #3588 said "after 4". - Older loop states without the stored cycle fall back to the old number. - I moved `getActionCounts` into the same shared file, mainly to keep `ultrafixOrchestrationService.ts` under the 400-line lint limit. It is still re-exported from the old place. 3. The leftover `ultrafix` label is removed on merge or close. This happens in the status sync's merged/closed branch, the same place that removes the status block and the title slot. The new code is `removeLeftoverUltrafixLabel` in `pullRequestStatusFacts.ts`. - It is best-effort: if the removal fails, it is logged and the next status update tries again. - It runs on any closed PR that has the label, not only ones ProPR created. Tests added: - In `test/ultrafixContinuationEntryPoint.test.ts`: - a loop that stops after its final fix reports `6/10` and cycle 2 of 2. - a #3588-style stop during a review reports the cycle the status line showed. - a loop that ends before any review scored still says `unknown`. - In `packages/core/test/pullRequestStatusSync.test.ts`, one test checks that the running and stopped status lines agree, and one checks the label removal (merged, closed, and a failed first try). - I updated the existing CI-timeout wording test in `test/ultrafixCiWait.test.ts` for the new format. When to stop and how many cycles to run are unchanged. The only extra Redis write is the score stored on the state write that already happens after each review. I made no preview images because the changes are text in GitHub comments and the PR status line.
|
/ultrafix goal=8 max=6 |
|
🔄 Ultrafix loop started (goal: 8/10, max cycles: 6) First action:
|
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR addresses score preservation, consistent stopped-cycle reporting, and leftover label cleanup with focused changes. It is merge-ready within the reviewed scope, conditional on the five pending checks completing successfully. ✅ Consistent final scores — ✅ Compatible cycle reporting — New terminal states record ✅ Scoped label cleanup — Cleanup runs for closed or merged PRs, preserves unrelated labels, and handles removal failures without blocking status maintenance. This was a static review of the supplied diff and context; no commands or tests were run. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Test timeout score fallbackAdd a regression that records a scored review, completes a fix without a score, and then reaches a CI timeout. Assert that both the saved terminal state and rewritten notice retain the review score and expected cycle. The supplied timeout tests cover wording and comment replacement, but do not directly exercise this combined fallback path. This is optional additional coverage. ScoreThe changes are focused and include relevant regression coverage. No merge-blocking defect was established; current checks report no failures, with five still pending. Score: 9/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
CI failed: Full Test Suite Shard 4/4 Please investigate and fix this CI failure.
Failure evidence
|
|
CI failed: Run Full Test Suite Please investigate and fix this CI failure.
Failure evidence
|
Full Test Suite ResultsValidation failed during: Test shard (shard 4).
View shard 4/4 outputDetails truncated; see the uploaded artifacts for complete failure rows and logs. |
|
✅ Applied the requested follow-up changes in commit 61b255d Processed 3 comments:
Summary of ChangesI fixed the Shard 4/4 failure with a one-line change to the test. The failure was a timing flake in What failed: The subtest "a newer admission generation is not deferred by a live older-generation holder" stopped with Cause:
Fix: The test now runs Verification: I built Redis 7.2.7 from source and ran the suite 3 times through The "Run Full Test Suite" failure is only the summary of the failed shard, so it needs no separate fix. There are no preview images because nothing visible changed. Review digestRisk-tiered paths
Validation evidence
Diff size: 1 file changed, +4/−0 lines 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
… test. The failure was a timing flake in `test/agentCapacityAliasOccupancy.test.ts` and has nothing to do with this PR's ultrafix changes: the test and the capacity code it checks weren't touched.
I fixed the Shard 4/4 failure with a one-line change to the test. The failure was a timing flake in `test/agentCapacityAliasOccupancy.test.ts` and has nothing to do with this PR's ultrafix changes: the test and the capacity code it checks weren't touched.
**What failed:** The subtest "a newer admission generation is not deferred by a live older-generation holder" stopped with `Missing expected rejection: an old-generation job is still deferred`.
**Cause:**
- The test keeps an old-generation holder alive on a short lease. The lease lasts 600 ms and is renewed every 200 ms.
- Partway through, the test calls `checkJobAgentCapacity` for the first time. That call loads `@propr/core` on demand.
- Loading `@propr/core` takes about 2.8 s and runs in chunks that pause everything else. Locally each pause was up to 124 ms, with the machine otherwise idle.
- On a busy CI machine those pauses can delay the renewals until the lease runs out. The old-generation check then sees a free slot and doesn't refuse, which is what the test expected it to do.
- The failed subtest took 2.07 s, which matches the module loading inside the test.
**Fix:** The test now runs `await import('@propr/core')` before the short lease starts, with a comment explaining why. The later call then finds the module already loaded and no longer stalls. The test still checks the same things.
**Verification:** I built Redis 7.2.7 from source and ran the suite 3 times through `scripts/run-test-suite.mjs` with `PROPR_REQUIRE_REDIS_INTEGRATION=1`, the setting CI uses. It passed each time, 5 of 5 tests. I couldn't recreate the CI load locally, so the original failure wasn't reproduced here. The cause above comes from the CI log and the pause timing I measured.
The "Run Full Test Suite" failure is only the summary of the failed shard, so it needs no separate fix. There are no preview images because nothing visible changed.
PR: #3614
Comment by: @propr-dev[bot] (ID: 6935539877)
Comment by: @propr-dev[bot] (ID: 6935560493)
Comment by: @github-actions[bot] (ID: 6935562083)
Model: Claude Opus 5.5
AI Implementation Summary
Closes #3593
Branch:
3593/claude-opus-5-5-ultrafix-stop-notices-rep-20261117-0116-3m4Commits: ✅ Changes committed (55162f5)
AI Processing Completed
Execution Details:
Summary:
I fixed all three problems from #3593 and added regression tests for each. The affected suites pass: 482 tests in the root ultrafix suites and 193 in core status/webhook, with no failures. Typecheck and the zero-warning lint pass for the root,
packages/coreandpackages/shared.1.
Last scoreis now the real score. The loop usually stops right after a fix step, and a fix step has no score, so the notice always saidunknown.lastReviewScore).at 6/10.Last score: 6/10. It saysunknownonly when no review in the loop produced a score.src/jobs/ultrafixStopNotice.ts.2. One cycle count everywhere. Cycle counting is defined once in
packages/shared/src/ultrafixCycle.ts: cycle N holds the Nth review and the Nth fix.Stopped in cycle 5 of 10.. The status line after the stop uses the same number:Ultrafix stopped after 5 cycles at 6/10, where [3556 by Claude Opus 5.5] Official plugin: Linear (start work from a ticket, keep the ticket in sync) #3588 said "after 4".getActionCountsinto the same shared file, mainly to keepultrafixOrchestrationService.tsunder the 400-line lint limit. It is still re-exported from the old place.3. The leftover
ultrafixlabel is removed on merge or close. This happens in the status sync's merged/closed branch, the same place that removes the status block and the title slot. The new code isremoveLeftoverUltrafixLabelinpullRequestStatusFacts.ts.Tests added:
test/ultrafixContinuationEntryPoint.test.ts:6/10and cycle 2 of 2.unknown.packages/core/test/pullRequestStatusSync.test.ts, one test checks that the running and stopped status lines agree, and one checks the label removal (merged, closed, and a failed first try).test/ultrafixCiWait.test.tsfor the new format.When to stop and how many cycles to run are unchanged. The only extra Redis write is the score stored on the state write that already happens after each review. I made no preview images because the changes are text in GitHub comments and the PR status line.
Review digest
Risk-tiered paths
packages/core/src/services/pullRequestStatus/pullRequestStatus.ts(+5/−2)packages/core/src/services/pullRequestStatus/pullRequestStatusFacts.ts(+32/−0)packages/core/src/services/pullRequestStatus/pullRequestStatusSync.ts(+2/−1)packages/shared/src/index.ts(+1/−0)packages/shared/src/ultrafixCycle.ts(added, +54/−0)src/jobs/ultrafixCiWait.ts(+16/−7)src/jobs/ultrafixLoopContinuation.ts(+1/−0)src/jobs/ultrafixLoopContinuationHelpers.ts(+13/−3)src/jobs/ultrafixOrchestrationService.ts(+15/−21)src/jobs/ultrafixStopNotice.ts(added, +18/−0)packages/core/test/pullRequestStatusSync.test.ts(+57/−0)test/ultrafixCiWait.test.ts(+2/−2)test/ultrafixContinuationEntryPoint.test.ts(+68/−0)Validation evidence
Diff size: 13 files changed, +284/−36 lines
Detailed Logs:
7746d9b7-b073-4eeb-9271-b10b13c8e96dLog files stored at:
/usr/src/app/logs/executions/issue-3593-2026-11-17T01-38-22-680Z-conversation.json/usr/src/app/logs/executions/issue-3593-2026-11-17T01-38-22-680Z-output.txtLatest Conversation Messages
This PR was created automatically by ProPR after processing issue #3593.
💡 Need changes?
Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!