Skip to content

test(cli): lint assets/docs for our-process words shipped to callers - #5370

Open
HelloOjasMutreja wants to merge 1 commit into
facebook:mainfrom
HelloOjasMutreja:docs/lint-assets-docs-our-process-words
Open

test(cli): lint assets/docs for our-process words shipped to callers#5370
HelloOjasMutreja wants to merge 1 commit into
facebook:mainfrom
HelloOjasMutreja:docs/lint-assets-docs-our-process-words

Conversation

@HelloOjasMutreja

Copy link
Copy Markdown
Contributor

Fixes #5369.

Problem

packages/cli/assets/docs/ ships to people building with Astryx. Material about building Astryx itself (grading rubrics, promotion gates, review evidence) keeps landing there instead of the wiki, and it was only ever caught if a human happened to read the diff. #5368 added a README to that directory with the audience rule and a routing table; this is the automated half the issue asked for.

What it checks

Added a case to packages/cli/foundation/discovery/docs-discovery.test.mjs, which already walks assets/docs, per the issue's suggestion. Fails on rubric, readiness, promotion, sign-off, evidence (case-insensitive, word-boundary) appearing in any .mjs file there.

Deliberately narrower than the README's own longer "tells" list. audit, checklist, and gate were the obvious additions, but checked first: all their current hits in the directory are innocent prose ("Verification Checklist", "Audit every reset stylesheet"), and lab collides with label/available 148 times. A noisy check gets suppressed rather than acted on, so I left those out.

Verified the five-word list is clean today (0 hits) and matches what the issue measured against the draft that prompted it (#5351, 56 hits) — didn't re-run that PR's diff since it's someone else's draft, took the issue's numbers as the baseline signal instead.

.mjs-only is deliberate too: it naturally excludes README.md, which legitimately contains all five words since it's the document describing the rule — filtering by extension is simpler than an explicit exclude-list and won't need updating if another non-.mjs file shows up in the directory later.

The failure message points at the README's routing table so the author knows which wiki page the material actually wants, per the issue's ask.

Verification

Confirmed the test fails against a real violation: temporarily appended a comment with rubric, readiness, evidence to getting-started.doc.mjs, ran the suite, watched it fail with the expected message naming the word and file, then reverted. Full docs-discovery.test.mjs suite: 23/23 passing. Typecheck and lint clean.

Not a visual change (a test file, no rendered output), so no screenshot.

packages/cli/assets/docs ships to people building WITH Astryx; material
about building Astryx itself (grading rubrics, promotion gates, review
evidence) keeps landing there instead of the wiki, and it was only ever
caught by a human reading the diff. facebook#5368 added the README with the
audience rule and routing table; this is the automated half.

Checks for rubric/readiness/promotion/sign-off/evidence, a narrower list
than the README's own "tells" section: audit/checklist/gate were the
obvious additions, but all their current hits are innocent prose
("Verification Checklist", "Audit every reset stylesheet"), and a noisy
check gets suppressed. Measured against main (0 hits) and the draft that
prompted this, facebook#5351 (56 hits).
@vercel

vercel Bot commented Aug 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
astryx Error Error Aug 23, 2026 10:10pm

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Aug 23, 2026
@github-actions github-actions Bot added community Authored by a community contributor (not on the eng/design team) needs:code-review High-risk change (new package/component/API) — needs human code review before merge labels Aug 23, 2026
@HelloOjasMutreja
HelloOjasMutreja marked this pull request as ready for review August 23, 2026 22:14
@github-actions

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

🧪 Sandbox Preview

View Sandbox for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

No new or modified components detected.

Bundle Size Summary

No component packages changed.

Accessibility Audit

Status: No accessibility violations detected.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. community Authored by a community contributor (not on the eng/design team) needs:code-review High-risk change (new package/component/API) — needs human code review before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: lint assets/docs for our-process words shipped to callers

1 participant