review brief: agent login by link, branch round 1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 files changed,
+84
−0
docs/superpowers/reviews/CODEX-REVIEW-BRIEF-agent-login-link-branch.md+63 −0docs/superpowers/reviews/agent-login-link-deferred.md+21 −0
CI cancelled — superseded by a newer push — run details
Intent
Attributed to this commit: 78.1 g CO₂e (9,939,443 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on design-agent-login-link, 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-agent-login-link-branch.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-agent-login-link-branch.md| new file mode 100644 |
| index 000000000..961cb20b7 |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-agent-login-link-branch.md |
| @@ -0,0 +1,63 @@ |
| +# Review brief: branch agent-login-link build, round 1 of 3 |
| + |
| +Repo carlos/platform, branch `design-agent-login-link`, commit: the commit |
| +that adds this file. Under review: the diff `432135aefefdd871414ee24a823ae275491c73b0..HEAD` (main already merged |
| +in; review only this branch's changes). |
| +Authorities: `docs/superpowers/specs/2026-11-07-agent-login-link-design.md` |
| +(rev 3.1, approved by Paul) and its plan |
| +`docs/superpowers/plans/2026-11-07-agent-login-link.md`. |
| + |
| +You are an independent reviewer. Read the spec, then the diff and the code it |
| +reaches, and check the build against the spec. |
| + |
| +## Fixed: do not re-argue |
| + |
| +- Paul's rulings in the spec's "Why" (R1 approve by link after checking the |
| + code; R2 withdrawn: email sign-in unchanged; R3 later slice). |
| +- Copy text was approved by Luna under Paul's delegation (rows in the |
| + commit "copy: agent login by link"); review meaning and safety only. |
| +- Controller rulings and deferred minors so far: |
| + `docs/superpowers/reviews/agent-login-link-deferred.md`. Triage which |
| + deferred minors must be fixed before merge. |
| + |
| +## What to check |
| + |
| +1. The approval gate: GET /auth/cli?code=X resolves only behind the GET |
| + lookup budget, writes nothing else, never spends the decision budget; |
| + POST continue/approve/deny check the decision budget before resolving; |
| + CSRF and step-up on Approve intact; Deny ungated; same 429 whatever the |
| + code past a budget; no Approve button for stale codes; output escaped; |
| + no code or token logged. |
| +2. The CLI: `--no-wait` prints verification_uri_complete and the code and |
| + exits; the pending file (0600, atomic, beside credentials, records the |
| + console); `--wait` uses the stored console, deletes only its own attempt, |
| + ends on approved/denied/unknown/expired (including its own expiry), keeps |
| + the file on transient failure; plain login untouched; token never printed; |
| + darwin/windows portability. |
| +3. Anything the spec requires that the build misses, or the build adds that |
| + the spec doesn't ask for. |
| +4. CENSUS: `docs/superpowers/notes/census-proposal-agent-login-link.md` |
| + (two new units authpending.go:loadPendingLogin and savePendingLogin; the |
| + module-root envelope re-pinned). Give the census verdict the card asks for |
| + (approve or reject per unit and for the envelope, with reasons). |
| + |
| +## Severity |
| + |
| +- **P1**: unsafe, would not compile, a test fails, or it would not work. Blocks merge. |
| +- **P2**: wrong or missing. Fixed without reopening this review. |
| +- **P3**: clarity or polish. Follow-up list; never a reason for another round. |
| + |
| +A P1 states its failure scenario and the evidence (file:line). Do not raise |
| +a P2 to P1 to keep the review open. |
| + |
| +## Output |
| + |
| +Findings ranked P1, P2, P3, each with evidence (file:line, verified), failure |
| +scenario, fix, and the invariant it breaks. Then the census verdict. Then the |
| +deferred-minors triage (must-fix before merge or not). End with exactly one |
| +verdict: **READY**, **READY AFTER FIXES** (no P1; listed P2s fixed without |
| +another round) or **NOT READY**. |
| + |
| +Do not edit files. Do not spawn Anthropic-model reviewers or subagents of your |
| +own. Do not run the full test suites; targeted `go test -run` on touched |
| +packages is fine (default GOCACHE). |
diff --git a/docs/superpowers/reviews/agent-login-link-deferred.md b/docs/superpowers/reviews/agent-login-link-deferred.md| new file mode 100644 |
| index 000000000..68e84bcaf |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/agent-login-link-deferred.md |
| @@ -0,0 +1,21 @@ |
| +Ruling: build on design-agent-login-link (spec + plan + code one branch, squash at merge) — one page for Paul — cost if wrong: none, squash collapses it. |
| +Ruling: implementers Sonnet (T1, T3, T4) / Opus (T2, security gate + template); task reviews Opus for T1/T2 (security gate), Sonnet for T3/T4; final review Astra (cross-family, also census) — cost if wrong: extra review spend only. |
| +Task 1: minor (deferred): test doesn't pin budget-before-step-up ordering (use postForm for approve past budget) |
| +Task 1: minor (deferred): test doesn't compare past-budget 429 body for wrong vs valid code |
| +Task 1: minor (deferred): spec-accepted trade-off: spent IP budget on shared NAT can block Deny/Approve for a window |
| +Task 1: minor (deferred): unused receiver on cliBudgetOpen/cliBudgetSpend (signature mandated) |
| +Ruling: Task 2 banner uses new key cli.signin_prompt; home.cli_prompt is pinned to approved copy by a test, retire it in Task 5 after copy review — cost if wrong: one dead copy key until T5 |
| +Ruling: location line renders the country NAME (countryName, analyticsdisplay.go) with the subdivision code in brackets, e.g. "United Kingdom (GB-ENG)", instead of "GB-ENG, GB" — spec says "country and subdivision as handleAPIGeo gives them"; names serve the person checking "is that where I am" — cost if wrong: one formatting change at copy review |
| +Task 2: minor (deferred): GeoLite2 attribution is a long sentence on the From line; consider own small line; add rel="noreferrer" on the attribution link |
| +Task 2: minor (deferred): lede states the self-reported label as fact; raise at copy review |
| +Task 2: minor (deferred): 429 text duplicated at GET and POST; share a helper/copy key so bodies can't drift |
| +Task 2: minor (deferred): no GET test for an expired code |
| +Task 2: minor (deferred): legacy em dashes in cli_approve.html text + old "No login is waiting" error; Task 5 copy review |
| +Ruling: cli.settings_link ('agents and terminals') belongs on the APPROVAL page's revoke sentence (spec §5 'Settings: command-line access becomes agents and terminals'), not the decided page; decided page keeps only Open your apps — cost if wrong: one link placement |
| +Task 3: minor (deferred): new test splits TestCLILoginDeny from its comment; move it |
| +Task 3: minor (deferred): no test for denied page or hostile-label escaping |
| +Task 3: minor (deferred): approved page dropped 30-day expiry / Keymail note / revoke link (copy review to confirm); Days unused there |
| +Task 3: minor (deferred): label read on deny is unused work |
| +Task 4: minor (deferred): approved-then-store-failure keeps file (retry gets unknown, clears later); confusing error |
| +Task 4: minor (deferred): package-level loginWaitCap would race if --wait tests go parallel; loginDeadline maybe dead on --wait path; first sleep can overshoot expiry by one interval |
| +Ruling: decline Luna's emptyOrDash row ("—" → "Not available"): emptyOrDash is a shared template helper used across many console pages, out of this branch's scope — cost if wrong: one dash left on the approval page's empty fields |