Skip to content

feat(client): add tracked option for env IPC#458

Open
wan9chi wants to merge 1 commit into
infra-get-envs-fingerprintfrom
infra-get-env-tracked-option
Open

feat(client): add tracked option for env IPC#458
wan9chi wants to merge 1 commit into
infra-get-envs-fingerprintfrom
infra-get-env-tracked-option

Conversation

@wan9chi

@wan9chi wan9chi commented Jun 14, 2026

Copy link
Copy Markdown
Member

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 tracked flag to both getEnv and getEnvs IPC requests and Rust/Node clients. The option defaults to true; tracked: false still 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_task
  • cargo test -p vite_task_server --test integration
  • cargo test -p vite_task_bin --test e2e_snapshots fetch_env_untracked_does_not_invalidate -- --ignored
  • cargo test -p vite_task_bin --test e2e_snapshots fetch_envs_untracked_does_not_invalidate -- --ignored
  • cargo clippy --locked --all-targets --all-features -- -D warnings

wan9chi commented Jun 14, 2026

Copy link
Copy Markdown
Member Author

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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>> {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@wan9chi wan9chi changed the title feat(client): add getEnv tracked option feat(client): add tracked option for env IPC Jun 14, 2026
@wan9chi wan9chi changed the base branch from codex/reapply-448 to graphite-base/458 June 14, 2026 09:13
@wan9chi wan9chi force-pushed the graphite-base/458 branch from 397eb93 to d8da9c9 Compare June 14, 2026 09:14
@wan9chi wan9chi force-pushed the infra-get-env-tracked-option branch from fb19a12 to 6dab0e4 Compare June 14, 2026 09:14
@wan9chi wan9chi changed the base branch from graphite-base/458 to infra-get-envs-fingerprint June 14, 2026 09:14
@wan9chi wan9chi changed the base branch from infra-get-envs-fingerprint to graphite-base/458 June 14, 2026 09:49
@wan9chi wan9chi force-pushed the infra-get-env-tracked-option branch from 6dab0e4 to 1074c41 Compare June 14, 2026 09:50
@wan9chi wan9chi force-pushed the graphite-base/458 branch from d8da9c9 to cf5f1ad Compare June 14, 2026 09:50
@wan9chi wan9chi changed the base branch from graphite-base/458 to infra-get-envs-fingerprint June 14, 2026 09:50
@wan9chi wan9chi changed the base branch from infra-get-envs-fingerprint to graphite-base/458 June 14, 2026 10:04
@wan9chi wan9chi force-pushed the infra-get-env-tracked-option branch from 1074c41 to b5e2a40 Compare June 14, 2026 10:04
@wan9chi wan9chi force-pushed the graphite-base/458 branch from cf5f1ad to 2a8601f Compare June 14, 2026 10:04
@wan9chi wan9chi changed the base branch from graphite-base/458 to infra-get-envs-fingerprint June 14, 2026 10:04
@wan9chi wan9chi force-pushed the infra-get-envs-fingerprint branch from 2a8601f to 860acd1 Compare June 14, 2026 10:08
@wan9chi wan9chi force-pushed the infra-get-env-tracked-option branch from b5e2a40 to 863801a Compare June 14, 2026 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant