carlos / platform Public

spec rev 3.1: Astra round 3 READY AFTER FIXES, P2 applied

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 258433977cda48b018e50d6ac826034d0e584133 parent 1018f8b
2 files changed, +37 −5
  • docs/superpowers/specs/2026-11-07-agent-login-link-design.md +10 −5
  • docs/superpowers/specs/CODEX-FINDINGS-agent-login-link-R3.md +27 −0

CI failed — run details

Intent

Human

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

Attributed to this commit: 8.47 g CO₂e (1,092,323 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 44c18ea1a..9467c9f2a 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,7 +1,8 @@
# Agent login by link
-Status: rev 3 for Paul, 2026-11-07. Astra rounds 1 and 2:
-`CODEX-FINDINGS-agent-login-link.md`, `-R2.md`. Accepted findings are
+Status: rev 3.1 for Paul, 2026-11-07. Astra rounds 1-3:
+`CODEX-FINDINGS-agent-login-link.md`, `-R2.md`, `-R3.md`; round 3 READY
+AFTER FIXES, its one P2 applied (R3-1). 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
@@ -183,9 +184,13 @@ 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
+**(codex R2-4, R3-1)**: only the newest email a browser was SENT works.
+An accepted request in the same browser creates a new challenge, and that
+kills the browser's earlier email, link and code alike
+(CreateEmailChallenge; emailsignin_test.go asserts it). A refused resend (a
+double tap, or a request inside the resend gap) creates nothing and keeps
+the existing live challenge (HoldEmailChallenge), so the email already
+sent keeps working. 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
diff --git a/docs/superpowers/specs/CODEX-FINDINGS-agent-login-link-R3.md b/docs/superpowers/specs/CODEX-FINDINGS-agent-login-link-R3.md
new file mode 100644
index 000000000..442555a9d
--- /dev/null
+++ b/docs/superpowers/specs/CODEX-FINDINGS-agent-login-link-R3.md
@@ -0,0 +1,27 @@
+- R2 finding 1, P1 — **Resolved by the cut:** cross-browser email-code matching is removed.
+- R2 finding 2, P1 — **Resolved by the cut:** conditional address accounting is removed.
+- R2 finding 3, P2 — **Resolved:** GET lookups and CSRF-protected decisions have separate budgets.
+- R2 finding 4, P2 — **Partly resolved:** replacement invalidates older links, but the wording still incorrectly includes refused resend requests.
+- R2 finding 5, P2 — **Resolved:** attribution from the same GeoIP snapshot is required.
+
+Reviewed commit `1018f8bfed673828ccc6c65bf7bc06997cf01143`. The referenced implementation matches local `origin/main` at `0d55ef8c455e10c4bc709c45c9b3ab7a22aabee8`. No files changed, subagents spawned, or tests run.
+
+No P1 findings.
+
+1. **P2 — §4: requesting another email does not always invalidate the previous one.**
+
+ **Problem:** [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) says asking again kills the earlier link and code. Replacement happens only when a new challenge is created.
+
+ **Evidence:** a rate-limited resend calls `HoldEmailChallenge` at [server.go:3936](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-agent-login-link/internal/console/server.go:3936), which preserves an existing live challenge at [emailsignin_store.go:171](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-agent-login-link/internal/console/emailsignin_store.go:171). The existing test explicitly checks successful redemption after refused requests at [emailsignin_test.go:1107](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-agent-login-link/internal/console/emailsignin_test.go:1107).
+
+ **Failure scenario:** someone double-taps Continue or immediately requests another email. The second request is throttled; no replacement email arrives, and the first link remains valid despite the specification saying it was killed.
+
+ **Concrete fix:** qualify replacement as occurring when an accepted request creates a new challenge. Explicitly state that a refused resend preserves the existing live challenge. No implementation change is needed.
+
+ **Invariant:** documented challenge replacement must preserve the existing double-click and throttled-resend recovery behaviour.
+
+No P3 findings. No remaining operative text depends on cross-browser email codes. The split-budget requirements preserve decision capacity against forced GETs and require refusal before resolution. The `next` chain, retained approval gates, and pending-file requirements are compatible with the current code.
+
+Fix the P2 without another review round.
+
+**READY AFTER FIXES**
\ No newline at end of file