Uh oh!
There was an error while loading. Please reload this page.
feat(cache): fingerprint tracked getEnv reads - #448
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
5e3b5ec to
51a8c0cCompare29db327 to
e9111bdComparece0d262 to
93cfb02Compare97761ba to
4b74a2cCompare93cfb02 to
b77c960Compare4b74a2c to
c45b304Compareb77c960 to
aef9617Comparec45b304 to
b96d1bdCompareaef9617 to
fee0f27Compareb96d1bd to
b3d0921Comparefee0f27 to
67b6aa2CompareThere was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:aef96174a2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if fingerprinted.contains_key(name_str) { | ||
| return None; | ||
| } | ||
| let value = record.value.as_ref().and_then(|value| value.to_str().map(Str::from)); |
There was a problem hiding this comment.
Redact tracked env values before caching
When a runner-aware tool reads a secret such as GITHUB_TOKEN/NPM_TOKEN with the default tracked: true, this stores the raw value in the serialized PostRunFingerprint; on a later change SavedCacheMissReason::TrackedEnvChanged formats the same EnvMismatch, so old/new secret values can be persisted in the cache DB and emitted in the full task summary. Declared env fingerprinting hashes sensitive patterns in EnvFingerprints::resolve, but this new path bypasses that protection, so tracked envs should be hashed/redacted before storage/display.
Useful? React with 👍 / 👎.
83684b7 to
3dcd916Compare67b6aa2 to
f61eaacComparef61eaac to
8d340a9Compare0a8737d to
f19e16cCompare8d340a9 to
be64c57Comparebe64c57 to
136a98bCompare136a98b to
7a67801CompareMotivation: Once tools can read env values from the runner, cached tasks must remember tracked getEnv reads or a later run can replay stale output after the env changes. Scope: Make the getEnv tracked option meaningful, record served single-env values in IPC reports, store tracked getEnv values in the post-run fingerprint, validate them during cache lookup, and render env-specific cache miss messages. This PR intentionally does not implement getEnvs or env glob match-set tracking. Verification: - cargo test -p vite_task_server --test integration - UPDATE_SNAPSHOTS=1 cargo test -p vite_task_bin --test e2e_snapshots fetch_env_tracked_invalidates_on_change -- --ignored - UPDATE_SNAPSHOTS=1 cargo test -p vite_task_bin --test e2e_snapshots fetch_env_tracks_with_explicit_inputs -- --ignored - cargo test -p vite_task_bin --test e2e_snapshots fetch_env_tracked_invalidates_on_change -- --ignored - cargo test -p vite_task_bin --test e2e_snapshots fetch_env_tracks_with_explicit_inputs -- --ignored
7a67801 to
08b48f2CompareUh oh!
There was an error while loading. Please reload this page.
Motivation: Revert the accidental merge of #448 so the tracked getEnv fingerprinting change can return as a normal reviewed PR instead of being landed out of order. Scope: This is a mechanical revert of the #448 squash commit (`2055bb0c`). It removes the tracked getEnv fingerprinting implementation and e2e coverage that #448 introduced, returning `main` to the #447 state. Verification: - CI

Motivation
Once tools can read env values from the runner, cached tasks must remember tracked
getEnvreads. Otherwise a later run can replay stale output after a tracked env value changes.Scope
Make the
getEnvtracked option meaningful, record served single-env values in IPC reports, store tracked values in the post-run fingerprint, validate them during cache lookup, and render env-specific cache miss messages. This PR intentionally does not implementgetEnvsor env glob match-set tracking.Verification
cargo test -p vite_task_server --test integrationUPDATE_SNAPSHOTS=1 cargo test -p vite_task_bin --test e2e_snapshots fetch_env_tracked_invalidates_on_change -- --ignoredUPDATE_SNAPSHOTS=1 cargo test -p vite_task_bin --test e2e_snapshots fetch_env_tracks_with_explicit_inputs -- --ignoredcargo test -p vite_task_bin --test e2e_snapshots fetch_env_tracked_invalidates_on_change -- --ignoredcargo test -p vite_task_bin --test e2e_snapshots fetch_env_tracks_with_explicit_inputs -- --ignored