docs: claim readiness needs Keymail, not a mailer
Operator note: without a mailer only Keymail addresses can claim, and claimAvailable can be true while email codes are refused.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
README.md+1 −1
CI cancelled — superseded by a newer push — run details
Intent
<task-notification> <task-id>bta2v9cm4</task-id> <tool-use-id>toolu_01XEVS1qWZUK4q6jU3ANcNhm</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/22215d20-2b53-4378-8426-ae55e2362d13/tasks/bta2v9cm4.output</output-file> <status>completed</status> <summary>Background command "echo "main CI PASSED on e12fe9a1." >> .claude/worktrees/agent-start-demo-3/.superpowers/sdd/2026-11-04-agent-start-demo-3-claim/progress.md 2>/dev/null; paseo send 39e7acfa "agent-start-demo-3: main CI passed on e12fe9a1. Mail-readiness answer and item 4 are in my previous reply (readiness requires mailReady at demo_claim_ready.go:38; second protocol-2 roll required by design via rootmovesfloor_refresh.go:46-54). Waiting on your decision on the mailer fix." 2>&1 | tail -1" completed (exit code 0)</summary> </task-notification>
<task-notification> <task-id>ba7fbv4ii</task-id> <tool-use-id>toolu_01SVQ8DM1EBjijGaZJtZa8Cr</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/22215d20-2b53-4378-8426-ae55e2362d13/tasks/ba7fbv4ii.output</output-file> <status>completed</status> <summary>Background command "S=/home/paulca/.cache/tmp/claude-1001/agent-start-demo-3; until [ -f $S/kr.done ]; do sleep 30; done; tail -1 $S/kr.log" completed (exit code 0)</summary> </task-notification>
<task-notification> <task-id>afbfedbc617debed3</task-id> <tool-use-id>toolu_01Bpfs3NwxADgRc1QMfgw1cr</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/22215d20-2b53-4378-8426-ae55e2362d13/tasks/afbfedbc617debed3.output</output-file> <status>completed</status> <summary>Agent "Review keymail-ready fix" 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>**Verdict: READY AFTER FIXES.** The code change is correct and safe. The only fix needed is one stale README sentence (P3-1); the other finding (P3-2) is a follow-up, not a blocker. I read the diff and the code around it, and ran the focused tests (`TestDemoClaim(EmailNoMailer|BrowserNoMailer|Readiness|ReadinessCache|ReadinessDeadline|ReadinessAvailabilityResponse|ReadinessWithPurgedStrays)`), which pass. I made no edits, so I could not run a mutation test. Point 3 below is based on reading the code. **1. The readiness change is exactly the intended one.** `internal/console/demo_claim_ready.go:36-38` drops only `!s.mailReady(ctx)`. Every other check is still there: Keymail present with a non-empty host, AppsDomain, both keys, Releases, SeedData and the leftover check. The new `keymailHost` test case covers a Keymail client with an empty host, which wasn't tested before. The cache and deadline tests were rebased onto Keymail and the deployment store, and they still prove that failures are cached, that a stale success is not, and that readiness gets its own 10-second deadline (`store.checked` is asserted). Nothing else was loosened. **2. With no mailer, every path that sends email is refused before any send budget is used.** - **Agent start, including resend with `flowToken`** (`demo_claim_auth.go:152-161`): if the address isn't Keymail, it returns 503 before the flow write, `signinSend`, `HoldEmailChallenge` and `sendChallengeAsync` (lines 177-210). The `flowToken` check at 145-150 only reads. - **Browser email start** (`demo_claim_page.go:288-293`): the 503 comes before both the over-cap branch and the locked write, `signinSend` and `HoldEmailChallenge` (lines 294-352). - **Keymail lookup failure:** `keymailAddress` (`emailsignin.go:104-120`) returns false on any error, so the request falls into the same 503. - **No other claim send paths exist.** These are the only two `ChallengeDemoClaim` creators. The verify and link handlers only consume challenges, and the guess budget is only reserved on a live challenge, which can't exist with no mailer. The Keymail OAuth finish path never touches the mailer. - **The submit decrement before the 503 is acceptable.** `handleContinue` (`server.go:3834-3846`) does the same thing: submit, then discovery, then the `NoMail` check. Submit has to come first because it is what bounds the outbound Keymail lookup. It is the per-IP submission cap, not a send limit, so a refused request only uses up the requester's own IP budget. That fits "503 before send-limit decisions". - **The per-request checks themselves are not new.** Both existed in e12fe9a1. This commit only stops readiness from hiding them. **3. The tests are real.** `demo_claim_no_mailer_test.go` runs 31 tries, which crosses the 30-per-hour submit cap. It asserts a 503 with `"unavailable"` (JSON for the agent, an HTML alert for the browser), checks that `addrSends`, `ipSends` and `globalSend` stay empty after every try, and checks that no `demo_claim_flows` row is created (agent side). It then checks that a Keymail address still gets `browser_required` or a 303 to `/auth/signin`. If either per-request mailer check were removed, the first under-cap request would return 202 or 303, and `signinSend` would record a hit. Both the status check and `claimNoSendBudget` would then fail. Small gap: only the lookup-404 branch is tested, not a lookup error (500). It goes through the same code, so this is minor. **4. Findings on `claimAvailable` and messaging** - **P3-1, stale operator docs.** `README.md:705` still says "Claims require a ready mailer and configured Keymail path … `claimAvailable` stays false." That is no longer true. - Failure: an operator reads it and expects `claimAvailable:false` on a console with no mailer. - Fix: say that readiness needs the Keymail path, and that without a ready mailer only Keymail addresses can claim. Other addresses get `503 unavailable` at start. - Fault family: docs drift after a gate change. - **P3-2, `claimAvailable` is now coarser than what a person can actually do.** On a console with Keymail but no mailer, create returns `claimAvailable:true` (`apidemo.go:473`). The browser page still shows the email field (`CanClaim`, `demo_claim_page.go:115`). Anyone with an ordinary email address then gets a bare 503 `"unavailable"`. Ordinary sign-in shows its `NoMail` notice in the same situation. - Failure: following the Plan 4 rule ("do not claim it works if `claimAvailable` is false"), an agent tells the person they can keep the demo. The person gives a non-Keymail address and gets "unavailable". The agent can't tell "this address can't be used here" from "claims are down". - Fix (follow-up, not blocking since this is dev-only and Plan 4's text isn't written yet): document the meaning now. Later, either add a distinct reason or methods field, or show a no-mail notice on the claim page. - Fault family: an availability flag that drifted from what each person can actually do. No P1 or P2 findings. Files: `internal/console/demo_claim_ready.go`, `internal/console/demo_claim_auth.go`, `internal/console/demo_claim_page.go`, `internal/console/demo_claim_no_mailer_test.go`, `internal/console/demo_claim_ready_test.go`, `README.md` (all under `/home/paulca/amadan.net/carlos/platform/.claude/worktrees/demo-claim-keymail-ready/`). READY AFTER FIXES</result> <usage><subagent_tokens>68678</subagent_tokens><tool_uses>11</tool_uses><duration_ms>101203</duration_ms></usage> </task-notification>
Attributed to this commit: 10.7 g CO₂e (1,360,914 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on demo-claim-keymail-ready, 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/README.md b/README.md| index 5fcd5804a..71eb118fb 100644 |
| --- a/README.md |
| +++ b/README.md |
| @@ -702,7 +702,7 @@ After success, the old URL displays a link to the permanent app until the origin |
| #### Claim activation and recovery |
| -The controller activates dev after the branch lands and the gated acceptance checks pass. Keep the production switch unset pending its separately scoped rollout. Set `CARLOS_DEMO_CLAIM=1` in the console's drop-in alongside the existing demo settings. Claims require a ready mailer and configured Keymail path, a connected export-capable demo worker, ordinary nested arm64 placement in the console's data region, no HA or host claims, a policy writer, streaming seed storage and change delivery. Enable the existing shared watch with `CARLOS_CHANGE_INDEX=read`. Every serving edge must report the moved-page and claim-seed capabilities. A failed readiness check gives the uniform `503 unavailable`; `claimAvailable` stays false. Readiness successes and failures are cached for 45 seconds, with a separate 10-second check deadline. |
| +The controller activates dev after the branch lands and the gated acceptance checks pass. Keep the production switch unset pending its separately scoped rollout. Set `CARLOS_DEMO_CLAIM=1` in the console's drop-in alongside the existing demo settings. Claims require a configured Keymail path, a connected export-capable demo worker, ordinary nested arm64 placement in the console's data region, no HA or host claims, a policy writer, streaming seed storage and change delivery. Enable the existing shared watch with `CARLOS_CHANGE_INDEX=read`. Every serving edge must report the moved-page and claim-seed capabilities. Without a ready mailer, only Keymail addresses can claim, in the browser; other addresses get `503 unavailable` when they start, so `claimAvailable` can be true while email codes are not. A failed readiness check gives the uniform `503 unavailable`; `claimAvailable` stays false. Readiness successes and failures are cached for 45 seconds, with a separate 10-second check deadline. |
| Before activation, publish the signed seeds floor with minimum protocol **2** and confirm acceptance on every reader, including rollback binaries. The existing `carlos system seeds-floor publish` door now republishes minimum 2. An old minimum-1 publication is insufficient even when all running binaries are new. Use the existing demo wildcard and housekeeper certificate path. New DNS, IAM or provisioning work requires its own scoped approval. |