@cbartens/bkit 0.0.0-stage → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.bkit/README.md +417 -0
- package/.bkit/core/.agents/context.md +95 -0
- package/.bkit/core/.agents/docs.md +62 -0
- package/.bkit/core/.agents/rules.md +147 -0
- package/.bkit/core/.agents/skills.md +43 -0
- package/.bkit/core/.bkit/LICENSE.md +151 -0
- package/.bkit/core/.bkit/README.md +417 -0
- package/.bkit/core/.bkit/cloud.md +493 -0
- package/.bkit/core/.bkit/comparison.md +321 -0
- package/.bkit/core/.bkit/install.md +401 -0
- package/.bkit/core/.bkit/jsonl.md +497 -0
- package/.bkit/core/.bkit/prompts.md +474 -0
- package/.bkit/core/.bkit/providers.md +598 -0
- package/.bkit/core/.bkit/templates.md +470 -0
- package/.bkit/core/.bkit/trackers.md +95 -0
- package/.bkit/core/.bkit/workflows.md +1550 -0
- package/.bkit/core/.claude/hooks/bkit-gateguard.cjs +82 -0
- package/.bkit/core/.claude/hooks/bkit-guardrails.cjs +93 -0
- package/.bkit/core/.claude/hooks/bkit-preflight.sh +74 -0
- package/.bkit/core/.codex/hooks/bkit-gateguard.cjs +115 -0
- package/.bkit/core/.codex/hooks/bkit-guardrails.cjs +135 -0
- package/.bkit/core/.cursor/hooks/bkit-gateguard.cjs +111 -0
- package/.bkit/core/.cursor/hooks/bkit-guardrails.cjs +169 -0
- package/.bkit/core/.cursor/hooks/bkit-preflight.sh +63 -0
- package/.bkit/core/.opencode/plugin/bkit-gateguard.js +225 -0
- package/.bkit/core/AGENTS.md +77 -0
- package/.bkit/core/LICENSE.md +149 -0
- package/.bkit/core/docs/templates/bkit-audit-accessibility.md +272 -0
- package/.bkit/core/docs/templates/bkit-audit-adoption.md +223 -0
- package/.bkit/core/docs/templates/bkit-audit-agents.md +230 -0
- package/.bkit/core/docs/templates/bkit-audit-aio-seo.md +227 -0
- package/.bkit/core/docs/templates/bkit-audit-analytics.md +266 -0
- package/.bkit/core/docs/templates/bkit-audit-annotations.md +230 -0
- package/.bkit/core/docs/templates/bkit-audit-app-performance.md +270 -0
- package/.bkit/core/docs/templates/bkit-audit-app-store.md +254 -0
- package/.bkit/core/docs/templates/bkit-audit-architecture.md +221 -0
- package/.bkit/core/docs/templates/bkit-audit-ci-performance.md +241 -0
- package/.bkit/core/docs/templates/bkit-audit-config.md +230 -0
- package/.bkit/core/docs/templates/bkit-audit-cost.md +218 -0
- package/.bkit/core/docs/templates/bkit-audit-coverage.md +221 -0
- package/.bkit/core/docs/templates/bkit-audit-database.md +229 -0
- package/.bkit/core/docs/templates/bkit-audit-dead-code.md +251 -0
- package/.bkit/core/docs/templates/bkit-audit-deferrals.md +283 -0
- package/.bkit/core/docs/templates/bkit-audit-dependencies.md +268 -0
- package/.bkit/core/docs/templates/bkit-audit-documentation.md +280 -0
- package/.bkit/core/docs/templates/bkit-audit-duplication.md +253 -0
- package/.bkit/core/docs/templates/bkit-audit-failures.md +259 -0
- package/.bkit/core/docs/templates/bkit-audit-flakes.md +237 -0
- package/.bkit/core/docs/templates/bkit-audit-gates.md +250 -0
- package/.bkit/core/docs/templates/bkit-audit-issues.md +273 -0
- package/.bkit/core/docs/templates/bkit-audit-llm.md +239 -0
- package/.bkit/core/docs/templates/bkit-audit-logs.md +266 -0
- package/.bkit/core/docs/templates/bkit-audit-models.md +210 -0
- package/.bkit/core/docs/templates/bkit-audit-privacy.md +211 -0
- package/.bkit/core/docs/templates/bkit-audit-prompts.md +216 -0
- package/.bkit/core/docs/templates/bkit-audit-red-team.md +220 -0
- package/.bkit/core/docs/templates/bkit-audit-reliability.md +222 -0
- package/.bkit/core/docs/templates/bkit-audit-repo.md +224 -0
- package/.bkit/core/docs/templates/bkit-audit-security.md +274 -0
- package/.bkit/core/docs/templates/bkit-audit-slop.md +200 -0
- package/.bkit/core/docs/templates/bkit-audit-testing.md +270 -0
- package/.bkit/core/docs/templates/bkit-audit-usability.md +237 -0
- package/.bkit/core/docs/templates/bkit-plan.md +476 -0
- package/.bkit/core/engine/checks/after/auth.ts +149 -0
- package/.bkit/core/engine/checks/after/ci-yml.ts +701 -0
- package/.bkit/core/engine/checks/after/github.ts +424 -0
- package/.bkit/core/engine/checks/after/index.ts +530 -0
- package/.bkit/core/engine/checks/after/managed.ts +217 -0
- package/.bkit/core/engine/checks/after/suppression.ts +53 -0
- package/.bkit/core/engine/checks/after/tools.ts +427 -0
- package/.bkit/core/engine/checks/before/context-fetch.ts +429 -0
- package/.bkit/core/engine/checks/before/env.ts +187 -0
- package/.bkit/core/engine/checks/before/files.ts +204 -0
- package/.bkit/core/engine/checks/before/index.ts +206 -0
- package/.bkit/core/engine/checks/before/mcp.ts +127 -0
- package/.bkit/core/engine/checks/before/repo.ts +77 -0
- package/.bkit/core/engine/checks/before/version.ts +67 -0
- package/.bkit/core/engine/checks/status-holes.ts +479 -0
- package/.bkit/core/engine/cli.ts +867 -0
- package/.bkit/core/engine/commands/analysis.ts +550 -0
- package/.bkit/core/engine/commands/ci/ci.ts +483 -0
- package/.bkit/core/engine/commands/comply.ts +415 -0
- package/.bkit/core/engine/commands/harvest.ts +459 -0
- package/.bkit/core/engine/commands/install/check.ts +70 -0
- package/.bkit/core/engine/commands/install/doctor.ts +254 -0
- package/.bkit/core/engine/commands/install/install.ts +550 -0
- package/.bkit/core/engine/commands/install/uninstall.ts +995 -0
- package/.bkit/core/engine/commands/install/upgrade.ts +1037 -0
- package/.bkit/core/engine/commands/launch.ts +139 -0
- package/.bkit/core/engine/commands/lib.ts +495 -0
- package/.bkit/core/engine/commands/registry.ts +53 -0
- package/.bkit/core/engine/commands/setup/setup.ts +184 -0
- package/.bkit/core/engine/commands/telemetry.ts +32 -0
- package/.bkit/core/engine/commands/workflow/branches.ts +1514 -0
- package/.bkit/core/engine/commands/workflow/context.ts +961 -0
- package/.bkit/core/engine/commands/workflow/counters.ts +268 -0
- package/.bkit/core/engine/commands/workflow/fids.ts +243 -0
- package/.bkit/core/engine/commands/workflow/issues.ts +675 -0
- package/.bkit/core/engine/commands/workflow/ledgers.ts +575 -0
- package/.bkit/core/engine/commands/workflow/locks.ts +478 -0
- package/.bkit/core/engine/commands/workflow/prs.ts +1087 -0
- package/.bkit/core/engine/commands/workflow/repo.ts +220 -0
- package/.bkit/core/engine/commands/workflow/roadmap.ts +576 -0
- package/.bkit/core/engine/commands/workflow/runs.ts +2140 -0
- package/.bkit/core/engine/commands/workflow/runtime.ts +300 -0
- package/.bkit/core/engine/commands/workflow/skills.ts +118 -0
- package/.bkit/core/engine/commands/workflow/status.ts +455 -0
- package/.bkit/core/engine/commands/workflow/steps.ts +1300 -0
- package/.bkit/core/engine/commands/workflow/tests.ts +161 -0
- package/.bkit/core/engine/commands/workflow/workflows.ts +1573 -0
- package/.bkit/core/engine/commands/workflow/workstreams.ts +164 -0
- package/.bkit/core/engine/commands/workflow/worktrees.ts +534 -0
- package/.bkit/core/engine/install/cloud-env.ts +924 -0
- package/.bkit/core/engine/install/managed-block.ts +212 -0
- package/.bkit/core/engine/install/manifest.ts +448 -0
- package/.bkit/core/engine/install/modules/claude.ts +362 -0
- package/.bkit/core/engine/install/modules/cloud.ts +173 -0
- package/.bkit/core/engine/install/modules/codex.ts +219 -0
- package/.bkit/core/engine/install/modules/core.ts +620 -0
- package/.bkit/core/engine/install/modules/cursor.ts +231 -0
- package/.bkit/core/engine/install/modules/index.ts +242 -0
- package/.bkit/core/engine/install/modules/opencode.ts +573 -0
- package/.bkit/core/engine/install/payload-links.ts +150 -0
- package/.bkit/core/engine/install/placeholders.ts +108 -0
- package/.bkit/core/engine/install/template-copies.ts +119 -0
- package/.bkit/core/engine/install/version-file.ts +284 -0
- package/.bkit/core/engine/install/write.ts +467 -0
- package/.bkit/core/engine/ledgers/clamp-log.ts +32 -0
- package/.bkit/core/engine/ledgers/status.ts +213 -0
- package/.bkit/core/engine/ledgers/telemetry.ts +1143 -0
- package/.bkit/core/engine/render/hosts.ts +372 -0
- package/.bkit/core/engine/render/models.ts +323 -0
- package/.bkit/core/engine/render/parts.ts +38 -0
- package/.bkit/core/engine/render/trackers.ts +170 -0
- package/.bkit/core/engine/shared/egress.ts +345 -0
- package/.bkit/core/engine/shared/json.ts +16 -0
- package/.bkit/core/engine/shared/log-prefix.ts +9 -0
- package/.bkit/core/engine/shared/package-json.ts +29 -0
- package/.bkit/core/engine/shared/package-manager.ts +38 -0
- package/.bkit/core/engine/shared/package-roots.ts +163 -0
- package/.bkit/core/engine/shared/protected-paths.ts +164 -0
- package/.bkit/core/engine/shared/settings.ts +72 -0
- package/.bkit/core/engine/shared/timeouts.ts +20 -0
- package/.bkit/core/engine/tools/wording.ts +748 -0
- package/.bkit/core/hooks/gateguard-edit-payload.js +18 -0
- package/.bkit/core/hooks/gateguard-engine.js +193 -0
- package/.bkit/core/hooks/guardrails-shell.js +154 -0
- package/.bkit/core/hooks/guardrails-tiers.js +68 -0
- package/.bkit/core/hooks/preflight-linear.sh +73 -0
- package/.bkit/core/prompts/bkit-audit-generate.md +66 -0
- package/.bkit/core/prompts/bkit-build-challenge-1.md +79 -0
- package/.bkit/core/prompts/bkit-build-challenge-2.md +81 -0
- package/.bkit/core/prompts/bkit-build-challenge-reconcile.md +68 -0
- package/.bkit/core/prompts/bkit-build-challenge-remediate.md +70 -0
- package/.bkit/core/prompts/bkit-build-challenge-tests.md +73 -0
- package/.bkit/core/prompts/bkit-build-install-skills.md +67 -0
- package/.bkit/core/prompts/bkit-build-plan-current.md +75 -0
- package/.bkit/core/prompts/bkit-build-plan-execute.md +72 -0
- package/.bkit/core/prompts/bkit-build-plan-gaps-remediate.md +73 -0
- package/.bkit/core/prompts/bkit-build-plan-verify.md +88 -0
- package/.bkit/core/prompts/bkit-build-summary.md +93 -0
- package/.bkit/core/prompts/bkit-debug-abort-handover.md +90 -0
- package/.bkit/core/prompts/bkit-debug-failure-diagnose.md +151 -0
- package/.bkit/core/prompts/bkit-debug-failure-remediate.md +78 -0
- package/.bkit/core/prompts/bkit-debug-failure-soak.md +73 -0
- package/.bkit/core/prompts/bkit-debug-summary.md +95 -0
- package/.bkit/core/prompts/bkit-design-brainstorm-ideate-1.md +72 -0
- package/.bkit/core/prompts/bkit-design-brainstorm-ideate-2.md +72 -0
- package/.bkit/core/prompts/bkit-design-brainstorm-ideate-3.md +75 -0
- package/.bkit/core/prompts/bkit-design-generate.md +110 -0
- package/.bkit/core/prompts/bkit-design-organise.md +85 -0
- package/.bkit/core/prompts/bkit-design-review-1.md +121 -0
- package/.bkit/core/prompts/bkit-design-review-2.md +111 -0
- package/.bkit/core/prompts/bkit-design-spike.md +97 -0
- package/.bkit/core/prompts/bkit-design-summary.md +106 -0
- package/.bkit/core/prompts/bkit-design-update.md +66 -0
- package/.bkit/core/prompts/bkit-plan-complexity-check.md +66 -0
- package/.bkit/core/prompts/bkit-plan-complexity-split.md +87 -0
- package/.bkit/core/prompts/bkit-plan-generate.md +74 -0
- package/.bkit/core/prompts/bkit-plan-review-1.md +90 -0
- package/.bkit/core/prompts/bkit-plan-review-2.md +80 -0
- package/.bkit/core/prompts/bkit-plan-review-3.md +92 -0
- package/.bkit/core/prompts/bkit-plan-scope-check-1.md +84 -0
- package/.bkit/core/prompts/bkit-plan-scope-check-2.md +84 -0
- package/.bkit/core/prompts/bkit-plan-summary.md +106 -0
- package/.bkit/core/prompts/bkit-plan-update.md +68 -0
- package/.bkit/core/prompts/bkit-ship-conflict-resolve.md +90 -0
- package/.bkit/core/prompts/bkit-ship-deferred-sweep.md +94 -0
- package/.bkit/core/prompts/bkit-ship-summary.md +77 -0
- package/.bkit/core/prompts/bkit-ship-update-docs.md +71 -0
- package/.bkit/core/prompts/bkit-utility-compress-markdown.md +91 -0
- package/.bkit/core/prompts/bkit-utility-update-decisions.md +75 -0
- package/.bkit/core/prompts/bkit-utility-update-deferrals.md +76 -0
- package/.bkit/core/prompts/bkit-utility-update-documentation.md +61 -0
- package/.bkit/core/prompts/bkit-utility-update-failures.md +76 -0
- package/.bkit/core/prompts/bkit-utility-update-knowledge.md +75 -0
- package/.bkit/core/prompts/bkit-utility-update-roadmap.md +82 -0
- package/.bkit/core/workflows/bkit-auto.md +121 -0
- package/.bkit/core/workflows/bkit-build.md +802 -0
- package/.bkit/core/workflows/bkit-debug.md +649 -0
- package/.bkit/core/workflows/bkit-design.md +495 -0
- package/.bkit/core/workflows/bkit-plan.md +510 -0
- package/.bkit/core/workflows/bkit-ship.md +650 -0
- package/.bkit/shared/.bkit/.env.example +86 -0
- package/.bkit/shared/.claude/bkit-cloud.md +117 -0
- package/.bkit/shared/.claude/settings.json +88 -0
- package/.bkit/shared/.codex/hooks.json +26 -0
- package/.bkit/shared/.cursor/bkit-cloud.md +84 -0
- package/.bkit/shared/.cursor/hooks.json +26 -0
- package/.bkit/shared/.cursor/mcp.json +15 -0
- package/.bkit/shared/.cursor/rules/bkit-rules.mdc +12 -0
- package/.bkit/shared/.gitattributes +37 -0
- package/.bkit/shared/.mcp.json +16 -0
- package/.bkit/shared/.opencode/opencode.json +62 -0
- package/.bkit/shared/CLAUDE.md +11 -0
- package/.bkit/shared/LICENSE.md +22 -0
- package/.bkit/shared/docs/architecture.md +19 -0
- package/.bkit/shared/docs/data-schema.md +19 -0
- package/.bkit/shared/docs/deployments.md +433 -0
- package/.bkit/shared/docs/design.md +39 -0
- package/.bkit/shared/docs/noise.md +19 -0
- package/.bkit/shared/docs/observability.md +25 -0
- package/.bkit/shared/docs/security.md +42 -0
- package/.bkit/shared/docs/setup.md +30 -0
- package/.bkit/shared/docs/technology.md +18 -0
- package/.bkit/shared/docs/testing.md +413 -0
- package/.bkit/shared/gitignore +97 -0
- package/.bkit/templates/.claude/hooks/bkit-cloud-bootstrap.sh +187 -0
- package/.bkit/templates/.cursor/Dockerfile +68 -0
- package/.bkit/templates/.cursor/environment.json +6 -0
- package/.bkit/templates/.cursor/settings.json +11 -0
- package/.bkit/templates/.envrc +7 -0
- package/.bkit/templates/.github/dependabot.yml +52 -0
- package/.bkit/templates/.github/renovate.json5 +224 -0
- package/.bkit/templates/.github/workflows/bkit-ci.yml +1062 -0
- package/.bkit/templates/.github/workflows/bkit-cloud.yml +564 -0
- package/.bkit/templates/.github/workflows/bkit-renovate.yml +102 -0
- package/.bkit/templates/.graphifyignore +108 -0
- package/.bkit/templates/.husky/pre-commit +16 -0
- package/.bkit/templates/.husky/pre-push +91 -0
- package/.bkit/templates/.lintstagedrc.json +3 -0
- package/.bkit/templates/.prettierignore +41 -0
- package/.bkit/templates/.serena/project.yml +243 -0
- package/.bkit/templates/.vale/styles/House/Filler.yml +11 -0
- package/.bkit/templates/.vale/styles/House/Hedging.yml +12 -0
- package/.bkit/templates/.vale/styles/House/LLMSlop.yml +13 -0
- package/.bkit/templates/.vale/styles/House/Verbose.yml +12 -0
- package/.bkit/templates/.vale.ini +67 -0
- package/.bkit/templates/LICENSE.md +22 -0
- package/.bkit/templates/context/bkit-cloudrun.md +84 -0
- package/.bkit/templates/context/bkit-expo.md +186 -0
- package/.bkit/templates/context/bkit-github.md +79 -0
- package/.bkit/templates/context/bkit-inngest.md +45 -0
- package/.bkit/templates/context/bkit-maestro.md +76 -0
- package/.bkit/templates/context/bkit-playwright.md +62 -0
- package/.bkit/templates/context/bkit-resend.md +36 -0
- package/.bkit/templates/context/bkit-sentry.md +65 -0
- package/.bkit/templates/context/bkit-serena.md +33 -0
- package/.bkit/templates/context/bkit-stripe.md +36 -0
- package/.bkit/templates/context/bkit-supabase.md +59 -0
- package/.bkit/templates/context/bkit-tavily.md +49 -0
- package/.bkit/templates/context/bkit-vercel.md +64 -0
- package/.bkit/templates/docs/capabilities.md +72 -0
- package/.bkit/templates/scripts/ci/accepted-divergences.json +21 -0
- package/.bkit/templates/scripts/ci/check-accepted-divergences.mjs +152 -0
- package/.bkit/templates/scripts/ci/check-accepted-divergences.test.mjs +130 -0
- package/.bkit/templates/scripts/ci/lanes/resolve-push-base.mjs +98 -0
- package/.bkit/templates/scripts/ci/lanes/resolve-push-base.test.mjs +86 -0
- package/.bkit/templates/scripts/graphify/bkit-graph-drift-rules.json +23 -0
- package/.bkit/templates/scripts/graphify/bkit-graph-drift.py +208 -0
- package/.bkit/templates/scripts/graphify/bkit-graph-eager-rules.json +35 -0
- package/.bkit/templates/scripts/graphify/bkit-graph-eager.py +236 -0
- package/.bkit/templates/scripts/graphify/bkit-graph-external-rules.json +17 -0
- package/.bkit/templates/scripts/graphify/bkit-graph-imports.py +290 -0
- package/.bkit/templates/scripts/graphify/bkit-graph-pre-push.sh +19 -0
- package/.bkit/templates/scripts/graphify/bkit-graph-repair.py +120 -0
- package/.bkit/templates/scripts/graphify/bkit-graph-surface.py +232 -0
- package/.bkit/templates/scripts/graphify/bkit-graphify-graphml.py +36 -0
- package/.bkit/templates/scripts/graphify/bkit-graphify-rollup.py +927 -0
- package/.bkit/templates/scripts/graphify/bkit-graphify.sh +351 -0
- package/.bkit/templates/scripts/launchd/ai.bkit.launchd.plist +26 -0
- package/.bkit/templates/scripts/launchd/bkit-launchd-env.sh +53 -0
- package/.bkit/templates/scripts/launchd/launchd.env.example +13 -0
- package/.bkit/templates/scripts/prettier/bkit-insert-ignore.mjs +275 -0
- package/.bkit/templates/scripts/secrets/bkit-secrets.config.mjs +66 -0
- package/.bkit/templates/scripts/secrets/bkit-secrets.mjs +785 -0
- package/.bkit/templates/scripts/serena/bkit-serena-mcp.sh +30 -0
- package/.bkit/templates/scripts/serena/bkit-serena.mcp.json +9 -0
- package/.bkit/templates/scripts/slop/bkit-slop-type-suppression.mjs +286 -0
- package/.bkit/templates/slop-scan.config.json +120 -0
- package/CHANGELOG.md +1503 -0
- package/LICENSE.md +161 -0
- package/README.md +184 -2
- package/dist/checks/after/auth.js +140 -0
- package/dist/checks/after/ci-yml.js +681 -0
- package/dist/checks/after/github.js +400 -0
- package/dist/checks/after/index.js +431 -0
- package/dist/checks/after/managed.js +187 -0
- package/dist/checks/after/suppression.js +39 -0
- package/dist/checks/after/tools.js +351 -0
- package/dist/checks/before/context-fetch.js +426 -0
- package/dist/checks/before/env.js +163 -0
- package/dist/checks/before/files.js +187 -0
- package/dist/checks/before/index.js +162 -0
- package/dist/checks/before/mcp.js +111 -0
- package/dist/checks/before/repo.js +71 -0
- package/dist/checks/before/version.js +60 -0
- package/dist/checks/status-holes.js +393 -0
- package/dist/cli.js +688 -0
- package/dist/commands/analysis.js +325 -0
- package/dist/commands/ci/ci.js +438 -0
- package/dist/commands/comply.js +310 -0
- package/dist/commands/harvest.js +354 -0
- package/dist/commands/install/check.js +61 -0
- package/dist/commands/install/doctor.js +209 -0
- package/dist/commands/install/install.js +475 -0
- package/dist/commands/install/uninstall.js +839 -0
- package/dist/commands/install/upgrade.js +782 -0
- package/dist/commands/launch.js +118 -0
- package/dist/commands/lib.js +363 -0
- package/dist/commands/registry.js +50 -0
- package/dist/commands/setup/setup.js +158 -0
- package/dist/commands/telemetry.js +29 -0
- package/dist/commands/workflow/branches.js +1265 -0
- package/dist/commands/workflow/context.js +846 -0
- package/dist/commands/workflow/counters.js +227 -0
- package/dist/commands/workflow/fids.js +224 -0
- package/dist/commands/workflow/issues.js +585 -0
- package/dist/commands/workflow/ledgers.js +472 -0
- package/dist/commands/workflow/locks.js +364 -0
- package/dist/commands/workflow/prs.js +904 -0
- package/dist/commands/workflow/repo.js +199 -0
- package/dist/commands/workflow/roadmap.js +495 -0
- package/dist/commands/workflow/runs.js +1717 -0
- package/dist/commands/workflow/runtime.js +257 -0
- package/dist/commands/workflow/skills.js +110 -0
- package/dist/commands/workflow/status.js +392 -0
- package/dist/commands/workflow/steps.js +1093 -0
- package/dist/commands/workflow/tests.js +144 -0
- package/dist/commands/workflow/workflows.js +1342 -0
- package/dist/commands/workflow/workstreams.js +141 -0
- package/dist/commands/workflow/worktrees.js +473 -0
- package/dist/install/cloud-env.js +818 -0
- package/dist/install/managed-block.js +182 -0
- package/dist/install/manifest.js +376 -0
- package/dist/install/modules/claude.js +288 -0
- package/dist/install/modules/cloud.js +151 -0
- package/dist/install/modules/codex.js +193 -0
- package/dist/install/modules/core.js +531 -0
- package/dist/install/modules/cursor.js +186 -0
- package/dist/install/modules/index.js +152 -0
- package/dist/install/modules/opencode.js +504 -0
- package/dist/install/payload-links.js +119 -0
- package/dist/install/placeholders.js +87 -0
- package/dist/install/template-copies.js +106 -0
- package/dist/install/version-file.js +204 -0
- package/dist/install/write.js +342 -0
- package/dist/ledgers/clamp-log.js +27 -0
- package/dist/ledgers/status.js +156 -0
- package/dist/ledgers/telemetry.js +637 -0
- package/dist/render/hosts.js +339 -0
- package/dist/render/models.js +288 -0
- package/dist/render/parts.js +33 -0
- package/dist/render/trackers.js +135 -0
- package/dist/shared/egress.js +299 -0
- package/dist/shared/json.js +16 -0
- package/dist/shared/log-prefix.js +7 -0
- package/dist/shared/package-json.js +22 -0
- package/dist/shared/package-manager.js +32 -0
- package/dist/shared/package-roots.js +145 -0
- package/dist/shared/protected-paths.js +153 -0
- package/dist/shared/settings.js +44 -0
- package/dist/shared/timeouts.js +19 -0
- package/dist/tools/wording.js +680 -0
- package/package.json +101 -4
|
@@ -0,0 +1,1062 @@
|
|
|
1
|
+
# Example. Copy into the repo and own it.
|
|
2
|
+
# bkit install does not write this file and does not overwrite a copy.
|
|
3
|
+
# The job-level `env:` of bkit-tests-static is where the `[verbose ci]` commit marker is
|
|
4
|
+
# read; keep it if you want verbose-CI support.
|
|
5
|
+
name: bkit-ci
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
push:
|
|
10
|
+
branches: [{{DEFAULT_BRANCH}}, dev]
|
|
11
|
+
pull_request:
|
|
12
|
+
branches: [{{DEFAULT_BRANCH}}, dev]
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
actions: read
|
|
16
|
+
contents: read
|
|
17
|
+
|
|
18
|
+
# One run per branch or pull request. A newer run cancels the older one on every event
|
|
19
|
+
# except the default branch, which QUEUES: that run promotes the deployment, and cancelling
|
|
20
|
+
# it mid-promote could leave production split across two releases. A pull request
|
|
21
|
+
# keys on its number; a push or dispatch keys on the ref, so a PR and a push to dev still
|
|
22
|
+
# overlap. A shared resource those two runs both touch is serialised by the tenant lease
|
|
23
|
+
# (bkit-tests-reset), not by this group. A workflow_run observer sees the latest run on that
|
|
24
|
+
# ref only. A push plans against the last green run on the branch, not github.event.before,
|
|
25
|
+
# so a cancelled run's changes stay in scope.
|
|
26
|
+
# See docs/deployments.md § "One run per branch or pull request".
|
|
27
|
+
concurrency:
|
|
28
|
+
group: ci-${{ github.workflow }}-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.pull_request.number) || github.ref }}
|
|
29
|
+
cancel-in-progress: ${{ github.ref != 'refs/heads/{{DEFAULT_BRANCH}}' }}
|
|
30
|
+
|
|
31
|
+
jobs:
|
|
32
|
+
# ── bkit-tests-static ────────────────────────────────────────────────────
|
|
33
|
+
# Static-analysis lane: typecheck, format, prose lint, slop, actionlint,
|
|
34
|
+
# bkit check. Runs on a CLEAN tree (no test artifacts). Parallel sibling of
|
|
35
|
+
# bkit-tests-unit — wall-clock = MAX(lane).
|
|
36
|
+
bkit-tests-static:
|
|
37
|
+
runs-on: ubuntu-latest
|
|
38
|
+
# [verbose ci] marker — escalates CI log detail for one run. Composes freely with
|
|
39
|
+
# [force build] / [force full] / [force cache] / [skip ci] (independent contains() per marker).
|
|
40
|
+
# Markers are bare substrings — bkit-emitted commits prepend `bkit ` for attribution
|
|
41
|
+
# (e.g. `bkit [verbose ci]`); substring match honours both forms.
|
|
42
|
+
# See docs/deployments.md § "Commit-message force tags" for where to put the marker
|
|
43
|
+
# (PR title for feature-branch pushes vs commit message for direct dev/main pushes)
|
|
44
|
+
# and docs/testing.md § "CI verbosity" for the full knob list.
|
|
45
|
+
#
|
|
46
|
+
# NODE_OPTIONS is set HERE, in static YAML, and must NEVER be written to $GITHUB_ENV.
|
|
47
|
+
# The runner blocklists NODE_OPTIONS for the $GITHUB_ENV / set-env workflow command:
|
|
48
|
+
# the write is REJECTED with
|
|
49
|
+
# ##[error]Can't store NODE_OPTIONS output parameter using '$GITHUB_ENV' command.
|
|
50
|
+
# while the step's conclusion stays `success`. The marker test is spelled out, not
|
|
51
|
+
# `env.VERBOSE_CI`: the `env` context is NOT available to a job-level `env:` value. A
|
|
52
|
+
# step with its own `env:` block REPLACES this value rather than merging, so such a
|
|
53
|
+
# step must restate the flags. See docs/testing.md § "CI verbosity".
|
|
54
|
+
env:
|
|
55
|
+
TURBO_LOG_LEVEL: ${{ (contains(github.event.head_commit.message, '[verbose ci]') || contains(github.event.pull_request.title, '[verbose ci]')) && 'full' || 'errors-only' }}
|
|
56
|
+
VERBOSE_CI: ${{ (contains(github.event.head_commit.message, '[verbose ci]') || contains(github.event.pull_request.title, '[verbose ci]')) && '1' || '' }}
|
|
57
|
+
NODE_OPTIONS: ${{ (contains(github.event.head_commit.message, '[verbose ci]') || contains(github.event.pull_request.title, '[verbose ci]')) && '--trace-warnings --trace-deprecation' || '' }}
|
|
58
|
+
steps:
|
|
59
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
60
|
+
with:
|
|
61
|
+
# Full history so slop:delta can materialise the PR base ref as a worktree.
|
|
62
|
+
fetch-depth: 0
|
|
63
|
+
|
|
64
|
+
# Node/TS toolchain region. On a non-Node repo, replace these steps with your
|
|
65
|
+
# stack's setup / install commands (and the typecheck / lint / test steps below with
|
|
66
|
+
# its own). Replace `{{NODE_VERSION}}` with your Node major (`.bkit/templates.md`).
|
|
67
|
+
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
|
68
|
+
with:
|
|
69
|
+
node-version: {{NODE_VERSION}}
|
|
70
|
+
|
|
71
|
+
# Pnpm version is resolved from the consumer's package.json#packageManager (single SoT).
|
|
72
|
+
# Do NOT add `with: version:` here — pnpm/action-setup errors when both are set.
|
|
73
|
+
- uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10
|
|
74
|
+
|
|
75
|
+
# Under [verbose ci]: propagate DEBUG to all subsequent steps via $GITHUB_ENV. Note
|
|
76
|
+
# that steps with their own `env:` block override $GITHUB_ENV — those steps must
|
|
77
|
+
# inline it in their env: declaration to stay verbose-aware. NODE_OPTIONS is NOT
|
|
78
|
+
# set here; the runner rejects that write while reporting success.
|
|
79
|
+
# See the job-level `env:` block above.
|
|
80
|
+
- name: Configure Verbose CI
|
|
81
|
+
if: env.VERBOSE_CI == '1'
|
|
82
|
+
run: |
|
|
83
|
+
echo "🔊 [verbose ci] marker active — escalating log detail"
|
|
84
|
+
echo "DEBUG=vercel:*,supabase:*" >> "$GITHUB_ENV"
|
|
85
|
+
|
|
86
|
+
# [force build] / [force cache] run the suite even when this SHA already has a green run.
|
|
87
|
+
- name: Check SHA Cache
|
|
88
|
+
id: cache
|
|
89
|
+
env:
|
|
90
|
+
GH_TOKEN: ${{ github.token }}
|
|
91
|
+
# User-controlled text (PR title) arrives via env: (runtime expansion,
|
|
92
|
+
# injection-safe) — never inlined into the run: body.
|
|
93
|
+
PR_TITLE: ${{ github.event.pull_request.title }}
|
|
94
|
+
EVENT_NAME: ${{ github.event_name }}
|
|
95
|
+
run: |
|
|
96
|
+
if [ "$EVENT_NAME" = "pull_request" ]; then
|
|
97
|
+
MSG="$PR_TITLE"
|
|
98
|
+
else
|
|
99
|
+
MSG=$(git log -1 --pretty=%B "$GITHUB_SHA" 2>/dev/null || echo "")
|
|
100
|
+
fi
|
|
101
|
+
case "$MSG" in
|
|
102
|
+
*"[force build]"*|*"[force cache]"*)
|
|
103
|
+
echo "skip=false" >> "$GITHUB_OUTPUT"
|
|
104
|
+
echo "::notice::force marker present — ignoring SHA cache."
|
|
105
|
+
exit 0 ;;
|
|
106
|
+
esac
|
|
107
|
+
SINCE=$(date -u -d '7 days ago' +%FT%TZ 2>/dev/null || date -u -v -7d +%FT%TZ)
|
|
108
|
+
PRIOR=$(gh run list \
|
|
109
|
+
--repo "$GITHUB_REPOSITORY" \
|
|
110
|
+
--workflow "$GITHUB_WORKFLOW" \
|
|
111
|
+
--status success \
|
|
112
|
+
--limit 50 \
|
|
113
|
+
--json headSha,createdAt \
|
|
114
|
+
--jq "[.[] | select(.headSha == \"$GITHUB_SHA\") | select(.createdAt > \"$SINCE\")] | length" \
|
|
115
|
+
2>/dev/null || echo 0)
|
|
116
|
+
if [ "${PRIOR:-0}" -gt 0 ]; then
|
|
117
|
+
echo "skip=true" >> "$GITHUB_OUTPUT"
|
|
118
|
+
echo "::notice::SHA $GITHUB_SHA has $PRIOR prior green run(s) since $SINCE — skipping suite."
|
|
119
|
+
else
|
|
120
|
+
echo "skip=false" >> "$GITHUB_OUTPUT"
|
|
121
|
+
fi
|
|
122
|
+
|
|
123
|
+
- name: Detect Direct Push
|
|
124
|
+
if: steps.cache.outputs.skip != 'true'
|
|
125
|
+
id: detect
|
|
126
|
+
env:
|
|
127
|
+
GH_TOKEN: ${{ github.token }}
|
|
128
|
+
# User-controlled text (PR title) arrives via env: (runtime expansion,
|
|
129
|
+
# injection-safe) — never inlined into the run: body.
|
|
130
|
+
PR_TITLE: ${{ github.event.pull_request.title }}
|
|
131
|
+
EVENT_NAME: ${{ github.event_name }}
|
|
132
|
+
REF: ${{ github.ref }}
|
|
133
|
+
run: |
|
|
134
|
+
if [ "$EVENT_NAME" = "pull_request" ]; then
|
|
135
|
+
MSG="$PR_TITLE"
|
|
136
|
+
else
|
|
137
|
+
MSG=$(git log -1 --pretty=%B "$GITHUB_SHA" 2>/dev/null || echo "")
|
|
138
|
+
fi
|
|
139
|
+
case "$MSG" in *"[force cache]"*) echo "turbo_force=1" >> "$GITHUB_OUTPUT" ;; esac
|
|
140
|
+
case "$MSG" in *"[force build]"*) echo "should_force_build=true" >> "$GITHUB_OUTPUT" ;; esac
|
|
141
|
+
case "$MSG" in *"[force full]"*) echo "should_run_full=true" >> "$GITHUB_OUTPUT" ;; esac
|
|
142
|
+
if [ "$EVENT_NAME" = "push" ] && [ "$REF" = "refs/heads/dev" ]; then
|
|
143
|
+
PR_NUMBER=$(gh pr list --repo "$GITHUB_REPOSITORY" --search "$GITHUB_SHA" --state merged --json number --jq '.[0].number // ""' 2>/dev/null || echo "")
|
|
144
|
+
if [ -z "$PR_NUMBER" ]; then
|
|
145
|
+
echo "turbo_force=1" >> "$GITHUB_OUTPUT"
|
|
146
|
+
fi
|
|
147
|
+
fi
|
|
148
|
+
|
|
149
|
+
# Promotion-lag reminder (non-blocking). Renovate reads its config
|
|
150
|
+
# ONLY from the default branch, and scheduled / default-branch-triggered Actions run the
|
|
151
|
+
# default branch's copy of each workflow — so a renovate.json5 or .github/workflows/ edit
|
|
152
|
+
# that lands on dev but is never promoted runs STALE for everyone until a dev -> default
|
|
153
|
+
# branch PR lands. CI on dev validates the code; nothing otherwise checks it reached the
|
|
154
|
+
# default branch. Warns (never fails) on dev pushes when those consumed-from-default-branch
|
|
155
|
+
# surfaces differ — keyed ONLY on those surfaces, so ordinary app-code dev pushes stay
|
|
156
|
+
# quiet. The default branch is read at runtime, so this step is identical for every repo.
|
|
157
|
+
# Safe to keep in any repo: it only runs on dev pushes and self-skips when the default
|
|
158
|
+
# branch is dev/unset, so it never fires where the dev -> default-branch flow does not apply.
|
|
159
|
+
# See docs/deployments.md § "Promotion-lag warning".
|
|
160
|
+
- name: Check Default Branch Lags Dev
|
|
161
|
+
if: github.event_name == 'push' && github.ref == 'refs/heads/dev'
|
|
162
|
+
env:
|
|
163
|
+
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
|
|
164
|
+
run: |
|
|
165
|
+
if [ -z "$DEFAULT_BRANCH" ] || [ "$DEFAULT_BRANCH" = "dev" ]; then
|
|
166
|
+
echo "::notice::promotion-lag check skipped (default branch is '$DEFAULT_BRANCH')"
|
|
167
|
+
exit 0
|
|
168
|
+
fi
|
|
169
|
+
if ! git fetch --no-tags --quiet origin "+refs/heads/$DEFAULT_BRANCH:refs/remotes/origin/$DEFAULT_BRANCH" 2>/dev/null; then
|
|
170
|
+
echo "::notice::promotion-lag check skipped — could not fetch $DEFAULT_BRANCH"
|
|
171
|
+
exit 0
|
|
172
|
+
fi
|
|
173
|
+
SURFACES=(.github/renovate.json5 .github/renovate.json .github/workflows)
|
|
174
|
+
STALE=$(git diff --name-only "origin/$DEFAULT_BRANCH" HEAD -- "${SURFACES[@]}" 2>/dev/null || true)
|
|
175
|
+
if [ -z "$STALE" ]; then
|
|
176
|
+
echo "consumed-from-$DEFAULT_BRANCH surfaces match $DEFAULT_BRANCH — nothing stale to promote."
|
|
177
|
+
exit 0
|
|
178
|
+
fi
|
|
179
|
+
BEHIND=$(git rev-list --count "origin/$DEFAULT_BRANCH..HEAD" 2>/dev/null || echo "?")
|
|
180
|
+
{
|
|
181
|
+
echo "### WARNING: $DEFAULT_BRANCH is serving stale consumed surfaces"
|
|
182
|
+
echo ""
|
|
183
|
+
echo "\`$DEFAULT_BRANCH\` is **$BEHIND commit(s)** behind \`dev\`, and these files — which Renovate and scheduled / default-branch Actions read LIVE from \`$DEFAULT_BRANCH\` — differ from \`dev\`:"
|
|
184
|
+
echo ""
|
|
185
|
+
printf '%s\n' "$STALE" | sed 's/^/- /'
|
|
186
|
+
echo ""
|
|
187
|
+
echo "They run the **$DEFAULT_BRANCH** version until promoted. Open a \`dev\` -> \`$DEFAULT_BRANCH\` PR to apply them."
|
|
188
|
+
} >> "$GITHUB_STEP_SUMMARY"
|
|
189
|
+
echo "::warning::$DEFAULT_BRANCH is $BEHIND commit(s) behind dev and consumed-from-$DEFAULT_BRANCH surfaces (Renovate config / workflows) differ — they run STALE until you promote dev -> $DEFAULT_BRANCH. See the run summary."
|
|
190
|
+
|
|
191
|
+
# bkit-stub:migrations-immutable — Block edits to an already-merged migration. The if: below is the
|
|
192
|
+
# pre-planner shape (pull_request only). Once bkit-tests-scope exists, run this on every event
|
|
193
|
+
# against the planner base. deployments.md § One run. To enable: uncomment and delete this header.
|
|
194
|
+
# - name: Assert Migrations Immutable
|
|
195
|
+
# if: github.event_name == 'pull_request' && steps.cache.outputs.skip != 'true'
|
|
196
|
+
# run: |
|
|
197
|
+
# git fetch origin "${{ github.base_ref }}" --depth=50 2>/dev/null || true
|
|
198
|
+
# CHANGED=$(git diff --name-only "origin/${{ github.base_ref }}..HEAD" -- supabase/migrations/ 2>/dev/null || true)
|
|
199
|
+
# EXIT=0
|
|
200
|
+
# for f in $CHANGED; do
|
|
201
|
+
# if git rev-parse "origin/${{ github.base_ref }}:$f" >/dev/null 2>&1; then
|
|
202
|
+
# echo "::error file=$f::Migration already exists on ${{ github.base_ref }} — migrations are immutable after merge"
|
|
203
|
+
# EXIT=1
|
|
204
|
+
# fi
|
|
205
|
+
# done
|
|
206
|
+
# exit $EXIT
|
|
207
|
+
|
|
208
|
+
- name: Install Dependencies
|
|
209
|
+
if: steps.cache.outputs.skip != 'true'
|
|
210
|
+
run: pnpm install --frozen-lockfile
|
|
211
|
+
|
|
212
|
+
# Static checks first — they read the source tree and must scan it CLEAN.
|
|
213
|
+
# Vitest/build run AFTER (below): they write coverage, dist/, and other
|
|
214
|
+
# artifacts that would otherwise pollute the Slop Scan and bkit check inputs.
|
|
215
|
+
# Keep this group (typecheck → prettier → vale → slop → bkit check) ahead of
|
|
216
|
+
# the test/build group if you reorder.
|
|
217
|
+
- name: Run Typecheck
|
|
218
|
+
if: steps.cache.outputs.skip != 'true'
|
|
219
|
+
env:
|
|
220
|
+
TURBO_FORCE: ${{ steps.detect.outputs.turbo_force }}
|
|
221
|
+
run: pnpm typecheck
|
|
222
|
+
|
|
223
|
+
- name: Run Prettier
|
|
224
|
+
if: steps.cache.outputs.skip != 'true'
|
|
225
|
+
env:
|
|
226
|
+
TURBO_FORCE: ${{ steps.detect.outputs.turbo_force }}
|
|
227
|
+
run: pnpm format:check
|
|
228
|
+
|
|
229
|
+
# vale is not on the runner and .vale/styles/ is gitignored, so without this step
|
|
230
|
+
# `pnpm lint:prose` guard-skips (write-good missing) and the prose gate is silently
|
|
231
|
+
# dead. Pinned tarball + `vale sync` (else E100: write-good missing).
|
|
232
|
+
- name: Install Vale
|
|
233
|
+
if: steps.cache.outputs.skip != 'true'
|
|
234
|
+
env:
|
|
235
|
+
VALE_VERSION: "3.9.1"
|
|
236
|
+
# sha256 of vale_${VALE_VERSION}_Linux_64-bit.tar.gz (from the release's checksums.txt).
|
|
237
|
+
# Bump alongside VALE_VERSION; verified before extract so a tampered/CDN-swapped tarball fails closed.
|
|
238
|
+
VALE_SHA256: "fbc2eb47d0b8c50220ed1a2c5c611fbe0904ed567d638143d482016a18fd2db0"
|
|
239
|
+
run: |
|
|
240
|
+
curl -fsSL --retry 3 --retry-all-errors "https://github.com/errata-ai/vale/releases/download/v${VALE_VERSION}/vale_${VALE_VERSION}_Linux_64-bit.tar.gz" -o "$RUNNER_TEMP/vale.tar.gz"
|
|
241
|
+
echo "${VALE_SHA256} $RUNNER_TEMP/vale.tar.gz" | sha256sum -c -
|
|
242
|
+
tar -xzf "$RUNNER_TEMP/vale.tar.gz" -C "$RUNNER_TEMP" vale
|
|
243
|
+
echo "$RUNNER_TEMP" >> "$GITHUB_PATH"
|
|
244
|
+
# vale sync pulls styles (write-good) from GitHub — retry to survive a transient CDN/network blip.
|
|
245
|
+
for i in 1 2 3; do
|
|
246
|
+
"$RUNNER_TEMP/vale" sync && break
|
|
247
|
+
[ "$i" = 3 ] && { echo "::error::vale sync failed after 3 attempts"; exit 1; }
|
|
248
|
+
echo "::warning::vale sync attempt $i failed — retrying in 5s"; sleep 5
|
|
249
|
+
done
|
|
250
|
+
|
|
251
|
+
- name: Run Vale Prose Lint
|
|
252
|
+
if: steps.cache.outputs.skip != 'true'
|
|
253
|
+
run: pnpm lint:prose
|
|
254
|
+
|
|
255
|
+
- name: Run Slop Scan
|
|
256
|
+
if: steps.cache.outputs.skip != 'true'
|
|
257
|
+
run: pnpm lint:slop
|
|
258
|
+
|
|
259
|
+
# The ENFORCING slop gate (lint:slop above is an advisory full-scan that never fails).
|
|
260
|
+
# PR-only: materialises the PR base as a worktree and fails on findings this PR ADDS or
|
|
261
|
+
# WORSENS vs base. Needs fetch-depth: 0 (set on checkout) so the base SHA is present.
|
|
262
|
+
- name: Run Slop Delta
|
|
263
|
+
if: steps.cache.outputs.skip != 'true' && github.event_name == 'pull_request'
|
|
264
|
+
env:
|
|
265
|
+
BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
|
266
|
+
run: pnpm slop:delta "$BASE_SHA"
|
|
267
|
+
|
|
268
|
+
# actionlint validates .github/workflows/* with GitHub-Actions-aware rules
|
|
269
|
+
# (${{ }} expression syntax, shellcheck on run: blocks). A YAML linter accepts
|
|
270
|
+
# workflows that are valid YAML but invalid GHA; actionlint catches that class.
|
|
271
|
+
- name: Run actionlint
|
|
272
|
+
if: steps.cache.outputs.skip != 'true'
|
|
273
|
+
run: |
|
|
274
|
+
# Script pinned to the v1.7.12 commit SHA (the git tag is mutable/forgeable); the binary version
|
|
275
|
+
# is pinned separately via the 1.7.12 arg passed to the script below.
|
|
276
|
+
curl -sSfL --retry 3 --retry-all-errors https://raw.githubusercontent.com/rhysd/actionlint/914e7df21a07ef503a81201c76d2b11c789d3fca/scripts/download-actionlint.bash -o "$RUNNER_TEMP/download-actionlint.bash"
|
|
277
|
+
# download-actionlint.bash fetches the binary from GitHub releases — retry to survive a transient CDN/network blip.
|
|
278
|
+
for i in 1 2 3; do
|
|
279
|
+
bash "$RUNNER_TEMP/download-actionlint.bash" 1.7.12 "$RUNNER_TEMP" && break
|
|
280
|
+
[ "$i" = 3 ] && { echo "::error::actionlint download failed after 3 attempts"; exit 1; }
|
|
281
|
+
echo "::warning::actionlint download attempt $i failed — retrying in 5s"; sleep 5
|
|
282
|
+
done
|
|
283
|
+
"$RUNNER_TEMP/actionlint" -color
|
|
284
|
+
|
|
285
|
+
- name: Run bkit Check
|
|
286
|
+
if: steps.cache.outputs.skip != 'true'
|
|
287
|
+
run: pnpm bkit check
|
|
288
|
+
|
|
289
|
+
# ── bkit-tests-unit ───────────────────────────────────────────────────────
|
|
290
|
+
# Unit lane. Parallel sibling of bkit-tests-static. Integration, E2E, deploy-await,
|
|
291
|
+
# and remote db push move out of this job when you adopt the scaffold below.
|
|
292
|
+
bkit-tests-unit:
|
|
293
|
+
runs-on: ubuntu-latest
|
|
294
|
+
# bkit-tests-check reads both: cache_skip (a SHA-cache short-circuit asserts no count)
|
|
295
|
+
# and tests_ran (the executed-test count the Run Unit Tests step writes).
|
|
296
|
+
outputs:
|
|
297
|
+
cache_skip: ${{ steps.cache.outputs.skip }}
|
|
298
|
+
tests_ran: ${{ steps.unit.outputs.ran }}
|
|
299
|
+
# Env vars duplicated from bkit-tests-static's job-level `env:`.
|
|
300
|
+
# See the comment above that `env:` in bkit-tests-static — NODE_OPTIONS is a
|
|
301
|
+
# static YAML key here and never a $GITHUB_ENV write.
|
|
302
|
+
env:
|
|
303
|
+
TURBO_LOG_LEVEL: ${{ (contains(github.event.head_commit.message, '[verbose ci]') || contains(github.event.pull_request.title, '[verbose ci]')) && 'full' || 'errors-only' }}
|
|
304
|
+
VERBOSE_CI: ${{ (contains(github.event.head_commit.message, '[verbose ci]') || contains(github.event.pull_request.title, '[verbose ci]')) && '1' || '' }}
|
|
305
|
+
NODE_OPTIONS: ${{ (contains(github.event.head_commit.message, '[verbose ci]') || contains(github.event.pull_request.title, '[verbose ci]')) && '--trace-warnings --trace-deprecation' || '' }}
|
|
306
|
+
steps:
|
|
307
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
308
|
+
with:
|
|
309
|
+
# Full history needed for E2E / supabase stubs when enabled.
|
|
310
|
+
fetch-depth: 0
|
|
311
|
+
|
|
312
|
+
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
|
313
|
+
with:
|
|
314
|
+
node-version: {{NODE_VERSION}}
|
|
315
|
+
|
|
316
|
+
- uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10
|
|
317
|
+
|
|
318
|
+
# NODE_OPTIONS is a job-level `env:` key above, never a $GITHUB_ENV write — the runner
|
|
319
|
+
# rejects that write and still reports success. See bkit-tests-static's block comment.
|
|
320
|
+
- name: Configure Verbose CI
|
|
321
|
+
if: env.VERBOSE_CI == '1'
|
|
322
|
+
run: |
|
|
323
|
+
echo "🔊 [verbose ci] marker active — escalating log detail"
|
|
324
|
+
echo "DEBUG=vercel:*,supabase:*" >> "$GITHUB_ENV"
|
|
325
|
+
|
|
326
|
+
# [force build] / [force cache] run the suite even when this SHA already has a green run.
|
|
327
|
+
- name: Check SHA Cache
|
|
328
|
+
id: cache
|
|
329
|
+
env:
|
|
330
|
+
GH_TOKEN: ${{ github.token }}
|
|
331
|
+
# User-controlled text (PR title) arrives via env: (runtime expansion,
|
|
332
|
+
# injection-safe) — never inlined into the run: body.
|
|
333
|
+
PR_TITLE: ${{ github.event.pull_request.title }}
|
|
334
|
+
EVENT_NAME: ${{ github.event_name }}
|
|
335
|
+
run: |
|
|
336
|
+
if [ "$EVENT_NAME" = "pull_request" ]; then
|
|
337
|
+
MSG="$PR_TITLE"
|
|
338
|
+
else
|
|
339
|
+
MSG=$(git log -1 --pretty=%B "$GITHUB_SHA" 2>/dev/null || echo "")
|
|
340
|
+
fi
|
|
341
|
+
case "$MSG" in
|
|
342
|
+
*"[force build]"*|*"[force cache]"*)
|
|
343
|
+
echo "skip=false" >> "$GITHUB_OUTPUT"
|
|
344
|
+
echo "::notice::force marker present — ignoring SHA cache."
|
|
345
|
+
exit 0 ;;
|
|
346
|
+
esac
|
|
347
|
+
SINCE=$(date -u -d '7 days ago' +%FT%TZ 2>/dev/null || date -u -v -7d +%FT%TZ)
|
|
348
|
+
PRIOR=$(gh run list \
|
|
349
|
+
--repo "$GITHUB_REPOSITORY" \
|
|
350
|
+
--workflow "$GITHUB_WORKFLOW" \
|
|
351
|
+
--status success \
|
|
352
|
+
--limit 50 \
|
|
353
|
+
--json headSha,createdAt \
|
|
354
|
+
--jq "[.[] | select(.headSha == \"$GITHUB_SHA\") | select(.createdAt > \"$SINCE\")] | length" \
|
|
355
|
+
2>/dev/null || echo 0)
|
|
356
|
+
if [ "${PRIOR:-0}" -gt 0 ]; then
|
|
357
|
+
echo "skip=true" >> "$GITHUB_OUTPUT"
|
|
358
|
+
echo "::notice::SHA $GITHUB_SHA has $PRIOR prior green run(s) since $SINCE — skipping suite."
|
|
359
|
+
else
|
|
360
|
+
echo "skip=false" >> "$GITHUB_OUTPUT"
|
|
361
|
+
fi
|
|
362
|
+
|
|
363
|
+
- name: Detect Direct Push
|
|
364
|
+
if: steps.cache.outputs.skip != 'true'
|
|
365
|
+
id: detect
|
|
366
|
+
env:
|
|
367
|
+
GH_TOKEN: ${{ github.token }}
|
|
368
|
+
# User-controlled text (PR title) arrives via env: (runtime expansion,
|
|
369
|
+
# injection-safe) — never inlined into the run: body.
|
|
370
|
+
PR_TITLE: ${{ github.event.pull_request.title }}
|
|
371
|
+
EVENT_NAME: ${{ github.event_name }}
|
|
372
|
+
REF: ${{ github.ref }}
|
|
373
|
+
run: |
|
|
374
|
+
if [ "$EVENT_NAME" = "pull_request" ]; then
|
|
375
|
+
MSG="$PR_TITLE"
|
|
376
|
+
else
|
|
377
|
+
MSG=$(git log -1 --pretty=%B "$GITHUB_SHA" 2>/dev/null || echo "")
|
|
378
|
+
fi
|
|
379
|
+
case "$MSG" in *"[force cache]"*) echo "turbo_force=1" >> "$GITHUB_OUTPUT" ;; esac
|
|
380
|
+
case "$MSG" in *"[force build]"*) echo "should_force_build=true" >> "$GITHUB_OUTPUT" ;; esac
|
|
381
|
+
case "$MSG" in *"[force full]"*) echo "should_run_full=true" >> "$GITHUB_OUTPUT" ;; esac
|
|
382
|
+
if [ "$EVENT_NAME" = "push" ] && [ "$REF" = "refs/heads/dev" ]; then
|
|
383
|
+
PR_NUMBER=$(gh pr list --repo "$GITHUB_REPOSITORY" --search "$GITHUB_SHA" --state merged --json number --jq '.[0].number // ""' 2>/dev/null || echo "")
|
|
384
|
+
if [ -z "$PR_NUMBER" ]; then
|
|
385
|
+
echo "turbo_force=1" >> "$GITHUB_OUTPUT"
|
|
386
|
+
fi
|
|
387
|
+
fi
|
|
388
|
+
|
|
389
|
+
# bkit-stub:auto-force-e2e — Auto-trigger the full lane (E2E etc.) for PRs touching sensitive paths. Orthogonal to the [force full] marker (sets needs_e2e, OR'd with should_run_full at the e2e gate). To enable: uncomment the step below and delete this stub header.
|
|
390
|
+
# - name: Auto Force E2E for Sensitive Paths
|
|
391
|
+
# if: github.event_name == 'pull_request' && steps.cache.outputs.skip != 'true'
|
|
392
|
+
# id: e2e-paths
|
|
393
|
+
# run: |
|
|
394
|
+
# git fetch origin "${{ github.base_ref }}" --depth=1 2>/dev/null || true
|
|
395
|
+
# CHANGED=$(git diff --name-only "origin/${{ github.base_ref }}..HEAD" 2>/dev/null || echo "")
|
|
396
|
+
# PATTERNS=('auth/' 'migrations/' 'supabase/migrations/' 'payment/' 'api/' 'server/')
|
|
397
|
+
# for f in $CHANGED; do
|
|
398
|
+
# for p in "${PATTERNS[@]}"; do
|
|
399
|
+
# case "$f" in *"$p"*) echo "needs_e2e=true" >> "$GITHUB_OUTPUT"; exit 0 ;; esac
|
|
400
|
+
# done
|
|
401
|
+
# done
|
|
402
|
+
|
|
403
|
+
- name: Install Dependencies
|
|
404
|
+
if: steps.cache.outputs.skip != 'true'
|
|
405
|
+
run: pnpm install --frozen-lockfile
|
|
406
|
+
|
|
407
|
+
# bkit-stub:supabase-migrate — REMOTE `db push` belongs in `bkit-tests-migration`, NOT here
|
|
408
|
+
# and NOT in `bkit-tests-e2e-web`. Prefer the migration-lane stub below
|
|
409
|
+
# (always-on; replay plan-/path-gated; push on every push to dev/main; e2e/live `needs:` it).
|
|
410
|
+
# Leaving the push inside e2e while live runs parallel to e2e is the PGRST202 race: @live can
|
|
411
|
+
# hit a shared remote whose new RPCs/schema the push has not applied yet. To enable the
|
|
412
|
+
# legacy single-job shape only (no migration lane yet): uncomment below, set SUPABASE_*
|
|
413
|
+
# secrets, delete this stub header — then migrate the step into bkit-tests-migration ASAP.
|
|
414
|
+
# - name: Apply Supabase Migrations to Dev
|
|
415
|
+
# if: github.event_name == 'push' && github.ref == 'refs/heads/dev' && steps.cache.outputs.skip != 'true'
|
|
416
|
+
# env:
|
|
417
|
+
# SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}
|
|
418
|
+
# SUPABASE_DB_PASSWORD: ${{ secrets.SUPABASE_DEV_DB_PASSWORD }}
|
|
419
|
+
# SUPABASE_PROJECT_REF: ${{ secrets.SUPABASE_DEV_PROJECT_REF }}
|
|
420
|
+
# run: |
|
|
421
|
+
# pnpm dlx supabase link --project-ref "$SUPABASE_PROJECT_REF"
|
|
422
|
+
# pnpm dlx supabase db push --linked --include-all
|
|
423
|
+
#
|
|
424
|
+
# BUILD-vs-MIGRATION RACE (latent until your first build-time DB read): if your host auto-deploys
|
|
425
|
+
# on this same push, its build runs UNORDERED vs this migrate step and a build-time DB read can
|
|
426
|
+
# ERROR the first deploy (PG 42P01/42703/42704/3F000; a redeploy of the SAME sha self-heals).
|
|
427
|
+
# Fix: serialise migrate -> deploy. Full mechanism + fix options: docs/deployments.md § Build-vs-migration race.
|
|
428
|
+
|
|
429
|
+
# bkit-stub:test-db — Assert schema-invariant DB checks (e.g. "every public table has RLS enabled, no hardcoded list") so they aren't app-defined. Two co-equal routes — pick by DEPLOY TOPOLOGY, not by whether you can run pgTAP locally:
|
|
430
|
+
# * pgTAP (this step) — fast, hermetic, offline; runs supabase/tests/*.sql against a CI-LOCAL fixture built from supabase/migrations. Caveat: that fixture can differ from prod — a migration that doesn't reproduce the live schema leaves this GREEN while prod RLS is broken. Best when there is NO deploy/@live tier, or for pure-logic DB unit tests.
|
|
431
|
+
# * @live catalog-RPC (JOB 3) — validates the REAL deployed schema in bkit-tests-live-web. Recommended default once you have a deploy + @live tier (RLS/tenancy especially: a passing fixture check is not evidence prod is locked down).
|
|
432
|
+
# To enable pgTAP: uncomment, add pgTAP files under supabase/tests/, delete this stub header.
|
|
433
|
+
# - name: Run DB Tests (pgTAP)
|
|
434
|
+
# if: steps.cache.outputs.skip != 'true'
|
|
435
|
+
# run: pnpm dlx supabase db test # spins up the local DB and runs supabase/tests/*.sql via pg_prove
|
|
436
|
+
# @live route: a SECURITY DEFINER, service_role-only catalog RPC (e.g. public.rls_coverage_gaps()) called over
|
|
437
|
+
# REST — direct port-5432 from CI runners is IPv4-flaky. Home: bkit-tests-live-web. docs/testing.md § Schema-invariant DB checks.
|
|
438
|
+
|
|
439
|
+
# bkit-stub:test-presence — Warn on packages with a test script but zero *.test.ts files. To enable: uncomment the step below and delete this stub header.
|
|
440
|
+
# - name: Check Test Presence
|
|
441
|
+
# if: steps.cache.outputs.skip != 'true'
|
|
442
|
+
# run: |
|
|
443
|
+
# for pkg in $(jq -r '.workspaces // [] | .[]' package.json 2>/dev/null) $(ls -d packages/*/ apps/*/ 2>/dev/null); do
|
|
444
|
+
# [ -f "$pkg/package.json" ] || continue
|
|
445
|
+
# if jq -e '.scripts.test' "$pkg/package.json" >/dev/null 2>&1; then
|
|
446
|
+
# COUNT=$(find "$pkg" -path '*/node_modules' -prune -o \( -name '*.test.ts' -o -name '*.test.tsx' -o -name '*.spec.ts' -o -name '*.spec.tsx' \) -print 2>/dev/null | wc -l)
|
|
447
|
+
# [ "$COUNT" -eq 0 ] && echo "::warning::$pkg declares a test script but has zero *.test.ts files"
|
|
448
|
+
# fi
|
|
449
|
+
# done
|
|
450
|
+
|
|
451
|
+
- name: Run Unit Tests
|
|
452
|
+
id: unit
|
|
453
|
+
if: steps.cache.outputs.skip != 'true'
|
|
454
|
+
env:
|
|
455
|
+
TURBO_FORCE: ${{ steps.detect.outputs.turbo_force }}
|
|
456
|
+
# Write the executed-test count as the step output `ran` so bkit-tests-check can
|
|
457
|
+
# prove tests ran. vitest: run with `--reporter=default --reporter=json
|
|
458
|
+
# --outputFile="$RUNNER_TEMP/unit.json"`, then
|
|
459
|
+
# `echo "ran=$(jq '[.numPassedTests, .numFailedTests] | add' "$RUNNER_TEMP/unit.json")" >> "$GITHUB_OUTPUT"`.
|
|
460
|
+
run: pnpm test
|
|
461
|
+
|
|
462
|
+
- name: Run Integration Tests
|
|
463
|
+
if: steps.cache.outputs.skip != 'true'
|
|
464
|
+
env:
|
|
465
|
+
TURBO_FORCE: ${{ steps.detect.outputs.turbo_force }}
|
|
466
|
+
run: |
|
|
467
|
+
if jq -e '.scripts["test:integration"]' package.json >/dev/null 2>&1; then
|
|
468
|
+
pnpm turbo run test:integration --continue
|
|
469
|
+
else
|
|
470
|
+
echo "::warning::test:integration script not found in package.json — skipping integration tests"
|
|
471
|
+
fi
|
|
472
|
+
|
|
473
|
+
# bkit-stub:coverage — Report vitest coverage on PRs via davelosert/vitest-coverage-report-action (free, runs entirely inside Actions with GITHUB_TOKEN — no third-party service, safe for private repos). Report-only by default: nothing fails the build until YOU set a threshold. PER-TIER: unit and integration are measured and commented SEPARATELY (a single merged number lets integration mask a hollow unit suite). To enable: make the edits below, uncomment the two steps, and delete this stub header.
|
|
474
|
+
# 1. devDep + config. Add `@vitest/coverage-v8` (pin to your vitest major) and a coverage block in vitest.config:
|
|
475
|
+
# coverage: {
|
|
476
|
+
# provider: 'v8',
|
|
477
|
+
# reporter: ['text', 'json-summary', 'json'], # json-summary + json are REQUIRED — the action reads
|
|
478
|
+
# reportOnFailure: true, # coverage/coverage-summary.json AND coverage-final.json
|
|
479
|
+
# }
|
|
480
|
+
# 2. TWO coverage runs into SEPARATE dirs (one merged run cannot produce two honest numbers — coverage is a union,
|
|
481
|
+
# so a line covered only by integration reads as covered and hides a missing unit test):
|
|
482
|
+
# unit: vitest run --coverage --coverage.reportsDirectory=coverage/unit --exclude '**/*.integration.test.ts'
|
|
483
|
+
# integration: vitest run --coverage --coverage.reportsDirectory=coverage/integration <your integration selection>
|
|
484
|
+
# Wire these into the "Run Unit Tests" step(s) above (or your test / test:integration scripts). Separate dirs
|
|
485
|
+
# also avoid the clobber a second same-dir --coverage run would cause (last-writer-wins, not a merge).
|
|
486
|
+
# 3. Thresholds (opt-in) live PER TIER, never merged:
|
|
487
|
+
# UNIT = the gate. Set coverage.thresholds.branches in the config your UNIT run uses (branches is the
|
|
488
|
+
# meaningful floor; line/statement % overstates confidence). Set it to your CURRENT coverage and
|
|
489
|
+
# ratchet up. Example: --coverage.thresholds.branches=70. vitest coverage is per-RUN (root config),
|
|
490
|
+
# NOT per-project — `projects` does NOT scope it, and a `thresholds` block in vitest.config reds BOTH
|
|
491
|
+
# runs. Pass the floor as a CLI flag on the UNIT run only (it cannot leak to integration); reach for a
|
|
492
|
+
# second vitest.<tier>.config.ts (run with -c) only if the per-run flags get unwieldy.
|
|
493
|
+
# INTEGRATION = REPORT-ONLY, no threshold. Gate integration on EXECUTION (the capstone's integration_ran > 0),
|
|
494
|
+
# not a %: a whole-repo integration % is denominator-noise (it covers boundaries/flows, not pure logic,
|
|
495
|
+
# and rarely drives every branch). For a real integration %, add --coverage.include='src/server/**'
|
|
496
|
+
# (a CLI flag on the integration run, same idiom as --exclude above) to scope it to the integration
|
|
497
|
+
# surface THEN set a floor, or ratchet from current — never a picked number. See docs/testing.md § Coverage on PRs.
|
|
498
|
+
# 4. JOB-LEVEL permissions on bkit-tests-unit. Job-level REPLACES the workflow-level block (not additive), and the
|
|
499
|
+
# Check SHA Cache step calls `gh run list`, so you MUST re-include actions: read or the cache step breaks:
|
|
500
|
+
# permissions:
|
|
501
|
+
# actions: read
|
|
502
|
+
# contents: read
|
|
503
|
+
# pull-requests: write # required to post/update the sticky PR coverage comments
|
|
504
|
+
# SEPARATE LANES: this stub wires both reports into bkit-tests-unit (the combined starter). If you run
|
|
505
|
+
# integration as its OWN lane (bkit-tests-integration — the shape bkit's own CI + consumer repos run; see the
|
|
506
|
+
# FULL CI SCAFFOLD REFERENCE below), move the integration coverage run + its Report step + a pull-requests: write
|
|
507
|
+
# permissions block into THAT lane instead. Each lane posts its own comment; the distinct name: keeps them apart.
|
|
508
|
+
# Fork PRs: GITHUB_TOKEN is read-only for PRs from a fork, so the steps fail — the head.repo == repo guard in the
|
|
509
|
+
# if: below skips them there (or adopt the action's workflow_run two-workflow pattern to support forks).
|
|
510
|
+
# Monorepo: set working-directory so the action finds the right report. Base-branch delta (up/down vs the default
|
|
511
|
+
# branch) needs the base's coverage-summary.json — see the action's json-summary-compare-path input (optional).
|
|
512
|
+
# The action is SHA-pinned to a commit (# vX.Y.Z comment) per best practice; your updater (Renovate/Dependabot,
|
|
513
|
+
# github-actions ecosystem) keeps the pin current — refresh the SHA if you enable this on a newer release.
|
|
514
|
+
# A distinct name: keys each sticky comment so the two do not collide.
|
|
515
|
+
# - name: Report Unit Coverage on PR
|
|
516
|
+
# if: steps.cache.outputs.skip != 'true' && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
|
|
517
|
+
# uses: davelosert/vitest-coverage-report-action@8b157684c6a6b259b97d45e72b44242865c0f6a5 # v2.12.2
|
|
518
|
+
# with:
|
|
519
|
+
# name: unit
|
|
520
|
+
# json-summary-path: coverage/unit/coverage-summary.json
|
|
521
|
+
# json-final-path: coverage/unit/coverage-final.json
|
|
522
|
+
# file-coverage-mode: changes # per-file table limited to files changed in the PR
|
|
523
|
+
# github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
524
|
+
# - name: Report Integration Coverage on PR
|
|
525
|
+
# # hashFiles guard: skip cleanly when the repo has no integration tier (no coverage/integration report produced).
|
|
526
|
+
# if: steps.cache.outputs.skip != 'true' && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && hashFiles('coverage/integration/coverage-summary.json') != ''
|
|
527
|
+
# uses: davelosert/vitest-coverage-report-action@8b157684c6a6b259b97d45e72b44242865c0f6a5 # v2.12.2
|
|
528
|
+
# with:
|
|
529
|
+
# name: integration
|
|
530
|
+
# json-summary-path: coverage/integration/coverage-summary.json
|
|
531
|
+
# json-final-path: coverage/integration/coverage-final.json
|
|
532
|
+
# file-coverage-mode: changes
|
|
533
|
+
# github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
534
|
+
|
|
535
|
+
# bkit-stub:vercel-await — Pre-split only: the host already built a preview and this step looks it up by SHA.
|
|
536
|
+
# Once bkit-tests-build-web publishes deployment_url, E2E reads TEST_URL from that output and this stub stays off.
|
|
537
|
+
# To enable the pre-split shape: uncomment, set the host secrets, delete this header.
|
|
538
|
+
# - name: Await Vercel Preview
|
|
539
|
+
# if: github.event_name == 'pull_request' && steps.cache.outputs.skip != 'true'
|
|
540
|
+
# id: vercel
|
|
541
|
+
# env:
|
|
542
|
+
# VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
|
|
543
|
+
# VERCEL_TEAM_ID: ${{ secrets.VERCEL_TEAM_ID }}
|
|
544
|
+
# VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
|
|
545
|
+
# run: |
|
|
546
|
+
# for i in $(seq 1 60); do
|
|
547
|
+
# URL=$(curl -s -H "Authorization: Bearer $VERCEL_TOKEN" \
|
|
548
|
+
# "https://api.vercel.com/v6/deployments?projectId=$VERCEL_PROJECT_ID&teamId=$VERCEL_TEAM_ID&meta-githubCommitSha=$GITHUB_SHA&state=READY&limit=1" \
|
|
549
|
+
# | jq -r '.deployments[0].url // empty')
|
|
550
|
+
# if [ -n "$URL" ]; then
|
|
551
|
+
# echo "target_url=https://$URL" >> "$GITHUB_OUTPUT"
|
|
552
|
+
# exit 0
|
|
553
|
+
# fi
|
|
554
|
+
# sleep 10
|
|
555
|
+
# done
|
|
556
|
+
# echo "::error::Vercel preview did not reach READY within 10 minutes"
|
|
557
|
+
# exit 1
|
|
558
|
+
#
|
|
559
|
+
# MIGRATION-COUPLED PRs: a preview deploy hits the SHARED dev DB, blind to a PR's unmerged migration,
|
|
560
|
+
# so a PR that adds+uses a column in one PR 500s pre-merge ([force full] won't help). Run feature->dev
|
|
561
|
+
# PR E2E against a LOCAL DB carrying this PR's migrations; keep preview E2E for pushes. Gate on head
|
|
562
|
+
# ref, not a flag. Full write-up: docs/testing.md § "E2E on PRs".
|
|
563
|
+
|
|
564
|
+
# bkit-stub:e2e — Run E2E gated on should_run_full ([force full] commit-tag/PR-title) or needs_e2e (auto-force-e2e). To enable: uncomment the step below and delete this stub header.
|
|
565
|
+
# Under bkit [verbose ci]: your test:e2e script reads VERBOSE_CI (in the job env) and
|
|
566
|
+
# appends --trace=on to its own `playwright test` call, so Playwright writes per-test
|
|
567
|
+
# trace.zip (snapshots + network + console + source) — the canonical e2e debug artifact.
|
|
568
|
+
# Recommended test:e2e form (package.json):
|
|
569
|
+
# TRACE=; [ "$VERBOSE_CI" = "1" ] && TRACE=--trace=on; playwright test $TRACE
|
|
570
|
+
# Do NOT pass --trace=on via a turbo / pnpm `-- --trace=on` passthrough: both append
|
|
571
|
+
# passthrough args to the script STRING, breaking any test:e2e that ends in a bash
|
|
572
|
+
# construct (fi / done / esac). Call test:e2e plainly and let it read VERBOSE_CI.
|
|
573
|
+
# `--video` and `--screenshot` are NOT Playwright CLI flags — they're `use:` keys in
|
|
574
|
+
# playwright.config.ts. Enabling standalone video / screenshot files requires editing
|
|
575
|
+
# the config (out of scope for this stub). Trace's snapshot timeline covers the
|
|
576
|
+
# dominant diagnose use case. Never pass --reporter=line — let playwright.config.ts's
|
|
577
|
+
# reporter chain run unmodified, otherwise verbose traces are written but no reporter
|
|
578
|
+
# surfaces them.
|
|
579
|
+
# - name: Run E2E Tests
|
|
580
|
+
# id: e2e
|
|
581
|
+
# if: (steps.detect.outputs.should_run_full == 'true' || steps.e2e-paths.outputs.needs_e2e == 'true') && steps.cache.outputs.skip != 'true'
|
|
582
|
+
# env:
|
|
583
|
+
# TARGET_URL: ${{ steps.vercel.outputs.target_url || 'http://localhost:3000' }}
|
|
584
|
+
# run: |
|
|
585
|
+
# pnpm test:e2e
|
|
586
|
+
#
|
|
587
|
+
# E2E PARITY: the full e2e suite runs on both pull_request and push — the PR runs the same spec
|
|
588
|
+
# set as the push. Scale a slow suite by sharding (parallel lanes). PR and push differ only by DB
|
|
589
|
+
# target (migration-coupled PRs) and push-only tiers (@live). See docs/testing.md § "E2E on PRs".
|
|
590
|
+
|
|
591
|
+
# bkit-stub:e2e-coverage — Report Playwright E2E code-coverage on PRs, free and entirely inside Actions (no third-party service, private-repo safe), consistent with bkit-stub:coverage above. Report-only by default. Unlike vitest there is NO --coverage flag: Playwright is black-box and does not instrument your source, so you wire a 3-part pipeline (collect -> report -> comment). To enable: build the pipeline below, uncomment the report step, delete this stub header.
|
|
592
|
+
# 1. COLLECT coverage during the E2E run — pick ONE route:
|
|
593
|
+
# a. Istanbul instrumented build (cross-browser): add `vite-plugin-istanbul` so the app under test exposes
|
|
594
|
+
# window.__coverage__, then scrape it in a Playwright fixture (afterEach/teardown) and pass it to Monocart.
|
|
595
|
+
# Works on all browsers. Ref: mxschmitt/playwright-test-coverage.
|
|
596
|
+
# b. V8 API (Chromium-only): page.coverage.startJSCoverage()/stopJSCoverage() in a fixture; needs source maps
|
|
597
|
+
# to map back to source. Ref: @bgotink/playwright-coverage.
|
|
598
|
+
# 2. REPORT with Monocart (`monocart-coverage-reports`, wired via the `monocart-reporter` Playwright custom
|
|
599
|
+
# reporter or the library directly). It ingests EITHER V8 or Istanbul input (auto-converts V8 -> Istanbul) and
|
|
600
|
+
# emits the SAME two Istanbul-format files the davelosert action reads, so no new commenter is needed:
|
|
601
|
+
# outputDir: 'coverage/e2e'
|
|
602
|
+
# reports: ['json-summary', 'json', 'lcov'] # json-summary is load-bearing; json enables file-coverage-mode: changes
|
|
603
|
+
# 3. COMMENT by reusing davelosert/vitest-coverage-report-action@v2 (same action as bkit-stub:coverage) pointed at
|
|
604
|
+
# coverage/e2e, with a DISTINCT name: e2e so its sticky comment does not collide with the unit/integration ones.
|
|
605
|
+
# If Monocart's coverage-final.json is not accepted for file-coverage-mode: changes, drop to file-coverage-mode:
|
|
606
|
+
# all, or comment via a cobertura commenter (irongut/CodeCoverageSummary on Monocart's `cobertura` report).
|
|
607
|
+
# REPORT-ONLY — ship NO threshold. A whole-app E2E % is denominator-noise (E2E exercises user flows, not every
|
|
608
|
+
# branch), so gate the tier on the E2E step succeeding, NOT on a number. For a real E2E %, scope Monocart's
|
|
609
|
+
# entryFilter/sourceFilter to the surface E2E is meant to cover, THEN ratchet from current — never a picked number.
|
|
610
|
+
# See docs/testing.md § E2E coverage on PRs.
|
|
611
|
+
# Permissions/forks/pin: this step runs in the SAME bkit-tests-unit job as bkit-stub:coverage, so it REUSES that
|
|
612
|
+
# stub's job-level permissions block (pull-requests: write + actions: read + contents: read) — if you enable
|
|
613
|
+
# e2e-coverage WITHOUT the unit/integration coverage, add that same job-level block or the comment cannot post.
|
|
614
|
+
# The head.repo == repo guard skips fork PRs (read-only GITHUB_TOKEN); the action is SHA-pinned to a commit
|
|
615
|
+
# (# vX.Y.Z comment) per best practice, kept current by your updater (Renovate/Dependabot).
|
|
616
|
+
# - name: Report E2E Coverage on PR
|
|
617
|
+
# # Same gate as Run E2E Tests (coverage exists only if E2E ran); hashFiles skips repos that produced no E2E report.
|
|
618
|
+
# if: (steps.detect.outputs.should_run_full == 'true' || steps.e2e-paths.outputs.needs_e2e == 'true') && steps.cache.outputs.skip != 'true' && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && hashFiles('coverage/e2e/coverage-summary.json') != ''
|
|
619
|
+
# uses: davelosert/vitest-coverage-report-action@8b157684c6a6b259b97d45e72b44242865c0f6a5 # v2.12.2
|
|
620
|
+
# with:
|
|
621
|
+
# name: e2e
|
|
622
|
+
# json-summary-path: coverage/e2e/coverage-summary.json
|
|
623
|
+
# json-final-path: coverage/e2e/coverage-final.json
|
|
624
|
+
# file-coverage-mode: changes
|
|
625
|
+
# github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
626
|
+
|
|
627
|
+
# bkit-stub:e2e-artifacts — Upload Playwright report + per-test traces after E2E runs so /bkit-debug can fetch them. To enable: uncomment the step below and delete this stub header.
|
|
628
|
+
# `if: always()` captures both failure AND job-timeout cancel: Playwright's HTML reporter
|
|
629
|
+
# only finalises `playwright-report/index.html` at suite onEnd, but per-test trace.zip files
|
|
630
|
+
# in `test-results/` write incrementally and survive mid-suite SIGTERM. Without `always()`,
|
|
631
|
+
# cancelled runs lose all per-test traces. Under bkit [verbose ci]: per-test trace.zip lands in
|
|
632
|
+
# test-results/; sharded runs additionally write blob-report/ intermediate.
|
|
633
|
+
# - name: Upload Playwright Artifacts
|
|
634
|
+
# if: always()
|
|
635
|
+
# uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
636
|
+
# with:
|
|
637
|
+
# name: playwright-report
|
|
638
|
+
# path: |
|
|
639
|
+
# playwright-report/
|
|
640
|
+
# test-results/
|
|
641
|
+
# blob-report/
|
|
642
|
+
# retention-days: 14
|
|
643
|
+
# if-no-files-found: ignore
|
|
644
|
+
|
|
645
|
+
# ── bkit-tests-check ──────────────────────────────────────────────────────
|
|
646
|
+
# Capstone and sole branch-protection required check. `bkit runs gate` (/bkit-ship) merges
|
|
647
|
+
# only when this job is present and green at the head; `bkit setup protect-main` requires
|
|
648
|
+
# it. Its name is `package.json` `bkit.capstoneJob` (default bkit-tests-check).
|
|
649
|
+
# needs: every lane — a lane missing here cannot red the capstone. if: !cancelled(), never
|
|
650
|
+
# always(): a concurrency cancel must not stamp a failure. Each lane must succeed; a failed,
|
|
651
|
+
# skipped or cancelled lane reds it. A lane that writes an executed-test count must have run
|
|
652
|
+
# more than 0 tests. Each lane you adopt from the reference below joins needs: and the assert.
|
|
653
|
+
bkit-tests-check:
|
|
654
|
+
needs: [bkit-tests-static, bkit-tests-unit]
|
|
655
|
+
if: ${{ !cancelled() }}
|
|
656
|
+
runs-on: ubuntu-latest
|
|
657
|
+
timeout-minutes: 2
|
|
658
|
+
steps:
|
|
659
|
+
- name: Assert Lanes Passed
|
|
660
|
+
env:
|
|
661
|
+
STATIC_RESULT: ${{ needs.bkit-tests-static.result }}
|
|
662
|
+
UNIT_RESULT: ${{ needs.bkit-tests-unit.result }}
|
|
663
|
+
UNIT_RAN: ${{ needs.bkit-tests-unit.outputs.tests_ran }}
|
|
664
|
+
UNIT_CACHE_SKIP: ${{ needs.bkit-tests-unit.outputs.cache_skip }}
|
|
665
|
+
run: |
|
|
666
|
+
FAIL=0
|
|
667
|
+
if [ "$STATIC_RESULT" != "success" ]; then
|
|
668
|
+
echo "::error::bkit-tests-static result=$STATIC_RESULT (expected success)"
|
|
669
|
+
FAIL=1
|
|
670
|
+
fi
|
|
671
|
+
if [ "$UNIT_RESULT" != "success" ]; then
|
|
672
|
+
echo "::error::bkit-tests-unit result=$UNIT_RESULT (expected success)"
|
|
673
|
+
FAIL=1
|
|
674
|
+
fi
|
|
675
|
+
# NON-HOLLOW: a real run (not a SHA-cache short-circuit) of a lane that writes a count
|
|
676
|
+
# must have executed >0 tests. An empty count is a lane that writes none yet.
|
|
677
|
+
if [ "$UNIT_RESULT" = "success" ] && [ "$UNIT_CACHE_SKIP" != "true" ]; then
|
|
678
|
+
case "$UNIT_RAN" in
|
|
679
|
+
'')
|
|
680
|
+
echo "::warning::bkit-tests-unit writes no executed-test count — green does not prove tests ran (see its Run Unit Tests step)." ;;
|
|
681
|
+
*[!0-9]*)
|
|
682
|
+
echo "::error::bkit-tests-unit executed-test count is non-numeric ('$UNIT_RAN')."
|
|
683
|
+
FAIL=1 ;;
|
|
684
|
+
0)
|
|
685
|
+
echo "::error::bkit-tests-unit succeeded but executed 0 tests — vacuous green."
|
|
686
|
+
FAIL=1 ;;
|
|
687
|
+
esac
|
|
688
|
+
fi
|
|
689
|
+
if [ "$FAIL" = "1" ]; then
|
|
690
|
+
echo "::error::bkit-tests-check FAILED — see above."
|
|
691
|
+
exit 1
|
|
692
|
+
fi
|
|
693
|
+
echo "✅ bkit-tests-check passed (static=$STATIC_RESULT, unit=$UNIT_RESULT, unit tests executed=${UNIT_RAN:-unreported})."
|
|
694
|
+
|
|
695
|
+
# bkit-stub:smoke — Post-CI smoke triggered by workflow_run on {{DEFAULT_BRANCH}}. To enable: copy the YAML below into .github/workflows/smoke.yml (separate file — workflow_run cannot share a file with push/pull_request) and delete this stub header.
|
|
696
|
+
# name: Smoke
|
|
697
|
+
# on:
|
|
698
|
+
# workflow_run:
|
|
699
|
+
# workflows: ["CI"]
|
|
700
|
+
# types: [completed]
|
|
701
|
+
# branches: [{{DEFAULT_BRANCH}}]
|
|
702
|
+
# jobs:
|
|
703
|
+
# smoke:
|
|
704
|
+
# if: github.event.workflow_run.conclusion == 'success'
|
|
705
|
+
# runs-on: ubuntu-latest
|
|
706
|
+
# steps:
|
|
707
|
+
# - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
708
|
+
# - run: ./scripts/ci/smoke-test.sh
|
|
709
|
+
|
|
710
|
+
# =============================================================================
|
|
711
|
+
# FULL CI SCAFFOLD REFERENCE — job graph, needs, if, step names. This is the target.
|
|
712
|
+
# The jobs above are the any-repo starter. A starter stub still inside bkit-tests-unit
|
|
713
|
+
# (e2e, vercel-await, supabase-migrate, immutability pull_request-only) is the pre-split
|
|
714
|
+
# shape — follow this reference when you add the lane. Adopt order: docs/testing.md
|
|
715
|
+
# § CI test tiers. Concurrency, push base, run levels, promotion, markers: docs/deployments.md.
|
|
716
|
+
# Order: static checks before env pull; build-web publishes the URL before E2E; capstone last.
|
|
717
|
+
# Tags: [U] in the starter above; [M]onorepo [D]eploy [E]2E [DB] opt-in.
|
|
718
|
+
# Tool names (turbo, Vercel, Supabase, Playwright) are examples.
|
|
719
|
+
#
|
|
720
|
+
# green == validated. testing.md § Validated means executed.
|
|
721
|
+
# Expression cap: a comment inside `run: |` counts toward 21,000 chars; a # comment does not.
|
|
722
|
+
# Long logic → a script. deployments.md § Workflow-file limits.
|
|
723
|
+
#
|
|
724
|
+
# ORDER + gating (needs: + result guards). Each TIER is its own parallel LANE (job) — the proven
|
|
725
|
+
# shape bkit's own bkit-ci.yml (bkit-tests-static/unit/integration) and consumer repos run;
|
|
726
|
+
# NOT steps in one monolithic tests job. Bring a lane to life only if that tier applies to your repo.
|
|
727
|
+
#
|
|
728
|
+
# The graph is FLAT AND WIDE for static/unit/build/integration: scope fans out, capstone joins.
|
|
729
|
+
# ONE deliberate exception: when the migration lane owns the shared-remote
|
|
730
|
+
# `db push`, `bkit-tests-e2e-web` and `bkit-tests-live-web` `needs:` that lane so they cannot hit a schema
|
|
731
|
+
# the push has not applied yet (and a from-empty replay failure cannot reach remote). Do NOT add
|
|
732
|
+
# edges from live/e2e back onto static/unit/build — those remain the expensive wall-clock trap.
|
|
733
|
+
#
|
|
734
|
+
# bkit-tests-scope ─┬─ bkit-tests-static
|
|
735
|
+
# always-on, ├─ bkit-tests-unit
|
|
736
|
+
# never skips ├─ bkit-tests-build-web ───────────────────┐
|
|
737
|
+
# (~15s) ├─ bkit-tests-integration │
|
|
738
|
+
# ├─ bkit-tests-build-ios │
|
|
739
|
+
# ├─ bkit-tests-build-android │
|
|
740
|
+
# └─ bkit-tests-migration ─┬─→ bkit-tests-deploy (push to {{DEFAULT_BRANCH}} only; promotes)
|
|
741
|
+
# always-on │ │ (own concurrency group; not required)
|
|
742
|
+
# (replay plan-/path- │ ▼
|
|
743
|
+
# gated; remote push └─→ bkit-tests-reset ──┬─→ bkit-tests-e2e-web
|
|
744
|
+
# on every push to (lease + ├─→ bkit-tests-live-web
|
|
745
|
+
# dev/main; on the known state)├─→ bkit-tests-e2e-ios
|
|
746
|
+
# default branch waits └─→ bkit-tests-e2e-android
|
|
747
|
+
# for the basic lanes)
|
|
748
|
+
# │
|
|
749
|
+
# ▼
|
|
750
|
+
# bkit-tests-cleanup (always(); releases the lease)
|
|
751
|
+
# │
|
|
752
|
+
# ▼
|
|
753
|
+
# bkit-tests-check (needs: scope + ALL lanes, deploy included; if: !cancelled())
|
|
754
|
+
#
|
|
755
|
+
# Suffix rule: a lane takes a platform suffix when that tier exists for more than one
|
|
756
|
+
# platform. static / unit / integration / migration stay bare. build and e2e are
|
|
757
|
+
# -web / -ios / -android. @live is -web — device flows are the e2e lanes, not a second live lane.
|
|
758
|
+
# Adopt only the lanes this repo has. A missing optional lane is not a gap.
|
|
759
|
+
#
|
|
760
|
+
# static/unit/integration/build-*: needs:[bkit-tests-scope]; if: run_level != 'none'
|
|
761
|
+
# bkit-tests-migration: needs:[bkit-tests-scope]; NO job-level if: (always-on)
|
|
762
|
+
# bkit-tests-deploy: needs:[bkit-tests-migration, bkit-tests-build-web];
|
|
763
|
+
# push to {{DEFAULT_BRANCH}} only; own `concurrency:` group
|
|
764
|
+
# bkit-tests-reset: needs:[scope, migration]; if: tenant_target != ''
|
|
765
|
+
# e2e-web / live-web / e2e-ios / e2e-android:
|
|
766
|
+
# needs:[scope, migration, deploy, reset, <build lane>];
|
|
767
|
+
# if: !cancelled() && scope==success && <own gate>
|
|
768
|
+
# && migration != 'failure' && deploy != 'failure'
|
|
769
|
+
# && reset != 'failure'
|
|
770
|
+
# (!= 'failure' — not == 'success' — so a cancelled/skipped
|
|
771
|
+
# migration, deploy or reset does not cascade-skip the lane)
|
|
772
|
+
#
|
|
773
|
+
# Do not gate bkit-tests-live-web behind static/unit/integration/e2e. Measure the pole first.
|
|
774
|
+
# deployments.md § Parallel test lanes.
|
|
775
|
+
#
|
|
776
|
+
# `bkit install` / `bkit check` raises an advisory per `# bkit-stub:` below. Delete the header to dismiss.
|
|
777
|
+
#
|
|
778
|
+
# === JOB 1 — planner (always-on) ===
|
|
779
|
+
# bkit-stub:bkit-tests-scope — emits the bkit-test-plan JSON. WHEN: CI has >1 run-type (PR/
|
|
780
|
+
# dev-push/release) or any skippable tier. Single-package repo: drop the [M] steps; the
|
|
781
|
+
# plan comes from markers and the event alone.
|
|
782
|
+
# bkit-tests-scope: runs-on: ubuntu-latest; timeout-minutes: 2; outputs: { plan: ${{ steps.scope.outputs.plan }} }
|
|
783
|
+
# steps:
|
|
784
|
+
# - name: Checkout Repository # [M] fetch-depth: 0 (turbo diffs need the base commit)
|
|
785
|
+
# - name: Install Turbo # [M] npm i -g turbo@<ver> (bare, ~10-15s; no pnpm install)
|
|
786
|
+
# - name: Resolve Base Ref # [M] push base = the branch's last green run; shipped:
|
|
787
|
+
# # scripts/ci/lanes/resolve-push-base.mjs (falls back to github.event.before). deployments.md
|
|
788
|
+
# # § One run per branch or pull request.
|
|
789
|
+
# bkit-stub:affected-graph — [M] turbo changed-packages. Stdout ≠ stderr. deployments.md § turbo `//`.
|
|
790
|
+
# - name: Detect Affected Packages # [M] sets web_affected / global_dep_changed
|
|
791
|
+
# - name: Read Markers # [U] one parse; lanes read plan.markers_present. deployments.md § Commit-message force tags.
|
|
792
|
+
# - name: Decide Run # [U] Layer 1 (whether): [skip ci] or affected-empty -> run_level=none
|
|
793
|
+
# - name: Decide Run Level # [U] force-build / PR / dispatch / push to default -> full.
|
|
794
|
+
# # push to dev from a merged PR -> partial. Direct dev push (no PR) -> full. api-error/403 -> full.
|
|
795
|
+
# # deployments.md § Run-level decision matrix. Needs pull-requests: read.
|
|
796
|
+
# - name: Decide Run Live & E2E # [D/E] web_affected_eff = web_affected || [force full] (emit as plan.web_affected — drives integration/e2e/@live + the capstone uniformly).
|
|
797
|
+
# # run_e2e = run_level==full && web_affected_eff. run_live = push dev/main && web_affected_eff (@live stays PUSH-ONLY — real LLM/email side effects; a docs-only/empty [force full] push reaches it via web_affected_eff, NOT off a PR/dispatch).
|
|
798
|
+
# # run_migration: true when migration/seed/seed-generator paths changed (or workflow_dispatch / no-usable-base → run-to-be-safe). Orthogonal to run_level — a run_level=none run can still need replay. Emits into the plan so migration-lane heavy steps gate per-step (job stays always-on).
|
|
799
|
+
# - name: Decide Release Mirror # [U] OPTIONAL — one CI run per dev commit. mirror_push_run = pull_request
|
|
800
|
+
# # && head.repo.full_name == github.repository && head_ref == 'dev' && base_ref == the default branch
|
|
801
|
+
# # (head_ref via env:, injection-safe). True → LAST word in the plan: run_level=none, run_e2e/run_live/
|
|
802
|
+
# # run_migration/web_affected=false, so every lane skips (migration lane included — it is always-on, so
|
|
803
|
+
# # its replay steps must read run_migration) and the capstone copies the dev push run's verdict (JOB 4).
|
|
804
|
+
# # The release PR head IS the dev tip that push run is testing; re-testing it doubles the slowest run.
|
|
805
|
+
# # PRECONDITIONS — mirroring copies whatever the push run validated, so adopt only when:
|
|
806
|
+
# # (1) a dev push resolves run_level=full — drop the merged-PR → partial arm above (a partial push run
|
|
807
|
+
# # has no E2E, and the release PR would inherit that);
|
|
808
|
+
# # (2) a push run's diff base is the head of the LAST GREEN push run on the branch, not
|
|
809
|
+
# # github.event.before — else a red run followed by an unrelated commit plans a green run that
|
|
810
|
+
# # never re-tests what the red one broke, and the mirror copies that green;
|
|
811
|
+
# # (3) promotion hangs off the push to the default branch (bkit-tests-deploy, JOB 5), never off
|
|
812
|
+
# # the PR check — the mirror is a merge gate, the default-branch push run is the release gate.
|
|
813
|
+
# # Fork PRs and every other head/base pair keep the normal plan. Field is REQUIRED in the plan (false
|
|
814
|
+
# # when off) so the capstone can read it. See docs/deployments.md § "One CI run per dev commit".
|
|
815
|
+
# - name: Generate Test Plan # [U] id: scope. jq has()/!=null, never `//`. deployments.md § One run.
|
|
816
|
+
# - name: Upload Test Plan # [U] plan-table -> $GITHUB_STEP_SUMMARY (if: !cancelled())
|
|
817
|
+
# - name: Write Cancellation Notice # [U] if: cancelled() — note instead of a blank summary
|
|
818
|
+
#
|
|
819
|
+
# === JOB 2: one job per tier. Distribute the steps below. Each lane: own checkout + setup + install. ===
|
|
820
|
+
# static/unit/integration/build-*: needs:[bkit-tests-scope]; if: run_level != 'none'; timeout-minutes: 20
|
|
821
|
+
# Emit <tier>_ran from the runner summary. Capstone asserts >0. testing.md § Validated means executed.
|
|
822
|
+
# deployments.md § Parallel test lanes.
|
|
823
|
+
# env: [D] scope TURBO_TOKEN/VERCEL_*/SUPABASE_* here (least-privilege); KEEP the verbose-CI job-level `env:` from the starter's bkit-tests-static.
|
|
824
|
+
# steps:
|
|
825
|
+
# - name: Checkout Repository # [U] fetch-depth: 0 only if running slop-scan delta
|
|
826
|
+
# - name: Fetch Base Branch # [M/PR] if: pull_request — base for --filter/diffs
|
|
827
|
+
# - name: Assert Migrations Immutable # [DB] EVERY event, against the planner's base (PR base, or a
|
|
828
|
+
# # push's last green run). Fail if an already-merged migration was edited (write a new one).
|
|
829
|
+
# - name: Materialise Base Worktree # same base, for slop-delta; loud-fail if it resolves to HEAD
|
|
830
|
+
# - name: Setup pnpm # [U]
|
|
831
|
+
# - name: Setup Node # [U] node-version: {{NODE_VERSION}}, cache: pnpm
|
|
832
|
+
# - name: Configure Verbose CI # [U] NODE_OPTIONS is job-level env, never $GITHUB_ENV. testing.md § CI verbosity.
|
|
833
|
+
# - name: Install Dependencies # [U] pnpm install --frozen-lockfile
|
|
834
|
+
# - name: Install Vale # [U] pinned tarball + `vale sync` (else E100: write-good missing)
|
|
835
|
+
# - name: Run Lint # [U] static checks FAIL-FAST before env pull; PRs scope --filter=...[origin/<base>]
|
|
836
|
+
# - name: Run Typecheck # [U]
|
|
837
|
+
# - name: Run Prettier # [U] CI-side format gate (hook-bypass net)
|
|
838
|
+
# - name: Run Vale Prose Lint # [U] same root lint:prose pre-push runs (local==CI)
|
|
839
|
+
# - name: Run Slop Scan (full) # [U] advisory baseline
|
|
840
|
+
# - name: Run Slop Scan (delta) # every event, against the planner base. deployments.md § One run.
|
|
841
|
+
# - name: Tear Down Base Worktree # if: always()
|
|
842
|
+
# - name: Run bkit Check # [U] drift gate (same as pre-push); catches --no-verify/web-edit/cloud drift
|
|
843
|
+
# - name: Check Accepted Divergences # [U] node scripts/ci/check-accepted-divergences.mjs — every event-keyed step is registered; stale rows fail too. testing.md § Accepted divergences.
|
|
844
|
+
# - name: Pull Vercel Env Vars # [D] preview vs prod env by branch; set CI_ENV_FILE; FAIL-FAST if critical secrets empty
|
|
845
|
+
# - name: Assert Environment Shape # [D] env-shape checker (e.g. env-check.sh)
|
|
846
|
+
# # Resolve URL and remote db push are NOT steps in this catalogue.
|
|
847
|
+
# # URL: bkit-tests-build-web publishes deployment_url. db push: bkit-tests-migration.
|
|
848
|
+
# # Race if the host still auto-deploys: deployments.md § Build-vs-migration race.
|
|
849
|
+
# bkit-stub:test-db — [DB] schema invariants ("every public table has RLS" etc., not app-defined). Two co-equal
|
|
850
|
+
# # routes by deploy topology: pgTAP (`supabase db test` over supabase/tests/*.sql) against a CI-LOCAL fixture
|
|
851
|
+
# # — fast/offline but can pass while prod drifts; OR a service_role-only catalog RPC from the @live tier
|
|
852
|
+
# # against the REAL deployed schema in bkit-tests-live-web — the stronger check once you have a deploy.
|
|
853
|
+
# # docs/testing.md § Schema-invariant DB checks.
|
|
854
|
+
# - name: Run DB Tests (pgTAP) # [DB] if: schema invariants matter; runs supabase/tests/*.sql
|
|
855
|
+
# - name: Run Unit Tests # [U] the one tier every repo has (source CI_ENV_FILE if needed)
|
|
856
|
+
# - name: Report Coverage on PR # [U/PR] bkit-stub:coverage — davelosert/vitest-coverage-report-action posts a per-tier coverage comment (distinct name: unit|integration|e2e). With SEPARATE lanes each posts from its OWN lane: unit-cov here (gated on branches), integration-cov in bkit-tests-integration (report-only, gate-on-execution), e2e-cov in bkit-tests-e2e-web (bkit-stub:e2e-coverage, Monocart). Each lane needs job-level pull-requests: write + the json-summary/json reporters.
|
|
857
|
+
# - name: Build All Packages # moves to bkit-tests-build-web. Not this catalogue.
|
|
858
|
+
# - name: Run Integration Tests # moves to bkit-tests-integration. Not this catalogue.
|
|
859
|
+
# - name: Check Stale Test Data # [DB] continue-on-error. Lives in the lane that touches the shared resource.
|
|
860
|
+
# # E2E, await, and upload move to bkit-tests-e2e-web. testing.md § E2E on PRs.
|
|
861
|
+
#
|
|
862
|
+
# Design is not a lane. testing.md § Design assertions. docs/design.md § Machine-checked reference.
|
|
863
|
+
#
|
|
864
|
+
# === JOB 2a — integration lane (distribute JOB 2's integration steps into their OWN job) ===
|
|
865
|
+
# bkit-stub:bkit-tests-integration — [D] the integration tier as its OWN parallel lane (job), not a
|
|
866
|
+
# step in bkit-tests-unit. WHEN: you have *.integration.test.ts (multi-module wiring / real infra
|
|
867
|
+
# boundaries). Mirrors bkit's own bkit-tests-integration lane + consumer repos. Self-contained
|
|
868
|
+
# (own checkout/setup/install); gate heavy steps on web_affected; emit integration_ran; the
|
|
869
|
+
# bkit-stub:coverage integration report (report-only, name: integration) posts from HERE, not bkit-tests-unit.
|
|
870
|
+
# bkit-tests-integration: needs:[bkit-tests-scope]; if: run_level != 'none'; timeout-minutes: 20
|
|
871
|
+
# # own job-level permissions: { actions: read, contents: read, pull-requests: write } for the coverage comment.
|
|
872
|
+
# steps: Checkout / Setup pnpm+Node / Install → Build (if needed) → Run Integration Tests
|
|
873
|
+
# (id: vitest; --continue so one failure doesn't mask the rest; --reporter=json → integration_ran) →
|
|
874
|
+
# Report Integration Coverage on PR (davelosert, name: integration). Step detail: JOB 2 catalogue above.
|
|
875
|
+
#
|
|
876
|
+
# === JOB 2d — web build lane ===
|
|
877
|
+
# bkit-stub:bkit-tests-build-web — [D] the web build as its OWN lane. WHEN: a later lane tests this
|
|
878
|
+
# commit's deployment, or a compile break should report on its own. The suffix is required once
|
|
879
|
+
# ios / android build lanes exist; use it even if you only have web, so the name does not move later.
|
|
880
|
+
# Two shapes, pick one:
|
|
881
|
+
# (a) Compile. Checkout / setup / install → build the workspace. TIME-TO-SIGNAL: a compile break
|
|
882
|
+
# reds here instead of inside a longer lane. Emits no *_ran count.
|
|
883
|
+
# (b) Host deployment gate (e.g. Vercel). Do not compile. Create this SHA's deployment, poll it
|
|
884
|
+
# to ready, publish deployment_url + deployment_id. On the default branch the deployment stays
|
|
885
|
+
# UN-promoted until bkit-tests-deploy (JOB 5). A guard fails if the production alias already
|
|
886
|
+
# serves this run's new deployment id.
|
|
887
|
+
# bkit-tests-build-web: needs:[bkit-tests-scope]; if: run_level != 'none'; timeout-minutes: 20
|
|
888
|
+
# Fold into bkit-tests-check's needs:.
|
|
889
|
+
#
|
|
890
|
+
# === JOB 2c — web E2E lane ===
|
|
891
|
+
# bkit-stub:bkit-tests-e2e-web — [E] browser E2E as its OWN lane. WHEN: you have a browser suite and
|
|
892
|
+
# a deploy or a local stack to hit. e.g. Playwright. Self-contained. Gate on run_e2e && web_affected.
|
|
893
|
+
# Emit e2e_ran. Coverage comment (bkit-stub:e2e-coverage) posts from HERE.
|
|
894
|
+
# Do NOT put remote db push in this lane — that lives in bkit-tests-migration.
|
|
895
|
+
# A feature → dev PR runs against a local stack with this PR's migrations. Every other event tests
|
|
896
|
+
# the deployment bkit-tests-build-web published. Same outcome rules on every machine: retries, traces,
|
|
897
|
+
# flake handling. A pass on retry is a failure. The target comes from TEST_URL alone. No spec is
|
|
898
|
+
# filtered by tag.
|
|
899
|
+
# bkit-tests-e2e-web:
|
|
900
|
+
# needs: [bkit-tests-scope, bkit-tests-migration, bkit-tests-reset, bkit-tests-build-web]
|
|
901
|
+
# if: >-
|
|
902
|
+
# ${{ !cancelled()
|
|
903
|
+
# && needs.bkit-tests-scope.result == 'success'
|
|
904
|
+
# && fromJSON(needs.bkit-tests-scope.outputs.plan).run_e2e
|
|
905
|
+
# && needs.bkit-tests-migration.result != 'failure'
|
|
906
|
+
# && needs.bkit-tests-reset.result != 'failure'
|
|
907
|
+
# && needs.bkit-tests-build-web.result != 'failure' }}
|
|
908
|
+
# timeout-minutes: 30
|
|
909
|
+
# # own job-level permissions block (same three) for the coverage comment.
|
|
910
|
+
# steps: Checkout / Setup / Install → Run E2E Tests (TEST_URL from bkit-tests-build-web;
|
|
911
|
+
# do not also run bkit-stub:vercel-await) → Report E2E Coverage → Upload report (if: always()).
|
|
912
|
+
# Fan-out: testing.md § Concurrent invocations. Shared identity and per-request cost: deployments.md § Parallel test lanes.
|
|
913
|
+
#
|
|
914
|
+
# === JOB 2e — shared resource: reset first, clean up last ===
|
|
915
|
+
# bkit-stub:bkit-tests-reset — [D/DB] WHEN: 2+ lanes use ONE long-lived resource (demo tenant, seeded
|
|
916
|
+
# account, fixture bucket). Prefer provisioning a fresh resource per run (testing.md § Provision
|
|
917
|
+
# backing services fresh) and DROP both jobs below. When the resource is shared:
|
|
918
|
+
# bkit-tests-reset runs AFTER scope + migration, BEFORE any lane that uses the resource. It takes
|
|
919
|
+
# a lease, then puts the resource in its known state. Every such lane needs: it and does not start
|
|
920
|
+
# if it failed. The planner names at most one target ("" | preview | production). Two targets is a
|
|
921
|
+
# planner failure, not a matrix. Production is legal only on the default branch. An empty target
|
|
922
|
+
# skips both jobs. The lease is what makes an overlapping PR and dev push safe: a run uses the
|
|
923
|
+
# resource only between its reset and its cleanup. The laptop runner calls the same commands.
|
|
924
|
+
# bkit-tests-reset:
|
|
925
|
+
# needs: [bkit-tests-scope, bkit-tests-migration]
|
|
926
|
+
# if: !cancelled() && scope==success && migration != 'failure' && plan.tenant_target != ''
|
|
927
|
+
# timeout-minutes: 160 # covers the lease wait
|
|
928
|
+
# bkit-stub:bkit-tests-cleanup — the other half. Runs LAST, if: always(), after every lane that used
|
|
929
|
+
# the resource. Puts it back and releases the lease, including when a lane failed or this run was
|
|
930
|
+
# cancelled. Does not touch a resource another run holds. When this run's reset never took the lease,
|
|
931
|
+
# finish quietly — the reset job is already red.
|
|
932
|
+
# bkit-tests-cleanup:
|
|
933
|
+
# needs: [bkit-tests-scope, bkit-tests-reset, <every tenant lane>]
|
|
934
|
+
# if: always() && scope==success && reset != 'skipped' && plan.tenant_target != ''
|
|
935
|
+
# timeout-minutes: 15
|
|
936
|
+
# Capstone reds when a planned reset skipped, or when reset or cleanup failed. Neither job emits a
|
|
937
|
+
# *_ran count. Exempt both BY NAME from any guard that treats every bkit-tests-* job as a counting lane.
|
|
938
|
+
# Job names do not grow a matrix suffix.
|
|
939
|
+
#
|
|
940
|
+
# === JOB 2b — migration lane (always-on ordering + provisioning) ===
|
|
941
|
+
# bkit-stub:bkit-tests-migration — [DB] always-on. No job-level if:. Replay + remote push.
|
|
942
|
+
# testing.md § Provision backing services fresh. Capstone asserts success whenever scope succeeded.
|
|
943
|
+
# bkit-tests-migration: needs:[bkit-tests-scope]; timeout-minutes: 15
|
|
944
|
+
# # NO job-level if:. Optional env: RUN_MIGRATION: ${{ fromJSON(...plan).run_migration }}
|
|
945
|
+
# steps:
|
|
946
|
+
# - name: Checkout Repository # fetch-depth: 0 when using in-job Detect
|
|
947
|
+
# - name: Detect Migration/Seed Changes # OPTIONAL if planner emits run_migration; else id: detect
|
|
948
|
+
# # relevant=true/false. dispatch + no-usable-base => run-to-be-safe; PR => vs origin/<base>;
|
|
949
|
+
# # push => vs the planner's base (last green run), over migrations/ + seed + seed-generator paths.
|
|
950
|
+
# - name: Install Supabase CLI # [DB] if: RUN_MIGRATION || push-to-dev/main — needed by BOTH paths
|
|
951
|
+
# - name: Provision Ephemeral DB # [DB] if: RUN_MIGRATION / relevant — e.g. supabase start --exclude …
|
|
952
|
+
# - name: Replay Migrations From Empty # [DB] if: RUN_MIGRATION / relevant — e.g. supabase db reset --local
|
|
953
|
+
# - name: Assert Seed Fixture Loaded # [DB] if: RUN_MIGRATION / relevant — known seed row must exist
|
|
954
|
+
# - name: Apply Remote Migrations # [DB] if: push to dev/main — UN-gated by run_migration
|
|
955
|
+
# # (self-heals a remote left behind by an earlier failed run). AFTER replay steps so a
|
|
956
|
+
# # from-empty failure never reaches shared remote. e.g. link + db push --linked --include-all
|
|
957
|
+
# # (resolve project ref via vercel env pull or SUPABASE_* secrets — same pattern as drift checks).
|
|
958
|
+
# - name: Tear Down # if: always() && (RUN_MIGRATION / relevant) — push-only runs never started Docker
|
|
959
|
+
#
|
|
960
|
+
# === JOB 2f — device build + device E2E (optional; drop the platforms you do not ship) ===
|
|
961
|
+
# Same rule on a PR, a dev push, a default-branch push, and a dispatch. These are NOT post-merge
|
|
962
|
+
# canaries: a change that affects the device app, a native dependency change, or a platform marker
|
|
963
|
+
# runs the build and the device flows, and a red lane reds bkit-tests-check. @live stays push-only.
|
|
964
|
+
# e.g. EAS for the build, Maestro for the flows. A dispatch input (default false) is how a human
|
|
965
|
+
# forces a fresh native build; a marker cannot, because markers are inert on workflow_dispatch.
|
|
966
|
+
# bkit-stub:bkit-tests-build-ios — needs:[bkit-tests-scope]; if: plan.run_native_ios
|
|
967
|
+
# bkit-stub:bkit-tests-build-android — needs:[bkit-tests-scope]; if: plan.run_native_android
|
|
968
|
+
# bkit-stub:bkit-tests-e2e-ios — needs: [bkit-tests-scope, bkit-tests-migration, bkit-tests-reset, bkit-tests-build-ios, bkit-tests-build-web].
|
|
969
|
+
# if: !cancelled() && scope==success && build-ios==success && migration != 'failure'
|
|
970
|
+
# && reset != 'failure' && build-web != 'failure' && plan.run_native_ios
|
|
971
|
+
# bkit-stub:bkit-tests-e2e-android — same shape, android tokens.
|
|
972
|
+
# `!cancelled()` switches off GitHub's default skip-on-failed-needs, so name each needs.result
|
|
973
|
+
# in the if:. A build lane that succeeds without a build id (quota exhausted, reuse) still lets
|
|
974
|
+
# the e2e job start; the flow steps inside gate on the id. Emit native_e2e_ran (flows that reached
|
|
975
|
+
# a verdict). Fold all four into bkit-tests-check's needs:.
|
|
976
|
+
#
|
|
977
|
+
# === JOB 2g — logging probe (a step, not a lane) ===
|
|
978
|
+
# bkit-stub:logging-probe — WHEN: a runtime can emit a log and an API can read it back. Inside each
|
|
979
|
+
# such lane (bkit-tests-e2e-web, bkit-tests-live-web, bkit-tests-e2e-ios, bkit-tests-e2e-android),
|
|
980
|
+
# one step emits a single marked event and a later step asks the tracker whether that marker arrived.
|
|
981
|
+
# e.g. Sentry. Skip the check when this run did not execute the probe. A missing marker reds the lane.
|
|
982
|
+
# DROP if you have no error tracker.
|
|
983
|
+
#
|
|
984
|
+
# === JOB 3 — @live canary (web) ===
|
|
985
|
+
# bkit-stub:bkit-tests-live-web — push-only @live vs the DEPLOYED url. WHEN: you have a deploy.
|
|
986
|
+
# DROP if no deploy (bkit does). The -web suffix matches the build/e2e suffix rule.
|
|
987
|
+
# /bkit-ship still filters a job named bkit-tests-live. This lane's name does not match that filter,
|
|
988
|
+
# so a planned @live failure is fatal through the capstone, not an advisory.
|
|
989
|
+
# bkit-tests-live-web:
|
|
990
|
+
# needs: [bkit-tests-scope, bkit-tests-migration, bkit-tests-reset, bkit-tests-build-web]
|
|
991
|
+
# if: >-
|
|
992
|
+
# ${{ !cancelled()
|
|
993
|
+
# && needs.bkit-tests-scope.result == 'success'
|
|
994
|
+
# && fromJSON(needs.bkit-tests-scope.outputs.plan).run_live
|
|
995
|
+
# && needs.bkit-tests-migration.result != 'failure'
|
|
996
|
+
# && needs.bkit-tests-reset.result != 'failure'
|
|
997
|
+
# && needs.bkit-tests-build-web.result != 'failure' }}
|
|
998
|
+
# timeout-minutes: 15
|
|
999
|
+
# # needs: scope + migration + reset + build-web. Not static/unit/integration/e2e.
|
|
1000
|
+
# # deployments.md § Parallel test lanes.
|
|
1001
|
+
# steps:
|
|
1002
|
+
# - name: Checkout Repository / Setup pnpm / Setup Node / Configure Verbose CI / Install Dependencies # [U] same setup chain as bkit-tests
|
|
1003
|
+
# - name: Pull Vercel Env Vars # [D] same branch-conditional env pull
|
|
1004
|
+
# - name: Run Live Tests # emit live_ran. testing.md § Validated means executed, § Schema-invariant DB checks.
|
|
1005
|
+
#
|
|
1006
|
+
# === JOB 4 — capstone (makes green == validated) ===
|
|
1007
|
+
# The starter bkit-tests-check above grows into this as lanes land. THE sole branch-protection
|
|
1008
|
+
# required check. ~seconds; needs no checkout UNTIL you extract the gate (below).
|
|
1009
|
+
# bkit-tests-check: needs:[bkit-tests-scope,bkit-tests-static,bkit-tests-unit,bkit-tests-build-web,bkit-tests-integration,bkit-tests-e2e-web,bkit-tests-migration,bkit-tests-live-web,bkit-tests-build-ios,bkit-tests-e2e-ios,bkit-tests-build-android,bkit-tests-e2e-android,bkit-tests-reset,bkit-tests-cleanup]; if: ${{ !cancelled() }}; timeout-minutes: 2 (mirror mode: see Mirror Push Run)
|
|
1010
|
+
# # needs: EVERY lane you actually have — a lane missing from needs: is a lane whose failure
|
|
1011
|
+
# # cannot red the capstone, which is the hollow-green this job exists to prevent.
|
|
1012
|
+
# # !cancelled() not always(): a concurrency cancel must not stamp a failure.
|
|
1013
|
+
# steps:
|
|
1014
|
+
# - name: Mirror Push Run # OPTIONAL (Decide Release Mirror in JOB 1). if: plan.mirror_push_run. Runs BEFORE
|
|
1015
|
+
# # the assert below; NEITHER continue-on-error. Needs a checkout and installed dependencies (it runs bkit) — ungated.
|
|
1016
|
+
# # run: pnpm bkit runs mirror --head="$PR_HEAD_SHA" --branch=dev --max-minutes=170
|
|
1017
|
+
# # (PR_HEAD_SHA: github.event.pull_request.head.sha via env:; GH_TOKEN: github.token — needs actions: read.)
|
|
1018
|
+
# # Waits for the dev push run at the PR head and passes only when that run's capstone passed; reds when it
|
|
1019
|
+
# # failed, was cancelled, its capstone is absent/skipped, or no push run appears within 10 min (a [skip ci]
|
|
1020
|
+
# # tip dispatches none). Every lane is skipped in this mode, so the assert below accepts the plan and this
|
|
1021
|
+
# # step IS the verdict — never `run_level=none` alone: a skipped required check can read as passed on the PR.
|
|
1022
|
+
# # Raise the job timeout ONLY in this mode, null-safe for a planner that failed before emitting a plan:
|
|
1023
|
+
# # timeout-minutes: ${{ needs.bkit-tests-scope.outputs.plan && fromJSON(needs.bkit-tests-scope.outputs.plan).mirror_push_run && 180 || 5 }}
|
|
1024
|
+
# # (180 > the command's --max-minutes 170 > your slowest push run, so a timeout names its cause.)
|
|
1025
|
+
# # A red push run re-run to green does NOT update the PR: re-run this job afterwards.
|
|
1026
|
+
# - name: Assert Test Plan Followed # script, not a heredoc. testing.md § Validated means executed.
|
|
1027
|
+
# # scope==success always. run_level!=none => static+unit+build-web success.
|
|
1028
|
+
# # web_affected => integration success. run_e2e && web_affected => e2e-web success.
|
|
1029
|
+
# # run_live => live-web success. plan.run_native_<platform> => that build + e2e success.
|
|
1030
|
+
# # planned reset skipped, or reset/cleanup failed => red. A skipped or failed deploy on a
|
|
1031
|
+
# # default-branch push => red. run_level==none ([skip ci]; release mirror) asserts nothing —
|
|
1032
|
+
# # in mirror mode Mirror Push Run above owns the verdict.
|
|
1033
|
+
# # migration==success whenever scope succeeded.
|
|
1034
|
+
# # Declared + planned tier: <tier>_ran > 0. No entrypoint: assert nothing. Cache hit is not zero.
|
|
1035
|
+
# # Protect bkit-tests-check, not bkit-tests-scope.
|
|
1036
|
+
#
|
|
1037
|
+
# === JOB 5 — promote the release, then the tenant lanes test it ===
|
|
1038
|
+
# bkit-stub:bkit-tests-deploy — WHEN: the host can create a deployment without promoting it (e.g. Vercel).
|
|
1039
|
+
# needs: [bkit-tests-migration, bkit-tests-build-web]. Push to {{DEFAULT_BRANCH}} only. NOT a required check.
|
|
1040
|
+
# Own `concurrency:` group (`cancel-in-progress: false`), so two releases never overlap; the workflow-level
|
|
1041
|
+
# block queues on {{DEFAULT_BRANCH}} too. Runs BEFORE the E2E / @live lanes: each of those needs: it and
|
|
1042
|
+
# refuses unless production serves this run's build (by deployment id). Promotes the EXACT deployment_id
|
|
1043
|
+
# bkit-tests-build-web published. Does not look the deployment up again by SHA. A 409 is success only when
|
|
1044
|
+
# the body says this id is already current production. A red job means the release did not happen; the
|
|
1045
|
+
# previous deployment stays live. On a default-branch push the capstone needs: it, so a skipped or failed
|
|
1046
|
+
# deploy reds bkit-tests-check.
|
|
1047
|
+
# The host must not auto-build the default branch, and any "hold promotion until a check passes"
|
|
1048
|
+
# setting (e.g. Vercel Deployment Checks) stays empty — this job is the promotion.
|
|
1049
|
+
#
|
|
1050
|
+
# === JOB 6 — health (separate workflow) ===
|
|
1051
|
+
# bkit-stub:health — copy into .github/workflows/health.yml. workflow_run cannot share a file with
|
|
1052
|
+
# push / pull_request. WHEN: you have a live URL to smoke after CI. Trigger on CI completed, default
|
|
1053
|
+
# branch only, if the CI run succeeded. Then hit the health URL of the deployment this SHA promoted.
|
|
1054
|
+
# e.g. poll the host until that deployment is ready, then GET /health. Not a required check.
|
|
1055
|
+
# DROP if you have no deployed health URL.
|
|
1056
|
+
#
|
|
1057
|
+
# COMPOSES WITH bkit-cloud.yml: it routes on workflow_run.conclusion (success->ship, failure->debug);
|
|
1058
|
+
# a red bkit-tests-check turns the whole run red, so the router reads the capstone for free. See .bkit/cloud.md.
|
|
1059
|
+
#
|
|
1060
|
+
# THE RULE (even with no CI): green != ran != validated. Confirm a FULL run of the touched tiers before
|
|
1061
|
+
# trusting green — direct dev pushes auto-escalate to full, but a green capstone on a LIGHT run is not full validation.
|
|
1062
|
+
# =============================================================================
|