Keep pinned runs outside completed retention quota - #1051
Conversation
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
cf7d073 to
118d1a2
Compare
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
118d1a2 to
82e1e6c
Compare
|
Exact-head review requested for 82e1e6c. This is rebased onto production main f3fb4d8. Focused retention test passed 100x normally and 50x under race; complete internal/harness normal/race and foreground ./scripts/test-regression.sh passed with 85.7% coverage and zero uncovered functions. @codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Closes #1048
Summary
Root cause
Subscriber-pinned terminal states consumed
MaxCompletedRetentiondespite being ineligible for pruning. Under a limit of one, that allowed a just-completed run to be removed before itsStartRuncaller could subscribe.Test-first evidence
Hosted race CI exposed the existing
TestRunner_PruneKeepsCompletedRunWithActiveSubscriberregression ascollect extra run 2 events: run not foundbefore the production fix.Exact-head verification
Rebased retention-only head
d8e7c261fc5680c10d599be080844d0837587b98onto production mainf3fb4d8e911210d53cb43e8e3163b24bda70cca1.-count=100-count=100internal/harnesspackage normal/race./scripts/test-regression.sh: PASS, 85.6% total coverage, zero uncovered functionsRollout / rollback
No migration or flag. Revert this commit if subscriber cancellation fails to reclaim pinned state or the number of unpinned drainable terminal states exceeds the configured limit.
Related: #958, #1000, #1047, #1045, #1043, #1041, #1033.