fix: resolve adversarial review round 2 — 9 findings, 8 of them in round 1's fixes
Build and deploy / build-and-deploy (push) Failing after 4s

D19 caps the loop at two rounds, and this is what the second round is for.

BLOCKING. Round 1 made NO_RETAINER_NOTICE a requireEnv and added it to no
document, while the fix's own comment claimed docs/06 named it. The deployment
list said five variables for a handler that needs six, so an operator following
the cutover checklist would have deployed a function that throws at cold start
on every invocation — 5xx from API Gateway, every inquiry lost from the moment
/api/* was wired, loud in CloudWatch and silent to Pouya. docs/05 and docs/06
now name all six, and the comment that asserted the documentation existed is
corrected rather than deleted.

The intake route check added in round 1 could not fail: curl -w already prints
000 on a failed transfer, so `|| echo 000` double-appended and the failure arm
was unreachable, and the pass arm accepted anything that was not literally 404 —
including the 403 CloudFront returns when the /api/* behaviour is missing, which
is the one distinction the check exists to draw. It now sends the correct Origin
and asserts a positive: 303 to /contact/could-not-send/, which the handler
returns before any DynamoDB write or email. Probed on refused/501/403/303; the
old version passed the first three. Fixed in both deploy paths.

Removing priceRange left three statements saying it was present or pending, one
of them the stated reason /fees/ emits no Offer node. Deleting
overtimeStartsAfterSessionHours left AGENTS.md §9 naming it and left Q59
recorded as open. The Google-as-processor fix was applied to the privacy
policy's "Where it is stored" and not to "Who can see it", which still read
"Nobody else has access".

And the variable removal was justified with a path-scoped git grep — which also
cannot see untracked files. The unscoped sweep found docs/06's variable table,
the OIDC example, and .env.example still carrying them; .env.example also
restates the execute-api hostname, falsifying a live claim in intake.ts that has
been corrected. That file is not edited here: this environment denies read
access to it, and nothing may edit a file it cannot read. It is in the batched
list.

Also: og:image:alt was the page title rather than the card's headline on 20
pages; og-card.ts documented the wrong path and invocation for the contact
sheet; deploy-local.sh still said Q22's deploy credential "does NOT yet exist";
and the round-1 fix comments were trimmed per D19, though the ratio held at 0.44.

Round 2 also confirmed the round-1 fixes by measurement: all 56 .btn instances
across 22 pages, the consent checkbox's computed accessible name, the radio
labels hit-tested at 44px, and og:proof exercised against synthetic article
pages in a sandbox.

Verified: check/build/check:claims/og:proof/check:intake/lint/bio:pdf all exit 0
on a clean build; 22 pages; Lighthouse 99-100 / 100 / 100 / 100, CLS 0.000.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Md3GndFqWPzK78xAoebsg5
This commit is contained in:
Pouya Lajevardi
2026-08-31 11:21:07 -04:00
co-authored by Claude Opus 5
parent 9f2d83c32f
commit 9f2d2eeb04
18 changed files with 360 additions and 180 deletions
+13 -31
View File
@@ -260,27 +260,14 @@ const hintId = (name: string) => `${name}-hint`;
</div>
{
/* ⚠️ THE LINK CAME OUT OF THE LABEL, AND THE LABEL IS NOW THE CONSENT
SENTENCE ALONE. Two defects in one element, found by
`adversarial-reviewer` 2026-08-31 and measured at 390px (the label
was 342 × 205 px and the nested anchor hit-tested as `<a>`,
100 × 21):
1. **A focusable interactive element inside a `<label>` for another
control.** Clicking it navigated rather than toggling, which is
the behaviour a reader wants — but label/link nesting is not
consistent across engines, so which of the two wins was left to
the browser.
2. **The checkbox's accessible name was a 250-character paragraph
ending "Privacy policy."** This is the one REQUIRED control on the
form, so it is also the one whose name is re-announced on every
validation failure.
The consent wording still has to be what the inquirer agrees to, so
it stays in the label verbatim from `CONSENT_TEXT`. The link moves to
a sibling that `aria-describedby` points at — described, not named.
The privacy policy is also linked twice above this form, so nothing
is lost. */
/* ⚠️ THE PRIVACY LINK MUST STAY OUT OF THIS LABEL. Two reasons, both
about the one REQUIRED control on the form: a focusable element
inside a `<label>` for another control behaves inconsistently across
engines, and the checkbox's accessible name becomes the whole
paragraph plus "Privacy policy link" — re-announced on every
validation failure. The consent wording itself must be verbatim from
`CONSENT_TEXT`, so it stays in the label; the link is DESCRIBED
instead, via `aria-describedby`. */
}
<div class="field field-consent">
<label class="consent">
@@ -461,16 +448,11 @@ const hintId = (name: string) => `${name}-hint`;
line-height: var(--leading-body);
color: var(--text-secondary);
}
/* ⚠️ 44px MINIMUM, AND IT WAS 25.6px. `docs/02` §Accessibility floor sets
44 × 44 for a touch target and `CLAUDE.md` calls that floor a build
requirement, not a polish pass. Hit-tested at 390px by
`adversarial-reviewer`: the label rect measured 70.6 × **25.6** and the hit
height 25px — an 18.4px control plus one line of body text, with no
`::after { inset: 0 }` overlay to enlarge it the way the cards on `/` have.
WCAG 2.2 SC 2.5.8's 24px was met; this project's own floor was not, and
`docs/02` grants no exception for a form control.
`min-block-size` rather than padding, so the label grows to the floor and no
further — padding would push the two radios apart at every width. */
/* 44px IS THE FLOOR (`docs/02` §Accessibility floor) and this row was 25.6px:
an 18.4px control plus one line of body text, with no `::after { inset: 0 }`
overlay to enlarge it. `min-block-size` rather than padding, so the label
grows to the floor and no further — padding would push the two radios apart
at every width. */
.radio {
align-items: center;
min-block-size: 44px;