feat(client): add tracked option for env IPC#458
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fb19a127bf
ℹ️ 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".
|
|
||
| #[napi] | ||
| pub fn get_env(&self, name: String, _options: Option<GetEnvOptions>) -> Result<Option<String>> { | ||
| pub fn get_env(&self, name: String, options: Option<GetEnvOptions>) -> Result<Option<String>> { |
There was a problem hiding this comment.
Add the changelog entry for tracked env opt-outs
This exposes { tracked } to the public Node client, which is a user-facing behavior change. The root AGENTS.md instruction says user-facing features or behavior changes must add an entry to CHANGELOG.md via /update-changelog, but this diff leaves CHANGELOG.md unchanged; release notes will omit the new getEnv(..., { tracked: false }) behavior.
Useful? React with 👍 / 👎.
397eb93 to
d8da9c9
Compare
fb19a12 to
6dab0e4
Compare
6dab0e4 to
1074c41
Compare
d8da9c9 to
cf5f1ad
Compare
1074c41 to
b5e2a40
Compare
cf5f1ad to
2a8601f
Compare
2a8601f to
860acd1
Compare
b5e2a40 to
863801a
Compare

Motivation
Some tools need to ask the runner for env values without making those reads cache dependencies. The default should stay safe, but callers need an explicit opt-out for env reads that only affect diagnostics or optional behavior.
Scope
Add a
trackedflag to bothgetEnvandgetEnvsIPC requests and Rust/Node clients. The option defaults totrue;tracked: falsestill serves the env value or match set but filters that read out of the post-run cache fingerprint. IPC records keep the tracked flag monotonic so a later tracked read of the same name or pattern wins over an earlier untracked read.This PR is intentionally placed after the getEnvs fingerprint PR so the opt-out is implemented against both env APIs at once.
Verification
cargo check -p vite_taskcargo test -p vite_task_server --test integrationcargo test -p vite_task_bin --test e2e_snapshots fetch_env_untracked_does_not_invalidate -- --ignoredcargo test -p vite_task_bin --test e2e_snapshots fetch_envs_untracked_does_not_invalidate -- --ignoredcargo clippy --locked --all-targets --all-features -- -D warnings