reviews: Astra brief for #1056 round 2
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/superpowers/reviews/CODEX-REVIEW-BRIEF-SERVICES-SECRET-SCRIPTS-1056-R2.md+20 −0
CI cancelled — superseded by a newer push — run details
Intent
<task-notification> <task-id>a113a9327c0527fa2</task-id> <tool-use-id>toolu_013Wx1SmGGjeAFzL8zhfrhXH</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/96a09f74-e398-48ed-a97f-140bd1f7e255/tasks/a113a9327c0527fa2.output</output-file> <status>completed</status> <summary>Agent "Implement #1056 CLI secret ergonomics" finished</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>All five round-1 findings are fixed, and the branch is pushed to amadan.net with tip 8479c42c, fast-forward. Targeted tests, golden replay and the census tests pass at that tip. **P1:** with `--json`, everything except the JSON object now goes to stderr for the whole command. That includes the "account: …" line and the account chooser. Tests cover create and rotate with a configured default, a single membership, and an old console. Each checks that stdout is exactly one JSON object. **P2-2:** if the object can't be written, the command exits non-zero and says so on stderr, without the secret. Tested with a failing writer, and through the binary with stdout on `/dev/full` for both create and rotate. **P2-3:** Git Bash / MSYS2 terminals now count as terminals too (`isatty.IsCygwinTerminal`). **P2-4:** neither the CLI nor the console has a per-value limit, so stdin is capped at 64 KiB (named constant `secretsStdinMaxBytes`). Tests cover exactly the cap, one byte over, and an input that never ends. **P2-5:** the name check now applies only to `secrets set`; `env set` accepts `FILTER=FILTER=active` again. `secrets set --literal` stores such a value on purpose, tested end to end. Luna's two docs edits are applied. I mutation-checked the 8 new guards and each one is caught by a test. The census proposal was re-run: same disposition, only the claim changed (body). gofmt, vet, build, and the darwin and windows builds are clean. Two golden lines for `secrets set -h` were updated for the new flag. **Strings that need the copy pass:** - Changed (was approved): `…nothing stored. Give the value on its own, or add --literal if it really starts that way.` - New: `%s: the value on stdin is larger than 64 KiB: nothing stored.` - New: `%s: %s was %s, but its secret could not be written (%v). Rotate it for a new one: carlos services rotate --account %s %s` - New: the `--literal` flag help, `store a value that starts with its own key and = as it is`, and `[--literal]` added to the usage line. - Docs: `The value can be up to 64 KiB.` and `If a secret really does start that way, add --literal to store it as it is.` **Commits:** a6478cb9, e5109f06, fb76d475, 8479c42c</result> <usage><subagent_tokens>205116</subagent_tokens><tool_uses>29</tool_uses><duration_ms>454817</duration_ms></usage> </task-notification>
Attributed to this commit: 13.7 g CO₂e (1,798,460 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on services-secret-scripts-1056, never backward from it. A turn that produced more than one commit books all of its tokens to the last one, and a concurrent session on this branch can add to the same figure. Some of it was priced using the shared default rate, because no model-specific factor row exists yet for at least one model involved. The Carbon view has the repo total, which is never derived from this attribution.
diff --git a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-SERVICES-SECRET-SCRIPTS-1056-R2.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-SERVICES-SECRET-SCRIPTS-1056-R2.md| new file mode 100644 |
| index 000000000..6d9fe764e |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-SERVICES-SECRET-SCRIPTS-1056-R2.md |
| @@ -0,0 +1,20 @@ |
| +# Review brief: #1056 service secrets in scripts, branch, round 2 of 3 |
| + |
| +Repo carlos/platform, branch `services-secret-scripts-1056`, commit 8479c42ce20b98efedcc022f40ad83d9f5aaaa7c. Diff: `origin/main..884bb164140b59f4d699328f69f256a3589969c1`. Issue: `amadan discuss show carlos/platform 1056`. |
| + |
| +The change: (1) `carlos services create|rotate --json` prints one JSON object (secret included) and nothing else on stdout; (2) `carlos secrets set --app A KEY -` reads the value from stdin (one key per command, one trailing newline stripped, refused on a terminal, empty refused); (3) secrets set and env set refuse a value that starts with its own key name and "=". |
| + |
| +Check: |
| +1. Secret handling: the secret appears only in the JSON object on stdout in --json mode; never in stderr, logs, error messages or argv; the stdin value never echoed in any refusal (including the name refusal and read errors). No change to what the console stores. |
| +2. Stdin parsing: interaction with existing argument forms (KEY=VALUE pairs, KEY=- storing "-", multiple keys, --environment), exactly-one-newline stripping, binary or very large input (is there a size cap?), Windows/darwin builds, terminal detection on all platforms. |
| +3. --json: stable field names and types, no human text leaks onto stdout, exit codes unchanged, rotate's object. |
| +4. The name refusal: no false positives for legitimate values that happen to start with KEY= (should any be allowed?), applies equally to env set. |
| +5. Tests: would each fail without its guard? |
| +6. **Census:** `docs/superpowers/notes/census-proposal-services-secret-scripts-1056.md` and its overlay: APPROVED or REFUSED per changed unit (you are the census reviewer). |
| +7. docs/site/cli.md accurate to the code. |
| + |
| +Severity P1 (blocks) / P2 (fixed without another round) / P3 (follow-up). End with READY, READY AFTER FIXES or NOT READY. Do not edit files; no subagents; targeted `go test -run` only (GOCACHE unset). |
| + |
| +## Round 2 |
| + |
| +Round 1: `CODEX-FINDINGS-SERVICES-SECRET-SCRIPTS-1056-R1.md`. Controller calls: the name guard applies to `secrets set` only, with `--literal` as the deliberate escape (env set unguarded); stdin capped at 64 KiB (no existing per-value limit). First one line per R1 finding: resolved, partly or not. Then new findings with the invariant beside each. Re-give census verdicts for the re-frozen overlay. |