refactor(cache): extract filesystem fingerprinting into vt_fs_fingerprint crate - #594
Open
wan9chi wants to merge 2 commits into
Open
refactor(cache): extract filesystem fingerprinting into vt_fs_fingerprint crate#594wan9chi wants to merge 2 commits into
wan9chi wants to merge 2 commits into
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
fspy benchmarklinuxmacoswindows |
wan9chi
force-pushed
the
claude/extract-filesystem-tracing-e49e4b
branch
from
August 5, 2026 11:14
f6991a1 to
69a31cb
Compare
…rint crate Move the filesystem story of task caching out of the execution engine into a new crate so the unsettled read-write-overlap policy can be reasoned about and tested with synthetic traces: pre-run input snapshot, traced-access judgment, input fingerprints, produced outputs, and cache-entry validation. The engine keeps storage, archiving, env tracking, and spawning. The cache entry layout is restructured around the opaque InputFingerprints record (CACHE_SCHEMA_VERSION 18 -> 19; old caches are ignored via the versioned dir). Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
wan9chi
force-pushed
the
claude/extract-filesystem-tracing-e49e4b
branch
from
August 5, 2026 11:17
69a31cb to
51f03f9
Compare
…ction The entry fetch and the old-key miss classification previously ran as two separately-locked reads with the pre-run snapshot walk between them, leaving a window where a concurrent run of the same task could store an entry and break the classifier's "the current key just missed" assumption. Both reads now share one deferred read transaction under a single lock hold, so they see the same database snapshot; the classification arrives atomically with the fetch. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.
Motivation
The logic that turns traced filesystem accesses into cache decisions — fingerprinting inputs, collecting outputs, and the read-write-overlap verdict ("did the task modify its own input?") — lived inside the execution engine, interleaved with process spawning, IPC, SQLite storage, archiving, and reporting. The overlap policy is unsettled and will be rewritten several times; until now the only way to exercise any of it was to run a whole task through the engine.
This extracts the filesystem story into a new
crates/vt_fs_fingerprintcrate where it can be driven directly with synthetic traces and temp directories:TaskFs::pre_run— before the task executes: validate the io configuration, snapshot the listed inputs, and (given a previous run's fingerprints) report the first input that changed.TaskFs::post_run— after it finished: judge the traced accesses and return eitherConclusion::InputModified(caching unsound) orConclusion::Cacheablewith the run's opaqueInputFingerprintsand its outputs.The engine keeps storage, archiving, env-fingerprint tracking, and spawning; its cache module shrinks to storage primitives and the lookup orchestration moves next to execution (fetch-first: the entry is fetched, then
pre_runcompares against it).Behavior is preserved — the full e2e snapshot suite passes untouched. Two deliberate exceptions: which error is reported when several things fail at once may differ in edge cases, and the cache entry layout is restructured around the opaque fingerprint record, so
CACHE_SCHEMA_VERSIONbumps 18 → 19 (existing caches are ignored once via the versioned cache directory).🤖 Generated with Claude Code