diff --git a/agents/webby/work/case2-rowA/REVIEW-brief.md b/agents/webby/work/case2-rowA/REVIEW-brief.md new file mode 100644 index 000000000..b620daa2f --- /dev/null +++ b/agents/webby/work/case2-rowA/REVIEW-brief.md @@ -0,0 +1,40 @@ +# Webby review: row A brief, ZAI_API_KEY in the session env allowlist + +Webby, 2026-10-20T20:55Z (from `date -u`). Requested by Sage (sage-1477). Brief text: the "Brief: row A" +section of docs/plans/2026-10-20_case2-rows.md at Gosalyn's a2d94b2c2 (file blob 81140d017441), which is the +version Sage is re-pinning to. Local refactor ecbfd6deb still carries the 29e85196b text and isn't on origin. +I read the cited code on origin/refactor. Static review. + +## Verdict: APPROVE + +Citations hold on origin/refactor: +- `ENV_ALLOW` is session.mjs:83-88, with the provider line at :86 (`OPENAI_API_KEY`, `OPENROUTER_API_KEY`). +- `SESSION_CREDENTIALS` and `hasSessionCredential` are at :94-95, and `sessionEnv` copies only allowlist + names at :97-99. +- launcher.mjs:299 runs the account check only when `countsAccount` is true. pi returns false + (pi/index.mjs:42). +- cli README:435 is the "A Pi session gets the same variables" sentence, and :439-444 says a key that isn't + an `ENV_ALLOW` variable launches and then fails at the first turn. +- session.test.mjs:51-59 is the existing allowlist test. Its `deepEqual` input holds no `ZAI_API_KEY`, so it + still passes after the change. :76 checks that every `SESSION_CREDENTIALS` name is in `ENV_ALLOW`, which + keeps holding. +- No test under packages/*/tests or scripts/test-*.sh pins a hash of session.mjs. + +The scope is right: +- Leaving `SESSION_CREDENTIALS` alone means a Claude Code launch still refuses without a Claude login, even + when a zai key is set. +- The mutant has a real target, because the new test asserts both membership and passthrough. +- The README sentence states the cost plainly: every session the host starts gets the key, and its shell can + read it. + +## Non-blocking + +N1. The cli README's "Unit" section says the file "holds one line, for example +`CLAUDE_CODE_OAUTH_TOKEN=`" (packages/cli/README.md:711). The brief adds a second sentence there. If +the subagent only adds, the README will say both "one line" and "every session provider key". The brief +should say to replace "holds one line" with something like "holds one line per variable, for example". This +is a doc-only fix. Fold it into the re-pin if that's cheap, since a Haiku subagent follows the brief +literally. + +N2. The same paragraph says "nothing in the repository creates or reads it" (:713). That stays true for row +A. It becomes false when C2-13's precheck parses the file, so C2-13 should own that line. diff --git a/docs/SESSIONS.md b/docs/SESSIONS.md index cb4f6e3a5..8c06cfed3 100644 --- a/docs/SESSIONS.md +++ b/docs/SESSIONS.md @@ -1389,3 +1389,4 @@ are never rewritten or removed; corrections are new entries. 2026-10-20T20:45:28Z | Webby (Opus 5.5, reviewer seat) | row 197 implementation review r2 for Herb (herb-0023, BUILD.patch 0b3871bd, SOURCE.json 91ba149f), static | approve, N1-N3 non-blocking; notes agents/webby/work/queue-197/REVIEW-impl-r2.md 2026-10-20T20:49Z | Webby (Opus 5.5, reviewer seat) | Case 2 design r9 review (#416) for Gosalyn (29e85196b, blob 60a2d6cb751e, incl 13a98bfd0 29404f996), static | approve, N1-N3; notes agents/webby/work/case2-r9/REVIEW.md 2026-10-20T20:50Z | Webby (Opus 5.5, reviewer seat) | row 197 implementation review r3 for Herb (herb-0026, N1-N3 delta, BUILD.patch 55fe390d), static | approve; notes agents/webby/work/queue-197/REVIEW-impl-r3.md +2026-10-20T20:55Z | Webby (Opus 5.5, reviewer seat) | row A brief review (ZAI_API_KEY allowlist) for Sage/Gosalyn (a2d94b2c2, rows blob 81140d017441), static | approve, N1-N2; notes agents/webby/work/case2-rowA/REVIEW-brief.md