Repository navigation
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a narrowly scoped server bug fix that restores inactivity settlement for persisted open PR links without changing settings defaults or introducing new workflows. Comprehensive policy and runtime regression tests cover retention, mixed link states, unknown snapshots, and settlement-worker behavior. You can add or adjust custom eligibility rules. Learn more. |
Preserve inactivity settlement with PR retention off and its policy and SQLite worker regression coverage.
|
Taking over this one. I’ll reduce the tests to the useful coverage, update the implementation against current main, and verify it before publishing the changes. |
Problem
An idle thread with a synced open link in
pullRequests[]bypasses inactivity settlement even when Keep threads with a PR is off. The early return prevents the retention setting and inactivity threshold from being evaluated.Change
Open persisted links now block merge/close settlement while allowing the existing inactivity rule to run. Visible persisted links participate in the retention check. Unknown snapshots still block settlement, and terminal-link selection and existing candidate guards keep their behavior.
Scope and approval
Fixes #19728, following the maintainer-confirmed direction. This restores the behavior established by #9610 and the opt-in retention setting from #14642. The change is confined to the shared server settlement policy and its regression coverage; no settings defaults, contracts, or client code change. Adjacent #18937 and #18232 address different settlement rules.
Verification
Verified on macOS arm64, Node 24.21.0, pnpm 11.10.0, against main
21bedfb175.ThreadSettlementService.test.ts,ProjectionSettlement.test.ts, andruntimeLayer.test.ts, including after rebasing onto current main.git diff --checkpassed. Typecheck emits existing nonblocking Effect suggestions.Commands:
No live multi-day sweep, provider, UI, mobile, or remote-connection pass was run. Tests ran in a new isolated clone/worktree with task-owned resources; the user's live app and sessions were not used.
Implemented and independently reviewed with GPT-6 through Codex.