Skip to content

chore(claude): finish the accent removal and stale-doc sweep - #133

Merged
Ardnived merged 5 commits into
mainfrom
chore/accent-doc-sweep
Aug 8, 2026
Merged

Ardnived merged 5 commits into
mainfrom
chore/accent-doc-sweep

Conversation

@Ardnived

@Ardnived Ardnived commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Finishes the Accent removal #99 left half-done, and sweeps the stale references
#100 catalogued but did not own. No runtime surface: 13 files, all documentation
plus one deleted config file. No src/ change.

Every claim was re-verified against source before being rewritten — the failure
mode for a ticket like this is "correcting" something into being wrong, and the
ticket's own list turned out to be both slightly stale and incomplete.

Changes

Accent leftovers (#99)

  • accent.json — deleted. It configured only the two translation-sync
    workflows chore(build): add audit gate, size budget, and embed smoke tests #99 removed; .github/workflows/ now holds audit.yml + ci.yml,
    and nothing in package.json, scripts/ or the workflows reads the file.
  • .claude/docs/architecture.md — the bullet called Accent a theming sync.
    Wrong twice: it was translation sync, and it is gone. Replaced with what is
    actually true (locale JSON is hand-maintained via pnpm i18n:add).
  • .claude/skills/draft-ticket/conventions.md — dropped "accent" from ui.

The seven catalogued references — six fixed, one already done

tests.md's "api interceptor (fetch.ts)" (it is applyRequestContext /
interceptFetch in client.ts) and its "mock axios" (the cited spec mocks
@payloadcms/sdk); i18n-and-state.md's "Five stores" (store.ts has six);
code-style.md's EventShare/ example (the folder is gone); environment.md's
axios-interceptor sentence; the src/components/mapbox/ paths in feature.md
and pr-template.md.

Item 3 — i18n-and-state.md's mapbox/map.tsx path — needed no change; a later
wave had already corrected it. Verified, left alone.

Beyond the ticket's list (the ticket's own acceptance greps reach these)

  • .claude/agents/security-reviewer.md — the worst of the batch. It briefed the
    security agent that the API key is sent as Authorization: Bearer … by an
    axios interceptor in fetch.ts. Three claims, three wrong: client.ts:36
    sends Authorization: clients API-Key …. A reviewer trusting that greps for a
    header this repo never sends and finds the auth path "clean". It also still
    named NextUI, and (found in review) claimed HashRouter when Widget.tsx
    picks HashRouter or MemoryRouter from the host's fragment, and listed
    three host props where WidgetProps has nine.
  • .claude/output-styles/review.md and .claude/skills/implement-issue/SKILL.md
    carried the same two drifts. The SKILL.md line was checked against
    workflow-parity.md: the spec governs that skill's numbered step list, and
    this line is repo-specific Edge-cases prose, so the three repos stay in parity.

Further false claims found while verifying (all in files this ticket owns)

  • code-style.md pointed at atoms/icons/; the directory is atoms/Icons/ —
    a path contradicting the PascalCase rule six lines above it, hidden by macOS's
    case-insensitive filesystem.
  • It said zustand stores are named useXState. Five of six are not.
  • Its props-type example named EventItemProps; no EventItem exists.
  • Its stated exception, "Chip composes a Radix primitive's props", is false —
    Chip imports no Radix at all.
  • environment.md listed VITE_GOOGLE_PLACES_API_KEY; nothing reads it (search
    is Mapbox), so the row sent readers hunting for a key the app has no use for.
  • architecture.md's host-prop list omitted analytics, geolocation and
    errorReporting.

Review

/code-review found no false claim in the diff, but caught the sweep committing
its own failure mode twice — correcting one half of a statement and leaving a
neighbour to contradict it. Both fixed in 47e712d: DESIGN_SYSTEM.md:206 still
said useXState while linking to the file that now denies it, and the
props-type rule competed with DESIGN_SYSTEM.md:210 instead of deferring to it.
It also caught that CopyField is not "named after" ShareContent, so that
example no longer illustrated its rule — Fallbacks/ does.

No security review: no security-relevant path changed (docs only). The
security-reviewer agent's briefing was corrected, which should improve future
reviews rather than change any attack surface.

