Skip to content

[3419 by GPT-6.1 Sol] Nightly test health - #3420

Merged
integry merged 2 commits into
mainfrom
3419/gpt-6.1-sol-nightly-test-health-20261104-1146-32n
Nov 17, 2026
Merged

integry merged 2 commits into
mainfrom
3419/gpt-6.1-sol-nightly-test-health-20261104-1146-32n

Conversation

@propr-dev

@propr-dev propr-dev Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

AI Implementation Summary

Closes #3419

Branch: 3419/gpt-6.1-sol-nightly-test-health-20261104-1146-32n
Commits: ✅ Changes committed (2557b79)


AI Processing Completed

Execution Details:

  • Issue: Nightly test health #3419
  • Repository: integry/propr
  • Status: Success
  • Execution Time: 6m 14s
  • Tokens used: 1.06M tokens [1.05M input + 8.07K output]
  • API cost: $0.31
  • Timestamp: Nov 4, 2026, 11:53 AM UTC
  • LLM Model: GPT-6.1 Sol

Summary:
Implemented the reindex fixes:

  • Prevented enqueueing from overwriting a fast worker’s terminal status.
  • Added deadline-aware, cancellable polling with progress diagnostics and branch matching.
  • Added regression coverage.

Validation: 46 tests passed; repository and CLI type checks passed. Live E2E could not run because its API and repository settings are unavailable. The artifact’s separate plan-generation failures require server logs to diagnose.

Detailed Logs:

  • Conversation: 63 messages
  • Session: 01a1a664-3f10-7f13-82c7-8334489c50d6

Log files stored at:

  • conversation: /usr/src/app/logs/executions/issue-3419-2026-11-04T11-53-17-679Z-conversation.json
  • output: /usr/src/app/logs/executions/issue-3419-2026-11-04T11-53-17-679Z-output.txt
Latest Conversation Messages

This PR was created automatically by ProPR after processing issue #3419.


💡 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!

Implemented by ProPR AI using gpt-6.1-sol model.

Implementation completed successfully.
@propr-dev propr-dev Bot changed the title [3419 by GPT-6.1 Sol] Nightly test health ✅ [3419 by GPT-6.1 Sol] Nightly test health Nov 14, 2026
@integry

integry commented Nov 16, 2026

Copy link
Copy Markdown
Owner

/review astra fable

@propr-dev propr-dev Bot changed the title ✅ [3419 by GPT-6.1 Sol] Nightly test health 🔨 [3419 by GPT-6.1 Sol] Nightly test health Nov 16, 2026
@propr-dev

propr-dev Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @integry

Posted 2 reviews:

View Task Details

@propr-dev

propr-dev Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — astra

Overall Evaluation

The PR addresses the fast-worker status race and makes indexing polling bounded and cancellable. It needs a localized correction before merge: enqueue failure now changes how a subsequent full reindex executes.

✅ Correct write ordering — Persisting indexing before queue.add() prevents a fast worker’s terminal status from being overwritten after enqueueing.

✅ Bounded polling — Requests and sleeps share a deadline, support cancellation, and report the last observed progress when the polling budget expires.

✅ Focused regression coverage — Added tests cover fast-worker completion and failure, enqueue rejection, cancellation, and successful-trigger branch matching. Current checks report 37 passed, 23 neutral/skipped, and no failures.

