frostney/GocciaScript

Extend the pass-rate sentinel beyond POSITIONING_FAQS to the rest of the site copy

Ouverte

#1 116 ouverte le 9 août 2026

 (0 commentaire) (0 réaction) (0 personne assignée)Pascal (3 forks)github user discovery
good first issueinternal

Métriques du dépôt

Stars
 (19 étoiles)
Métriques de merge PR
 (Merge moyen 16h 4m) (128 PRs mergées en 30 j)

Description

Summary

website/src/__tests__/positioning.test.ts ("rejects compressed claims and historical pass rates") guards against a hand-typed conformance percentage, but it only inspects POSITIONING_FAQS. Extend it to the other modules that carry user-facing copy: landing.tsx, landing-data.ts, agent-discovery.ts, and site-markdown.ts.

Why

A hardcoded "80%" once sat in the site copy long after the real test262 figure had moved well past it. The current guard would not catch that class of regression today, because the copy carrying conformance figures does not live in POSITIONING_FAQS.

Everything is clean right now — every figure on the site is live-sourced from published dashboard data — so this is prevention, not a bug fix. It is the follow-up the /prepare-release skill names for hardening its Layer 1 sweep, which currently depends on a human running a grep each release cycle.

Current behavior

positioning.test.ts:154 asserts /\b\d{2,3}(?:\.\d+)?\s*%/ against the concatenated POSITIONING_FAQS question/answer pairs only. Nothing guards:

  • website/src/components/landing.tsx
  • website/src/lib/landing-data.ts
  • website/src/lib/agent-discovery.ts
  • website/src/lib/site-markdown.ts

Expected behavior

A regression test fails when a literal conformance percentage is introduced into any of those modules' user-facing copy.

Scope notes

Blocked by #1114. No CI workflow currently runs the website suite, so this test would not gate anything until that lands. Worth filing and implementing regardless — it is cheap and #1114 is already open.

The guard must not fire on legitimate percentages. A naive raw-file-text regex produces false positives immediately:

  • landing.tsx contains width="100%" (lines 609 and 735) — CSS, not a claim.
  • site-markdown.ts generates percentages at runtime via compatibilityPercent() and returns a "0.0%" fallback for an empty run.
  • agent-discovery.ts:225 already carries the prose instruction "Do not copy a historical pass rate from this file" — that line must stay allowed.

Suggested approach: assert over the exported copy constants (as the existing test does for POSITIONING_FAQS) rather than scanning file text, so that computed and interpolated values are structurally out of the guard's reach. landing-data.ts and agent-discovery.ts contain no % at all today, so they are cheap to lock down.

Extend the existing "rejects compressed claims and historical pass rates" test rather than adding a parallel one, and keep the accompanying comment explaining why % needs no trailing \b.

Guide contributeur