Verification

  • Lint: ✓ No errors (pnpm lint)
  • Types: ✓ Clean (pnpm typecheck)
  • Tests: ✓ 832 passing / 76 files (pnpm test:run) — unchanged, as expected
  • grep -rn 'components/mapbox' CLAUDE.md .claude/ → clean
  • grep -rni axios CLAUDE.md .claude/ → only data-layer.md's three deliberate
    refactor(api): migrate data layer from axios+qs to @payloadcms/sdk #41-migration references (permitted by the AC; that file is owned by another
    ticket in this batch)
  • grep -rni accent → only the past-tense paragraphs describing the removal

Action for the repo owner (not in this diff)

The ACCENT_API_KEY repository secret can now be revoked — GitHub →
Settings → Secrets and variables → Actions. Nothing reads it. This is a
GitHub-settings action, so the ticket should not be held open for it.

Separately, a commented-out Google Places API key sits in the local
(gitignored) .env.local. It was never referenced by any code and its doc row is
now gone; worth revoking at the same time if it is still live.

Closes #116

🤖 Generated with Claude Code

Ardnived and others added 5 commits August 7, 2026 19:25
accent.json configured only the two translation-sync workflows #99 deleted;
.github/workflows/ now holds audit.yml + ci.yml, and nothing else in the tree
reads the file. architecture.md described those workflows as a "theming" sync,
which was wrong twice over — Accent was translation sync, and it is gone — so
the bullet actively misdirected theming work. Replaced with what is actually
true: locale JSON is hand-maintained. Dropped "accent" from the ui scope.

Closes #116

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Six of the seven items from that report's section 4, each re-verified against
source rather than copied from the list:

- tests.md named "the api interceptor (fetch.ts)". No interceptor exists;
  applyRequestContext / interceptFetch live in client.ts, and fetch.test.ts:49
  is what covers them.