This review uses the supplied code and context; no commands or tests were run.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F1: 🔴 Enqueue failure downgrades subsequent full reindex

  • Category: correctness

  • Required behavior: A full reindex must retain its requested semantics when retried after enqueue failure; failure to submit a job must not imply that partially completed indexing should be resumed.

  • Evidence: packages/api/routes/indexingQueueHelpers.ts, queueIndexingJob — new enqueue-error status write.

    1. A repository has completed indexing and existing summaries. The caller requests a full reindex to regenerate those summaries.
    2. The helper selects effectiveFullReindex = true, writes indexing, and calls queue.add().
    3. Enqueueing rejects before accepting the job. The new catch handler persists failed, although no indexing work occurred.
    4. The caller retries the full reindex. The existing resume-on-failure branch reads failed and changes effectiveFullReindex to false.
    5. The worker receives an incremental job. For unchanged files, identifyStaleFiles and the no-files path leave existing file summaries in place, so the requested full regeneration does not occur.

    The branch-specific status writes and enqueue regression test do not prevent this: the test explicitly expects failed but never exercises a subsequent full-reindex request. static trace: verified through the supplied full-reindex downgrade logic, new catch handler, worker payload consumer, and stale-file/no-files paths.

  • Minimum fix: Preserve the distinction between enqueue failure and indexing execution failure. For a rejected enqueue, restore the prior status or otherwise ensure the next explicit full reindex is not downgraded solely because submission failed. Add coverage for a completed repository whose full-reindex enqueue fails and is then retried.

Suggestions

These are optional follow-ups and are not sent to /fix.

S1: 🟢 Match branches after queued responses

When the trigger reports “already queued” and no branch was supplied, test/e2e/indexing.ts still falls back to the first repository row. A completed unrelated branch can therefore satisfy the wait. This behavior predates the PR, so it is optional follow-up work. Resolve the effective branch consistently on this path and add a multiple-branch regression test.

Score

The central race fix and polling improvements are well targeted, with green current checks. The enqueue-failure recovery regression requires a small correction before merge.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 54s
  • Tokens: 49,009 (47,879 in / 1,130 out)
  • Cost: $0.43

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix F1 S1

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — fable

Overall Evaluation

This PR targets the nightly failure where incremental reindex completes without errors ran into the 300 s test timeout. I reviewed it by static trace only; no commands were run.

The diagnosis fits the supplied code. queueIndexingJob previously wrote indexing after queue.add(). An incremental run with nothing to process finishes almost at once through handleNoFilesToProcess, so the API's late write could overwrite the worker's completed. Nothing would then move the row out of indexing, and the old poller waited until the timeout. That also matches the issue's "green on the same commit" rerun.

The PR writes the status before enqueueing. It also moves the E2E polling into test/e2e/indexing.ts, with a deadline, cancellation, branch matching and diagnostics. I found no PR-introduced blocker and current-head checks are green, so it is ready to merge within scope. The PR summary says the live E2E was not run, so the nightly itself is the remaining confirmation.

✅ Root cause fixed at the source — packages/api/routes/indexingQueueHelpers.ts:289-302 persists indexing before queue.add(), so the API's write always precedes any terminal write from the worker. test/indexingQueue.test.ts models the worker finishing inside add() and asserts the only API write is ['indexing'].

✅ Timeouts now explain themselves — waitForIndexedRepo polls immediately, bounds every request and sleep by the remaining deadline, and ends with last status, phase, file and directory counts. INDEXING_TEST_TIMEOUT_MS leaves 30 s over the budget so that message is emitted before node:test cancels the test.

✅ Branch-accurate waiting — triggerAndWaitForIndexing waits on the normalized baseBranch returned by the trigger, not repositories[0]. A completed row for another branch can no longer satisfy the wait (covered by "completed HEAD must not mask unfinished release indexing").

Merge blockers

No merge blockers.

Suggestions

These are optional follow-ups and are not sent to /fix.

S2: 🟢 Enqueue failure marks an intact index failed

In indexingQueueHelpers.ts:299-302, a queue.add() rejection now writes failed; before the PR the row was left as it was. If the repository was completed, a brief Redis error now reports an untouched index as failed. The next full-reindex request is then quietly downgraded to incremental by the resume-on-failure branch in the same function. Reading the prior status and restoring it would be more accurate. This is optional because it needs Redis to fail between getJobs() and add(), and the next successful run corrects the status.

