Skip to content

fix(server): refresh open PRs on settled threads and dedupe lane-ended alerts - #209

Merged
nullStack65 merged 3 commits into
release/native-0.1.10from
fix/cac-916-settled-pr-refresh-dedupe-alert
Nov 27, 2026
Merged

nullStack65 merged 3 commits into
release/native-0.1.10from
fix/cac-916-settled-pr-refresh-dedupe-alert

Conversation

@nullStack65

@nullStack65 nullStack65 commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner

Addresses nullStack65/closura-agent-config#916:

Changes

  1. PullRequestSyncReactor.ts: Keep sweeping open/unsynced pull request links (snapshot === null || snapshot.state === "open") on settled threads on SLOW_SYNC_INTERVAL_MS (15m) until they reach a terminal state (merged or closed), so PRs merged/closed after settle do not stay stuck as "open". Terminal (closed/merged) links on settled threads are not swept.
  2. ThreadEventAlerts.ts:
    • Dedupe completed-with-open-PRs lane-ended alerts by the sorted open-PR set (open-prs:<sorted-keys>) instead of shell.latestRunId, preventing repeated alerts across completed runs of the same lane.
    • Include "lane-ended" in KINDS_BY_TRIGGER.settled so settling a thread clears/re-evaluates lane-ended state.
  3. Tests: Updated PullRequestSyncReactor.test.ts (62/62 passing) and added unit tests in ThreadEventAlerts.test.ts (48/48 passing) covering settled open-link slow-cadence refresh, open-PR-set deduplication across runs, and settle clearing.

Closes nullStack65/closura-agent-config#916

Deploy: fleet

@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

…cac-916-settled-pr-refresh-dedupe-alert

# Conflicts:
#	apps/server/src/orchestration-v2/ThreadEventAlerts.test.ts
#	apps/server/src/orchestration-v2/ThreadEventAlerts.ts
@nullStack65

Copy link
Copy Markdown
Owner Author

Independent review: refresh open pull requests on settled threads and dedupe the lane-ended alert

Verdict: clean. There are no important or critical findings, only two nits. I ran one full fresh-context pass at head d1330429f200d24d943d5627cbd8aa3fbb7ebd01 against base release/native-0.1.10 at caf9ebeb0cae23bee584f7b0acf3856fb6f6cada. The requirements come from the controlling issue, "t3code: refresh PR state for settled threads; one lane-ended alert per lane" (closura-agent-config issue 916).

What I checked

  • Refresh on settled threads (item 1 of the issue). When every thread linked to a pull request is settled, isDue now rereads open or unsynced links every SLOW_SYNC_INTERVAL_MS (15 minutes). It skips merged and closed links. The failed-read backoff and requested refreshes still run before that check. Links shared with an unsettled thread keep the existing cadence. The settled 15-minute cadence is slower than the 5-minute quiet cadence used for active threads, so load is not inverted. Stack reads stay limited to unsettled threads.
  • One alert per lane (item 2). A completed run with open pull requests now uses the signature open-prs:<sorted host/repo#n>. recordThreadEvents keeps a signature while it stays true, so later completed runs on the same lane with the same set of open pull requests stay quiet. When the set changes, a new alert is correct. Each alert ID still includes occurredAt, so delivery keys stay unique.
  • Settle trigger. The settled trigger now evaluates lane-ended. A settled thread is not watched, so the kind produces no findings and its remembered signatures are cleared. A settled thread cannot raise a new lane-ended alert.
  • Tests. I ran the focused suites on this head: vp test run on the PullRequestSyncReactor, ThreadEventAlerts and ModelAlertReactor test files gave 168/168 passed. Required CI on this head is green: Deploy line declared and the Voice + inbox core, web, mobile and founder-inbox jobs.

Limits: I did not run a live fleet check that stale snapshots for settled lanes actually move to merged or closed after deploy. That is deployment verification, outside source review.

