ci(docs): add docs.page link check to docs workflow - #9214
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9214 +/- ##
=========================================
Coverage 69.50% 69.50%
- Complexity 2124 2125 +1
=========================================
Files 443 443
Lines 25536 25536
Branches 4259 4259
=========================================
Hits 17745 17745
Misses 6389 6389
Partials 1402 1402
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
russellwheatley
left a comment
There was a problem hiding this comment.
Two things before merge. The AuthSettings fragment drop is a real docs regression. The TypeDoc host gap is bigger: with the current CLI, this job will not fail on a broken reference.rnfirebase.io URL after merge.
| Ensure that all parts of step 1 and 2 from [the official firebase Android phone auth docs](https://firebase.google.com/docs/auth/android/phone-auth#enable-phone-number-sign-in-for-your-firebase-project) have been followed. | ||
|
|
||
| To bypass Play Integrity for manual testing, you may [force reCAPTCHA to be used](https://reference.rnfirebase.io/_react-native-firebase/auth/FirebaseAuthTypes/AuthSettings.html#appVerificationDisabledForTesting) prior to calling [`verifyPhoneNumber`](https://reference.rnfirebase.io/_react-native-firebase/auth/verifyPhoneNumber.html). | ||
| To bypass Play Integrity for manual testing, you may [force reCAPTCHA to be used](https://reference.rnfirebase.io/_react-native-firebase/auth/AuthSettings.html) prior to calling [`verifyPhoneNumber`](https://reference.rnfirebase.io/_react-native-firebase/auth/verifyPhoneNumber.html). |
There was a problem hiding this comment.
The iOS AuthSettings link a few lines up still deep-links to #appverificationdisabledfortesting. This Android one dropped the fragment, so it lands on the interface page instead of the property. Restore the same hash.
There was a problem hiding this comment.
Restored. Both the iOS and Android AuthSettings links now use #appverificationdisabledfortesting on the live TypeDoc page (AuthSettings.html). That hash lives in the sweep commit (docs: fix broken links found by docs.page check) so the first commit is already click-correct.
| "lint:ios:check": "find packages/*/ios -type f \\( -name '*.h' -o -name '*.cpp' -o -name '*.m' -o -name '*.mm' \\) -not -path '*/generated/*' -print0 | xargs -0 clang-format --style=Google -n -Werror", | ||
| "lint:ios:fix": "find packages/*/ios -type f \\( -name '*.h' -o -name '*.cpp' -o -name '*.m' -o -name '*.mm' \\) -not -path '*/generated/*' -print0 | xargs -0 clang-format -i --style=Google", | ||
| "lint:markdown": "eslint \"docs/**/*.mdx\" --max-warnings=0 && prettier --check \"docs/**/*.mdx\"", | ||
| "lint:docs-links": "docs check . --external-links warn", |
There was a problem hiding this comment.
--external-links warn is the right call for npm/SO 403s. @docs.page/cli treats every https:// URL as external (classifyTarget), and there is no per-host severity. That means a 404 on reference.rnfirebase.io will only warn, which is almost every TypeDoc link this sweep rewrote.
Internal /auth/usage paths, assets, MDX, and frontmatter will still fail the job. TypeDoc URL rot will not.
If the point of wiring this in is to keep those reference links honest, this needs a companion check that fails on that host, or a CLI feature for host-specific severity. As written, the sweep helps today's clicks and then CI stops watching.
There was a problem hiding this comment.
Agreed — with the current CLI, https://reference.rnfirebase.io/... is classified as external, so --external-links warn will not fail the job on TypeDoc 404s.
We are leaving this as-is until @docs.page/cli grows host-specific severity (or equivalent). This PR is converted to draft until that lands; then we can make reference.rnfirebase.io fail CI without also failing on npm/SO 403s.
f015cec to
106d170
Compare
106d170 to
2e4dca3
Compare
|
blocked: do-not-merge — waiting on final merge + publish of invertase/docs.page#544. This PR is already shaped as if that release is live ( |
2e4dca3 to
9b251ab
Compare
9b251ab to
408de77
Compare
| # In case you must have a package version that would be disallowed | ||
| # by the above npmMinimalAgeGate | ||
| npmPreapprovedPackages: | ||
| - '@docs.page/cli@2.1.0' # published 2026-09-04; needed immediately for docs CI |
There was a problem hiding this comment.
The reference.rnfirebase.io gap is still there. 2.1.0 treats 401/403/405/429 as warnings on every host, and nothing here pins reference.rnfirebase.io back to hard-error. That host isn't bot-gated today, but if Cloudflare/Fastly ever 429s it under the burst of requests this check fires, a real broken TypeDoc link would quietly become a warning instead of failing the build, which is the whole thing this PR is meant to catch.
There was a problem hiding this comment.
That's a good one and it's handled poorly - I've pursuing upstream CLI remediation/features that will stop conflating "bot blocked" vs "failed but should have worked" so we don't downgrade things we want. Upstream pursuit:
- debug flag and better error messaging for better error tracing in case of problems
- ability to specify explicit hosts we know are bot-friendly so never downgrade
- friendly server behavior so cloudflare or others don't 429 us (honoring retry-after, less per-host concurrent load etc)
This whole PR should sit again until those are resolved - this exercise is making the docs.page CLI checker a lot more battle-tested that's for sure!
| run: | | ||
| yarn lint:spellcheck | ||
| - name: Docs.page links | ||
| run: yarn lint:docs-links |
There was a problem hiding this comment.
This check is already flaky on this exact commit. Same head SHA, two runs: one failed on invertase.io/blog/... with "operation was aborted" (timeout), the other passed clean with 0 errors. I hit that blog URL directly a few times just now and it's fine, so this looks like a transient network hiccup, not a real 404, and there's no retry around it (Yarn Install a few lines up already wraps itself in nick-fields/retry). As-is this will occasionally fail PRs for no reason.
There was a problem hiding this comment.
comment above should work to handle this
Superseded by #9214 (review) - AuthSettings fragment looks fixed on the current commits, TypeDoc host-gap point carried forward there along with a new flakiness finding.
|
Back to draft for a bit while newly surfaced production-usage issues get some clean upstream solutions Details: #9214 (comment) |
Summary
Integrates
@docs.page/cli checkinto RNFB docs validation so broken internal links, missing assets, MDX render issues, and metadata problems fail CI — closing the gap left after the June 2026 link-audit sweep (PR #9051), which fixed URLs but never wired the checker into lint/CI.Two bisectable commits:
migrating-to-v26.mdxem dash) so the checker is green before enforcement landsyarn lint:docs-links(docs check .),@docs.page/cli@2.1.0,.github/workflows/docs.ymlstep, OKF agent guidance (bot-gate warns; real 404s error)External links
docs check .uses CLI defaults. Real breakage (404, 5xx, DNS, timeout) fails CI. Bot-gated hosts (401 / 403 / 405 / 429) warn for visibility without false-positive red builds. Agents still must fix every error line (validation-checklist § docs.page link check).Test plan
yarn lint:markdownexit 0yarn lint:spellcheckexit 0yarn lint:docs-linksexit 0 against@docs.page/cli@2.1.0(0 errors; bot-gate 403s as warnings)Maintainer note: Fixes CPRN-368