S3: 🟢 Compensating write can mask the enqueue error

In the same catch, if updateRepositoryStatus(..., 'failed', ...) also rejects, its error replaces the original enqueue error and the row stays indexing with no job behind it. A process crash between the status write and add() leaves the same state. Wrapping the compensating write in its own try/catch that logs and rethrows the original error would keep the cause visible. This is optional because it needs two failures in a row.

S4: 🟢 Polling no longer tolerates transient transport errors

test/e2e/indexing.ts sends every status poll with retry: false, and the loop rethrows any non-deadline error. One NetworkError or one 30 s request timeout in a five-minute poll now fails the test, where the client's default GET retry used to absorb it. Since the loop is itself a retry, catching NetworkError/TimeoutError and continuing to the next poll would keep the deadline accounting without the fragility. This is optional because no such failure is shown in the nightly environment.

S5: 🟢 Optimistic publish can still follow completion

configRoutesIndexing.ts:59 (unchanged) publishes indexing after queueIndexingJob returns. That can land after a fast worker has published completed, so a live UI may show indexing until its next refresh even though the stored status is now correct. This is the same ordering problem on the publish channel. It is pre-existing and outside this diff, so it is a follow-up.

S6: 🟢 Leftover import and repeated completion check

test/e2e.test.ts may now import the top-level sleep from ./e2e/helpers.js without using it, since the remaining sleep calls use the withE2EWork callback parameter; worth checking. The "completed with timestamp and hash" check in ensure indexed also repeats the one in waitForIndexedRepo; a small exported isIndexed(row) would keep them in step. Both are cosmetic.

Score

The change fixes the status-overwrite race that plausibly caused the nightly timeout, adds focused regression tests, and all current-head checks pass. The remaining items are optional, and the live E2E has not yet been run against the change.

Score: 8/10


🤖 Review Details

  • Model: Claude Fable 5.2
  • Time: 1m 20s
  • Tokens: 72,975 (65,838 in / 7,137 out)
  • Cost: $0.94

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix S2 S3 S4 S5 S6

🤖 Review by ProPR

@propr-dev propr-dev Bot changed the title 🔨 [3419 by GPT-6.1 Sol] Nightly test health ✅⑧ [3419 by GPT-6.1 Sol] Nightly test health Nov 16, 2026
@integry

integry commented Nov 16, 2026

Copy link
Copy Markdown
Owner

/fix

@propr-dev propr-dev Bot changed the title ✅⑧ [3419 by GPT-6.1 Sol] Nightly test health 🔨 [3419 by GPT-6.1 Sol] Nightly test health Nov 16, 2026
@propr-dev

propr-dev Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 900235c

Addressed 1 AI review comment (IDs: 6917655045)

Addressed finding F1

Summary of Changes

Addressed F1 only. Rejected enqueues restore the prior status, preserving full-reindex retry semantics, completion metadata, and any worker terminal status.

Added focused regressions for retries, branch matching, and asynchronous status changes.

Validation: all 24 focused tests passed, type check passed, and diff checks passed. No visual preview needed for this backend change.

Review digest

Risk-tiered paths

  • High risk: none
  • Normal risk (1 file)
    • packages/api/routes/indexingQueueHelpers.ts (+24/−17)
  • Low risk (1 file)
    • test/indexingQueue.test.ts (+91/−10)

Validation evidence

  • No repository validation commands ran.

Diff size: 2 files changed, +115/−27 lines


🤖 Implementation Details

  • Model: GPT-6.1 Sol (medium)
  • Requested By: @integry
  • Time: 4m 37s
  • Tokens: 426,409 (422,782 in / 3,627 out)
  • Cost: $0.14

Undo Changes • View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment ID: 6917808073✓

…us, preserving full-reindex retry semantics, completion metadata, and any worker terminal status.

Addressed F1 only. Rejected enqueues restore the prior status, preserving full-reindex retry semantics, completion metadata, and any worker terminal status.

