Skip to content

fix(frontend): the marketing nav was never a consumer of MARKETING_PATHS - #715

Merged
athvin merged 2 commits into
mainfrom
fix/post-audit-followups
Nov 6, 2026
Merged

athvin merged 2 commits into
mainfrom
fix/post-audit-followups

Conversation

@athvin

@athvin athvin commented Nov 6, 2026

Copy link
Copy Markdown
Owner

Post-merge follow-ups on #682. Two commits, each independently verified; one flagged item deliberately not done, with reasons.

1. routes.ts claimed a consumer that does not exist (ac90d33b)

MARKETING_PATHS called itself the "single source of truth for three consumers": the proxy, the sitemap, and "the marketing nav itself". The third does not exist — nothing under src/components/marketing/ imports either list. marketing-header.tsx carries a wordmark link to / and one CTA to PORTAL_ENTRY_PATH; the footer carries only the CTA.

The cost lands on the likeliest edit this surface gets. Following the documented adding a page recipe, /pricing goes into MARKETING_PATHS, becomes reachable through the proxy, appears in the sitemap — and is linked from nowhere, because no nav derives from that list. The recipe reads as complete and the gate passes.

Corrected at five sites, each stating the obligation rather than just dropping the count:

Site Was Now
routes.ts MARKETING_PATHS comment "three consumers … the marketing nav itself" two consumers, why the nav deliberately is not one, and that the link is a separate manual edit
routes.ts file header "the proxy spreads MARKETING_PATHS" the proxy spreads MARKETING_PUBLIC_PATHS, the superset — the same two-list confusion #682 fixed in the skill, one file over
landing-page/SKILL.md trap 2 "all three consumers" both consumers, plus an explicit "the nav is not one of those"
landing-page/SKILL.md adding-a-page "feeds the proxy, the sitemap and the nav at once" link it from marketing-header.tsx by hand
landing-page/evals.md scenario 1 "rather than editing the proxy, the sitemap and the nav separately" requires naming the manual link; an answer stopping at MARKETING_PATHS is incomplete

#682 had restated this false claim while fixing the neighbouring one, which is how the consistency pass caught it.

2. The assertion nothing made (77680247)

tests/unit/site-routes.test.ts opens by claiming each assertion "pins a property something else depends on". The property the proxy actually depends on — MARKETING_PUBLIC_PATHS containing every MARKETING_PATHS entry, since PUBLIC_PATHS is that list — was the one nothing pinned.

Mutation-tested, not assumed. Dropping the ...MARKETING_PATHS spread (the realistic refactor, which keeps today's single page public by coincidence):

× keeps every marketing path inside the public list
  AssertionError: expected [ '/robots.txt', '/sitemap.xml' ] to include '/'
Tests  1 failed | 6 passed (7)

Six pre-existing assertions stayed green against a tree where the landing page itself would 307 to /login. That is what makes it an accidental pass rather than a thin one. Spread restored: 7 passed.

Verification

Gate Result
eslint / prettier --check / tsc --noEmit clean on both changed source files
the four BFF gate scripts pass
full vitest unit tier 65/65 files, 875/875 tests, exit 0
make skills-check green on the rebased tree, generated references current
skill loaded end to end landing-page loads intact; walking add a /pricing page against the pre-fix text reproduces the unlinked page

An earlier combined run showed 4 failures (usage.test.ts hook timeouts on PGlite). Re-run alone it was fully green in 233s versus 479s — the failures were CPU contention from my own concurrent make skills-check, not the diff. Flagging the sensitivity rather than treating it as a pass.

Rebased onto 7fc70ead; main moved three times during this work.

Deliberately not done

  • The Next 16.4 version literal (landing-page/SKILL.md), the one LOW finding I skipped in fix(skills): landing-page pointed a new page at the wrong routes list #682. On re-examination I still disagree with changing it: the counts lens exempts "a measurement with a fixture behind it … evidence, not inventory", and this dates a measured behaviour (ensureStatic requires cacheComponents). Replacing it with a pointer to the pin would read as current after a Next upgrade nobody re-measured — strictly worse.
  • The two failed merge bus runs. Not a defect: the log reads main moved from 8a74db3b to f034785d while the batch validated; abandoning. That is the bus's own base-moved guard firing correctly while a fleet of sibling audits hand-merged. No code change is the right answer; the remedy is the label workflow.
  • frontend-data-ui's description at 3 characters of headroom. 5d79a89a deferred that to an audit of that skill, and which of its clauses earns the space is that audit's judgement, not this PR's.

🤖 Generated with Claude Code

bmoore813 and others added 2 commits November 6, 2026 01:20
`routes.ts` called itself the "single source of truth for three consumers":
the proxy, the sitemap, and "the marketing nav itself". The third does not
exist. Nothing under `src/components/marketing/` imports either list —
`marketing-header.tsx` carries a wordmark link to `/` and one CTA to
PORTAL_ENTRY_PATH, and the footer only the CTA. The real consumers are two.

The cost is a silent failure in the likeliest edit this surface gets. Following
the documented "adding a page" recipe, a new `/pricing` is added to
MARKETING_PATHS, becomes reachable through the proxy and appears in the
sitemap — and is linked from nowhere on the site, because no nav derives from
that list. The recipe reads as complete, and `make frontend` passes.

Corrected at all five sites, and each now states the obligation rather than
just dropping the count:

- `routes.ts`, the MARKETING_PATHS doc comment: two consumers, plus why the nav
  is deliberately not one (a plain row at every width is what keeps the mobile
  DOM a subset of the desktop one, which the desktop-only axe sweep rests on)
  and that the link is a separate manual edit.
- `routes.ts`, the file header: it said the proxy spreads MARKETING_PATHS. The
  proxy spreads MARKETING_PUBLIC_PATHS, which is the superset. Same confusion
  between the two lists that #682 fixed in the skill, one file over.
- `landing-page/SKILL.md` trap 2 and the "adding a page" workflow.
- `landing-page/evals.md` scenario 1, which now requires the answer to name the
  manual header link and calls an answer that stops at MARKETING_PATHS
  incomplete.

Found by the post-merge consistency pass on #682, which had restated the false
claim while fixing the neighbouring one.

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

`tests/unit/site-routes.test.ts` opens by claiming each assertion "pins a
property something else depends on". The property the proxy actually depends
on — that MARKETING_PUBLIC_PATHS contains every MARKETING_PATHS entry, since
PUBLIC_PATHS *is* that list — was the one nothing pinned.

The failure mode is a refactor rather than a typo: rewriting
MARKETING_PUBLIC_PATHS as a literal and dropping the `...MARKETING_PATHS`
spread keeps today's single page public by coincidence, and every future
marketing page is served a 307 to /login while the sitemap advertises it.

Mutation-tested rather than assumed. With the spread dropped, this is the only
case that fails:

    × keeps every marketing path inside the public list
      AssertionError: expected [ '/robots.txt', '/sitemap.xml' ] to include '/'
    Tests  1 failed | 6 passed (7)

Six pre-existing assertions stayed green against a tree where the landing page
itself would have redirected to login — which is what makes this an accidental
pass rather than a thin one. Spread restored: 7 passed.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@athvin
athvin merged commit 5f2152d into main Nov 6, 2026
42 checks passed
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.

2 participants