Repository navigation
test(metadata-fs): external-write-resync drives the sweep at its seam, 24 s to 3.3 s (#23182 row 4) - #23262
Merged
objectstack-fleet[bot] merged 2 commits intoOct 13, 2026
Conversation
…, 24 s to ~3 s The file spent ~24 s of wall almost entirely idle: three sequential waits on the 2 s reconciliation cadence in the first case and three fixed 5 s quiet windows. One recovery, the lost create, still waits for the scheduled sweep with nobody calling anything, and the case now also requires the chain to re-arm behind it. Every other recovery and quiet window awaits resync() itself, so a quiet window is a count of sweeps that ran. The ENOENT case now requires each driven sweep to have met the injected fault. Claude-Session: https://claude.ai/code/session_01P88ehrZ6hM19hBzdpsQTTo Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P88ehrZ6hM19hBzdpsQTTo Co-authored-by: Claude <noreply@anthropic.com>
Contributor
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
This was referenced Oct 13, 2026
objectstack-fleet
Bot
deleted the
claude/issue-23182-metadata-fs-resync-test-budget
branch
October 13, 2026 14:04
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.
Part of #23182 (row 4)
Clause-②: no
This PR covers row 4 of #23182 only:
@objectstack/metadata-fs,test/external-write-resync.test.ts, 24.3 s in run38217670691. It changes one test file and no production file. #23182 stays open for rows 1, 3, 5 and 6.Where the 24 s went
Per case at BASE
6f4c518b01(vitest, ms): create/update/delete 6042–6169, exactly-once 6082–6124, unreadable directory 7030–7048, ENOENT 5012–5018, close 6.All of it was idle waiting, on two things:
RESYNC_INTERVAL_MS, a private constant insrc/repository.tsthat no option sets. Making it injectable would widenFileSystemRepositoryOptions, a published production surface, so I did not take that route.QUIET_WINDOW_MS), in the exactly-once, unreadable-directory and ENOENT cases.What changed (test only)
RECOVERY_WAIT_MS(15 s, unchanged). The case now also requires the chain to re-arm after that sweep:resyncTimermust be set again. This keeps the half of the pin that says the backstop runs by itself and keeps running.awaitthe privateresync(), the same body the timer runs. A quiet window is nowQUIET_SWEEPS = 3sweeps, where the old window was sized at "comfortably more than two sweeps".self-write-suppression.test.tsandexternal-delete-requires-absence.test.tsalready test this package this way. The watcher stays blinded exactly as before, so a recovered event can only come from a sweep.enoentServed). Before this change, the ENOENT case passed even if no sweep ran.put()in the unreadable-directory case is gone.put()is awaited and sets the head in the same continuation.RECOVERY_WAIT_MSandCASE_TIMEOUT_MSare unchanged. No case was deleted, skipped or moved.Wall time
Vitest module line, in ms, on a shared 4-core box under
os-verify-lock:6f4c518b0143fef097df--maxWorkers=2--maxWorkers=8(2x oversubscribed)origin/main(afbf960c26, which touches nothing in this package) was merged before the AFTER readings.Ablation: every case can still fail
Each leg changed
src/repository.tsthroughscripts/ablation-replace.mjs: the anchor count went from 1 to 0, and the marker was on disk. Each leg then ran the new file and a temporary copy of the BASE file in one vitest run. Afterwards, the file was restored to the HEAD blobf76f6dee4f48, withgit diff HEADempty. The test imports../src/index.js, so no dist is involved.resync()returns at oncescheduleResync()never armsheadsbefore each fileexistsSyncre-check removedGates, lint and typecheck (at
43fef097df)dispatch-gates --commands --repo objectstack-ai/objectstackgives 49 commands, identical to the dispatch list. All 49 ran.--ranwith exit codes reads "49 derived, 49 run, 0 NOT-MEASURED, 0 UNRUN".check:dual-build-cjs-loadsandcheck:lean-entry-closurefirst exited 3 (PREREQUISITE NOT MET, no dist). Both were re-run green afterturbo run build(75 tasks, 73 from cache).check:sourcemap-no-sources-contentwas also re-run after the build: 70 packages, 554 maps.pnpm --filter @objectstack/metadata-fs typecheckexits 0.tsc --listFilesontsconfig.test.jsonnames the test file once.eslint --no-inline-config --format jsonreports 1 file, 0 errors and 0 warnings.--print-configreturns a config for the file, so it is linted.ecmaVersionandsourceTypeonly. Without type-aware linting, the diff cannot change any other file's result.check:nul-bytesexits 0, and a control-byte scan of the file finds 0 lines.No changeset
This diff changes only a test. I built the package with
pnpm --filter @objectstack/metadata-fs buildand searched itsfiles(dist,README.mdandCHANGELOG.md). The test-only namesQUIET_SWEEPS,reportedByFirstSweep,enoentServedandblindWatcherhave 0 hits. The production controlsRESYNC_INTERVAL_MSandreportResyncFaulthit 2 and 4 files.skip-changesetis labelled.Acceptance notes
importfigure in the summary line), and no module line reports it. This is an observation only and is not filed. Carrier: none.Generated by Claude Code