Added focused regressions for retries, branch matching, and asynchronous status changes.

Validation: all 24 focused tests passed, type check passed, and diff checks passed. No visual preview needed for this backend change.

PR: #3420
Comment by: @integry (ID: 6917808073)
Model: GPT-6.1 Sol
@propr-dev propr-dev Bot changed the title 🔨 [3419 by GPT-6.1 Sol] Nightly test health ✅⑧ [3419 by GPT-6.1 Sol] Nightly test health Nov 16, 2026
@propr-dev propr-dev Bot changed the title ✅⑧ [3419 by GPT-6.1 Sol] Nightly test health 🔨 [3419 by GPT-6.1 Sol] Nightly test health Nov 16, 2026
@propr-dev propr-dev Bot changed the title 🔨 [3419 by GPT-6.1 Sol] Nightly test health ✅⑧ [3419 by GPT-6.1 Sol] Nightly test health Nov 16, 2026
propr-dev Bot pushed a commit that referenced this pull request Nov 17, 2026
… Ready` or `⚠️ Needs you`. It stays `🔨 Waiting for CI` until its checks are reported and complete, or until a bounded wait runs out. I ran the relevant suites with these changes: 227 core status/readiness tests and 367 root tests (`checkRunHandler`, `epicMergeProgressHandler`, `taskIntentWithdrawal`) all pass. Typecheck and lint are clean. I also checked the new regression tests the other way round: they fail on the old status code, and the re-read test fails if the extra rescheduling is removed.

The rule (for the PR description). A head counts as having checks once GitHub lists at least one check run or commit status for it, non-blocking ones included. A head with none waits, counted from the first time ProPR saw it without checks:
- 10 minutes if any head in the repository has reported checks in the last 30 days.
- 2 minutes if not. This is the same no-CI grace auto-merge already uses, and the same first-seen record, so the status and auto-merge agree.

After the wait the head is treated as having no CI, so a repository without CI still becomes ready. A pull request in a repository whose CI skips some changes (path filters) will show "Waiting for CI" for up to 10 minutes before it can turn ready. There is no new setting and no extra GitHub request per update; the records live in Redis, with an in-process fallback.

What changed:
- Old review scores: a score given for an older head (review scores already store their head) no longer gives `⚠️ review below goal` while the new head's checks are pending or absent. A score for the current head, or one saved without a head, still counts while checks are pending, as before.
- Once checks finish: if the latest score is still from an older head and below goal, the pull request shows `⚠️` with that score until it is reviewed again.
- Re-reading when the wait ends: in a repository without CI no webhook arrives, so the status sync now schedules its own re-read for that moment.
- Files:
  - `pullRequestStatusCheckWait.ts`: new; holds the wait logic.
  - `pullRequestStatus.ts`: the status rules above.
  - `pullRequestStatusFacts.ts`: records whether checks were reported, the wait, and the score's head.
  - `pullRequestStatusSync.ts`: the re-read.
  - `checkRunHelpers.ts`: gains a small `clearPRHeadObservation` helper.
- Existing tests: the head with no checks in "the block a pull request was created with…" now shows Waiting for CI first, then Ready. The checks deep-equal assertions now include the new `reported` field.

No visual preview, since the change only affects the PR body and title text.

Acceptance criteria
- AC1: met — `pullRequestStatus.ts` (`checksOutstanding`), `pullRequestStatusCheckWait.ts`; tests "#3420: a fix pushed on a ✅ pull request stays 🔨…" (stays 🔨 past the 2-minute grace, no `✅`) in `test/pullRequestStatusTitle.test.ts`, and "a head whose checks have not appeared yet waits for CI…" in `test/pullRequestStatus.test.ts`
- AC2: met — 2-minute no-CI grace, or a 10-minute wait in a repository that has reported checks, with a scheduled re-read when it ends; tests "a repository with no CI becomes ✅…" and "a head without checks in a repository that reports them is ready once the bounded wait is over" (`pullRequestStatusTitle.test.ts`), "a head without checks is re-read when its wait ends…" and "the wait for a head's checks…" (`pullRequestStatusSync.test.ts`)
- AC3: met — `confirmedAttentionReason` ignores a below-goal score from an older head while checks are outstanding; tests "#3573: after a fix push the pre-fix ⚠️ and score do not come back…" and "a review score of an older head is not held against a new head…"
- AC4: met — the #3420 test (push, no checks, pending, complete) asserts renames `[✅➇, 🔨, ✅➇]`; the #3573 test (two fix rounds, with checks absent then pending) asserts exactly one rename per real state change; both fail on the old code
integry pushed a commit that referenced this pull request Nov 17, 2026
…ou" on a freshly pushed head before its checks exist (#3631)

* A freshly pushed head with no check runs yet is no longer shown as `✅ Ready` or `⚠️ Needs you`. It stays `🔨 Waiting for CI` until its checks are reported and complete, or until a bounded wait runs out. I ran the relevant suites with these changes: 227 core status/readiness tests and 367 root tests (`checkRunHandler`, `epicMergeProgressHandler`, `taskIntentWithdrawal`) all pass. Typecheck and lint are clean. I also checked the new regression tests the other way round: they fail on the old status code, and the re-read test fails if the extra rescheduling is removed.

The rule (for the PR description). A head counts as having checks once GitHub lists at least one check run or commit status for it, non-blocking ones included. A head with none waits, counted from the first time ProPR saw it without checks:
- 10 minutes if any head in the repository has reported checks in the last 30 days.
- 2 minutes if not. This is the same no-CI grace auto-merge already uses, and the same first-seen record, so the status and auto-merge agree.

After the wait the head is treated as having no CI, so a repository without CI still becomes ready. A pull request in a repository whose CI skips some changes (path filters) will show "Waiting for CI" for up to 10 minutes before it can turn ready. There is no new setting and no extra GitHub request per update; the records live in Redis, with an in-process fallback.

What changed:
- Old review scores: a score given for an older head (review scores already store their head) no longer gives `⚠️ review below goal` while the new head's checks are pending or absent. A score for the current head, or one saved without a head, still counts while checks are pending, as before.
- Once checks finish: if the latest score is still from an older head and below goal, the pull request shows `⚠️` with that score until it is reviewed again.
- Re-reading when the wait ends: in a repository without CI no webhook arrives, so the status sync now schedules its own re-read for that moment.
- Files:
  - `pullRequestStatusCheckWait.ts`: new; holds the wait logic.
  - `pullRequestStatus.ts`: the status rules above.
  - `pullRequestStatusFacts.ts`: records whether checks were reported, the wait, and the score's head.
  - `pullRequestStatusSync.ts`: the re-read.
  - `checkRunHelpers.ts`: gains a small `clearPRHeadObservation` helper.
- Existing tests: the head with no checks in "the block a pull request was created with…" now shows Waiting for CI first, then Ready. The checks deep-equal assertions now include the new `reported` field.

No visual preview, since the change only affects the PR body and title text.

Acceptance criteria
- AC1: met — `pullRequestStatus.ts` (`checksOutstanding`), `pullRequestStatusCheckWait.ts`; tests "#3420: a fix pushed on a ✅ pull request stays 🔨…" (stays 🔨 past the 2-minute grace, no `✅`) in `test/pullRequestStatusTitle.test.ts`, and "a head whose checks have not appeared yet waits for CI…" in `test/pullRequestStatus.test.ts`
- AC2: met — 2-minute no-CI grace, or a 10-minute wait in a repository that has reported checks, with a scheduled re-read when it ends; tests "a repository with no CI becomes ✅…" and "a head without checks in a repository that reports them is ready once the bounded wait is over" (`pullRequestStatusTitle.test.ts`), "a head without checks is re-read when its wait ends…" and "the wait for a head's checks…" (`pullRequestStatusSync.test.ts`)
- AC3: met — `confirmedAttentionReason` ignores a below-goal score from an older head while checks are outstanding; tests "#3573: after a fix push the pre-fix ⚠️ and score do not come back…" and "a review score of an older head is not held against a new head…"
- AC4: met — the #3420 test (push, no checks, pending, complete) asserts renames `[✅➇, 🔨, ✅➇]`; the #3573 test (two fix rounds, with checks absent then pending) asserts exactly one rename per real state change; both fail on the old code

* feat(ai): I fixed the Validate Changes failure. The step that failed was "Core Package Lint", which allows zero warnings, and `packages/core/src/services/pullRequestStatus/pullRequestStatusSync.ts` had two:

I fixed the Validate Changes failure. The step that failed was "Core Package Lint", which allows zero warnings, and `packages/core/src/services/pullRequestStatus/pullRequestStatusSync.ts` had two:

- **Complexity 21, limit 20**, in the `syncUnderBodyLock` callback. `DesiredStatus.checksAwaitedForMs` is now a required `number | null`, and the early "closed or merged" return sets it to `null`. That removes the `?? null` fallback from the callback, which brings it to the limit.
- **406 lines, limit 400.** I put the `DesiredStatus` interface back on one line and moved its field comment into the doc comment above it. I also merged the extra return field onto the line before it and made the `earliest` helper a one-line arrow function.

The behaviour is unchanged; this only restructures the code. ESLint now passes with zero warnings on `src/services/pullRequestStatus/` and `checkRunHelpers.ts`, and the `packages/core` typecheck is clean. The three status test files (`pullRequestStatus`, `pullRequestStatusSync`, `pullRequestStatusTitle`) pass, 127 of 127. There's no visual preview because nothing a user sees changes.

PR: #3631
Comment by: @propr-dev[bot] (ID: 6936016486)
Model: Claude Opus 5.5

* feat(ai): I fixed both findings, F1 and F2, and every `pullRequestStatus*` test suite in `packages/core` passes. Typecheck and zero-warning lint are clean. I also ran the three new tests against the old code, and all three fail there.

I fixed both findings, F1 and F2, and every `pullRequestStatus*` test suite in `packages/core` passes. Typecheck and zero-warning lint are clean. I also ran the three new tests against the old code, and all three fail there.

**F1: read-only waits never expired** (`pullRequestStatusCheckWait.ts`)
- When a read-only store (the MCP reads) had no record of a head, its first-seen time was never saved. Every read started the full wait again, so the PR could stay `working` indefinitely.
- Now this process remembers that time in its own memory. Redis is still never written, so later reads count down and the head becomes ready after the bound. This was the only place that skipped saving it, so the now-unused `record` flag is gone.
- New test: repeated read-only reads count down from the first read, wait no longer once the bound has passed, and start afresh for a new head. It also checks that nothing is written to Redis.

**F2: a failed re-read at the deadline dropped the wait** (`pullRequestStatusSync.ts`)
- Each scheduled entry now carries an `awaitsChecks` flag, set from the last successful read that returned a wait for checks.
- If a read fails while that flag is set, it is retried with the existing bounded refresh schedule. Until now only a base push or a startup backfill got that treatment.
- Related case I also fixed: at the deadline the checks read itself can fail, which publishes "checks could not be read" instead of ending the wait. That case now keeps the flag and is retried the same way.
- The flag is cleared only by a read that actually ends the wait, or when the bounded retries run out. A failed PATCH after a successful read keeps it set.
- New tests (two cases): the deadline pull read fails once, or the deadline checks read fails once. In both, the status still goes from `Waiting for CI` to `Ready` with no further webhook.

To keep `pullRequestStatusSync.ts` under the 400-line lint limit, I put two object literals on one line each and made `SyncOutcome` extend `Pick<DesiredStatus, 'checksAwaitedForMs'>`.

No visual preview, since this only changes status timing and retries.

PR: #3631
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5

* feat(ai): I fixed F3. When a check read is incomplete but still lists checks, the loader now records that the repository reports checks. A new head with no checks then waits the documented 10 minutes instead of the 2-minute grace.

I fixed F3. When a check read is incomplete but still lists checks, the loader now records that the repository reports checks. A new head with no checks then waits the documented 10 minutes instead of the 2-minute grace.

**The fix:** in `loadPullRequestStatusFacts` (`packages/core/src/services/pullRequestStatus/pullRequestStatusFacts.ts:393`), the value passed to `headChecksWaitMs` is now:
- `true` whenever any check was listed, even if the read was cut off by the 300-item budget or one endpoint rejected.
- `false` only for a complete read that found nothing.
- `null` otherwise.

The status of the original head does not change. `headChecksWaitMs` sets no wait for both `true` and `null`, and the incomplete read still keeps that head from being called ready. The only new effect is the record that the repository reports checks.

**Sibling check:** `headChecksWaitMs` has no other caller, and nothing else reads `checks.reported`, so no other place had the same problem.

**Regression:** a new test in `packages/core/test/pullRequestStatusSync.test.ts` runs twice, once per case in the finding:
1. a head with 301 check runs (over the read limit), and
2. a head whose commit-status read rejects while its check runs come back.

Each time a fix then pushes a new head with no checks and a complete, empty read. The test asserts that the wait is the 10-minute bound. It also clears this process's memory and checks that the remaining wait is still read from Redis, as another process would see it.

**Verification:** both new tests pass, and both fail when I put the old line back. All 213 tests in `packages/core/test/pullRequestStatus*.test.ts` pass, and typecheck and zero-warning lint on the changed source are clean.

I found no other issues while checking this.

PR: #3631
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5

* feat(ai): I fixed the lint failure, and core lint now passes on both this branch and the merge CI actually tests.

I fixed the lint failure, and core lint now passes on both this branch and the merge CI actually tests.

**Why it didn't show up locally:** this PR's base is the epic branch `3589-epic-0-9-y3w`, not `main`. CI lints the PR merged into that branch. The epic branch has since added a `removeLeftoverUltrafixLabel` call (and its import) to `packages/core/src/services/pullRequestStatus/pullRequestStatusSync.ts`. That is what pushes the file from 400 to 401 code lines after the merge. Running `npx eslint --max-warnings 0 .` on the branch alone passes. To reproduce the failure, I built the merge result in `/tmp`, and it showed the same `580:1 … (401)` warning.

**Fix:** I moved the check that a pull request is unchanged between two reads into a new module, `pullRequestStatusSubject.ts`. It holds `sameStatusSubject` and its private `mergeability` helper, unchanged; `pullRequestStatusSync.ts` now imports `sameStatusSubject` from there. Behaviour is the same.

**Checks:**
- **Core lint:** passes on this branch and on the merge with the epic branch.
- **Typecheck:** passes on this branch. I didn't run it on the merge result, because that would need the epic branch's newer `@propr/shared` built first.
- **Tests:** all 7 `packages/core/test/pullRequestStatus*.test.ts` files pass (213 tests, 0 failures) on this branch. I didn't run them on the merge result.

PR: #3631
Comment by: @integry (ID: 6940298187)
Model: Claude Opus 5.5

---------

Co-authored-by: propr-dev[bot] <1316198+propr-dev[bot]@users.noreply.github.com>
propr-dev Bot pushed a commit that referenced this pull request Nov 17, 2026
…eviews of that round together instead of the one posted last. In the #3420 case (6/10 with blocker F1, then 8/10), the PR now reads `⚠️ Needs you · review below goal …/10 · review 6/10` and the title shows `⚠️➅`, whichever review posts first.

What changed
- Grouping the round (`packages/core/src/services/reviewScoreStore.ts`): a new `latestReviewRound()` helper takes every score row the newest review job wrote for the same head and Ultrafix cycle. It returns the lowest score and the total blocker count. A later review of a newer head is a different job, so it replaces the round as before.
- Status (`pullRequestStatusFacts.ts`, `pullRequestStatus.ts`, `pullRequestStatusBlock.ts`):
  - The shown score is the round's lowest.
  - Below the goal, the reason is still `review_below_goal`.
  - I added one thing the issue didn't ask for: a round that meets the goal but has a blocker from any reviewer now gets a new reason, `review_blockers`, shown as "review has open blockers". Without it such a PR would show `ready`.
  - The title takes the same `detail.reviewScore` as the body line, so the digit and the line always agree.
- Readiness gate (`pullRequestReadinessGates.ts`): `summarizeReview` uses the same helper, so the readiness API agrees with the status.
- Ultrafix's own goal check (`src/jobs/reviewScorePersistence.ts`, `src/jobs/reviewCommentGatherer.ts`): a multi-model job now reaches the goal only if every reviewer meets it with no blockers. For a known result set the loop's score is the lowest reviewer's; a member with no score leaves the set unscored.

Behaviour change in Ultrafix: a cycle where one model scores 9 and another 7 with goal 8 used to pass if the 9 was posted last. It now fails. I updated two expectations in `test/reviewScorePersistence.test.ts` that had pinned the old "newest review decides" rule.

Tests
- New regression tests cover both posting orders:
  - `packages/core/test/pullRequestStatusTitle.test.ts` runs the real sync against SQLite and checks both the body line and the title.
  - Also `packages/core/test/pullRequestReadiness.test.ts` and `test/reviewCommentGatherer.test.ts`.
- With the grouping switched back to "last row only", 4 of the new title tests fail.
- All the suites I ran pass, including the status, sync, epic, readiness, persistence, gatherer and the Ultrafix suites. `tsc` and the zero-warning ESLint gates are clean on the changed files.

There are no previews: the change is only in the PR status text and title, not in a screen the project renders.

Acceptance criteria
- AC1: met — `latestReviewRound` in `packages/core/src/services/reviewScoreStore.ts` and `reviewBelowGoal` in `pullRequestStatus.ts`; test "a round scored 6 with a blocker and 8 needs you at 6…" (both orders) in `packages/core/test/pullRequestStatusTitle.test.ts`, plus `packages/core/test/pullRequestReadiness.test.ts`
- AC2: met — test "a round scored 8 and 9 with no blocker is ready at 8…" (both orders) in `packages/core/test/pullRequestStatusTitle.test.ts`; readiness `goal_reached` at score 8 in `packages/core/test/pullRequestReadiness.test.ts`
- AC3: met — test "a later single review of a newer head replaces the round" in `packages/core/test/pullRequestStatusTitle.test.ts`, plus the newer-head case in `packages/core/test/pullRequestReadiness.test.ts`
- AC4: met — the title slot (`pullRequestStatusTitle.ts`, `detail.reviewScore`) and the body line read the same round score; every new title test asserts both the line and the title digit
- AC5: met — every new case runs once per posting order: the `for (const order …)` loops in `pullRequestStatusTitle.test.ts` and `test/reviewCommentGatherer.test.ts`, and both reviews orders in `pullRequestReadiness.test.ts`
@integry
integry merged commit a7505e5 into main Nov 17, 2026
50 checks passed
@integry
integry deleted the 3419/gpt-6.1-sol-nightly-test-health-20261104-1146-32n branch November 17, 2026 20:56
@propr-dev propr-dev Bot changed the title ✅⑧ [3419 by GPT-6.1 Sol] Nightly test health [3419 by GPT-6.1 Sol] Nightly test health Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nightly test health

1 participant