carlos / platform Public

Ledger · demo-claim-account-ui

Human

<paseo-system version="1" kind="agent-message" source-agent-id="32157efb-ed29-443f-b428-8c9e3320fa50" message-id="173a78aa-5486-432c-b4eb-78558b1f24d4"> From platform-f6: departures 1-3 are fine. On room: don&apos;t show raw counts that make 2-of-3 look full. Each card says &apos;Has room&apos; or, for an account that can&apos;t take it, &apos;Full&apos; with the numbers in the plan&apos;s own words (e.g. &apos;Full: 3 of 3 running things used&apos;); use the same &apos;running things&apos; term the plans and pricing copy use, via Luna. Paul may still ask for numbers on every card; I&apos;ll relay if so. </paseo-system>

Human

<task-notification> <task-id>b1toc13us</task-id> <tool-use-id>toolu_01TYr57AFkaJozmvzpo32azX</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/22215d20-2b53-4378-8426-ae55e2362d13/tasks/b1toc13us.output</output-file> <status>completed</status> <summary>Background command "S=/home/paulca/.cache/tmp/dcau; until [ -f $S/done ]; do sleep 20; done; tail -1 $S/log; cat $S/final.md" completed (exit code 0)</summary> </task-notification>

Human

<task-notification> <task-id>bvaz88t9d</task-id> <tool-use-id>toolu_01WThg6icKEK9Q5MFv27s3pF</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/22215d20-2b53-4378-8426-ae55e2362d13/tasks/bvaz88t9d.output</output-file> <status>completed</status> <summary>Background command "S=/home/paulca/.cache/tmp/dcau; until [ -f $S/done ]; do sleep 20; done; tail -1 $S/log; cat $S/final.md; cut -c1-200 $S/strings.tsv" completed (exit code 0)</summary> </task-notification>

Human

