Repository navigation
chore(ci): partition archived runs by UTC day - #4166
Merged
Merged
Conversation
This was referenced Nov 17, 2026
This was referenced Nov 17, 2026
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.
Closes #4130
What changed
New archived runs use
YYYY-MM/run/DD.jsonbased on UTCrun.createdAt; other kinds stay monthly. Legacy monthly run blobs remain unchanged and readable. Both report commands share deterministic run/attempt joins across layouts, retaining newer/richer observations and refusing conflicting identities. The dated decision amendment, archive guide, inventory and workflow describe the transition.Why this shape
Implements the maintainer's 2026-11-17 option B ruling. Natural UTC days give late arrivals a stable location. Numbered parts can reshuffle and compression obscures text diffs. No live archive dispatch or publication was performed.
Proof
Refresh after clean merge of current
origin/main: the run fixture now returnsTimingSnapshotexplicitly; the deep-equality check compares the same arrays with operands reversed to satisfy the typed matcher. All behavioral assertions remain.NODE_OPTIONS=--max-old-space-size=8192 bun run typecheck: passed.Refreshed focused tests: 37 passed, 359 assertions.
Refreshed
bun run check:pr --base origin/main: passed, including 1,214 affected invariant tests.Failing first: daily-path expectations against the original writer failed (3 archive tests; expected
2026-07/run/12.json, got monthlyrun.jsonor missing daily path).Placement mutation: replacing daily selection with monthly selection failed
UTC_DAY_PARTITIONS, showing two monthly paths instead of four UTC day paths.Boundary mutation: allowing
MAX_FILE_BYTES + 1failed the daily overflow assertion because the promise resolved instead of refusing. Both mutations restored.bun run test tests/ci-archive.test.ts tests/ci-timings.test.ts tests/ci-evidence-report.test.ts: 37 pass, 0 fail, 359 assertions. Covers late arrivals, UTC offset/day/month boundaries, unchanged historical blob bytes, deterministic mixed-layout joins and replay, both report inputs, unknown versions, leakage refusal and real exact-lease concurrent writers. Exactly 95 MiB passes; one byte over refuses before any commit.bun run check:pr --base origin/main: all checks passed, including 1,214 affected fast invariant tests.Existing repository-wide citation drift is tracked by docs: reconcile accumulated citation drift before the next release #3626; archive source citations are valid.
{"version":1,"kind":"brain-check-pr-receipt","head":"0b336f9b906c74c8b1e957b25f301935b294a4cc","base":"origin/main","mode":"focused","startedAt":"2026-11-17T09:40:34.578Z","finishedAt":"2026-11-17T09:42:19.168Z","checks":[{"name":"all lint and leakage gates","categories":["changeset"],"outcome":"passed","elapsedMs":17774.813049},{"name":"environment documentation","categories":["changeset"],"outcome":"passed","elapsedMs":132.83902999999918},{"name":"pending changeset package names","categories":["changeset"],"outcome":"passed","elapsedMs":157.11149999999907},{"name":"contribution changeset","categories":["changeset"],"outcome":"passed","elapsedMs":19.945106000002852},{"name":"affected fast invariants","categories":["verify","unit"],"outcome":"passed","elapsedMs":86487.320378}]}Off-main qualification
Exact-head CI after the orchestrator refresh merge: https://github.com/schlessera/brain-kit/actions/runs/44082827503, head
0ea997b774f375888d82fad3d1a0981b42878897, completedsuccess.Exact-head CI after the orchestrator refresh merge: https://github.com/schlessera/brain-kit/actions/runs/44081657952, head
ffe98524bac7062e080b03a8418c4d2fb8e92c74, completedsuccess.Exact-head CI after the orchestrator refresh merge: https://github.com/schlessera/brain-kit/actions/runs/44064721612, head
95724c9534139c8b5965f7eb594d32e62711877a, completedsuccess.Exact-head CI after the orchestrator refresh merge: https://github.com/schlessera/brain-kit/actions/runs/44060884007, head
843918cf1ed29ffa55b00ba3bb008442a6f5f186, completedsuccess(the refresh merged main's #4160 proof-input change, so the earlier run on0b336f9b9no longer qualifies).Exact-head draft CI: https://github.com/schlessera/brain-kit/actions/runs/44058030415, head
0b336f9b906c74c8b1e957b25f301935b294a4cc. It runs the selected offline invariants and repeats changed archive tests under load. At handback it is in progress; this is not a claim of completed hosted proof. Local offline tests compare daily/mixed-layout inputs against equivalent single-layout reports. Candidate confirmation belongs to the orchestrator.Guard containment
A record in the wrong UTC partition or an incompatible run identity refuses that read/publication; it does not change unrelated archive data or proof/merge eligibility. Skipping a conflicting observation would silently misstate evidence, so reports refuse rather than label it clean. Size overflow refuses the whole proposed publication to avoid partial source receipts; the inspected ref stays intact. A subsequent valid batch can publish automatically. CLI errors and the workflow's retained result/log expose the cause. The boundary test proves a valid batch succeeds before an oversized batch refuses without another commit; existing leakage and concurrency tests prove unaffected records and competing writers survive. Unknown versions, leakage screening and exact-lease publication retain their existing behavior.
Checklist
Collision check
bun scripts/collisions.ts --json --pr 4166at head0b336f9b906c74c8b1e957b25f301935b294a4cc: 12 closure-only reports, no direct path, textual or unknown collisions. Shared test/import closures overlap #3054, #3056, #3059, #3069, #3581, #3622, #4002, #4036, #4151, #4155, #4157, #4167. The graph was built for this head; these are dependency overlaps, not a lock.Anything left open
Hosted candidate proof and landing belong to the orchestrator. No follow-up issues filed. Existing citation cleanup remains #3626.