Skip to content

fix(cache): honor explicit untrackedEnv for tool-reported reads - #856

Open
jasonkuhrt wants to merge 4 commits into
voidzero-dev:mainfrom
jasonkuhrt:codex/untracked-env-queries
Open

jasonkuhrt wants to merge 4 commits into
voidzero-dev:mainfrom
jasonkuhrt:codex/untracked-env-queries

Conversation

@jasonkuhrt

@jasonkuhrt jasonkuhrt commented Oct 16, 2026 •

Copy link
Copy Markdown

Note

AI-authored PR. Code and tests by Codex (GPT-6); reviewed by Claude Opus 5.5.

Motivation

Refs #505; related proposal: #693.

Currently untrackedEnv controls the spawned environment, but tools' tracked getEnv and getEnvs reads still invalidate the cache for those variables. This makes it impossible for task config to exclude volatile values from broad tool-reported queries.

Explicit cache.untrackedEnv patterns now override both scalar and bulk tool-reported dependencies, including additions and removals. This changes existing explicit configs: to keep a tool-reported variable tracked, declare it in cache.env or exclude it from untrackedEnv with !. Command-prefix assignments remain fingerprinted.

For GitHub Actions run metadata, a task can explicitly configure untrackedEnv: ['ACTIONS_*', 'GITHUB_*', 'RUNNER_*']. Built-in passthrough defaults do not cancel tool-reported tracking, so default configs are unchanged: a Vite build still invalidates when VITE_MAPBOX_TOKEN changes.

Complete observations remain stored, so removing an exclusion restores invalidation even with an unchanged cache key. Validation uses filtered iterators and compiles an override matcher only when needed. Existing default patterns, serialized cache keys and the cache format are unchanged.

jasonkuhrt and others added 3 commits October 16, 2026 08:11
Apply the existing untracked contract to bulk queries while retaining explicit reads and non-UTF-8 validation. Builds on the approach proposed in voidzero-dev#693.

Co-authored-by: Codex (GPT-6) <noreply@openai.com>
Co-authored-by: Codex (GPT-6) <noreply@openai.com>
Keep complete environment observations and apply explicit task overrides consistently during validation. Preserve built-in passthrough defaults as tool dependencies and add a real Vite stale-bundle regression.

Co-authored-by: Codex (GPT-6) <noreply@openai.com>
@jasonkuhrt jasonkuhrt changed the title fix(cache): honor untrackedEnv in bulk environment queries fix(cache): honor explicit untrackedEnv for tool-reported reads Oct 16, 2026
Co-authored-by: Codex (GPT-6) <noreply@openai.com>

This branch has not been deployed

No deployments
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