- tests.md told readers to mock axios; the spec it cites mocks @payloadcms/sdk
  (axios went in #41).
- i18n-and-state.md said "Five stores" above six bullets — store.ts has six
  create<> calls.
- code-style.md's folder-family example, EventShare/, no longer exists.
  ShareContent/ succeeded it and exports the family DESIGN_SYSTEM.md:122 lists.
- environment.md described the shared client as axios-with-an-interceptor. The
  header and locale it names are still exactly right, so only the mechanism
  changed.
- feature.md and pr-template.md used src/components/mapbox/ example paths.

Item 3 (i18n-and-state.md's mapbox/map.tsx path) needed no change: a later wave
had already corrected it to src/components/organisms/Mapbox/Map.tsx.

Closes #116

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The ticket's own acceptance greps reach past the seven catalogued items, and
these three are what they turn up.

security-reviewer.md was the worst of them: it briefed the security agent that
the API key is sent as `Authorization: Bearer …` by an axios interceptor in
fetch.ts. Three claims, three wrong — client.ts:36 sends
`Authorization: clients API-Key …` from applyRequestContext. A reviewer taking
that at face value greps for a header this repo never sends, and concludes the
auth path is clean because it cannot find it. Its Render line also still named
NextUI, which components.md:19 exists to say is not a dependency.

review.md and implement-issue/SKILL.md carried the mapbox path and the
"api interceptor" drift the catalogued items name elsewhere.

implement-issue/SKILL.md is checked here against workflow-parity.md: the spec
governs that skill's numbered step list, and this line is in the repo-specific
Edge cases prose, so the three repos stay in parity.

Closes #116

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
A verification sweep over the files this ticket owns, in the spirit of the
ticket rather than its list. Each was checked against source:

- code-style.md said icons live in atoms/icons/. The directory is atoms/Icons/
  and every import uses it. macOS's case-insensitive filesystem is why nobody
  noticed a path that contradicts the PascalCase rule six lines above it.
- code-style.md said zustand stores are named useXState. Five of the six are
  not; only useViewState carries the suffix. A convention 5/6 of the code
  disobeys is a description of one store, not a rule.
- Its props-type example named EventItemProps. No EventItem exists — the
  molecule is EventListItem.
- Its stated exception, "Chip composes a Radix primitive's props", is not true:
  Chip imports no Radix at all. Dropped rather than re-illustrated; the only
  local `type Props` left in src/components is in Mapbox/layers.ts, which is
  not a props-name clash.
- environment.md's table listed VITE_GOOGLE_PLACES_API_KEY. Nothing reads it —
  location search is Mapbox — so the row sent readers hunting for a key the
  app has no use for.
- architecture.md's host-prop list omitted analytics, geolocation and
  errorReporting, all three declared in Widget.tsx:248 and all three cited by
  neighbouring docs.

Closes #116

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Review caught this sweep committing its own failure mode twice — correcting one
half of a claim and leaving a neighbour to disagree with it:

- code-style.md now said the `State` suffix is not a convention, while
  DESIGN_SYSTEM.md:206 still said `useXState` AND linked to code-style.md as its
  authority. A reader following that link got the two flatly disagreeing.
- The props-type rule kept a "fall back to a local `Props`" clause that
  DESIGN_SYSTEM.md:210 contradicts (alias the import, not ours) and that no code
  in src/ practises. Now defers to DESIGN_SYSTEM instead of competing with it.
- The folder-family example was accurate about the filesystem but stopped
  illustrating the rule: `CopyField` is not named after `ShareContent`.
  `Fallbacks/` — LoadingFallback / ErrorFallback / FallbackPanel — actually is.
- security-reviewer.md was half-swept. Its embedding line claimed HashRouter
  when Widget.tsx:213-215 picks HashRouter OR MemoryRouter from the host's
  fragment — an untrusted input selecting a branch, which that agent's own
  focus area tells it to audit. Its trust-boundary line listed three host props
  where WidgetProps has nine, contradicting the architecture.md list this
  branch had just corrected.
- tests.md read as though fetchers parse "through" the request context; they
  parse responses through zod.

Also a rendering bug in the paragraph this ticket is about: the ACCENT_API_KEY
note had no blank line before it, so markdown lazy-continued it into the
MAPBOX_SECRET_ACCESSTOKEN bullet.

Closes #116

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying sahajatlas-design with  Cloudflare Pages  Cloudflare Pages

Latest commit: 47e712d
Status: ✅  Deploy successful!
Preview URL: https://dcec9154.sahajatlas-design.pages.dev
Branch Preview URL: https://chore-accent-doc-sweep.sahajatlas-design.pages.dev

View logs

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying sahajatlas with  Cloudflare Pages  Cloudflare Pages

Latest commit: 47e712d
Status: ✅  Deploy successful!
Preview URL: https://509c7dcb.sahajatlas.pages.dev
Branch Preview URL: https://chore-accent-doc-sweep.sahajatlas.pages.dev

View logs

@Ardnived
Ardnived merged commit 38dcb9e into main Aug 8, 2026
5 checks passed
@Ardnived
Ardnived deleted the chore/accent-doc-sweep branch August 8, 2026 03:34
Ardnived added a commit that referenced this pull request Aug 8, 2026
One conflict, in .claude/rules/tests.md: this branch and #101 each added a
fourth jsdom spec to the same list, and both bumped its count to "Three".
Kept both entries, corrected the count to Four, and fixed #101's "least
optional of the three" to match. The ordinal in the report-form entry
still reads correctly — with sanitize.test.ts second, it is the third
cautionary tale.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Ardnived added a commit that referenced this pull request Aug 11, 2026
* fix(build): pin smoke discovery to the head commit's deploy

`pick()` gates the HOST, never which BUILD that host serves. Cloudflare
publishes two per project — the per-deployment alias and a stable branch
alias — and both cleared the gate, so the lane could go green having
smoke-tested the previous commit.

Candidates now carry provenance and are ranked: the deployment named by
our own check run for this SHA (its `details_url` ends in the deployment
UUID, whose first 8 chars ARE the alias) beats a deploy-shaped URL from a
per-SHA source, which beats a branch alias. A Cloudflare comment naming
some other commit is refused outright — that is the observed defect, not
a hypothetical: on PR #135 the comment still linked `9326e3b`'s deploy
while the head was `56c6b0d`.

Also wires `failure` through `main()`. It was computed in `discover()`
and dropped on the floor, so `timeoutStatus` never saw it and the
`failed` status — added by #132's code review precisely so a broken build
is not reported as a slow one — was unreachable in production while its
unit spec passed.

Closes #138

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* test(build): pin URL provenance, and record the third smoke invariant

Eleven cases over `deploymentAlias` / `provenanceOf` / `pickPreview`,
built on PR #135's real data so the fixture names the defect rather than
paraphrasing it. The host gate is re-asserted at the strongest tier as
well as the weakest: ranking chooses AMONG urls `pick()` accepts and must
never reach past it.

tests.md gains the third invariant — a green Smoke check means the specs
ran against THIS commit — and loses #132's "known gap, deliberately still
open", whose precondition (does the check-run summary carry a per-commit
URL?) is now answered: yes, on all of #133-#137.

It also records why a passing unit spec did not stop `failed` being
unreachable: the defect was in the wiring, which no pure test can see.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* fix(build): close the gaps /security-review found

Three Low findings, all about the new attestation trusting something
self-declared:

- The deployment id was read from any check run admitted by NAME, and a
  name is self-declared. An installed App with `checks:write` could call
  itself "Cloudflare Pages: sahajatlas" and choose the `details_url` we
  derive the expected host from. It could never aim us off-host — pick()
  decides that — but it could steer selection between builds of our own
  site, which is the defect this ticket closes. Now gated on the app slug,
  matching source 1's "both the context AND the author".
- The bare project host is PRODUCTION, not a preview. It clears pick(),
  isn't deploy-shaped, and so sat on the `alias` floor beside a branch
  alias — but this script only runs for a PR head, so production is never
  the right answer. Refused outright.
- `includes(shortSha)` matched a 7-hex prefix anywhere, including inside a
  longer hex run, so a stale comment could be called "naming the head" on
  a coincidence. Now a whole-token match, built only from a real hex
  prefix so a bogus PR_HEAD_SHA degrades instead of throwing.

Also softens the tests.md headline, which promised more than the `alias`
floor delivers, and corrects the "exactly one run" comment: filter=latest
is one run per check NAME, which is unique per APP, not globally — which
is exactly why the slug gate matters.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* fix(build): close the gaps /code-review found

Two High, four Medium, three Low. The two that mattered most were both
things this PR had asserted and not checked:

- The summary DENIED the URL it had just refused. `refused` reached the
  poll log but never `main()`, so at timeout `absent` read "no check run,
  no deployment, no bot comment" while the line above named the URL we
  declined — and ci.yml routes `absent` to "INVESTIGATE, don't re-run". It
  now rides into `explain()`. It deliberately does NOT reach
  `timeoutStatus`: another commit's URL is not evidence that this one
  built, so it must not soften `absent` into "re-run".
- `\b<sha>\b` rejected every LONGER spelling of the same commit (`56c6b0d1`,
  the full 40 hex). Since that predicate now gates the URL harvest and not
  just the evidence, source 4 would have died wholesale the day Cloudflare
  printed one more digit. Only the left boundary is anchored now.

- Deploy-shape is read at BOTH scopes. Reading it only for per-SHA sources
  left one comment's two URLs indistinguishable, so Cloudflare's table
  order decided which won — this ticket's own defect, one level down. New
  `claimed` tier: below the check run, above a branch alias.
- The slug gate now guards every CONCLUSION drawn from a check run, not
  just `deployment`. An impostor could still set `failure`, and `failed`
  tells the reader "re-running cannot help" — a red check nobody can clear.
  URLs stay on the name-only path; `pick()` bounds those.
- The header's "the only URLs this refuses are X" was false four ways.
  Replaced with the enumeration, and the top-line "take the first we find"
  corrected. MEMORY.md warns about exactly this class of scope claim.
- `deploymentAlias` took the FIRST uuid while its doc said "ending in";
  the production-host refusal read a module-level slug instead of the
  passed host; the poll line dropped evidence whenever it had a refusal.

`waitingLine` is exported and specced, per the lesson this PR itself added
to tests.md — the wiring is where every one of these lived.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore(claude): finish the accent removal and stale-doc sweep

1 participant