carlos / platform Public

review brief: agent login by link, round 1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 5128198f710f6083bbcab604b8ad3084fc844c03 parent fb063e8
1 file changed, +68 −0
  • docs/superpowers/specs/CODEX-REVIEW-BRIEF-agent-login-link.md +68 −0

CI cancelled — superseded by a newer push — run details

Intent

Human

Yes review.

Attributed to this commit: 8.39 g CO₂e (1,011,995 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/specs/CODEX-REVIEW-BRIEF-agent-login-link.md b/docs/superpowers/specs/CODEX-REVIEW-BRIEF-agent-login-link.md
new file mode 100644
index 000000000..c06cfea7c
--- /dev/null
+++ b/docs/superpowers/specs/CODEX-REVIEW-BRIEF-agent-login-link.md
@@ -0,0 +1,68 @@
+# Review brief: spec "Agent login by link", round 1 of 3
+
+Repo carlos/platform, branch `design-agent-login-link`, commit: the commit
+that adds this file.
+Under review: `docs/superpowers/specs/2026-11-07-agent-login-link-design.md`.
+Authorities: main's code (internal/console/authcli.go, emailsignin.go,
+emailsignin_store.go, emailsignin_limits.go, stepup.go,
+templates/cli_approve.html, the module-root auth.go) and
+`docs/superpowers/specs/2026-10-21-console-email-signin-design.md`.
+
+You are an independent reviewer. Read the document, then the code it
+names, and check every claim against that code.
+
+## Fixed: do not re-argue
+
+- Paul's rulings R1 (approve by link after checking the code), R2 (email
+ code in any browser with per-address limits), R3 (secrets: the person's
+ choice, later slice), recorded in the spec's "Why". Report only
+ mechanisms that fail to honour them, or that weaken a control the spec
+ says it keeps.
+
+## What to check
+
+1. Device-code phishing after R1: with the typed code gone, do the kept
+ controls (session, CSRF, step-up on Approve, issuance notice, deny,
+ 10-minute TTL, the page's "does your agent show this code?") still do
+ what the spec claims? Is anything that today depends on typing (e.g.
+ the wrong-code limiters as an oracle bound, the "describe before
+ approve" step) silently lost? Is resolving the code on GET a new
+ oracle or a CSRF-able state change?
+2. R2 edges as specified (form address wins, any live challenge matches
+ as one guess, limiter keying only when a live challenge exists): any
+ enumeration oracle (timing, limiter behaviour, different replies), any
+ way to burn or lock out someone else's challenge, any conflict with
+ the email sign-in spec's flow-cookie reasons (throttle oracles, the
+ double-click race).
+3. The next= path: signed out at /auth/cli?code=X, sign in by email link or
+ code or Keymail in another browser, land on the approval page. Does
+ main's code (v0.34.21: sign-in redirects to /?next=, handleHome
+ honours next) actually carry ?code= through safeNext, the challenge
+ row's next, and the Keymail next cookie?
+4. CLI `--no-wait` / `--wait`: is the pending-file design sound
+ (permissions, stale/expired handling, wrong console), and does it fit
+ how auth.go stores credentials today?
+5. Anything the spec claims about current code that is false.
+
+## Severity
+
+- **P1**: unsafe, would not work, or contradicts the code. Blocks approval.
+- **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 gives the section, the problem, the
+evidence (file:line, verified), the failure scenario, a concrete fix and
+the invariant or trust boundary it breaks. End with exactly one verdict:
+
+- **READY**: no P1 and no P2.
+- **READY AFTER FIXES**: no P1. The listed P2s are fixed without another
+ round.
+- **NOT READY**: one or more P1s, listed.
+
+Do not edit files. Do not spawn Anthropic-model reviewers or subagents of
+your own. Do not run the full test suites.