<task-notification> <task-id>ae31b866796ba75e9</task-id> <tool-use-id>toolu_01XJrhnAUgF4RgmdwvmmsSwz</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/22215d20-2b53-4378-8426-ae55e2362d13/tasks/ae31b866796ba75e9.output</output-file> <status>completed</status> <summary>Agent "Review claim account UI" 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># Round 1 of 3: review of `demo-claim-account-ui`, tip e240344c **Verdict: READY AFTER FIXES (tip e240344c).** There are no P1s, so under the stopping rules this review stops here. Apply the two P2s without opening another round. The P3s go on the follow-up list. P2-1 needs one new string, so it goes to the copy pass. All paths are under `/home/paulca/amadan.net/carlos/platform/.claude/worktrees/demo-claim-account-ui/internal/console/`. ## What I ran - **Focused tests:** the choice, status, CSP, chrome, census, resume, wrong-demo, replay and `TestDemoClaimBrowser*` tests all pass, except the headless one below. - **Probes:** I added out-of-tree probes through `go test -overlay`. The worktree stayed clean and the scratch is deleted. - **Blocked:** Chromium can't start in this sandbox (`socket() failed: Operation not permitted`), and I did not bypass that. - `TestDemoClaimBrowserHeadless` fails here, most likely for that reason, because its node harness died on start. - I did not run `TestDemoClaimSelectStepUpHeadless`. - All real-browser claims (JS auto-submit, polling, CSP violations) rest on Codex's run, plus my reading of the code and five of the 20 screenshots. ## Findings **P2-1: the `aborting` phase shows "Copying your data" for up to a day.** Family: progress UI reports the real operation state. - **Where:** `demo_claim_status_page.go:53` (default case) and `demo_claim_page.go:132`. The probe confirmed door `{claiming, 1}` and the page's current step "Copying your data". - **Scenario:** a claim passes its deadline with the box offline, so it is already lost. - `continueDemoClaimAbort` (`demo_claim_transfer.go:849-859`) waits for an ack that doesn't come. It only retires the demo at source expiry (`:835`), and demos last 24 hours. - The page keeps saying it is copying and polls every 3 s. An abort from `verifying` also moves the page backwards from step 2 to step 1. - It does not hang forever: it ends at `aborted`, or at a 401 after expiry plus 24 hours. - **Fix:** - Have the door return a distinct state such as `{state:"stopping", step:0}`. - Render one new sentence with no step marked, and keep polling. - Update the JS allow-list at `demo_claim.js:47`. - Add `aborting` to the test table at `demo_claim_choice_test.go:93`, which omits it today. **P2-2: the room hint has no budget for time or requests.** Family: an advisory hint must be bounded and must not delay the gate. - **Where:** `demo_claim_page.go:173-174` and `:600-635`. - **Numbers:** the probe measured 4 accounts x 5 apps = 20 `List` calls per GET, so it grows linearly with accounts times apps. - Accounts run one after another. `readConcurrency` of 10 applies only within an account. - No membership cap exists, and over-limit accounts have no ceiling. Plan caps limit apps only for accounts within their plan. - 10 accounts x 100 apps would be 1000 Lists per reload, with no throttle on GET. - Polling itself adds none of this. - **Scenario:** a slow store holds up the only page that leads to a claim, because a hint failure is handled only when the call returns an error. - **Fix:** one shared `context.WithTimeout` of about 2 s across the whole loop, and a cap on counted accounts (for example 20). Past either limit, omit the hint and leave the account eligible, since reservation still enforces. Add a test with a blocking store. **P3 follow-ups** 1. **Admission off** (`demo_claim_page.go:159`, `:196`): the signed-in branch still counts (probe: 3 Lists). With a full account, it also replaces "unavailable" with "None of your accounts can take this demo". Skip the account view when `!p.CanClaim`. 2. **Exempt accounts** (`demo_claim_page.go:605-613`): the card shows the default plan label ("Free") for a `planExempt` account, which is false. Skip the label when exempt. 3. **Double submit** (`demo_claim.js:22`): changing a radio during a pending POST re-enables the button. A second POST can't double-claim, because `demo_claim_page.go:232` refuses it, but the person sees "Open the claim link" while the claim runs. Add a submitted guard. 4. **Live region** (`demo_claim.js:53`): the same text is rewritten every 3 s, which some screen readers may repeat. Write only on change. 5. **Brittle test** (`demo_claim_choice_test.go:151`): `TestDemoClaimSharedChromeUnchanged` pins the SHA of `console_chrome.html`, so any later chrome edit by anyone fails it. Drop it before merge; it is a branch check, not an invariant. 6. **Test gaps:** - Nothing committed pins the hidden summary for another person at `demo_claim_page.go:164`. - Signed-out is only asserted as zero Lists, not absent names. - The Chromium harness has no long account name or long host at 360 px. 7. **Small template points:** - The `no_accounts` state (`demo_claim.html:46`) omits "You are signed in as", so someone in the wrong session can't tell why. - The reason text on line 81 lacks `claim-detail`, so it renders larger (visible in `many-dark-360`). - `Copy["url"]` (`demo_claim_page.go:552`) is now unused. ## The eight checks **1. Disclosure: OK.** Probe results: | Viewer | Account names and plan | Demo name and host | |---|---|---| | Signed-out, intent cookie | none | shown | | Signed-out, proved flow | none | shown | | Other person, proved flow | none | none (`:161-165`) | | Bad cookie or expired intent | none | none | - **Own data only:** other accounts never appeared. The owner case showed only their own. - **No cross-account path:** `runningThings` (`plancaps.go:57-106`) and `EffectiveLimits` key only on `acct.ID` and `acct.Sqid`. `demoClaimReservedThings` also filters by account. - **Summary:** it adds only demo name, host and the apps domain. I judged those to be what a link holder already has; I did not separately confirm the link response exposes the name. - **Role-disabled cards:** viewers see the plan name but no counts. `billingpage.go:319` suggests the billing page already serves non-owners. I read only that line, so check this if it matters. - **Sqids:** none in the choice UI as text. The done page's address contains the sqid, because that is the app's host. - **Escaping:** a hostile account name came out escaped in the card, `data-button`, `data-neutral`, the destination line and the button. JS uses only `textContent`. **2. Status door: OK.** - **Auth:** only a status-purpose row passes (`status_page.go:27`), and a proof cookie gets 401 (test). The cookie binds through `flow_hash` to its own operation, and an unrelated live intent gets 401. - **Same-origin:** cross-site and same-site get 403, and so does missing evidence (`:12`). Browsers without `Sec-Fetch-Site` degrade to the reload link after three failures. - **Response:** `no-store`, and only `state`, `step`, plus `url` on done. - **Store use:** expired and purpose cases are tested. A panicking store confirms zero remote calls. - **Independence:** it works with admission off (`TestDemoClaimRecoveryRoutes`). - **Agent endpoints:** they refuse the cookie as cookie or Bearer, all 401. - **Census:** `TestClaimConsoleRouteCensus` passes without listing this door, and the diff adds no inventory entry. So the census says little about it. `TestClaimConsoleMuxHasOneRegistrar` and the door tests are the real guards, which is acceptable for a read-only door. - **Old-cookie URL (judged acceptable):** - `demo_claim_store.go:214` promotes every browser on the flow. So someone who opened the link and typed a victim's email keeps a cookie that later reads the victim's public app URL. - The page has always shown this. The URL is public and the link holder started the flow. - The same holds for a shared browser. The `url` field is unused by the client, so dropping it is optional and buys little. **3. Enforcement: OK.** - The select handler is unchanged. Probe: tampered full account got 409 with cap copy, tampered viewer and foreign accounts got 404. - The hint uses the same `EffectiveLimits` and `runningThings` as `checkRunningThings(ctx, acct, 2)`. `n+2 &gt; limit` matches exactly, and this covers reservations and team plans. So only a race can make "Has room" wrong on capacity. - A failed count leaves the account eligible. - No path blocks a viable account. Disabled radios don't submit, so the single hidden input wins. With no-JS the button is enabled and `required` validates. Without radios, `update()` never runs. **4. Resume: OK.** - Radio `checked` and the single hidden input both work. - `AutoSubmit` is set only inside `Reason == ""`, so a now-full account stops the auto-submit, and it never submits a different account. - `requestSubmit()` ignores button state, and `update()` already enabled the button. - `WrongDemo`, `CopiedCookieReplay`, `Gates` and `ConcurrentGET` pass. The real-browser JS round trip was not re-run here. **5. Cost:** the report's numbers hold, including role-disabled accounts skipping the count. It needs a session and a live intent: signed-out and missing-intent gave zero Lists. It isn't bounded for many memberships (P2-2). Polling is 3 s after each completed attempt, with a 10 s timeout. It stops on claimed, aborted or three failures, and is SQL only. **6. CSP: OK.** `TestDemoClaimChoiceCSP` compares the whole policy against the hash of the rendered bytes. It finds no inline style and one script. The hash covers the new block automatically. `console_chrome.html` and `fiesta.html` are untouched. **7. Progress mapping:** `reserved`, `freezing` and `copying` map to step 1. `verifying` and `committed` map to step 2. `aborted` is correct. `done` is set only once the outbox is empty (`demo_claim_transfer.go:763`). `aborting` is wrong (P2-1). A stuck `committed` stays on "Starting your app" and rolls forward through retries, polling within the same bound. **8. Accessibility and layout: OK, except P3 items 4 and 7.** - Fieldset and legend, real radios inside labels, `aria-current`, and the hidden live region are all correct. - The chrome already has `--muted` on `--rst-surface-2` at about 6.9:1 or better in both themes. - The screenshots I opened show no left stripes and no all-caps labels. - **Not measured:** long names at 360 px. The CSS looks safe (`overflow-wrap: anywhere` is inherited, no `nowrap` on buttons), but my measurement was blocked and the harness only uses short names. ## Copy accuracy I found no false statements beyond P2-1 and P3-2. The old-address sentence matches `demo_claim_moved.go:77-79`.</result> <usage><subagent_tokens>176222</subagent_tokens><tool_uses>36</tool_uses><duration_ms>580098</duration_ms></usage> </task-notification>

