b4push
Run comprehensive pre-push validation. Use when: (1) Completing a PR or feature implementation, (2) Before pushing significant changes, (3) After large refactors, (4) User says 'b4push', 'before push'...
Before Push Check
Run pnpm b4push from the project root. This executes scripts/, which is the single source of truth for the step list — consult it directly rather than this summary if the two ever appear to disagree.
Steps (cheap → expensive) — 24-step suite
Format check (mdx) —
pnpm format:check:mdxTemplate drift check —
bash scripts/(host ↔ generator template parity)check- template- drift. sh No-host-alias-in-package guard (#2344) —
pnpm check:no-host-alias-in-package(packages/must not import the hostzudo- doc/ src/ ** @/alias)Pin parity check (W4A #1732) —
pnpm check:pin-parity(root package.json zfb pins ↔ scaffold.ts literals)Fixture settings drift check —
pnpm check:fixture-settings-drift(e2e fixtures ↔ root settings.ts)Tags audit —
pnpm tags:audit --ci(validates tag vocabulary)Current-only compatibility contract check —
pnpm check:compatibility-contractDesign token lint —
pnpm lint:tokensComponent-tokens codegen drift check (#2448) —
pnpm check:component-tokensE2E spec naming guard (#2095) —
pnpm check:e2e-spec-naming@flaky/@local-only tracking-issue guard (#2292) —
pnpm check:flaky-tracking-issueWait-debt guard (#2538) —
pnpm check:wait-debt(zero-tolerancewaitForTimeoutannotation check)B4push/CI parity check (#1967) —
pnpm check:b4push-ci-parity(guard manifest meta-check)Type checking —
pnpm check(zfb check) +pnpm check:pages+ workspace package typechecksWorker contract proof —
pnpm verify:worker-contract(types + runtime + dry-run)Root unit tests —
pnpm --filter @takazudo/zudo-doc build && pnpm test:unit(builds dist/ first; required for import resolution)Package tests —
pnpm test:packages(dist/ already built by step 16)Package safelist check (#1994) —
pnpm check:package-safelist(requires dist/safelist.css from step 16)Build —
pnpm build(zfb build → static HTML export to dist/)Content-fallback check —
pnpm check:content-fallbackLink check —
pnpm check:links -- --strict-broken --strict-absolute --allowlist=.check-links-allowlistHTML validation —
pnpm check:html(html-validate dist/**/*.html)Automated preview smoke —
pnpm smoke:preview(blocking)Manual interactive smoke — operator-driven (theme toggle, mobile menu, search, etc.)
Each step's elapsed time is recorded and printed as a breakdown in the final SUMMARY block. Playwright E2E runs in CI (pr-checks e2e job); b4push intentionally excludes it for time-budget reasons — see TESTING.md at repo root for the full tier rationale.
Env overrides (skip expensive steps in non-interactive use)
B4PUSH_SKIP_HTML_VALIDATE=1 pnpm b4push # skip step 22
B4PUSH_SKIP_PREVIEW_SMOKE=1 pnpm b4push # skip step 23
B4PUSH_SKIP_MANUAL_SMOKE=1 pnpm b4push # skip step 24Combine as needed, e.g. B4PUSH_SKIP_PREVIEW_SMOKE=1 B4PUSH_SKIP_MANUAL_SMOKE=1 pnpm b4push.
On failure
b4push accumulates failures across all steps and reports a summary at the end — a single step failure does not abort the run. Read the ❌ lines in the summary to identify which steps failed.
Read the failure output to identify which steps failed
Auto-fix what you can:
Formatting:
pnpm formatto auto-fix MD/MDX formatting issuesType errors: fix the TypeScript issues
Build errors: fix the MDX compilation or config issues
Unit/package test failures: investigate and fix the test or the underlying code
Re-run
pnpm b4pushto confirm all checks passReport the final status