Repository navigation
fix(env): give each directory its own team env (#1018) - #1023
Conversation
deef0c4 to
407a767
Compare
The PR description’s testing record is sufficient, including representative real-CLI verification. |
The four previously reported findings are resolved in the current diff. The PR description includes sufficient real-CLI testing. |
The six earlier findings are resolved in the current diff. The PR description includes sufficient representative real-CLI testing. |
The previously reported findings are resolved in the current diff. The PR description includes sufficient representative real-CLI testing. |
The previously reported concrete cases are resolved. The PR description includes sufficient representative real-CLI testing. |
|
Findings
All previously reported findings are resolved in the current diff. The PR description includes sufficient representative real-CLI testing. |
|
Findings
All previously reported findings are resolved. The PR description includes sufficient representative real-CLI testing. |
|
Findings
All previously reported findings are resolved in the current diff. The PR description includes sufficient representative real-CLI testing. |
|
@jeff-r2026 could you re-run the Codex PR Review job for this head (run 38046833356)? It failed with |
|
Findings
The earlier reported findings remain resolved. The PR description includes sufficient representative real-CLI testing. |
|
Findings
The earlier findings predating the October 11 review pass are resolved. The PR description includes sufficient representative real-CLI testing. |
|
Findings
The previously reported findings are resolved in the current diff. The PR description includes sufficient representative real-CLI testing. |
|
Findings
The previously reported findings are resolved in the current diff. The PR description includes sufficient representative real-CLI testing. |
|
Findings
Earlier reported findings remain resolved. The PR description documents sufficient representative real-CLI and end-to-end testing. |
|
Findings
The previously reported findings are resolved. The PR description documents sufficient representative real-CLI and end-to-end testing. |
|
Findings
The previously reported findings are resolved in the current diff. The PR description documents sufficient representative real-CLI and end-to-end testing. |
|
Findings
The previously reported findings remain resolved. The PR description includes sufficient representative real-CLI and end-to-end testing. |
|
Findings
The other previously reported cases appear resolved. The PR description includes sufficient representative real-CLI and end-to-end testing. |
|
Findings
The previously reported findings appear resolved. The PR description includes sufficient representative real-CLI and end-to-end testing. |
|
Findings
The previously reported findings appear resolved in the current diff. The PR description includes sufficient representative real-CLI and end-to-end testing. |
|
Findings
The previously reported findings appear resolved in the current diff. The PR description includes sufficient representative real-CLI and end-to-end testing. |
|
Findings
The previously reported findings appear resolved. The PR description includes sufficient representative real-CLI and end-to-end testing. |
|
Findings
The previously reported findings appear resolved. The PR description includes sufficient representative real-CLI and end-to-end testing. |
|
Findings
The previously reported findings appear resolved in the current diff. The PR description documents sufficient representative real-CLI and end-to-end testing. |
|
Findings
The previously reported findings appear resolved. The PR description includes sufficient representative real-CLI and end-to-end testing. |
|
Findings
The previously reported findings appear resolved in the current diff. The PR description documents sufficient representative real-CLI and end-to-end testing. |
|
Findings
All previously reported findings appear resolved. The PR description documents sufficient representative real-CLI and end-to-end testing. |
|
Findings
The previously reported concrete cases appear resolved. The PR description includes sufficient representative real-CLI and end-to-end testing. |
The last pass’s diagnostic-environment and exported-variable detection findings are resolved. The PR description includes sufficient representative real-CLI testing. I only read the specified diff; I did not run, build, or install PR code. |
The latest diagnostic-environment and exported-variable detection findings are resolved. The PR description includes sufficient representative real-CLI testing; its older recorded commit is not blocking. I only read the specified diff and trusted base criteria; I did not run, build, or install PR code. |
The latest reported route-preservation, attribute-restoration, and Windows MCP cases are resolved. The PR description documents sufficient representative real-CLI testing. I only read the specified diff and trusted base criteria; I did not run, build, or install PR code. |
bash prints `declare -ix PORT=...` and zsh `export -i PORT=...`, so a member's exported integer came back unexported after leaving a project.
…IT_* A tool started from a project shell inherits the project's values; the check now puts back the member's ones before it runs the loader, so a project PATH without git no longer reports broken routing.
Keep the per-directory rules and the limits a member runs into; drop the loader internals and the profile-file selection details, and leave the README matrix as main has it.
…ml cannot resolve
…er or case attribute
364ba71 to
df27477
Compare
The previously reported secret-filtering and directory-loader attribute-coercion findings are resolved in this diff. The PR description documents sufficient representative real-CLI testing. I only read the specified diff and trusted base criteria; I did not run, build, or install PR code. |
…'s BASH_ENV gives the key an integer or case attribute
The previously reported findings appear resolved, including the latest The PR description documents sufficient representative real-CLI testing. I only read the specified diff and trusted base criteria; I did not run, build, or install PR code. |
…t#1023) * fix(env): load each directory's team env through one loader block Closes Tencent#1018 * fix(env): keep a variable exported when it has other attributes too bash prints `declare -ix PORT=...` and zsh `export -i PORT=...`, so a member's exported integer came back unexported after leaving a project. * fix(doctor): check a directory's env with the member's own PATH and GIT_* A tool started from a project shell inherits the project's values; the check now puts back the member's ones before it runs the loader, so a project PATH without git no longer reports broken routing. * docs(env): shorten the env-by-directory docs to what a member needs Keep the per-directory rules and the limits a member runs into; drop the loader internals and the profile-file selection details, and leave the README matrix as main has it. * docs(readme): mark env for Pi, DeepSeek Harness and ZCode through teamai env exec * fix(env): keep a scope's shell env while its env.yaml cannot resolve * fix(env): keep a variable's other attributes when leaving a project * docs(readme): shorten the env exec footnote * test(mcp): keep one spelling of a secret's name in a server's table on Windows * fix(env): keep a key now declared a secret out of shells while env.yaml cannot resolve * fix(env): deliver a team value as written to a variable with an integer or case attribute * fix(doctor): compare env names as Windows does when checking env.sh * docs(env): note how a variable's attributes survive a project * docs(readme): mark Muse Code's rules with the renamed always-on marker * fix(models): find Muse Code's key block in the zsh startup file the env loader uses * test(env): expect bash before 4.2 to leave the integer attribute off after a project * fix(env): deliver a team value as written in env exec when the member's BASH_ENV gives the key an integer or case attribute
Closes #1018
Summary
Team env follows the directory a shell starts in, not the project that pulled last.
env.shinheritUserScope: trueenv.sh, then the project's; never user secretsenv.shThe loader routes to the scope
resolveConfigForDirresolves, so shells,env exec, MCP,doctorand the session hint agree. Outside git that is the directory holding.teamaiitself, not its subdirectories, as for the CLI. While a scope's env can't be resolved, its row keeps routing to the lastenv.sh, the valuesenv execand MCP keep too, minus any key now declared a secret; a scope never delivered loads nothing, never the user scope's. Inside a project, and in a bashenv execstarts, a team value arrives as written, even into adeclare -i/-l/-uvariable. Leaving restores each key as the member had it, with its attributes (bash before 4.2, macOS's/bin/bash, can't restore one from a function).doctorchecks the directory with the member's ownPATH/GIT_*, and compares env names case-insensitively on Windows.The README marks env
✓²for Pi, DeepSeek Harness and ZCode: env reaches them only throughteamai env exec. The rules marker becomes✓¹(Muse Code included). For zsh, Muse Code's model key block now goes in the same.zshenv(or$ZDOTDIR/.zshenv) as the loader, and a restore takes it out of there.On Windows, MCP already compares a secret's name case-insensitively (
declaredSecretKeys().hasfolds throughenvName), so a member'stokennever sits beside the secretTOKEN; two win32 tests now pin that.Evidence
teamai pullin project B, a new shell in project A gets B's env anddoctorfails in A.After:
env-by-directory-1018.test.tspasses 3/3.env.yaml(or the values file) was broken stayed in shells (keeps a key ... now declares a secret, 4 rows);declare -ix TOKEN=3got team1+1as2(bash, zsh, also-l/-u), in a project and through a memberBASH_ENVunderenv exec; on win32doctorcalledjira_passwordmissing and leftover forJIRA_PASSWORD.After: all pass.
392de135, a project with teamTOKEN='1+1', member~/.bash_envwithdeclare -ix TOKEN=3:392de135: tsc, lint, build pass;npx vitest run9,402 passed, 20 skipped, and with/bin/bash3.2 first onPATH(as on the macOS runners) 9,397 passed, 23 skipped; e2e selected by the diff (all 112 files) 1,187 passed, 27 skipped, 1 failed (source-freshness-recall, which fails the same way onorigin/mainon macOS).Merge Danger
Door: two-way
Pull moves older per-scope blocks out of the profile;
teamai uninstallremoves the loader block. Rollback to an earlier release not exercised.Blast Radius: shells
Every bash and zsh startup sources the loader. User-scope env no longer loads inside a project unless it sets
inheritUserScope: true(in the changelog as breaking).