{
  "reviewed_base": "caf9ebeb0cae23bee584f7b0acf3856fb6f6cada",
  "reviewed_head": "d1330429f200d24d943d5627cbd8aa3fbb7ebd01",
  "reviewer": "Claude Opus 5.5 (claude-opus-5-5), Claude Code via T3 Code",
  "author_session": "unknown (not supplied to reviewer; PR authored by the fix/cac-916 lane)",
  "reviewer_session": "claude-code:1ce947a7-a925-4ad9-9480-540d9757dd21 / t3:mcp:launch:ae4e3f2396ca8fac0a8135d199c6823786d4f627326313bf80447b306fd60c2d",
  "fresh_context": true,
  "review_kind": "full",
  "round_id": "t3:mcp:launch:ae4e3f2396ca8fac0a8135d199c6823786d4f627326313bf80447b306fd60c2d",
  "intent": [
    "closura-agent-config#916 item 1: refresh open links on settled threads until terminal",
    "closura-agent-config#916 item 2: dedupe lane-ended per thread and open-PR set, not per run",
    "closura-agent-config#916 item 3: fresh state at delivery (skip settled threads with no open PR; re-read PR state)"
  ],
  "prior_findings": [],
  "findings": [
    {
      "id": "F1",
      "severity": "nit",
      "outcome": "open",
      "file": "apps/server/src/orchestration-v2/ThreadEventAlerts.ts",
      "line": 218,
      "summary": "Item 3 of the controlling issue is only partly built. Settling now clears the remembered lane-ended signatures, and settled threads raise no new findings. But a run-ended alert still trusts the stored pull request snapshot rather than rereading it at delivery, and an alert already in the outbox is not withdrawn on settle. The PR body still says 'Closes' the issue. Keep the issue open for item 3 and optional item 4, or change 'Closes' to 'Addresses'."
    },
    {
      "id": "F2",
      "severity": "nit",
      "outcome": "open",
      "file": "apps/server/src/orchestration-v2/PullRequestSyncReactor.ts",
      "line": 393,
      "summary": "Open or unsynced links on settled threads are reread every 15 minutes with no age limit, including ones in the 'missing' set. Abandoned open pull requests and deleted repositories keep costing a host read each interval for as long as the link exists. This is acceptable now (the issue asked for it), but a cap such as no reads after N days settled would bound GitHub API use as settled lanes pile up."
    }
  ]
}

Review by Claude Opus 5.5 (Claude Code, via T3 Code). This is an automated technical review, not human approval.

@nullStack65

nullStack65 commented Nov 26, 2026 •

