@cbartens/bkit 5.2.3 → 5.3.0
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 +29 -12
- package/.bkit/core/.agents/context.md +1 -1
- package/.bkit/core/.agents/docs.md +1 -1
- package/.bkit/core/.agents/plugins/bkit/hooks/bkit-guardrails.cjs +1 -1
- package/.bkit/core/.agents/rules.md +11 -0
- package/.bkit/core/.bkit/README.md +28 -11
- package/.bkit/core/.bkit/cloud.md +9 -8
- package/.bkit/core/.bkit/comparison.md +68 -345
- package/.bkit/core/.bkit/install.md +15 -9
- package/.bkit/core/.bkit/lite.md +73 -0
- package/.bkit/core/.bkit/pipeline.md +345 -0
- package/.bkit/core/.bkit/prompts.md +88 -73
- package/.bkit/core/.bkit/providers.md +41 -22
- package/.bkit/core/.bkit/templates.md +125 -18
- package/.bkit/core/.bkit/trackers.md +47 -1
- package/.bkit/core/.bkit/workflows.md +51 -45
- package/.bkit/core/.claude/hooks/bkit-guardrails.cjs +1 -1
- package/.bkit/core/.codex/hooks/bkit-guardrails.cjs +7 -4
- package/.bkit/core/.cursor/hooks/bkit-guardrails.cjs +8 -5
- package/.bkit/core/docs/templates/bkit-audit-accessibility.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-adoption.md +10 -2
- package/.bkit/core/docs/templates/bkit-audit-agents.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-aio-seo.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-analytics.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-annotations.md +10 -2
- package/.bkit/core/docs/templates/bkit-audit-app-performance.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-app-store.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-architecture.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-ci-performance.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-config.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-cost.md +10 -2
- package/.bkit/core/docs/templates/bkit-audit-coverage.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-database.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-dead-code.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-deferrals.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-dependencies.md +22 -10
- package/.bkit/core/docs/templates/bkit-audit-documentation.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-duplication.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-failures.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-flakes.md +10 -2
- package/.bkit/core/docs/templates/bkit-audit-gates.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-issues.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-llm.md +29 -15
- package/.bkit/core/docs/templates/bkit-audit-logs.md +10 -2
- package/.bkit/core/docs/templates/bkit-audit-models.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-privacy.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-prompts.md +11 -3
- package/.bkit/core/docs/templates/bkit-audit-red-team.md +19 -9
- package/.bkit/core/docs/templates/bkit-audit-reliability.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-repo.md +10 -2
- package/.bkit/core/docs/templates/bkit-audit-security.md +13 -5
- package/.bkit/core/docs/templates/bkit-audit-slop.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-testing.md +14 -5
- package/.bkit/core/docs/templates/bkit-audit-usability.md +9 -1
- package/.bkit/core/docs/templates/bkit-plan.md +8 -6
- package/.bkit/core/engine/checks/after/auth.ts +9 -9
- package/.bkit/core/engine/checks/after/ci-yml.ts +14 -12
- package/.bkit/core/engine/checks/after/github.ts +29 -120
- package/.bkit/core/engine/checks/after/index.ts +2 -2
- package/.bkit/core/engine/checks/after/managed.ts +8 -28
- package/.bkit/core/engine/checks/after/tools.ts +3 -15
- package/.bkit/core/engine/checks/before/context-fetch.ts +1 -21
- package/.bkit/core/engine/checks/before/index.ts +7 -43
- package/.bkit/core/engine/checks/before/mcp.ts +17 -8
- package/.bkit/core/engine/checks/before/repo.ts +9 -12
- package/.bkit/core/engine/checks/status-holes.ts +4 -5
- package/.bkit/core/engine/checks/tips/catalogue.ts +70 -24
- package/.bkit/core/engine/checks/tips/detect.ts +45 -2
- package/.bkit/core/engine/checks/tips/index.ts +37 -8
- package/.bkit/core/engine/cli.ts +39 -16
- package/.bkit/core/engine/commands/analysis.ts +36 -26
- package/.bkit/core/engine/commands/comply.ts +17 -16
- package/.bkit/core/engine/commands/harvest.ts +12 -12
- package/.bkit/core/engine/commands/install/doctor.ts +57 -28
- package/.bkit/core/engine/commands/install/install.ts +62 -126
- package/.bkit/core/engine/commands/install/uninstall.ts +191 -33
- package/.bkit/core/engine/commands/install/upgrade.ts +58 -53
- package/.bkit/core/engine/commands/lib.ts +35 -10
- package/.bkit/core/engine/commands/tips.ts +8 -5
- package/.bkit/core/engine/commands/workflow/branches.ts +65 -11
- package/.bkit/core/engine/commands/workflow/counters.ts +21 -12
- package/.bkit/core/engine/commands/workflow/fids.ts +46 -0
- package/.bkit/core/engine/commands/workflow/ledgers.ts +3 -1
- package/.bkit/core/engine/commands/workflow/prs.ts +4 -2
- package/.bkit/core/engine/commands/workflow/repo.ts +18 -4
- package/.bkit/core/engine/commands/workflow/roadmap.ts +4 -3
- package/.bkit/core/engine/commands/workflow/runs.ts +8 -7
- package/.bkit/core/engine/commands/workflow/steps.ts +1 -0
- package/.bkit/core/engine/commands/workflow/tests.ts +17 -5
- package/.bkit/core/engine/commands/workflow/workflows.ts +19 -17
- package/.bkit/core/engine/commands/workflow/workstreams.ts +2 -1
- package/.bkit/core/engine/commands/workflow/worktrees.ts +13 -5
- package/.bkit/core/engine/install/cloud-env.ts +10 -31
- package/.bkit/core/engine/install/manifest.ts +14 -7
- package/.bkit/core/engine/install/modules/antigravity.ts +15 -26
- package/.bkit/core/engine/install/modules/claude.ts +20 -28
- package/.bkit/core/engine/install/modules/cloud.ts +5 -2
- package/.bkit/core/engine/install/modules/codex.ts +15 -29
- package/.bkit/core/engine/install/modules/core.ts +91 -70
- package/.bkit/core/engine/install/modules/cursor.ts +6 -20
- package/.bkit/core/engine/install/modules/index.ts +7 -1
- package/.bkit/core/engine/install/modules/opencode.ts +48 -70
- package/.bkit/core/engine/install/network-allowlist.ts +73 -0
- package/.bkit/core/engine/install/placeholders.ts +3 -18
- package/.bkit/core/engine/install/write.ts +59 -12
- package/.bkit/core/engine/ledgers/telemetry.ts +6 -4
- package/.bkit/core/engine/render/hosts.ts +47 -67
- package/.bkit/core/engine/render/models.ts +29 -11
- package/.bkit/core/engine/shared/bkit-latest.ts +164 -0
- package/.bkit/core/engine/shared/branches.ts +13 -0
- package/.bkit/core/engine/shared/egress.ts +3 -3
- package/.bkit/core/engine/shared/json.ts +18 -1
- package/.bkit/core/engine/shared/package-json.ts +63 -0
- package/.bkit/core/engine/shared/package-roots.ts +0 -10
- package/.bkit/core/engine/shared/protected-paths.ts +5 -130
- package/.bkit/core/engine/shared/settings.ts +36 -0
- package/.bkit/core/engine/shared/timeouts.ts +6 -0
- package/.bkit/core/hooks/antigravity-hook.js +1 -0
- package/.bkit/core/hooks/guardrails-shell.js +186 -40
- package/.bkit/core/hooks/guardrails-tiers.js +5 -78
- package/.bkit/core/prompts/bkit-audit-generate.md +65 -10
- package/.bkit/core/prompts/bkit-build-challenge-1.md +1 -1
- package/.bkit/core/prompts/bkit-build-challenge-2.md +1 -1
- package/.bkit/core/prompts/bkit-build-challenge-reconcile.md +1 -1
- package/.bkit/core/prompts/bkit-build-challenge-remediate.md +1 -1
- package/.bkit/core/prompts/bkit-build-challenge-tests.md +1 -1
- package/.bkit/core/prompts/bkit-build-install-skills.md +1 -1
- package/.bkit/core/prompts/bkit-build-plan-current.md +1 -1
- package/.bkit/core/prompts/bkit-build-plan-execute.md +4 -4
- package/.bkit/core/prompts/bkit-build-plan-gaps-remediate.md +1 -1
- package/.bkit/core/prompts/bkit-build-plan-verify.md +2 -2
- package/.bkit/core/prompts/bkit-debug-abort-handover.md +1 -1
- package/.bkit/core/prompts/bkit-debug-failure-diagnose.md +1 -1
- package/.bkit/core/prompts/bkit-debug-failure-remediate.md +1 -1
- package/.bkit/core/prompts/bkit-debug-failure-reproduce.md +78 -0
- package/.bkit/core/prompts/bkit-debug-failure-soak.md +1 -1
- package/.bkit/core/prompts/bkit-debug-summary.md +3 -3
- package/.bkit/core/prompts/bkit-design-spike.md +1 -1
- package/.bkit/core/prompts/bkit-design-summary.md +2 -2
- package/.bkit/core/prompts/bkit-design-update.md +1 -1
- package/.bkit/core/prompts/bkit-plan-complexity-check.md +1 -1
- package/.bkit/core/prompts/bkit-plan-generate.md +1 -1
- package/.bkit/core/prompts/bkit-plan-scope-check-1.md +1 -1
- package/.bkit/core/prompts/bkit-plan-scope-check-2.md +1 -1
- package/.bkit/core/prompts/bkit-plan-summary.md +1 -1
- package/.bkit/core/prompts/bkit-plan-update.md +1 -1
- package/.bkit/core/prompts/bkit-ship-conflict-resolve.md +1 -1
- package/.bkit/core/prompts/bkit-ship-deferred-sweep.md +1 -1
- package/.bkit/core/prompts/bkit-ship-update-docs.md +1 -1
- package/.bkit/core/prompts/bkit-utility-update-decisions.md +9 -2
- package/.bkit/core/prompts/bkit-utility-update-deferrals.md +9 -2
- package/.bkit/core/prompts/bkit-utility-update-documentation.md +2 -1
- package/.bkit/core/prompts/bkit-utility-update-failures.md +9 -2
- package/.bkit/core/prompts/bkit-utility-update-knowledge.md +9 -2
- package/.bkit/core/prompts/bkit-utility-update-roadmap.md +11 -4
- package/.bkit/core/workflows/bkit-build.md +4 -4
- package/.bkit/core/workflows/bkit-debug.md +70 -34
- package/.bkit/core/workflows/bkit-design.md +3 -3
- package/.bkit/core/workflows/bkit-plan.md +12 -5
- package/.bkit/core/workflows/bkit-ship.md +6 -6
- package/.bkit/shared/.claude/bkit-cloud.md +46 -13
- package/.bkit/shared/.claude/settings.json +18 -0
- package/.bkit/shared/.cursor/mcp.json +2 -1
- package/.bkit/shared/.opencode/opencode.json +19 -1
- package/.bkit/shared/docs/deployments.md +20 -4
- package/.bkit/shared/docs/security.md +8 -6
- package/.bkit/shared/docs/testing.md +9 -5
- package/.bkit/templates/.cursor/Dockerfile +30 -16
- package/.bkit/templates/.github/ISSUE_TEMPLATE/bkit-bug.yml +78 -0
- package/.bkit/templates/.github/ISSUE_TEMPLATE/bkit-change.yml +91 -0
- package/.bkit/templates/.github/ISSUE_TEMPLATE/bkit-idea.yml +56 -0
- package/.bkit/templates/.github/renovate.json5 +91 -12
- package/.bkit/templates/.github/workflows/bkit-ci.yml +66 -53
- package/.bkit/templates/.github/workflows/bkit-cloud.yml +3 -1
- package/.bkit/templates/.github/workflows/bkit-renovate.yml +8 -1
- package/.bkit/templates/.github/workflows/bkit-trivy.yml +67 -0
- package/.bkit/templates/.husky/pre-push +15 -3
- package/.bkit/templates/.oxlintrc.json +21 -0
- package/.bkit/templates/docs/capabilities.md +1 -1
- package/.bkit/templates/scripts/ci/check-capstone.mjs +176 -0
- package/.bkit/templates/scripts/ci/check-capstone.test.mjs +311 -0
- package/.bkit/templates/scripts/cleanup/bkit-tmp-prune.mjs +115 -0
- package/.bkit/templates/scripts/graphify/bkit-graph-eager.py +2 -2
- package/.bkit/templates/scripts/graphify/bkit-graph-imports.py +43 -20
- package/.bkit/templates/scripts/graphify/bkit-graph-pre-push.sh +33 -11
- package/.bkit/templates/scripts/graphify/bkit-graph-repair.py +3 -2
- package/.bkit/templates/scripts/graphify/bkit-graphify-rollup.py +5 -5
- package/.bkit/templates/scripts/graphify/bkit-graphify.sh +79 -19
- package/CHANGELOG.md +67 -3
- package/README.md +258 -129
- package/dist/checks/after/auth.js +10 -11
- package/dist/checks/after/ci-yml.js +11 -14
- package/dist/checks/after/github.js +32 -125
- package/dist/checks/after/index.js +3 -2
- package/dist/checks/after/managed.js +8 -24
- package/dist/checks/after/tools.js +3 -16
- package/dist/checks/before/context-fetch.js +1 -21
- package/dist/checks/before/index.js +6 -42
- package/dist/checks/before/mcp.js +14 -9
- package/dist/checks/before/repo.js +8 -11
- package/dist/checks/status-holes.js +5 -6
- package/dist/checks/tips/catalogue.js +60 -18
- package/dist/checks/tips/detect.js +41 -2
- package/dist/checks/tips/index.js +25 -5
- package/dist/cli.js +34 -14
- package/dist/commands/analysis.js +21 -5
- package/dist/commands/comply.js +20 -18
- package/dist/commands/harvest.js +12 -13
- package/dist/commands/install/doctor.js +55 -23
- package/dist/commands/install/install.js +62 -118
- package/dist/commands/install/uninstall.js +165 -31
- package/dist/commands/install/upgrade.js +55 -49
- package/dist/commands/lib.js +32 -10
- package/dist/commands/tips.js +6 -3
- package/dist/commands/workflow/branches.js +57 -13
- package/dist/commands/workflow/counters.js +17 -7
- package/dist/commands/workflow/fids.js +39 -0
- package/dist/commands/workflow/ledgers.js +3 -1
- package/dist/commands/workflow/prs.js +3 -3
- package/dist/commands/workflow/repo.js +16 -4
- package/dist/commands/workflow/roadmap.js +4 -4
- package/dist/commands/workflow/runs.js +5 -5
- package/dist/commands/workflow/steps.js +1 -0
- package/dist/commands/workflow/tests.js +16 -3
- package/dist/commands/workflow/workflows.js +19 -18
- package/dist/commands/workflow/workstreams.js +2 -1
- package/dist/commands/workflow/worktrees.js +4 -5
- package/dist/install/cloud-env.js +10 -23
- package/dist/install/manifest.js +14 -7
- package/dist/install/modules/antigravity.js +15 -26
- package/dist/install/modules/claude.js +17 -21
- package/dist/install/modules/cloud.js +6 -2
- package/dist/install/modules/codex.js +15 -29
- package/dist/install/modules/core.js +82 -63
- package/dist/install/modules/cursor.js +6 -9
- package/dist/install/modules/index.js +6 -1
- package/dist/install/modules/opencode.js +41 -72
- package/dist/install/network-allowlist.js +62 -0
- package/dist/install/placeholders.js +3 -16
- package/dist/install/write.js +55 -15
- package/dist/ledgers/telemetry.js +5 -4
- package/dist/render/hosts.js +30 -55
- package/dist/render/models.js +20 -9
- package/dist/shared/bkit-latest.js +150 -0
- package/dist/shared/branches.js +11 -0
- package/dist/shared/egress.js +0 -2
- package/dist/shared/json.js +14 -0
- package/dist/shared/package-json.js +61 -0
- package/dist/shared/package-roots.js +0 -8
- package/dist/shared/protected-paths.js +5 -122
- package/dist/shared/settings.js +18 -1
- package/dist/shared/timeouts.js +6 -0
- package/package.json +21 -17
- package/.bkit/core/.agents/shortcuts.md +0 -73
|
@@ -11,8 +11,11 @@
|
|
|
11
11
|
{
|
|
12
12
|
$schema: "https://docs.renovatebot.com/renovate-schema.json",
|
|
13
13
|
|
|
14
|
-
// `config:
|
|
15
|
-
//
|
|
14
|
+
// `config:best-practices` is Renovate's curated baseline: `config:recommended` plus
|
|
15
|
+
// digest pinning for Docker images and GitHub Actions, exact-version pinning of
|
|
16
|
+
// devDependencies, config-migration PRs, an abandoned-packages section on the
|
|
17
|
+
// dashboard, and a 3-day npm release-age gate (raised to 7 days in the first
|
|
18
|
+
// packageRule below). Repo-specific rules go in this file.
|
|
16
19
|
// A `local>` preset with no `#` is read from the default branch. `useBaseBranchConfig`
|
|
17
20
|
// does not change that fetch. Append the branch `baseBranchPatterns` names — a branch
|
|
18
21
|
// after `#` works (branch, tag, or commit SHA):
|
|
@@ -20,7 +23,7 @@
|
|
|
20
23
|
// The `extends` line itself is still read from the default branch, so `#dev` needs
|
|
21
24
|
// one merge there before edits on `dev` apply.
|
|
22
25
|
extends: [
|
|
23
|
-
"config:
|
|
26
|
+
"config:best-practices",
|
|
24
27
|
":dependencyDashboard",
|
|
25
28
|
],
|
|
26
29
|
|
|
@@ -67,23 +70,40 @@
|
|
|
67
70
|
minimumReleaseAge: "7 days",
|
|
68
71
|
|
|
69
72
|
// Lockfile maintenance — picks up indirect-dependency updates that a
|
|
70
|
-
// direct-dependency bump alone wouldn't catch.
|
|
73
|
+
// direct-dependency bump alone wouldn't catch. Monthly: it rewrites the whole
|
|
74
|
+
// lockfile, so a weekly PR is mostly churn.
|
|
71
75
|
lockFileMaintenance: {
|
|
72
76
|
enabled: true,
|
|
73
|
-
schedule: ["before 6am on
|
|
77
|
+
schedule: ["before 6am on the first day of the month"],
|
|
74
78
|
},
|
|
75
79
|
|
|
76
|
-
//
|
|
80
|
+
// Rebase a Renovate PR only when it conflicts. The default re-bases every open PR
|
|
81
|
+
// each time the base branch moves, which re-runs CI on PRs that auto-merge.
|
|
82
|
+
rebaseWhen: "conflicted",
|
|
83
|
+
|
|
84
|
+
// A repo-level `ignorePaths` REPLACES the list from `:ignoreModulesAndTests`
|
|
85
|
+
// (pulled in by `config:best-practices`), so that preset's entries are repeated
|
|
86
|
+
// here. `docs/plans/**` holds archived plans and spike code, never live
|
|
87
|
+
// dependencies. `**/tests/**` and `**/__fixtures__/**` hold fixture manifests.
|
|
77
88
|
// `.bkit/templates/**` and `.agents/skills/**` are bkit-owned and stay out of
|
|
78
89
|
// the scan. To keep Renovate off a file entirely, list it here:
|
|
79
90
|
// a packageRule `enabled: false` suppresses version bumps, but the github-actions
|
|
80
91
|
// manager still scans the file and applies tag->SHA pinDigests. Workflows you
|
|
81
|
-
// copied from `.bkit/templates/` (bkit-ci.yml, bkit-cloud.yml, bkit-renovate.yml
|
|
92
|
+
// copied from `.bkit/templates/` (bkit-ci.yml, bkit-cloud.yml, bkit-renovate.yml,
|
|
93
|
+
// bkit-trivy.yml) are yours —
|
|
82
94
|
// leave them out of ignorePaths so their action pins refresh.
|
|
83
95
|
ignorePaths: [
|
|
84
96
|
"**/node_modules/**",
|
|
97
|
+
"**/bower_components/**",
|
|
98
|
+
"**/vendor/**",
|
|
99
|
+
"**/examples/**",
|
|
100
|
+
"**/__tests__/**",
|
|
101
|
+
"**/test/**",
|
|
102
|
+
"**/tests/**",
|
|
103
|
+
"**/__fixtures__/**",
|
|
85
104
|
"**/dist/**",
|
|
86
105
|
"**/build/**",
|
|
106
|
+
"docs/plans/**",
|
|
87
107
|
".bkit/templates/**",
|
|
88
108
|
".agents/skills/**",
|
|
89
109
|
],
|
|
@@ -92,7 +112,62 @@
|
|
|
92
112
|
prConcurrentLimit: 10,
|
|
93
113
|
prHourlyLimit: 4,
|
|
94
114
|
|
|
115
|
+
// ─────────────────────────────────────────────────────────────────────
|
|
116
|
+
// Pinned CLIs and tools that live in no package manifest. A comment line
|
|
117
|
+
// # renovate: datasource=<datasource> depName=<name> [packageName=<n>] [versioning=<v>] [extractVersion=<regex>]
|
|
118
|
+
// directly above the pin tells Renovate what to look up. Forms matched:
|
|
119
|
+
// ARG NODE_VERSION=24.11.0 · GH_VERSION="2.83.0" (Dockerfile / shell)
|
|
120
|
+
// VALE_VERSION: "3.9.1" · renovate-version: "44.x.y" (workflow env / `with:` input)
|
|
121
|
+
// GRAPHIFY_SPEC="graphifyy[sql]==0.9.50" (pip spec in bkit-graphify.sh: value after `==`)
|
|
122
|
+
// npm install -g @opencode/cli@2.0.26 (npm global install)
|
|
123
|
+
// bash "$RUNNER_TEMP/download-actionlint.bash" 1.7.12 (installer-script version argument)
|
|
124
|
+
// Pins paired with a checksum (Vale, gh, jq, Node, actionlint) get the new VERSION
|
|
125
|
+
// from Renovate, but the sha256 beside it stays old: update it by hand in the same
|
|
126
|
+
// PR, or the install fails closed. See the NOTE in the docker images rule below.
|
|
127
|
+
// ─────────────────────────────────────────────────────────────────────
|
|
128
|
+
customManagers: [
|
|
129
|
+
{
|
|
130
|
+
customType: "regex",
|
|
131
|
+
managerFilePatterns: [
|
|
132
|
+
"/(^|/)Dockerfile$/",
|
|
133
|
+
"/(^|/)\\.claude/bkit-cloud\\.md$/",
|
|
134
|
+
"/(^|/)\\.github/workflows/[^/]+\\.ya?ml$/",
|
|
135
|
+
"/(^|/)scripts/graphify/bkit-graphify\\.sh$/",
|
|
136
|
+
],
|
|
137
|
+
matchStrings: [
|
|
138
|
+
"# renovate: datasource=(?<datasource>[a-zA-Z0-9-._]+?) depName=(?<depName>\\S+?)(?: packageName=(?<packageName>\\S+?))?(?: versioning=(?<versioning>\\S+?))?(?: extractVersion=(?<extractVersion>\\S+?))?\\s+(?:(?:ARG|export)\\s+)?[\\w-]*(?:VERSION|version)[=:]\\s*\"?(?<currentValue>[^\"\\s]+)\"?",
|
|
139
|
+
"# renovate: datasource=(?<datasource>[a-zA-Z0-9-._]+?) depName=(?<depName>\\S+?)(?: packageName=(?<packageName>\\S+?))?(?: versioning=(?<versioning>\\S+?))?(?: extractVersion=(?<extractVersion>\\S+?))?\\s+\\w*_SPEC[=:]\\s*\"[^\"=\\s]+==(?<currentValue>[^\"\\s]+)\"",
|
|
140
|
+
"# renovate: datasource=(?<datasource>[a-zA-Z0-9-._]+?) depName=(?<depName>\\S+?)(?: packageName=(?<packageName>\\S+?))?(?: versioning=(?<versioning>\\S+?))?(?: extractVersion=(?<extractVersion>\\S+?))?\\s+npm install -g \\S+@(?<currentValue>[^\\s\"]+)",
|
|
141
|
+
"# renovate: datasource=(?<datasource>[a-zA-Z0-9-._]+?) depName=(?<depName>\\S+?)(?: packageName=(?<packageName>\\S+?))?(?: versioning=(?<versioning>\\S+?))?(?: extractVersion=(?<extractVersion>\\S+?))?\\s+bash \"[^\"]+\" (?<currentValue>[0-9][^\\s\"]*)",
|
|
142
|
+
],
|
|
143
|
+
},
|
|
144
|
+
],
|
|
145
|
+
|
|
95
146
|
packageRules: [
|
|
147
|
+
// ─────────────────────────────────────────────────────────────────────
|
|
148
|
+
// `config:best-practices` sets a 3-day npm release-age gate as a packageRule,
|
|
149
|
+
// which beats the root-level `minimumReleaseAge: "7 days"` for npm packages.
|
|
150
|
+
// This rule restores 7 days. Rules in this file are applied after the preset's
|
|
151
|
+
// rules, so it wins; the preset's `internalChecksFilter: "strict"` stays on.
|
|
152
|
+
// ─────────────────────────────────────────────────────────────────────
|
|
153
|
+
{
|
|
154
|
+
matchDatasources: ["npm"],
|
|
155
|
+
minimumReleaseAge: "7 days",
|
|
156
|
+
},
|
|
157
|
+
|
|
158
|
+
// ─────────────────────────────────────────────────────────────────────
|
|
159
|
+
// `renovate-version` in bkit-renovate.yml. Renovate's github-actions manager
|
|
160
|
+
// finds it as a Docker image (ghcr.io/renovatebot/renovate), but ghcr.io tags
|
|
161
|
+
// carry no publish date, so `minimumReleaseAge` would hold every update as
|
|
162
|
+
// "pending" forever. That lookup is switched off; the `customManagers` entry
|
|
163
|
+
// below reads the same line through GitHub releases, which are dated.
|
|
164
|
+
// ─────────────────────────────────────────────────────────────────────
|
|
165
|
+
{
|
|
166
|
+
matchManagers: ["github-actions"],
|
|
167
|
+
matchDepNames: ["ghcr.io/renovatebot/renovate"],
|
|
168
|
+
enabled: false,
|
|
169
|
+
},
|
|
170
|
+
|
|
96
171
|
// ─────────────────────────────────────────────────────────────────────
|
|
97
172
|
// The bkit package itself — Renovate does not bump it.
|
|
98
173
|
// Upgrade with `pnpm bkit upgrade --latest`, which bumps the pin and
|
|
@@ -111,7 +186,8 @@
|
|
|
111
186
|
{
|
|
112
187
|
matchManagers: ["npm"],
|
|
113
188
|
matchUpdateTypes: ["minor", "patch"],
|
|
114
|
-
|
|
189
|
+
// `packageManager` is the pnpm pin in package.json; its bumps join the group.
|
|
190
|
+
matchDepTypes: ["devDependencies", "packageManager"],
|
|
115
191
|
groupName: "non-major dependencies",
|
|
116
192
|
automerge: true,
|
|
117
193
|
automergeType: "pr",
|
|
@@ -136,10 +212,12 @@
|
|
|
136
212
|
automerge: false,
|
|
137
213
|
},
|
|
138
214
|
|
|
139
|
-
// Major bumps — always separate, never auto-merged
|
|
215
|
+
// Major bumps — always separate, never auto-merged, and held until you tick
|
|
216
|
+
// the update on the Dependency Dashboard issue (no branch, PR or CI run before).
|
|
140
217
|
{
|
|
141
218
|
matchUpdateTypes: ["major"],
|
|
142
219
|
automerge: false,
|
|
220
|
+
dependencyDashboardApproval: true,
|
|
143
221
|
labels: ["dep-major"],
|
|
144
222
|
},
|
|
145
223
|
|
|
@@ -206,9 +284,10 @@
|
|
|
206
284
|
// comment, or the dockerfile manager can't map the digest to its tag.
|
|
207
285
|
// Reviewed manually.
|
|
208
286
|
// NOTE: version+checksum-paired installer fetches (e.g. the Vale tarball
|
|
209
|
-
// sha256, the pinned actionlint download-script SHA in bkit-ci.yml) are
|
|
210
|
-
// Renovate-managed —
|
|
211
|
-
//
|
|
287
|
+
// sha256, the pinned actionlint download-script SHA in bkit-ci.yml) are only
|
|
288
|
+
// half Renovate-managed — the `customManagers` entry below bumps the version
|
|
289
|
+
// but cannot recompute a tarball checksum — so update those version+sha pairs
|
|
290
|
+
// by hand in the same PR. See docs/deployments.md § GitHub Actions pinning.
|
|
212
291
|
// ─────────────────────────────────────────────────────────────────────
|
|
213
292
|
{
|
|
214
293
|
matchManagers: ["dockerfile"],
|
|
@@ -30,7 +30,7 @@ concurrency:
|
|
|
30
30
|
|
|
31
31
|
jobs:
|
|
32
32
|
# ── bkit-tests-static ────────────────────────────────────────────────────
|
|
33
|
-
# Static-analysis lane: typecheck, format, prose lint, slop, actionlint,
|
|
33
|
+
# Static-analysis lane: typecheck, lint, format, prose lint, slop, actionlint,
|
|
34
34
|
# bkit check. Runs on a CLEAN tree (no test artifacts). Parallel sibling of
|
|
35
35
|
# bkit-tests-unit — wall-clock = MAX(lane).
|
|
36
36
|
bkit-tests-static:
|
|
@@ -64,13 +64,13 @@ jobs:
|
|
|
64
64
|
# Node/TS toolchain region. On a non-Node repo, replace these steps with your
|
|
65
65
|
# stack's setup / install commands (and the typecheck / lint / test steps below with
|
|
66
66
|
# its own). Replace `{{NODE_VERSION}}` with your Node major (`.bkit/templates.md`).
|
|
67
|
-
- uses: actions/setup-node@
|
|
67
|
+
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
|
68
68
|
with:
|
|
69
69
|
node-version: {{NODE_VERSION}}
|
|
70
70
|
|
|
71
71
|
# Pnpm version is resolved from the consumer's package.json#packageManager (single SoT).
|
|
72
72
|
# Do NOT add `with: version:` here — pnpm/action-setup errors when both are set.
|
|
73
|
-
- uses: pnpm/action-setup@
|
|
73
|
+
- uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
|
|
74
74
|
|
|
75
75
|
# Under [verbose ci]: propagate DEBUG to all subsequent steps via $GITHUB_ENV. Note
|
|
76
76
|
# that steps with their own `env:` block override $GITHUB_ENV — those steps must
|
|
@@ -212,7 +212,7 @@ jobs:
|
|
|
212
212
|
# Static checks first — they read the source tree and must scan it CLEAN.
|
|
213
213
|
# Vitest/build run AFTER (below): they write coverage, dist/, and other
|
|
214
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
|
|
215
|
+
# Keep this group (typecheck → lint → prettier → vale → slop → bkit check) ahead of
|
|
216
216
|
# the test/build group if you reorder.
|
|
217
217
|
- name: Run Typecheck
|
|
218
218
|
if: steps.cache.outputs.skip != 'true'
|
|
@@ -220,6 +220,12 @@ jobs:
|
|
|
220
220
|
TURBO_FORCE: ${{ steps.detect.outputs.turbo_force }}
|
|
221
221
|
run: pnpm typecheck
|
|
222
222
|
|
|
223
|
+
- name: Run Lint
|
|
224
|
+
if: steps.cache.outputs.skip != 'true'
|
|
225
|
+
env:
|
|
226
|
+
TURBO_FORCE: ${{ steps.detect.outputs.turbo_force }}
|
|
227
|
+
run: pnpm lint
|
|
228
|
+
|
|
223
229
|
- name: Run Prettier
|
|
224
230
|
if: steps.cache.outputs.skip != 'true'
|
|
225
231
|
env:
|
|
@@ -232,6 +238,7 @@ jobs:
|
|
|
232
238
|
- name: Install Vale
|
|
233
239
|
if: steps.cache.outputs.skip != 'true'
|
|
234
240
|
env:
|
|
241
|
+
# renovate: datasource=github-releases depName=errata-ai/vale
|
|
235
242
|
VALE_VERSION: "3.9.1"
|
|
236
243
|
# sha256 of vale_${VALE_VERSION}_Linux_64-bit.tar.gz (from the release's checksums.txt).
|
|
237
244
|
# Bump alongside VALE_VERSION; verified before extract so a tampered/CDN-swapped tarball fails closed.
|
|
@@ -276,6 +283,7 @@ jobs:
|
|
|
276
283
|
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
284
|
# download-actionlint.bash fetches the binary from GitHub releases — retry to survive a transient CDN/network blip.
|
|
278
285
|
for i in 1 2 3; do
|
|
286
|
+
# renovate: datasource=github-releases depName=rhysd/actionlint
|
|
279
287
|
bash "$RUNNER_TEMP/download-actionlint.bash" 1.7.12 "$RUNNER_TEMP" && break
|
|
280
288
|
[ "$i" = 3 ] && { echo "::error::actionlint download failed after 3 attempts"; exit 1; }
|
|
281
289
|
echo "::warning::actionlint download attempt $i failed — retrying in 5s"; sleep 5
|
|
@@ -298,22 +306,21 @@ jobs:
|
|
|
298
306
|
# docs/capabilities.md is not what this tree produces, so the register cannot drift
|
|
299
307
|
# silently. Self-skips when the graphify wrapper is absent — a repo that did not adopt
|
|
300
308
|
# scripts/graphify/ is a no-op. graphify is pinned because its output must match the
|
|
301
|
-
# committed register to the byte: bump GRAPHIFY_SPEC and refresh the register together.
|
|
309
|
+
# committed register to the byte: bump GRAPHIFY_SPEC (bkit-graphify.sh) and refresh the register together.
|
|
302
310
|
# Push events only — a pull_request checkout is the MERGE ref, whose tree (base + head)
|
|
303
311
|
# can differ from the head the register was built against: a false red no author can clear.
|
|
304
312
|
- name: Setup uv
|
|
305
313
|
if: steps.cache.outputs.skip != 'true' && github.event_name == 'push' && hashFiles('scripts/graphify/bkit-graphify.sh') != ''
|
|
306
314
|
uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
|
|
307
315
|
with:
|
|
308
|
-
version: "0.
|
|
316
|
+
version: "0.13.0"
|
|
309
317
|
|
|
310
318
|
- name: Check Capability Register
|
|
311
319
|
if: steps.cache.outputs.skip != 'true' && github.event_name == 'push' && hashFiles('scripts/graphify/bkit-graphify.sh') != ''
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
GRAPHIFY_SPEC: "graphifyy[sql]==0.9.50"
|
|
320
|
+
# graphify release pinned once: GRAPHIFY_SPEC in bkit-graphify.sh. Same release here,
|
|
321
|
+
# in the pre-push gate and by hand.
|
|
315
322
|
run: |
|
|
316
|
-
uv tool install "$
|
|
323
|
+
uv tool install "$(bash scripts/graphify/bkit-graphify.sh spec)"
|
|
317
324
|
# `uv tool install` drops the shim in ~/.local/bin, not on this step's PATH.
|
|
318
325
|
export PATH="$HOME/.local/bin:$PATH"
|
|
319
326
|
pnpm graph:check
|
|
@@ -341,11 +348,11 @@ jobs:
|
|
|
341
348
|
# Full history needed for E2E / supabase stubs when enabled.
|
|
342
349
|
fetch-depth: 0
|
|
343
350
|
|
|
344
|
-
- uses: actions/setup-node@
|
|
351
|
+
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
|
345
352
|
with:
|
|
346
353
|
node-version: {{NODE_VERSION}}
|
|
347
354
|
|
|
348
|
-
- uses: pnpm/action-setup@
|
|
355
|
+
- uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
|
|
349
356
|
|
|
350
357
|
# NODE_OPTIONS is a job-level `env:` key above, never a $GITHUB_ENV write — the runner
|
|
351
358
|
# rejects that write and still reports success. See bkit-tests-static's block comment.
|
|
@@ -502,7 +509,7 @@ jobs:
|
|
|
502
509
|
echo "::warning::test:integration script not found in package.json — skipping integration tests"
|
|
503
510
|
fi
|
|
504
511
|
|
|
505
|
-
# 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.
|
|
512
|
+
# bkit-stub:coverage — Report vitest coverage on PRs and in every run's job summary 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.
|
|
506
513
|
# 1. devDep + config. Add `@vitest/coverage-v8` (pin to your vitest major) and a coverage block in vitest.config:
|
|
507
514
|
# coverage: {
|
|
508
515
|
# provider: 'v8',
|
|
@@ -516,12 +523,20 @@ jobs:
|
|
|
516
523
|
# Wire these into the "Run Unit Tests" step(s) above (or your test / test:integration scripts). Separate dirs
|
|
517
524
|
# also avoid the clobber a second same-dir --coverage run would cause (last-writer-wins, not a merge).
|
|
518
525
|
# 3. Thresholds (opt-in) live PER TIER, never merged:
|
|
519
|
-
# UNIT = the gate.
|
|
520
|
-
#
|
|
521
|
-
#
|
|
522
|
-
#
|
|
523
|
-
#
|
|
524
|
-
#
|
|
526
|
+
# UNIT = the gate. Put coverage.thresholds.branches in a vitest.unit.config.ts that ONLY your unit run loads
|
|
527
|
+
# (`vitest run -c vitest.unit.config.ts --coverage …`); branches is the meaningful floor (line/statement
|
|
528
|
+
# % overstates confidence). Set it to your CURRENT coverage and ratchet up:
|
|
529
|
+
# import { defineConfig, mergeConfig } from 'vitest/config'
|
|
530
|
+
# import base from './vitest.config'
|
|
531
|
+
# export default mergeConfig(base, defineConfig({ test: { coverage: { thresholds: {
|
|
532
|
+
# branches: 70,
|
|
533
|
+
# } } } }))
|
|
534
|
+
# vitest coverage is per-RUN (root config), NOT per-project — `projects` does NOT scope it, and a
|
|
535
|
+
# `thresholds` block in vitest.config reds BOTH runs. One file feeds both readers: vitest gates on it,
|
|
536
|
+
# and the Report Unit Coverage step's vite-config-path shows it as the 🎯 target. The action reads
|
|
537
|
+
# that file as raw TEXT and regex-matches `<metric>: <number>`: keep the floor on one unquoted line
|
|
538
|
+
# and write no other metric name + colon + number in the file, or the target silently goes wrong.
|
|
539
|
+
# A --coverage.thresholds.branches=<n> CLI flag also gates, but the report cannot read it.
|
|
525
540
|
# INTEGRATION = REPORT-ONLY, no threshold. Gate integration on EXECUTION (the capstone's integration_ran > 0),
|
|
526
541
|
# not a %: a whole-repo integration % is denominator-noise (it covers boundaries/flows, not pure logic,
|
|
527
542
|
# and rarely drives every branch). For a real integration %, add --coverage.include='src/server/**'
|
|
@@ -537,26 +552,32 @@ jobs:
|
|
|
537
552
|
# integration as its OWN lane (bkit-tests-integration — the shape bkit's own CI + consumer repos run; see the
|
|
538
553
|
# FULL CI SCAFFOLD REFERENCE below), move the integration coverage run + its Report step + a pull-requests: write
|
|
539
554
|
# permissions block into THAT lane instead. Each lane posts its own comment; the distinct name: keeps them apart.
|
|
540
|
-
# Fork PRs: GITHUB_TOKEN is read-only for PRs from a fork, so
|
|
541
|
-
#
|
|
555
|
+
# Fork PRs: GITHUB_TOKEN is read-only for PRs from a fork, so commenting fails — the unit step sets comment-on: none
|
|
556
|
+
# there (its job summary still lands) and the integration step's head.repo == repo guard skips it (or adopt the
|
|
557
|
+
# action's workflow_run two-workflow pattern to comment on forks).
|
|
542
558
|
# Monorepo: set working-directory so the action finds the right report. Base-branch delta (up/down vs the default
|
|
543
559
|
# branch) needs the base's coverage-summary.json — see the action's json-summary-compare-path input (optional).
|
|
544
560
|
# The action is SHA-pinned to a commit (# vX.Y.Z comment) per best practice; your updater (Renovate/Dependabot,
|
|
545
561
|
# github-actions ecosystem) keeps the pin current — refresh the SHA if you enable this on a newer release.
|
|
546
562
|
# A distinct name: keys each sticky comment so the two do not collide.
|
|
547
|
-
# - name: Report Unit Coverage
|
|
548
|
-
#
|
|
549
|
-
#
|
|
563
|
+
# - name: Report Unit Coverage
|
|
564
|
+
# # Every event, including a red unit run (reportOnFailure keeps the summary): writes the coverage table, with
|
|
565
|
+
# # the floor as its target, to the job summary; comments on same-repo PRs only. No floor yet → drop
|
|
566
|
+
# # vite-config-path (a missing file only warns, on every run).
|
|
567
|
+
# if: ${{ !cancelled() && steps.cache.outputs.skip != 'true' && hashFiles('coverage/unit/coverage-summary.json') != '' }}
|
|
568
|
+
# uses: davelosert/vitest-coverage-report-action@c4bbc33a89b7ace0e63d35f1f7d4bcee31155a73 # v2.13.0
|
|
550
569
|
# with:
|
|
551
570
|
# name: unit
|
|
552
571
|
# json-summary-path: coverage/unit/coverage-summary.json
|
|
553
572
|
# json-final-path: coverage/unit/coverage-final.json
|
|
573
|
+
# vite-config-path: vitest.unit.config.ts # the file the floor lives in
|
|
554
574
|
# file-coverage-mode: changes # per-file table limited to files changed in the PR
|
|
575
|
+
# comment-on: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) && 'pr' || 'none' }}
|
|
555
576
|
# github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
556
577
|
# - name: Report Integration Coverage on PR
|
|
557
578
|
# # hashFiles guard: skip cleanly when the repo has no integration tier (no coverage/integration report produced).
|
|
558
579
|
# 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') != ''
|
|
559
|
-
# uses: davelosert/vitest-coverage-report-action@
|
|
580
|
+
# uses: davelosert/vitest-coverage-report-action@c4bbc33a89b7ace0e63d35f1f7d4bcee31155a73 # v2.13.0
|
|
560
581
|
# with:
|
|
561
582
|
# name: integration
|
|
562
583
|
# json-summary-path: coverage/integration/coverage-summary.json
|
|
@@ -648,7 +669,7 @@ jobs:
|
|
|
648
669
|
# - name: Report E2E Coverage on PR
|
|
649
670
|
# # Same gate as Run E2E Tests (coverage exists only if E2E ran); hashFiles skips repos that produced no E2E report.
|
|
650
671
|
# 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') != ''
|
|
651
|
-
# uses: davelosert/vitest-coverage-report-action@
|
|
672
|
+
# uses: davelosert/vitest-coverage-report-action@c4bbc33a89b7ace0e63d35f1f7d4bcee31155a73 # v2.13.0
|
|
652
673
|
# with:
|
|
653
674
|
# name: e2e
|
|
654
675
|
# json-summary-path: coverage/e2e/coverage-summary.json
|
|
@@ -682,47 +703,39 @@ jobs:
|
|
|
682
703
|
# always(): a concurrency cancel must not stamp a failure. Each lane must succeed; a failed,
|
|
683
704
|
# skipped or cancelled lane reds it. A lane that writes an executed-test count must have run
|
|
684
705
|
# more than 0 tests. Each lane you adopt from the reference below joins needs: and the assert.
|
|
706
|
+
# The assert is scripts/ci/check-capstone.mjs, required with this file (copy it from
|
|
707
|
+
# .bkit/templates/scripts/ci/); the step reds when the script is missing.
|
|
685
708
|
bkit-tests-check:
|
|
686
709
|
needs: [bkit-tests-static, bkit-tests-unit]
|
|
687
710
|
if: ${{ !cancelled() }}
|
|
688
711
|
runs-on: ubuntu-latest
|
|
689
712
|
timeout-minutes: 2
|
|
690
713
|
steps:
|
|
714
|
+
# Ungated checkout, never continue-on-error: it fetches the script below. A checkout
|
|
715
|
+
# gated on a plan value leaves some runs with no script, and the required check then
|
|
716
|
+
# exits on "cannot find module" instead of judging the lanes.
|
|
717
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
718
|
+
|
|
691
719
|
- name: Assert Lanes Passed
|
|
720
|
+
# The verdict is scripts/ci/check-capstone.mjs (copy it with this file from
|
|
721
|
+
# .bkit/templates/scripts/ci/; check-capstone.test.mjs tests it). Every lane in LANES
|
|
722
|
+
# must succeed; a lane with a *_RAN variable must have run more than 0 tests unless
|
|
723
|
+
# cache_skip=true. EMPTY_COUNT=warn: a lane that writes no count yet warns instead of
|
|
724
|
+
# failing; delete it once every counted lane writes one. Add each lane you adopt to
|
|
725
|
+
# LANES and to its *_RESULT / *_RAN / *_CACHE_SKIP variables.
|
|
692
726
|
env:
|
|
727
|
+
LANES: static,unit
|
|
728
|
+
EMPTY_COUNT: warn
|
|
693
729
|
STATIC_RESULT: ${{ needs.bkit-tests-static.result }}
|
|
694
730
|
UNIT_RESULT: ${{ needs.bkit-tests-unit.result }}
|
|
695
731
|
UNIT_RAN: ${{ needs.bkit-tests-unit.outputs.tests_ran }}
|
|
696
732
|
UNIT_CACHE_SKIP: ${{ needs.bkit-tests-unit.outputs.cache_skip }}
|
|
697
733
|
run: |
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
echo "::error::bkit-tests-static result=$STATIC_RESULT (expected success)"
|
|
701
|
-
FAIL=1
|
|
702
|
-
fi
|
|
703
|
-
if [ "$UNIT_RESULT" != "success" ]; then
|
|
704
|
-
echo "::error::bkit-tests-unit result=$UNIT_RESULT (expected success)"
|
|
705
|
-
FAIL=1
|
|
706
|
-
fi
|
|
707
|
-
# NON-HOLLOW: a real run (not a SHA-cache short-circuit) of a lane that writes a count
|
|
708
|
-
# must have executed >0 tests. An empty count is a lane that writes none yet.
|
|
709
|
-
if [ "$UNIT_RESULT" = "success" ] && [ "$UNIT_CACHE_SKIP" != "true" ]; then
|
|
710
|
-
case "$UNIT_RAN" in
|
|
711
|
-
'')
|
|
712
|
-
echo "::warning::bkit-tests-unit writes no executed-test count — green does not prove tests ran (see its Run Unit Tests step)." ;;
|
|
713
|
-
*[!0-9]*)
|
|
714
|
-
echo "::error::bkit-tests-unit executed-test count is non-numeric ('$UNIT_RAN')."
|
|
715
|
-
FAIL=1 ;;
|
|
716
|
-
0)
|
|
717
|
-
echo "::error::bkit-tests-unit succeeded but executed 0 tests — vacuous green."
|
|
718
|
-
FAIL=1 ;;
|
|
719
|
-
esac
|
|
720
|
-
fi
|
|
721
|
-
if [ "$FAIL" = "1" ]; then
|
|
722
|
-
echo "::error::bkit-tests-check FAILED — see above."
|
|
734
|
+
if [ ! -f scripts/ci/check-capstone.mjs ]; then
|
|
735
|
+
echo "::error::scripts/ci/check-capstone.mjs is missing. Copy it from .bkit/templates/scripts/ci/ into scripts/ci/; without it bkit-tests-check cannot tell a green lane from a lane that ran no tests."
|
|
723
736
|
exit 1
|
|
724
737
|
fi
|
|
725
|
-
|
|
738
|
+
node scripts/ci/check-capstone.mjs
|
|
726
739
|
|
|
727
740
|
# 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.
|
|
728
741
|
# name: Smoke
|
|
@@ -889,7 +902,7 @@ jobs:
|
|
|
889
902
|
# # docs/testing.md § Schema-invariant DB checks.
|
|
890
903
|
# - name: Run DB Tests (pgTAP) # [DB] if: schema invariants matter; runs supabase/tests/*.sql
|
|
891
904
|
# - name: Run Unit Tests # [U] the one tier every repo has (source CI_ENV_FILE if needed)
|
|
892
|
-
# - name: Report Coverage
|
|
905
|
+
# - name: Report Coverage # [U/PR] bkit-stub:coverage — davelosert/vitest-coverage-report-action posts a per-tier coverage comment (distinct name: unit|integration|e2e); the unit report also writes its table, with the floor as target, to the job summary on every event. 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.
|
|
893
906
|
# - name: Build All Packages # moves to bkit-tests-build-web. Not this catalogue.
|
|
894
907
|
# - name: Run Integration Tests # moves to bkit-tests-integration. Not this catalogue.
|
|
895
908
|
# - name: Check Stale Test Data # [DB] continue-on-error. Lives in the lane that touches the shared resource.
|
|
@@ -476,6 +476,7 @@ jobs:
|
|
|
476
476
|
# SHA mirror bkit-ci.yml.
|
|
477
477
|
- name: Install vale
|
|
478
478
|
env:
|
|
479
|
+
# renovate: datasource=github-releases depName=errata-ai/vale
|
|
479
480
|
VALE_VERSION: "3.9.1"
|
|
480
481
|
VALE_SHA256: "fbc2eb47d0b8c50220ed1a2c5c611fbe0904ed567d638143d482016a18fd2db0"
|
|
481
482
|
run: |
|
|
@@ -490,7 +491,7 @@ jobs:
|
|
|
490
491
|
git config user.email 'bkit-auto@users.noreply.github.com'
|
|
491
492
|
|
|
492
493
|
- name: Dispatch /bkit-auto on Claude Code runner
|
|
493
|
-
uses: anthropics/claude-code-action@
|
|
494
|
+
uses: anthropics/claude-code-action@1d6de8cb0c237e7c15e9e1bdf973826ebae490cc # v1.0.248
|
|
494
495
|
with:
|
|
495
496
|
# Orchestrator contract: `/bkit-auto <phase> <arg>` where <arg> is the open
|
|
496
497
|
# PR number (ship/debug) or the tracker issue number/id (design/plan/build).
|
|
@@ -542,6 +543,7 @@ jobs:
|
|
|
542
543
|
# is v1.19.0), so the curl installer (https://opencode.ai/install downloads GitHub
|
|
543
544
|
# release binaries) cannot fetch 2.0.26. npm's postinstall selects the runner's
|
|
544
545
|
# platform binary.
|
|
546
|
+
# renovate: datasource=npm depName=@opencode/cli
|
|
545
547
|
npm install -g @opencode/cli@2.0.26
|
|
546
548
|
echo "$(npm prefix -g)/bin" >> "$GITHUB_PATH"
|
|
547
549
|
|
|
@@ -65,7 +65,7 @@ jobs:
|
|
|
65
65
|
# app-id: ${{ secrets.RENOVATE_APP_ID }}
|
|
66
66
|
# private-key: ${{ secrets.RENOVATE_APP_PRIVATE_KEY }}
|
|
67
67
|
# then set `token: ${{ steps.app-token.outputs.token }}` below.
|
|
68
|
-
- uses: renovatebot/github-action@
|
|
68
|
+
- uses: renovatebot/github-action@230ce922b08968d0a4f6f70f295601daff09ef1d # v46.3.7
|
|
69
69
|
with:
|
|
70
70
|
# PAT secret (default). FINE-GRAINED repository permissions (this repo):
|
|
71
71
|
# Contents: Read and write · Pull requests: Read and write ·
|
|
@@ -78,6 +78,13 @@ jobs:
|
|
|
78
78
|
# lets Renovate use your verified email as the git author — org-owned tokens have no
|
|
79
79
|
# such permission, so set RENOVATE_GIT_AUTHOR below instead.)
|
|
80
80
|
token: ${{ secrets.BKIT_GH_TOKEN }}
|
|
81
|
+
# Exact Renovate image tag. Unset, the action runs the floating `renovate:<major>`
|
|
82
|
+
# tag, which can sit a major behind the latest. renovate.json5 `customManagers`
|
|
83
|
+
# reads the comment below and opens a PR when a newer release lands. The lookup
|
|
84
|
+
# uses GitHub releases (they carry publish dates, so `minimumReleaseAge` applies);
|
|
85
|
+
# the image tags on ghcr.io carry none.
|
|
86
|
+
# renovate: datasource=github-releases depName=renovatebot/renovate
|
|
87
|
+
renovate-version: "44.151.0"
|
|
81
88
|
env:
|
|
82
89
|
# Scope to THIS repo only — never org-wide autodiscover.
|
|
83
90
|
RENOVATE_REPOSITORIES: ${{ github.repository }}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Example Trivy scan. Copy it to `.github/workflows/bkit-trivy.yml` and own it.
|
|
2
|
+
# bkit install does not write this file and does not overwrite a copy.
|
|
3
|
+
#
|
|
4
|
+
# Fails on a HIGH or CRITICAL finding in any lockfile (every language Trivy reads), in
|
|
5
|
+
# config files (Dockerfile, Terraform, Kubernetes, Helm, CloudFormation) and in secrets
|
|
6
|
+
# committed to tracked files. Accept a finding in `.trivyignore.yaml`, each entry with a
|
|
7
|
+
# `statement` (why) and an `expired_at` (when it comes back). See
|
|
8
|
+
# `.bkit/templates.md` § Trivy.
|
|
9
|
+
#
|
|
10
|
+
# Runs the official image pinned by tag AND digest. Never reference
|
|
11
|
+
# `aquasecurity/trivy-action` or `setup-trivy` by tag: in March 2026 their tags were
|
|
12
|
+
# re-pointed at a credential stealer. This file is yours, so Renovate bumps the tag and
|
|
13
|
+
# digest together. Do NOT add this path to renovate.json5 `ignorePaths`.
|
|
14
|
+
name: Trivy
|
|
15
|
+
|
|
16
|
+
on:
|
|
17
|
+
workflow_dispatch:
|
|
18
|
+
push:
|
|
19
|
+
branches: [{{DEFAULT_BRANCH}}, dev]
|
|
20
|
+
pull_request:
|
|
21
|
+
branches: [{{DEFAULT_BRANCH}}, dev]
|
|
22
|
+
schedule:
|
|
23
|
+
# New advisories land without a code change; the daily run catches them.
|
|
24
|
+
- cron: "41 5 * * *"
|
|
25
|
+
|
|
26
|
+
# The scan reads the checkout and needs no secret and no write scope.
|
|
27
|
+
permissions:
|
|
28
|
+
contents: read
|
|
29
|
+
|
|
30
|
+
concurrency:
|
|
31
|
+
group: trivy-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.pull_request.number) || github.ref }}
|
|
32
|
+
cancel-in-progress: true
|
|
33
|
+
|
|
34
|
+
jobs:
|
|
35
|
+
trivy:
|
|
36
|
+
runs-on: ubuntu-latest # Edit this label in your copy.
|
|
37
|
+
timeout-minutes: 15
|
|
38
|
+
steps:
|
|
39
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
40
|
+
with:
|
|
41
|
+
persist-credentials: false
|
|
42
|
+
|
|
43
|
+
# `scripts/ci/check-dependency-audit.mjs` (bkit-ci.yml `Check Dependency Audit`)
|
|
44
|
+
# already gates pnpm-lock.yaml against `accepted-advisories.json`; scanning it here
|
|
45
|
+
# too would need every acceptance twice. Without that gate, Trivy owns the lockfile.
|
|
46
|
+
- name: Plan Scan
|
|
47
|
+
id: plan
|
|
48
|
+
run: |
|
|
49
|
+
args=""
|
|
50
|
+
if [ -f scripts/ci/check-dependency-audit.mjs ]; then
|
|
51
|
+
args="$args --skip-files pnpm-lock.yaml"
|
|
52
|
+
fi
|
|
53
|
+
if [ -f .trivyignore.yaml ]; then
|
|
54
|
+
args="$args --ignorefile .trivyignore.yaml"
|
|
55
|
+
fi
|
|
56
|
+
echo "args=$args" >> "$GITHUB_OUTPUT"
|
|
57
|
+
|
|
58
|
+
# --include-dev-deps: without it Trivy drops every dev dependency from npm, yarn
|
|
59
|
+
# and pnpm lockfiles, and a repo of dev tooling scans zero packages and passes.
|
|
60
|
+
# --skip-dirs .bkit/templates: bkit rewrites those files; your adopted copies are
|
|
61
|
+
# scanned where they live.
|
|
62
|
+
- name: Run Trivy
|
|
63
|
+
uses: docker://ghcr.io/aquasecurity/trivy:0.75.0@sha256:af6acf9a6b85dfe389a1941505c0ce9efef52a4719635e1a962f022a3d855daa
|
|
64
|
+
with:
|
|
65
|
+
args: >-
|
|
66
|
+
fs --scanners vuln,misconfig,secret --severity HIGH,CRITICAL --exit-code 1
|
|
67
|
+
--include-dev-deps --skip-dirs .bkit/templates ${{ steps.plan.outputs.args }} .
|
|
@@ -20,15 +20,20 @@ set -e
|
|
|
20
20
|
# all-zero local sha. When EVERY line is a delete, the push carries no commits. A push
|
|
21
21
|
# mixing a delete with a real update still gates, and so does an empty ref list. Reading
|
|
22
22
|
# stdin here is safe: every later command redirects from /dev/null. `[ -t 0 ]` keeps a
|
|
23
|
-
# hand-run hook from hanging.
|
|
23
|
+
# hand-run hook from hanging. The loop also sets PUSH_DEV_SHA (commit pushed to dev) for
|
|
24
|
+
# repo extras that gate only dev pushes (e.g. scripts/graphify/bkit-graph-pre-push.sh).
|
|
24
25
|
PUSH_SAW_REF=0
|
|
25
26
|
PUSH_HAS_COMMITS=0
|
|
27
|
+
PUSH_DEV_SHA=""
|
|
26
28
|
if [ ! -t 0 ]; then
|
|
27
|
-
while read -r _push_local_ref push_local_sha
|
|
29
|
+
while read -r _push_local_ref push_local_sha push_remote_ref _push_remote_sha; do
|
|
28
30
|
[ -n "$push_local_sha" ] || continue
|
|
29
31
|
PUSH_SAW_REF=1
|
|
30
32
|
case "$push_local_sha" in
|
|
31
|
-
*[!0]*)
|
|
33
|
+
*[!0]*)
|
|
34
|
+
PUSH_HAS_COMMITS=1
|
|
35
|
+
[ "$push_remote_ref" = "refs/heads/dev" ] && PUSH_DEV_SHA="$push_local_sha"
|
|
36
|
+
;;
|
|
32
37
|
esac
|
|
33
38
|
done
|
|
34
39
|
fi
|
|
@@ -73,6 +78,13 @@ case "$BRANCH" in
|
|
|
73
78
|
;;
|
|
74
79
|
esac
|
|
75
80
|
|
|
81
|
+
# tmp/ prune — deletes files under tmp/ untouched for 7+ days. Not a gate: a failed
|
|
82
|
+
# prune warns and the push goes on. Skipped until scripts/cleanup/ holds the script.
|
|
83
|
+
if [ -f scripts/cleanup/bkit-tmp-prune.mjs ]; then
|
|
84
|
+
node scripts/cleanup/bkit-tmp-prune.mjs --days=7 < /dev/null ||
|
|
85
|
+
echo "[pre-push] WARN: tmp/ prune failed; push continues" >&2
|
|
86
|
+
fi
|
|
87
|
+
|
|
76
88
|
# WHAT each gate runs lives in package.json, not here — the same `bkit:gate*` scripts
|
|
77
89
|
# the bkit agent workflows and prompts dispatch through. Edit the scripts, not this
|
|
78
90
|
# hook. Repo-specific extras go BELOW this block.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
|
3
|
+
"plugins": [],
|
|
4
|
+
"categories": {
|
|
5
|
+
"correctness": "off"
|
|
6
|
+
},
|
|
7
|
+
"ignorePatterns": [".bkit/templates/**", "scripts/ci/**/*.test.mjs"],
|
|
8
|
+
"overrides": [
|
|
9
|
+
{
|
|
10
|
+
"files": ["**/*.{test,spec}.{ts,tsx,mts,cts,js,jsx,mjs,cjs}"],
|
|
11
|
+
"plugins": ["vitest", "typescript"],
|
|
12
|
+
"rules": {
|
|
13
|
+
"vitest/expect-expect": "error",
|
|
14
|
+
"vitest/no-conditional-in-test": "error",
|
|
15
|
+
"vitest/no-conditional-expect": "error",
|
|
16
|
+
"vitest/valid-expect": ["error", { "maxArgs": 2 }],
|
|
17
|
+
"typescript/no-floating-promises": "error"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
>
|
|
10
10
|
> **Rules:**
|
|
11
11
|
>
|
|
12
|
-
> - GENERATED. `pnpm graph:
|
|
12
|
+
> - GENERATED. `pnpm graph:refresh` rewrites this file.
|
|
13
13
|
> - Source of truth: `scripts/graphify/bkit-graph-drift-rules.json`. Status is derived from the tree, never typed.
|
|
14
14
|
> - Markers literal, never regex. Regex metacharacter in a marker matches nothing → reads as clean result.
|
|
15
15
|
> - Optional `scope`: path prefixes. Optional `surface`: `product` (default), `tests`, or `all`.
|