Repository navigation
fix(performance): retention keeps a monitor run this store never examined - #1455
Merged
Juliusolsson05 merged 10 commits intoSep 27, 2026
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
Review disposition (head 39174f1)
Accepted residual (B6, owner proxy, 2026-09-27): another store's write can land between retention's check (unchanged / touched) and its Other residuals:
Gate at 39174f1: |
…ed-run Keeps both sets of unknown-is-protected rules: main's refused / foreign incident runs and set-aside scan, and this branch's examinedRuns, touchedSince and foreign-file fingerprints; main's rewrite path in writeRunIncidents is behind foreignChanged too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sted alone After merging main, touchedSince kept #1411's fresh 1970-clock fixtures on its own, so the foreignIncidents, refusedAsideRuns and listing-failure unindexed guards lost their failing tests. Those tests now use the real clock and aged() fixtures; each fails without its guard. Adds the two-store carried-rows retention test (B6 check 2110). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Juliusolsson05
marked this pull request as ready for review
September 27, 2026 21:07
Juliusolsson05
changed the base branch from
main
to
integration/batch-2026-09-27-r
September 27, 2026 21:32
Juliusolsson05
merged commit Sep 27, 2026
2e539f6
into
integration/batch-2026-09-27-r
2 checks passed
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1453.
Plan (first commit):
docs/plans/2026-09-27-monitor-unexamined-run.md.Problem
MonitorHistoryStore.maintain()deleted every run folder its in-memory maps did not know. Those maps are filled only by startup indexing. A run created later, by a second store sharing the folder (--packaging-smokeskips the single-instance lock), was never examined, read as empty, and deleted on the next maintenance pass. That is the "never seen means empty" shape the q109/q115 rule forbids.What merges
examinedRuns: retention deletes a run as empty only if startup indexing examined it. A run that appeared later is unknown and waits for the next start to index it.[]);statfailure other than ENOENT;examinedRunsis forgotten when a run is deleted, so a name another store recreates is unexamined again.touchedSince; any failure counts as touched), so a run examined while empty and filled afterwards is kept.Residuals
unindexedRuns(the 128 MiB ceiling wins).touchedSince()and itsrm(). It needs two processes sharing the folder (--packaging-smokeonly) and a write in that sub-millisecond window. Closing it would need a cross-process lock on the monitor folder. Accepted by B6 (owner proxy) as a residual; no lock.Tests
examinedRunsguard dropped;The ELOOP case has two guards (noted in its test).
examinedRuns,touchedSinceand foreign-file fingerprints. Main's rewrite path inwriteRunIncidentsis behindforeignChangedtoo; the incident-guard and examined-guard mutations still fail on the merged code.touchedSincekept fix: one bad record no longer fails the whole set (C5 rows 8–12, #1251) #1411's fresh, 1970-clock fixtures on its own, so three of main's guards had lost their failing tests. The set-aside run, the foreign-only run and the listing-failure run now use the real clock andaged()fixtures. Each fails without its guard:foreignIncidents.has,refusedAsideRuns.has, and the unindexed mark on a failed listing.npx tsc -bis clean;src/main/performancepasses, 13 files / 82 tests atc77a0e61.🤖 Generated with Claude Code