Copy link
Copy Markdown
Owner Author
{
  "reviewed_base": "caf9ebeb0cae23bee584f7b0acf3856fb6f6cada",
  "reviewed_head": "d1330429f200d24d943d5627cbd8aa3fbb7ebd01",
  "reviewer": "Gemini 4 Carbon (High), Antigravity",
  "author_session": "mcp:launch:3e368848c32c998138e477993eaa5d4c7584ac27d683359da7aec7c0fa424e92",
  "reviewer_session": "mcp:launch:4d799ee525ad7dcffd2251244b224bf13140cb26c41e7b6d9d98f3140bc2f74c",
  "fresh_context": true,
  "review_kind": "full",
  "round_id": "mcp:launch:4d799ee525ad7dcffd2251244b224bf13140cb26c41e7b6d9d98f3140bc2f74c",
  "intent": [
    "nullStack65/closura-agent-config issue #916 item 1: keep sweeping open pull request links on settled threads until terminal",
    "nullStack65/closura-agent-config issue #916 item 2: dedupe lane-ended alerts per thread and open-PR set across runs and clear on settle",
    "nullStack65/closura-agent-config issue #916 item 3: re-read pull request state before delivering lane-ended alerts rather than trusting a stale snapshot"
  ],
  "prior_findings": [],
  "findings": [
    {
      "id": "F1",
      "severity": "important",
      "outcome": "fixed",
      "file": "apps/server/src/orchestration-v2/ThreadEventAlerts.ts",
      "line": 225,
      "summary": "Deduplicating completed open-PR lane-ended findings by `open-prs:...` while `threadEventAlert` stamps `runId: shell.latestRunId` and `ModelAlertReactor.currentAlert` checks `alertIsStale(shell, alert.runId)` drops all alerts when a second run completes before the first run's outbox entry is delivered (e.g. during `busyWatcherHold`): Run 2 is skipped via `state.reported`, Run 1's queued alert is dropped as superseded by `run:2`, and `afterDrop` leaves `open-prs:...` in `state.reported` permanently.",
      "check": "fixed in 018491d20c2d: open-PR lane-ended alerts skip run staleness and a dropped undelivered report is forgotten"
    },
    {
      "id": "F2",
      "severity": "important",
      "outcome": "fixed",
      "file": "apps/server/src/orchestration-v2/ModelAlertReactor.ts",
      "line": 1151,
      "summary": "nullStack65/t3code pull request #209 closes nullStack65/closura-agent-config issue #916 without implementing requested fix item 3 (re-reading pull request state at delivery rather than trusting a stale snapshot): `currentAlert` evaluates `threadEventStillHolds` only against cached `shell.pullRequests`, so a pull request merged or closed externally within the 1m/5m sync interval (or newly linked with `snapshot: null`) still delivers a false `lane-ended` open-PR wake.",
      "check": "fixed in 018491d20c2d: delivery rereads open links from the host (cache bypassed) and re-judges"
    },
    {
      "id": "F3",
      "severity": "nit",
      "outcome": "fixed",
      "file": "apps/server/src/orchestration-v2/PullRequestSyncReactor.ts",
      "line": 884,
      "summary": "Comment `// Settled threads are not swept, so read their links once to settle with fresh status.` is now stale after `isDue` started sweeping open/unsynced links on settled threads on `SLOW_SYNC_INTERVAL_MS`; also `ThreadEventAlerts.ts:219` can use `threadPullRequestKeyOf(link)` for canonical case-insensitive host/repository keys.",
      "check": "fixed in 018491d20c2d: comment updated; signature uses threadPullRequestKeyOf"
    }
  ]
}