Human

<task-notification> <task-id>bej33e9yj</task-id> <tool-use-id>toolu_01U6mQwtoUChLE2vdTZPm4ZA</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/22215d20-2b53-4378-8426-ae55e2362d13/tasks/bej33e9yj.output</output-file> <status>completed</status> <summary>Background command "S=/home/paulca/.cache/tmp/dcau; until [ -f $S/luna.done ]; do sleep 10; done; cut -c1-260 $S/luna-final.md; until amadan ci status carlos/platform -branch demo-claim-account-ui 2&gt;&amp;1 | head -1 | grep -q 'e240344c.*CI \(passed\|failed\)'; do sleep 45; done; amadan ci status carlos/platform -branch demo-claim-account-ui 2&gt;&amp;1 | head -1" completed (exit code 0)</summary> </task-notification>

Human

<task-notification> <task-id>beb3jnmuy</task-id> <tool-use-id>toolu_012KSbxYSg4HD6neJ2MYHq5k</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/22215d20-2b53-4378-8426-ae55e2362d13/tasks/beb3jnmuy.output</output-file> <status>completed</status> <summary>Background command "S=/home/paulca/.cache/tmp/dcau; sleep 5; until [ -f $S/done ]; do sleep 20; done; tail -1 $S/log; cat $S/final.md | cut -c1-240" completed (exit code 0)</summary> </task-notification>

Human

<task-notification> <task-id>buxwz2nuc</task-id> <tool-use-id>toolu_014Whhv1HM87GiqmSaDVHiib</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/22215d20-2b53-4378-8426-ae55e2362d13/tasks/buxwz2nuc.output</output-file> <status>completed</status> <summary>Background command "until amadan ci status carlos/platform -branch demo-claim-account-ui 2&gt;&amp;1 | head -1 | grep -q 'f68807685.*CI \(passed\|failed\)'; do sleep 45; done; amadan ci status carlos/platform -branch demo-claim-account-ui 2&gt;&amp;1 | head -1" completed (exit code 0)</summary> </task-notification>