carlos / platform Public

spec rev 3: cut any-browser code (Paul), round 2 P2 fixes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 1018f8bfed673828ccc6c65bf7bc06997cf01143 parent 519ccd5
3 files changed, +209 −94
  • docs/superpowers/specs/2026-11-07-agent-login-link-design.md +58 −94
  • docs/superpowers/specs/CODEX-FINDINGS-agent-login-link-R2.md +66 −0
  • docs/superpowers/specs/CODEX-REVIEW-BRIEF-agent-login-link-R3.md +85 −0

CI cancelled — superseded by a newer push — run details

Intent

Human

<task-notification> <task-id>b3crprt09</task-id> <tool-use-id>toolu_015YrSE9TmU5wUzRQBLmTj42</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/a1de5273-c148-49b8-8267-3dee9d49c9c1/tasks/b3crprt09.output</output-file> <status>completed</status> <summary>Background command "Run Astra spec review round 2" completed (exit code 0)</summary> </task-notification>

Attributed to this commit: 17.8 g CO₂e (2,151,585 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/2026-11-07-agent-login-link-design.md b/docs/superpowers/specs/2026-11-07-agent-login-link-design.md
index beaeffd5f..44c18ea1a 100644
--- a/docs/superpowers/specs/2026-11-07-agent-login-link-design.md
+++ b/docs/superpowers/specs/2026-11-07-agent-login-link-design.md
@@ -1,8 +1,10 @@
# Agent login by link
-Status: rev 2 for Paul, 2026-11-07 (rev 1 reviewed by Astra:
-`CODEX-FINDINGS-agent-login-link.md`; accepted findings are marked
-**(codex N)**; none declined). First slice of "agent-first onboarding
+Status: rev 3 for Paul, 2026-11-07. Astra rounds 1 and 2:
+`CODEX-FINDINGS-agent-login-link.md`, `-R2.md`. Accepted findings are
+marked **(codex N)** for round 1 and **(codex R2-N)** for round 2; none
+declined. Round 2's two P1s and round 1's three P1s were all in the
+any-browser code, which Paul cut (R2 below). First slice of "agent-first onboarding
and console parity"; the later slices are listed under Non-goals.
## Why
@@ -26,7 +28,12 @@ Paul's rulings (2026-11-07, in this session):
(authcli.go handleCLIApprovePage, auth.go's bare-URI print). GitHub and
Google accept the same risk.
- R2. An emailed sign-in code works in any browser, entered with its
- address, keeping the per-address guess limits.
+ address, keeping the per-address guess limits. **Withdrawn by Paul,
+ 2026-11-07, after Astra rounds 1-2** found five holes in one family
+ (address-wide code matching: search widening, link burning, login CSRF,
+ local challenges blocking, challenge-state oracle). The emailed LINK
+ already works in any browser and carries the pending approval with it,
+ so the code stays same-browser and the link is the cross-browser path.
- R3. Secrets are the person's choice: through the agent, or entered on
Carloku themselves. (Later slice; recorded here so this slice doesn't
close it off.)
@@ -37,7 +44,8 @@ Paul's rulings (2026-11-07, in this session):
one sign-in if not already signed in, one Approve.
2. It works when the link, the email and the approval open in different
browsers on one phone (the Claude app's in-app browser, Safari, a mail
- app's viewer).
+ app's viewer), by following links: the emailed sign-in link works in
+ any browser and lands that browser on the approval page.
3. It works for agents that only see a command's output when the command
ends (Claude Code's Bash tool returns output at exit; default timeout
2 minutes, the login lasts 10).
@@ -123,29 +131,37 @@ leaves a pending file alone. The file name is the builder's.
the code, large; the label with its "supplied by the machine asking"
caveat; where it dialled from (IP, plus country and subdivision from the
platform GeoIP answer, as handleAPIGeo gives them; the answer has no
- city; IP alone when there is no answer) **(codex 8)**; how long ago it
- started; when it expires. Then: Approve, and "That wasn't me".
+ city; IP alone when there is no answer) **(codex 8)**, with the
+ attribution credit from the same lookup snapshot whenever AttributionFor
+ returns one **(codex R2-5)**; how long ago it started; when it expires.
+ Then: Approve, and "That wasn't me".
- The question on the page is the check R1 depends on, in plain words:
"Does your agent show this code?" plus "If you didn't just ask an agent
or terminal to log in, press That wasn't me."
- Unknown, expired or already-decided codes say so and show the typed-code
box as today (it stays as the fallback for a code read off a screen).
-- Resolving on GET changes no state: it reads the request row and renders.
- Approve and Deny stay POSTs with the session's CSRF token.
-- Guess budget checked BEFORE any resolution **(codex 4)**. Today
+- Resolving on GET writes nothing but its own lookup budget, and Approve
+ and Deny stay POSTs with the session's CSRF token.
+- Guess budgets are checked BEFORE any resolution **(codex 4)**. Today
handleCLIApprove resolves first and counts only failures (authcli.go
~1666, ~1688), so a caller past the limit still learns whether a code is
- live. The fix applies to the new GET and the existing POST alike: a
- shared, concurrency-safe budget (per signed-in address and per IP) is
- consulted first; past it, every answer is the same 429 whatever the
- code; a lookup that finds nothing then spends one unit. A test proves a
- VALID code is refused once the budget is spent.
+ live. Two separate, concurrency-safe budgets, each per signed-in address
+ and per IP, are consulted first:
+ - the GET budget, spent by GET lookups that find nothing. A top-level
+ navigation carries the Lax session cookie without any CSRF token, so
+ it must never touch the decision budget **(codex R2-3)**;
+ - the decision budget, spent by POST continue, approve and deny that
+ find nothing, behind the CSRF check as today.
+ Past a budget, every answer on that path is the same 429 whatever the
+ code. Tests prove a VALID code is refused once its path's budget is
+ spent, and that forced GETs to bad codes leave a valid Approve working.
`GET /auth/cli?code=X`, signed out: unchanged. The front page asks the
person to sign in with next=/auth/cli?code=X. The email link and code
carry next on the challenge row and, since v0.34.21, land via `/?next=`,
-so whichever browser opens the email link (or takes the code, section 4)
-arrives on the approval page with the code. Keymail is narrower
+so whichever browser opens the email link arrives on the approval page
+with the code. (The emailed code works only in the browser that asked, as
+today; it lands that browser on the approval page the same way.) Keymail is narrower
**(codex 6)**: its ceremony keeps next in a cookie and must finish in the
browser that started it (state and PKCE live there, server.go ~4020), and
an ordinary Keymail sign-in records no step-up, so a Keymail person gets
@@ -159,70 +175,21 @@ works in the browser that asked, but whose code can be typed on the
waiting page. Making step-up links work in any browser is out of scope
for this slice (my call); the code box is the path.
-### 4. Email codes work in any browser (R2)
-
-Today a code is checked only against the newest live sign-in challenge of
-the browser's own flow (emailsignin.go handleEmailCode): another browser
-cannot use it, and the flow cookie is also the code path's login-CSRF
-fallback. Issuing a new challenge in a flow deletes that flow's earlier
-ones (CreateEmailChallenge), and a right code ends that flow's challenges.
-
-Rev 2 keeps every protection that binding gave and adds a cross-browser
-path that cannot be used to widen the search, destroy a link, or sign a
-victim's browser into someone else's account.
-
-**Browser-bound form nonce (codex 3).** Every page with a code box (the
-check page, and the front page's "I already have a code") sets a random
-nonce cookie and puts the same value in the form, exactly as the email
-link's confirm page does with linkConfirmCookie. `POST /auth/email/code`
-refuses, before anything is looked up or counted, unless the request is
-same-origin by sameOrigin's rules AND carries the cookie equal to the
-form's nonce. A cross-site auto-submit has no such cookie, so it cannot
-sign a victim's browser into the attacker's address. The nonce is not tied
-to any challenge, so it does not reintroduce the flow binding R2 removes.
-
-**Which challenges a code can match (codex 1, codex 5).**
-
-1. Same browser first: if this browser's flow has a live sign-in
- challenge for the form's address, the code is checked against it,
- exactly as today (attempts, burn, everything).
-2. Otherwise, cross-browser: the candidates are the address's live,
- SENT sign-in challenges, newest first, at most 3. A refused send's
- held row (HoldEmailChallenge) is never a candidate: the row needs a
- marker saying it was emailed, set only once the send succeeds. Since a
- flow keeps only its newest challenge, the candidates are the newest
- email from each of at most 3 browsers that asked.
-3. A right code against any candidate signs in and, in one transaction,
- ends EVERY live sign-in challenge for that address (all flows), not
- just this flow's. A wrong code is one guess however many candidates
- were checked.
-
-Same-flow replacement is unchanged: asking again in the same browser
-still kills that browser's earlier email (link and code). The "older
-email arrives late" case is handled by its link, which works in any
-browser, and by asking from the browser that will read the newest email.
-
-**Cross-browser guesses never burn a challenge (codex 2).** A wrong code
-on path 2 does not touch any candidate's attempts counter, so knowing an
-address never lets anyone destroy its holder's link or same-browser code.
-Path 2 is bounded instead by limits consulted BEFORE the lookup: wrong
-codes per address per day (10, today's wrongCodesPerAddrDay) and per IP
-per hour (30), plus a path-2-only cap of 3 wrong codes per address per
-hour. Past any of them the answer is today's throttled reply and nothing
-is checked. The per-address count is keyed only when the address has a
-live sent challenge; otherwise only the IP pays, the reply is identical,
-and attacker-chosen addresses create no per-address entries. The odds
-per address are at most 3 candidates x 10 guesses per day against a
-6-digit code (3 in 100,000 per day), and the emailed link, which is the
-high-entropy credential, is never reachable by guessing.
-
-Path 1 keeps today's per-challenge burn (5 wrong codes): only the browser
-that asked can spend it.
-
-**Front page.** "I already have a code" on the front page takes address
-plus code (with its nonce) and goes down the same two paths. My call: a
-mail app that opens links in its own viewer is exactly where the link
-fails and the code is the fallback.
+### 4. Email sign-in across browsers
+
+No change to email sign-in itself. The cross-browser path is the emailed
+link: it works in any browser (handleEmailLinkPage / handleEmailLink) and
+carries next, so it lands that browser on the approval page. The code
+stays bound to the browser that asked, with today's limits and burn.
+
+Stated precisely, because round 2 caught the earlier wording out
+**(codex R2-4)**: only the newest email a browser asked for works. Asking
+again in the same browser kills that browser's earlier email, link and
+code alike (CreateEmailChallenge; emailsignin_test.go asserts it). So the
+"Check your email" page's advice stays as it is: use the newest email. If
+an older email arrives late, its link says "Link expired" and the newest
+one is the one to tap. (A gentler answer for that case belongs with the
+first-run work, not here.)
### 5. Words
@@ -256,15 +223,14 @@ Drafts only; every string goes through copy review when built.
the approval page with the code → Approve works.
- Wrong or stale codes in the link count against the limiters; the page
answers unknown and expired codes the same way the form does.
-- Any-browser email code: a browser with no flow signs in with address +
- code; a request without the matching nonce cookie is refused before any
- lookup; a held (unsent) challenge never matches cross-browser; path-2
- wrong codes never burn a challenge and the victim's link still works
- after them; path-2 caps refuse a VALID code once spent; a right code
- ends every sign-in challenge for the address; a browser with its own
- flow still checks its own first and keeps the 5-guess burn.
-- CLI approval: a VALID code is refused (same 429) once the guess budget
- is spent, on GET and POST.
+- Cross-browser by link: sign in by the emailed link in a second browser
+ starting from /auth/cli?code=X; that browser lands on the approval page
+ with the code.
+- CLI approval: a VALID code is refused (same 429) once its path's budget
+ is spent, on GET and on POST; forced GETs to bad codes leave a valid
+ Approve working.
+- The location line carries the GeoIP attribution when the snapshot has
+ one.
- CLI pending file: an old `--wait` finishing after a newer `--no-wait`
leaves the newer file in place.
- CLI: `--no-wait` exits at once with the link and stores the pending
@@ -277,7 +243,5 @@ Drafts only; every string goes through copy review when built.
File names, flag spellings beyond `--no-wait` and `--wait`, how the GeoIP
place is formatted, and test structure. Marked "my call" above: the
-pending-login file's contents and lifecycle; the any-browser code's edges
-(two paths, at most 3 sent candidates, no cross-browser burn, limiter
-keying); step-up links stay same-browser; "I already have a code" on the
-front page; same-flow replacement unchanged.
+pending-login file's contents and lifecycle; step-up links stay
+same-browser.
diff --git a/docs/superpowers/specs/CODEX-FINDINGS-agent-login-link-R2.md b/docs/superpowers/specs/CODEX-FINDINGS-agent-login-link-R2.md
new file mode 100644
index 000000000..f5cb0e3a7
--- /dev/null
+++ b/docs/superpowers/specs/CODEX-FINDINGS-agent-login-link-R2.md
@@ -0,0 +1,66 @@
+- R1 finding 1, P1 — **Resolved:** cross-browser matching excludes unsent rows and caps candidates at three.
+- R1 finding 2, P1 — **Resolved:** cross-browser failures no longer burn challenges or their links.
+- R1 finding 3, P1 — **Resolved:** code submissions require a browser-bound nonce before lookup.
+- R1 finding 4, P2 — **Resolved:** CLI resolution now requires a shared, concurrency-safe budget check first.
+- R1 finding 5, P2 — **Partly resolved:** replacement and code-success cleanup are explicit; the older-email link claim remains false.
+- R1 finding 6, P2 — **Resolved:** Keymail’s browser binding and separate step-up are correctly qualified.
+- R1 finding 7, P2 — **Resolved:** pending-file cleanup compares attempts, with terminal and transient outcomes specified.
+- R1 finding 8, P2 — **Partly resolved:** country/subdivision replaces city, but required attribution remains unspecified.
+
+Reviewed `519ccd5d42c4c599a425a91f7cb090fcbb02cc9a`. The referenced implementation matches local `origin/main` at `0d55ef8c455e10c4bc709c45c9b3ab7a22aabee8`. No files changed, subagents spawned, or test suites run.
+
+1. **P1 — §4: a local challenge prevents “any browser” code redemption.**
+
+ Path 1 checks only the browser’s own challenge; path 2 runs **otherwise**, rather than after a non-match. See [design:186](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-agent-login-link/docs/superpowers/specs/2026-11-07-agent-login-link-design.md:186).
+
+ **Failure scenario:** browser A requests an email. Browser B requests the same address within the resend interval and receives an unsent placeholder. The person enters A’s valid emailed code in B. B selects its placeholder through path 1 and rejects the code; cross-browser matching never runs. This follows directly from [server.go:3935](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-agent-login-link/internal/console/server.go:3935) and [emailsignin_store.go:151](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-agent-login-link/internal/console/emailsignin_store.go:151). Two browsers with different sent challenges have the same problem.
+
+ **Concrete fix required if retained:** define one bounded matching operation that can accept another browser’s eligible sent code even when a local challenge exists. A local mismatch must not spend an additional guess or burn a challenge before that operation finishes. Include the refused-send placeholder scenario in the acceptance tests.
+
+ **Invariant / family:** R2’s address-wide matching must accept an eligible emailed code independently of the receiving browser’s existing flow.
+
+2. **P1 — §4: conditional address accounting exposes a live-challenge oracle.**
+
+ The design requires a distinct “today’s throttled reply” after three cross-browser failures, but creates address counters only when a live sent challenge exists. See [design:208](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-agent-login-link/docs/superpowers/specs/2026-11-07-agent-login-link-design.md:208). Today’s handler distinguishes throttled and wrong-code replies at [emailsignin.go:462](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-agent-login-link/internal/console/emailsignin.go:462) and [emailsignin.go:473](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-agent-login-link/internal/console/emailsignin.go:473).
+
+ **Failure scenario:** from a browser without a challenge, obtain the form nonce and submit four incorrect codes for an address. A live sent challenge produces the address-hour throttle on submission four. Without one, only four of the IP’s thirty guesses have been spent, so that throttle does not occur. This reveals active sign-in state, rather than necessarily account membership. Saying “the reply is identical” for the no-challenge case does not reconcile these different response transitions.
+
+ **Concrete fix required if retained:** specify indistinguishable responses for wrong, absent, expired and address-throttled cross-browser attempts, including consistent IP accounting and bounded equivalent work. Test the complete response sequence across those states, through and beyond the address cap.
+
+ **Invariant / family:** R2’s address-wide matching must not expose another browser’s challenge or throttle state. This conflicts with the flow-cookie protection recorded at [email-signin design:521](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-agent-login-link/docs/superpowers/specs/2026-10-21-console-email-signin-design.md:521).
+
+3. **P2 — §3: GET can spend the victim’s approval budget.**
+
+ “Resolving on GET changes no state” conflicts with charging failed GET lookups to the signed-in address and sharing that budget with POST decisions. See [design:133](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-agent-login-link/docs/superpowers/specs/2026-11-07-agent-login-link-design.md:133). Session cookies are `SameSite=Lax` at [server.go:3041](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-agent-login-link/internal/console/server.go:3041); current POST accounting occurs behind the CSRF check at [authcli.go:1626](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-agent-login-link/internal/console/authcli.go:1626).
+
+ **Failure scenario:** an attacker repeatedly navigates a signed-in browser to invalid approval links. Those top-level GETs carry its session cookie and exhaust its shared budget without a CSRF token. Valid Approve and Deny submissions then receive 429 until the window resets.
+
+ **Concrete fix:** give GET resolution a separate bounded budget that cannot exhaust POST decision capacity; retain CSRF-protected accounting for POSTs. Describe the limiter mutation accurately and test forced GETs followed by a valid decision.
+
+ **Invariant:** unsolicited navigation must not spend the browser’s protected decision budget.
+
+4. **P2 — §4, carried from R1 finding 5: a replaced email’s link does not remain usable.**
+
+ [Design:200](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-agent-login-link/docs/superpowers/specs/2026-11-07-agent-login-link-design.md:200) says replacement kills the earlier link, then says the late older-email case is handled by that link.
+
+ **Failure scenario:** two successful requests occur in the same flow, and the first email arrives last. Its link returns “Link expired” in every browser. `CreateEmailChallenge` deletes the earlier row at [emailsignin_store.go:139](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-agent-login-link/internal/console/emailsignin_store.go:139); [emailsignin_test.go:1018](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-agent-login-link/internal/console/emailsignin_test.go:1018) explicitly asserts that result.
+
+ **Concrete fix:** state that only the newest successful same-flow issuance works. Restrict the cross-browser-link fallback claim to challenges that remain live.
+
+ **Invariant:** the documented recovery path must agree with challenge replacement.
+
+5. **P2 — §3, carried from R1 finding 8: GeoIP attribution is still missing.**
+
+ [Design:124](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-agent-login-link/docs/superpowers/specs/2026-11-07-agent-login-link-design.md:124) now names supported location fields but omits their source attribution. The API supplies attribution at [apigeo.go:58](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-agent-login-link/internal/console/apigeo.go:58), and [pointer.go:101](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-agent-login-link/internal/geoip/pointer.go:101) defines the credit a page displaying that data must carry.
+
+ **Failure scenario:** the builder renders country/subdivision as specified but drops the accompanying required credit.
+
+ **Concrete fix:** require attribution from the same lookup snapshot whenever `AttributionFor` returns one, with a rendering check.
+
+ **Invariant:** displaying GeoIP data preserves the platform’s attribution contract.
+
+No P3 findings. The `next` chain preserves `?code=` through email challenges, `finishSignin`, `handleHome`, and same-browser Keymail. Session, CSRF and fresh-auth approval gates remain compatible with R1.
+
+Rev 2 closes the three original P1 mechanisms, but **does not close their address-wide-matching fault family**. Further corrective work would be needed in that family for a second consecutive round. Under the stopping rule, recommend cutting any-browser code redemption from this slice and retaining cross-browser emailed links, rather than starting another patch cycle. That scope change requires Paul’s decision because R2 remains a fixed ruling.
+
+**NOT READY**
\ No newline at end of file
diff --git a/docs/superpowers/specs/CODEX-REVIEW-BRIEF-agent-login-link-R3.md b/docs/superpowers/specs/CODEX-REVIEW-BRIEF-agent-login-link-R3.md
new file mode 100644
index 000000000..6d8f56490
--- /dev/null
+++ b/docs/superpowers/specs/CODEX-REVIEW-BRIEF-agent-login-link-R3.md
@@ -0,0 +1,85 @@
+# Review brief: spec "Agent login by link", round 3 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.
+
+## Round 3 (final)
+
+Earlier rounds: `CODEX-FINDINGS-agent-login-link.md` (round 1) and
+`CODEX-FINDINGS-agent-login-link-R2.md` (round 2), beside the spec.
+
+Paul's decision after round 2 (stopping rule 2): R2 is WITHDRAWN. The
+any-browser emailed CODE is cut; the emailed LINK (already any-browser) is
+the cross-browser path; email sign-in itself is unchanged. Do not review
+the cut design. Item 2 of "What to check" no longer applies.
+
+First give one line per round-2 finding (P1 1-2, P2 3-5): resolved (by the
+cut or a fix), partly, or not. Then check rev 3 for anything new, especially
+that no text still relies on the cut feature and that the two-budget CLI
+limiter (GET vs decision) is sound. This is the last round: a NOT READY
+also says whether the P1s share one cause and whether refusing the case up
+front or cutting the feature would remove them.