Independent Review Summary (nullStack65/t3code pull request #209 at d1330429f200d24d943d5627cbd8aa3fbb7ebd01)

  • Controlling requirement: nullStack65/closura-agent-config issue fix(web): close settings with Escape pingdotgg/t3code#916 against base release/native-0.1.10 (caf9ebeb0cae23bee584f7b0acf3856fb6f6cada).
  • What works well:
    • PullRequestSyncReactor.ts (isDue) cleanly refreshes snapshot === null and snapshot.state === "open" links on settled threads on SLOW_SYNC_INTERVAL_MS (15m) until terminal (merged or closed), while keeping terminal links on settled threads quiet and preventing stack sibling auto-linking on settled threads (isUnsettled(thread)).
    • Adding "lane-ended" to KINDS_BY_TRIGGER.settled in ThreadEventAlerts.ts properly clears state.reported on thread.settled without emitting spurious wakes on subscriptions.
    • Conflict resolution in merge commit d1330429f200d24d943d5627cbd8aa3fbb7ebd01 cleanly preserved thread-failed from nullStack65/t3code pull request feat(server): wake the watcher when an unsettled top-level thread fails #205 alongside "lane-ended" on settled.
  • Blocking findings (important):
    • F1 (apps/server/src/orchestration-v2/ThreadEventAlerts.ts:225): Cross-run open-prs:... signature collides with per-run alertIsStale(shell, alert.runId) (ModelAlertReactor.ts:1124,1147 / UsageLimitIncidents.ts:93-95). When Run 1's lane-ended alert is waiting in outbox (for instance during busyWatcherHold while the launching coordinator is mid-turn) and Run 2 completes with the same open pull request set, recordThreadEvents skips Run 2 because open-prs:... is already in state.reported, and flush then drops Run 1's outbox alert because shell.latestRunId !== alert.runId and LIVE_OR_DONE.has("completed"), leaving open-prs:... in state.reported so zero alerts are ever delivered.
    • F2 (apps/server/src/orchestration-v2/ModelAlertReactor.ts:1151): nullStack65/t3code pull request fix(server): refresh open PRs on settled threads and dedupe lane-ended alerts #209 carries Closes nullStack65/closura-agent-config#916, but item 3 of nullStack65/closura-agent-config issue fix(web): close settings with Escape pingdotgg/t3code#916 ("re-read PR state rather than trust a stale snapshot" before delivering) is unimplemented: currentAlert checks threadEventStillHolds only against cached shell.pullRequests in SQLite without refreshing open/unsynced pull requests via PullRequestService.
  • Non-blocking (nit):
    • F3 (apps/server/src/orchestration-v2/PullRequestSyncReactor.ts:884): Update the stale // Settled threads are not swept... comment above case "thread.settled": (and optionally normalize openPrSignature via threadPullRequestKeyOf).
  • Verification run: vp run --filter t3 typecheck, vp lint on the 4 changed files (0 warnings, 0 errors), and vp test run on PullRequestSyncReactor.test.ts, ThreadEventAlerts.test.ts, ModelAlertReactor.test.ts, and eventSubscription.test.ts (4 files, 179/179 tests passing on Node v26.13.1).

… state at delivery

F1: an open-PR lane-ended report is shared by every run with the same open
pull requests, so a newer run no longer marks its queued alert stale (the
re-judge still drops it once the lane runs again, fails, or the open set
changes), and a dropped undelivered report is forgotten so the next run end
can report it.

F2: before delivering an open-PR lane-ended alert, reread its open links from
the host (cache bypassed) and re-judge against those states, so a pull request
merged or closed within the sync interval no longer sends a false wake. A
failed read keeps the stored snapshot.

Also: fix the stale settled-thread comment and key the signature with
threadPullRequestKeyOf.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nullStack65
nullStack65 merged commit 8b47840 into release/native-0.1.10 Nov 27, 2026
6 checks passed
@nullStack65
nullStack65 deleted the fix/cac-916-settled-pr-refresh-dedupe-alert branch November 27, 2026 01:21
@nullStack65

Copy link
Copy Markdown
Owner Author

Focused re-check: refresh open pull requests on settled threads and dedupe the lane-ended alert

Verdict: the re-check is clean. All three findings from the Gemini review round, which covered head d1330429f200, are fixed at head 018491d20c2d. The diff introduces no new defects.

Scope: git range-diff caf9ebeb0cae..d1330429f200 caf9ebeb0cae..018491d20c2d. The base release/native-0.1.10 is unchanged at caf9ebeb0cae. The original patch is identical (54004c1472). The only new change is commit 018491d20c2d, and the range has no merge commits, so there were no conflict resolutions to inspect.

Findings

  • F1 (important), confirmed. ModelAlertReactor.currentAlert now passes a null run ID to stillCurrent when the alert is an open-prs: lane-ended alert, so a newer run no longer marks it stale. The re-judge still drops the alert when the lane goes live again, fails, or its open set changes. A newer run's later latestRunCompletedAt keeps the finding recent, because the window check is one-sided. afterDrop now removes an undelivered open-prs: signature through forgetDroppedOpenPrReport, so the next run end can report it again. A sibling delivery that is still queued keeps the dedupe. Run-keyed reports are unchanged. A new test in ModelAlertReactor.test.ts covers the drop-then-report-again path.
  • F2 (important), confirmed. Before the re-judge, withHostPrStates rereads the open and unsynced links of an open-prs: alert through PullRequestService.summary with bypassCache: true, four reads at a time, and runs the re-judge on those states. A link that is now merged or closed leaves the open set, which changes the signature, so the alert is dropped. A failed read keeps the stored snapshot, but interrupts still propagate. PullRequestService is resolved with serviceOption. In server.ts, layerPullRequestService is provided outside ModelAlertReactor.layer, so the service is present at runtime.
  • F3 (nit), fixed. The settled-thread comment in PullRequestSyncReactor.ts is updated, and the signature is now built with threadPullRequestKeyOf.

Not blocking: no reactor-level test drives currentAlert through the host reread (F2) or through null-run staleness (F1). Those paths are covered only by reading the code and by the pure-function tests. Each delivery attempt on an open-prs: alert makes one uncached host read per open link. That is bounded by the outbox retry cadence.

Checks at head 018491d20c2d: vp test run on ThreadEventAlerts.test.ts, ModelAlertReactor.test.ts, PullRequestSyncReactor.test.ts and eventSubscription.test.ts passed 181/181. vp run typecheck in apps/server exited 0. Required CI on this head is green: Deploy line declared, the four Voice + inbox jobs, and CodeRabbit.

{
  "reviewed_base": "caf9ebeb0cae23bee584f7b0acf3856fb6f6cada",
  "reviewed_head": "d1330429f200d24d943d5627cbd8aa3fbb7ebd01",
  "rechecked_head": "018491d20c2d59e856896df10ccdace09703ddbd",
  "reviewer": "Claude Opus 5.5 (claude-opus-5-5), Claude Code via T3 Code",
  "author_session": "mcp:launch:3e368848c32c998138e477993eaa5d4c7584ac27d683359da7aec7c0fa424e92",
  "reviewer_session": "claude-code:0c935e85-ca60-4b0f-932c-93337bb2c37c",
  "fresh_context": true,
  "review_kind": "focused_recheck",
  "round_id": "mcp:launch:4d799ee525ad7dcffd2251244b224bf13140cb26c41e7b6d9d98f3140bc2f74c",
  "intent": [
    "nullStack65/closura-agent-config issue #916 item 1: keep sweeping open pull request links on settled threads until terminal",
    "nullStack65/closura-agent-config issue #916 item 2: dedupe lane-ended alerts per thread and open-PR set across runs and clear on settle",
    "nullStack65/closura-agent-config issue #916 item 3: re-read pull request state before delivering lane-ended alerts rather than trusting a stale snapshot"
  ],
  "prior_findings": ["F1", "F2", "F3"],
  "findings": [
    {
      "id": "F1",
      "severity": "important",
      "outcome": "confirmed",
      "file": "apps/server/src/orchestration-v2/ThreadEventAlerts.ts",
      "line": 225,
      "summary": "Deduplicating completed open-PR lane-ended findings by `open-prs:...` while `threadEventAlert` stamps `runId: shell.latestRunId` and `ModelAlertReactor.currentAlert` checks `alertIsStale(shell, alert.runId)` drops all alerts when a second run completes before the first run's outbox entry is delivered (e.g. during `busyWatcherHold`): Run 2 is skipped via `state.reported`, Run 1's queued alert is dropped as superseded by `run:2`, and `afterDrop` leaves `open-prs:...` in `state.reported` permanently.",
      "check": "confirmed at 018491d20c2d by the range-diff since d1330429f200: currentAlert passes runId null to stillCurrent for open-prs lane-ended alerts (ModelAlertReactor.ts:1185-1186), the re-judge still gates live/failed/changed-set, and afterDrop forgets an undelivered open-prs signature via forgetDroppedOpenPrReport (ModelAlertReactor.ts:394-405, 670); new ModelAlertReactor.test.ts case passes; 181/181 focused tests pass",
      "rechecked_head": "018491d20c2d59e856896df10ccdace09703ddbd"
    },
    {
      "id": "F2",
      "severity": "important",
      "outcome": "confirmed",
      "file": "apps/server/src/orchestration-v2/ModelAlertReactor.ts",
      "line": 1151,
      "summary": "nullStack65/t3code pull request #209 closes nullStack65/closura-agent-config issue #916 without implementing requested fix item 3 (re-reading pull request state at delivery rather than trusting a stale snapshot): `currentAlert` evaluates `threadEventStillHolds` only against cached `shell.pullRequests`, so a pull request merged or closed externally within the 1m/5m sync interval (or newly linked with `snapshot: null`) still delivers a false `lane-ended` open-PR wake.",
      "check": "confirmed at 018491d20c2d: withHostPrStates (ModelAlertReactor.ts:1208-1234) rereads open/unsynced links via PullRequestService.summary with bypassCache true and re-judges on withPullRequestStates (ThreadEventAlerts.ts:124-134); a merged/closed link leaves the open set so the signature no longer matches and the alert drops; PullRequestService is provided around ModelAlertReactor.layer in server.ts:1017-1021; typecheck exit 0",
      "rechecked_head": "018491d20c2d59e856896df10ccdace09703ddbd"
    },
    {
      "id": "F3",
      "severity": "nit",
      "outcome": "fixed",
      "file": "apps/server/src/orchestration-v2/PullRequestSyncReactor.ts",
      "line": 884,
      "summary": "Comment `// Settled threads are not swept, so read their links once to settle with fresh status.` is now stale after `isDue` started sweeping open/unsynced links on settled threads on `SLOW_SYNC_INTERVAL_MS`; also `ThreadEventAlerts.ts:219` can use `threadPullRequestKeyOf(link)` for canonical case-insensitive host/repository keys.",
      "check": "fixed at 018491d20c2d: comment rewritten (PullRequestSyncReactor.ts:884) and openPrSignature uses threadPullRequestKeyOf (ThreadEventAlerts.ts:248)",
      "rechecked_head": "018491d20c2d59e856896df10ccdace09703ddbd"
    }
  ]
}

@nullStack65

Copy link
Copy Markdown
Owner Author
{
  "reviewed_base": "caf9ebeb0cae23bee584f7b0acf3856fb6f6cada",
  "reviewed_head": "d1330429f200d24d943d5627cbd8aa3fbb7ebd01",
  "rechecked_head": "018491d20c2d59e856896df10ccdace09703ddbd",
  "reviewer": "Gemini 4 Carbon (High), Antigravity",
  "author_session": "mcp:launch:3e368848c32c998138e477993eaa5d4c7584ac27d683359da7aec7c0fa424e92",
  "reviewer_session": "mcp:launch:2c5bfccb5d3ed84d3051037db76d950aea1bb5ec959f597b50a9fefc75bce621",
  "fresh_context": true,
  "review_kind": "focused_recheck",
  "round_id": "mcp:launch:4d799ee525ad7dcffd2251244b224bf13140cb26c41e7b6d9d98f3140bc2f74c",
  "intent": [
    "nullStack65/closura-agent-config issue #916 item 1: keep sweeping open pull request links on settled threads until terminal",
    "nullStack65/closura-agent-config issue #916 item 2: dedupe lane-ended alerts per thread and open-PR set across runs and clear on settle",
    "nullStack65/closura-agent-config issue #916 item 3: re-read pull request state before delivering lane-ended alerts rather than trusting a stale snapshot"
  ],
  "prior_findings": [
    "F1",
    "F2",
    "F3"
  ],
  "findings": [
    {
      "id": "F1",
      "severity": "important",
      "outcome": "confirmed",
      "file": "apps/server/src/orchestration-v2/ThreadEventAlerts.ts",
      "line": 225,
      "summary": "Deduplicating completed open-PR lane-ended findings by `open-prs:...` while `threadEventAlert` stamps `runId: shell.latestRunId` and `ModelAlertReactor.currentAlert` checks `alertIsStale(shell, alert.runId)` drops all alerts when a second run completes before the first run's outbox entry is delivered (e.g. during `busyWatcherHold`): Run 2 is skipped via `state.reported`, Run 1's queued alert is dropped as superseded by `run:2`, and `afterDrop` leaves `open-prs:...` in `state.reported` permanently.",
      "check": "confirmed at 018491d20c2d via git range-diff since d1330429f200 and Node v26.13.1 checks: currentAlert passes runId null to stillCurrent for open-prs lane-ended alerts (ModelAlertReactor.ts:1185-1186), re-judge drops live/failed/settled/changed-set alerts, and afterDrop clears undelivered open-prs signatures via forgetDroppedOpenPrReport (ModelAlertReactor.ts:394-405, 670); vp lint, vp run --filter t3 typecheck, and 181/181 focused orchestration tests passed",
      "rechecked_head": "018491d20c2d59e856896df10ccdace09703ddbd"
    },
    {
      "id": "F2",
      "severity": "important",
      "outcome": "confirmed",
      "file": "apps/server/src/orchestration-v2/ModelAlertReactor.ts",
      "line": 1151,
      "summary": "nullStack65/t3code pull request #209 closes nullStack65/closura-agent-config issue #916 without implementing requested fix item 3 (re-reading pull request state at delivery rather than trusting a stale snapshot): `currentAlert` evaluates `threadEventStillHolds` only against cached `shell.pullRequests`, so a pull request merged or closed externally within the 1m/5m sync interval (or newly linked with `snapshot: null`) still delivers a false `lane-ended` open-PR wake.",
      "check": "confirmed at 018491d20c2d via git range-diff since d1330429f200 and Node v26.13.1 checks: withHostPrStates (ModelAlertReactor.ts:1208-1234) rereads open and unsynced links via PullRequestService.summary with bypassCache: true and recoverTransientFailure: false, falling back to stored state on non-interrupt failures, and re-judges on withPullRequestStates (ThreadEventAlerts.ts:123-134); vp lint, vp run --filter t3 typecheck, and 181/181 focused orchestration tests passed",
      "rechecked_head": "018491d20c2d59e856896df10ccdace09703ddbd"
    },
    {
      "id": "F3",
      "severity": "nit",
      "outcome": "fixed",
      "file": "apps/server/src/orchestration-v2/PullRequestSyncReactor.ts",
      "line": 884,
      "summary": "Comment `// Settled threads are not swept, so read their links once to settle with fresh status.` is now stale after `isDue` started sweeping open/unsynced links on settled threads on `SLOW_SYNC_INTERVAL_MS`; also `ThreadEventAlerts.ts:219` can use `threadPullRequestKeyOf(link)` for canonical case-insensitive host/repository keys.",
      "check": "confirmed fixed at 018491d20c2d: comment updated in PullRequestSyncReactor.ts:884 and openPrSignature uses threadPullRequestKeyOf in ThreadEventAlerts.ts:248",
      "rechecked_head": "018491d20c2d59e856896df10ccdace09703ddbd"
    }
  ]
}

Focused Re-check (nullStack65/t3code pull request #209 at 018491d20c2d59e856896df10ccdace09703ddbd)

  • Range inspected: git range-diff caf9ebeb0cae23bee584f7b0acf3856fb6f6cada..d1330429f200d24d943d5627cbd8aa3fbb7ebd01 caf9ebeb0cae23bee584f7b0acf3856fb6f6cada..018491d20c2d59e856896df10ccdace09703ddbd plus git show --remerge-diff d1330429f200d24d943d5627cbd8aa3fbb7ebd01. Commit 54004c1472 and merge commit d1330429f200 are unchanged; 018491d20c2d is the sole new commit in the pull request range and introduces no new defects.
  • Finding dispositions:
    • F1 (important → confirmed): currentAlert now passes runId = null to stillCurrent for open-prs: lane-ended alerts so a subsequent run no longer marks a queued open-PR alert stale before delivery, while threadEventStillHolds still drops it if the lane restarts, fails, settles, or changes its open pull request set, and afterDrop forgets undelivered open-prs: signatures via forgetDroppedOpenPrReport.
    • F2 (important → confirmed): withHostPrStates rereads open/unsynced pull request links via PullRequestService.summary (bypassCache: true, recoverTransientFailure: false) and applies withPullRequestStates before threadEventStillHolds, suppressing false wakes when a pull request merged or closed within the sync interval (including unsynced snapshot: null links without a watch) while preserving stored state on transient host errors.
    • F3 (nit → fixed): Stale settled-thread comment updated in PullRequestSyncReactor.ts and openPrSignature normalized via threadPullRequestKeyOf.
  • Verification: Ran vp lint, vp run --filter t3 typecheck, and vp test run across PullRequestSyncReactor.test.ts, ModelAlertReactor.test.ts, ThreadEventAlerts.test.ts, and eventSubscription.test.ts on 018491d20c2d59e856896df10ccdace09703ddbd (Node v26.13.1, 4/4 suites, 181/181 tests passing).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant