Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ A monorepo task runner (like Nx/Turbo) with intelligent caching and dependency r
- `crates/vt_graph` — Task dependency graph construction and config loading
- `crates/vt_plan` — Execution planning (resolves env vars, working dirs, commands)
- `crates/vt_workspace` — Workspace detection and package dependency graph
- `crates/vt_fs_fingerprint` — Filesystem fingerprinting for task caching (pre-run snapshot, traced-access judgment, cache-entry validation)
- `crates/fspy*` — File system access tracing (9 crates: supervisor, preload libs, platform backends)
- `crates/pty_terminal*` — Cross-platform headless terminal emulator (3 crates)
- `crates/vt_path` — Type-safe absolute/relative path system
Expand Down
27 changes: 24 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ tui-term = "0.3.1"
twox-hash = "2.1.1"
uuid = "1.18.1"
vec1 = "1.12.1"
vt_fs_fingerprint = { path = "crates/vt_fs_fingerprint" }
vt_glob = { path = "crates/vt_glob" }
vt_graph_ser = { path = "crates/vt_graph_ser" }
vt_path = { path = "crates/vt_path" }
Expand Down
5 changes: 2 additions & 3 deletions crates/vt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ wincode = { workspace = true, features = ["derive"] }
clap = { workspace = true, features = ["derive"] }
ctrlc = { workspace = true }
derive_more = { workspace = true, features = ["debug", "from"] }
fspy_shared = { workspace = true }
futures-util = { workspace = true }
once_cell = { workspace = true }
owo-colors = { workspace = true }
petgraph = { workspace = true }
pty_terminal_test_client = { workspace = true }
rayon = { workspace = true }
rusqlite = { workspace = true, features = ["bundled"] }
rustc-hash = { workspace = true }
serde = { workspace = true, features = ["derive", "rc"] }
Expand All @@ -42,9 +42,9 @@ tokio = { workspace = true, features = [
] }
tokio-util = { workspace = true }
tracing = { workspace = true }
twox-hash = { workspace = true }
materialized_artifact = { workspace = true }
uuid = { workspace = true, features = ["v4"] }
vt_fs_fingerprint = { workspace = true }
vt_glob = { workspace = true }
vt_path = { workspace = true }
vt_select = { workspace = true }
Expand All @@ -54,7 +54,6 @@ vt_ipc_shared = { workspace = true }
vt_plan = { workspace = true }
vt_server = { workspace = true }
vt_workspace = { workspace = true }
wax = { workspace = true }
zstd = { workspace = true }

# Artifact build-deps must be unconditional: cargo's resolver panics when
Expand Down
28 changes: 19 additions & 9 deletions crates/vt/docs/task-cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,11 @@ The cached execution result:

```rust
pub struct CacheEntryValue {
pub post_run_fingerprint: PostRunFingerprint,
pub input_fingerprints: InputFingerprints, // vt_fs_fingerprint (opaque)
pub tracked_env_fingerprints: TrackedEnvFingerprints,
pub std_outputs: Arc<[StdOutput]>,
pub duration: Duration,
pub globbed_inputs: BTreeMap<RelativePathBuf, u64>,
pub output_archive: Option<Str>,
}
```

Expand Down Expand Up @@ -348,19 +349,20 @@ Cache entries are serialized using `bincode` for efficient storage.
│ • Stop monitoring │
│ │ │
│ ▼ │
│ 2. Generate Post-Run Fingerprint
│ 2. Conclude the run (vt_fs_fingerprint)
│ ───────────────────────────────── │
│ • Hash all accessed files
│ • Record file system access patterns
│ • Judge traced accesses (read-write overlap check)
│ • Fingerprint discovered inputs, collect outputs
│ │ │
│ ▼ │
│ 3. Create CacheEntryValue │
│ ──────────────────────────── │
│ CacheEntryValue { │
│ post_run_fingerprint, │
│ input_fingerprints, │
│ tracked_env_fingerprints, │
│ std_outputs, │
│ duration, │
globbed_inputs, │
output_archive, │
│ } │
│ │ │
│ ▼ │
Expand Down Expand Up @@ -565,13 +567,21 @@ Each `&&` separated command is cached independently. If only terser config chang
### Core Cache Components

```
crates/vt_fs_fingerprint/src/ # Filesystem fingerprinting (own crate)
├── task_run.rs # TaskFs (pre_run/post_run), Conclusion
├── fingerprint.rs # InputFingerprints, PathFingerprint, InputChange
├── tracked_accesses.rs # fspy access normalization
├── glob.rs # Glob walking + input hashing
└── hash.rs # Content hashing

crates/vt/src/session/
├── cache/
│ ├── mod.rs # ExecutionCache, CacheEntryKey/Value, FingerprintMismatch
│ └── display.rs # Cache status display formatting
├── execute/
│ ├── mod.rs # execute_spawn, SpawnOutcome
│ ├── fingerprint.rs # PostRunFingerprint, PathFingerprint, DirEntryKind
│ ├── mod.rs # execute_spawn, SpawnOutcome, cache lookup
│ ├── cache_update.rs # Post-run cache update decision
│ ├── post_run.rs # TrackedEnvFingerprints (tracked env validation)
│ └── spawn.rs # spawn_with_tracking, fspy integration
└── reporter/
└── mod.rs # Reporter traits for cache hit/miss display
Expand Down
1 change: 0 additions & 1 deletion crates/vt/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
mod cli;
mod collections;
mod napi_client;
pub mod session;

Expand Down
2 changes: 1 addition & 1 deletion crates/vt/src/session/cache/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ mod tests {
fn inline_tracked_env_mismatch_preserves_kind() {
let added = CacheStatus::Miss(CacheMiss::FingerprintMismatch(
FingerprintMismatch::TrackedEnvQueryChanged {
query: crate::session::execute::fingerprint::TrackedEnvQuery::Glob(Str::from(
query: crate::session::execute::post_run::TrackedEnvQuery::Glob(Str::from(
"PROBE_*",
)),
mismatch: EnvMismatch::Added { name: Str::from("PROBE_C") },
Expand Down
Loading
Loading