@codyswann/lisa 5.14.2 → 6.0.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/all/copy-overwrite/scripts/check-npm-publish-landed.mjs +5 -2
- package/all/copy-overwrite/scripts/lib/gate-failure-diagnosis.mjs +14 -18
- package/all/copy-overwrite/scripts/lib/invoked-as-script.d.mts +5 -0
- package/all/copy-overwrite/scripts/lisa-commit-msg-gates.mjs +1 -1
- package/all/copy-overwrite/scripts/lisa-destructive-guard.mjs +4 -4
- package/all/copy-overwrite/scripts/lisa-environment-prepare.mjs +2 -2
- package/all/copy-overwrite/scripts/lisa-gates.mjs +61 -30
- package/all/copy-overwrite/scripts/lisa-reconcile-policy.mjs +5 -3
- package/all/copy-overwrite/scripts/lisa-run-gates.mjs +2 -2
- package/all/copy-overwrite/scripts/lisa-work-item.mjs +3 -2
- package/all/copy-overwrite/scripts/npm-updater-helper-graph.json +6 -6
- package/all/copy-overwrite/scripts/threshold-ratchet-families.mjs +0 -8
- package/cdk/copy-overwrite/eslint.cdk.ts +7 -161
- package/cdk/copy-overwrite/tsconfig.eslint.json +5 -1
- package/dist/cli/lisa-test-run.js +0 -1
- package/dist/cli/lisa-test-run.js.map +1 -1
- package/dist/configs/jest/base.d.ts +2 -2
- package/dist/configs/jest/index.d.ts +5 -6
- package/dist/configs/jest/index.d.ts.map +1 -1
- package/dist/configs/jest/index.js +5 -6
- package/dist/configs/jest/index.js.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.js +30 -0
- package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
- package/dist/core/nightly-e2e-guard-behavior-certificate.d.ts +5 -0
- package/dist/core/nightly-e2e-guard-behavior-certificate.d.ts.map +1 -1
- package/dist/core/nightly-e2e-guard-behavior-certificate.js +8 -1
- package/dist/core/nightly-e2e-guard-behavior-certificate.js.map +1 -1
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +61 -55
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/expo/copy-overwrite/eslint.expo.ts +17 -18
- package/expo/copy-overwrite/tsconfig.eslint.json +5 -1
- package/harper-fabric/copy-overwrite/tsconfig.eslint.json +5 -1
- package/nestjs/copy-overwrite/eslint.nestjs.ts +7 -161
- package/nestjs/copy-overwrite/tsconfig.eslint.json +5 -1
- package/nestjs/copy-overwrite/tsconfig.spec.json +2 -3
- package/package.json +6 -8
- package/phaser/copy-overwrite/tsconfig.eslint.json +5 -1
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-detect-tooling/scripts/detect-tooling.mjs +3 -3
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/aws-bootstrap.mjs +2 -2
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/doctor-secrets.mjs +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/publish-aws-bootstrap.mjs +4 -3
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/sync-secret-to-ci.mjs +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/tools-from-notes.mjs +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-setup-remote-env/scripts/toolchain.mjs +2 -2
- package/plugins/lisa/.codex-plugin/skills/lisa-setup-workstation/scripts/catalogue.mjs +32 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-setup-workstation/scripts/cli.mjs +2 -2
- package/plugins/lisa/.codex-plugin/skills/lisa-setup-workstation/scripts/workstation.mjs +22 -7
- package/plugins/lisa/hooks/threshold-ratchet-families.mjs +0 -8
- package/plugins/lisa/scripts/design-bindings-probe.mjs +37 -8
- package/plugins/lisa/scripts/design-intake-gate.mjs +23 -5
- package/plugins/lisa/scripts/design-source-gate.mjs +5 -5
- package/plugins/lisa/scripts/lifecycle-label-trust.mjs +1 -1
- package/plugins/lisa/scripts/rollup-blocker-classification.mjs +41 -4
- package/plugins/lisa/skills/lisa-detect-tooling/scripts/detect-tooling.mjs +3 -3
- package/plugins/lisa/skills/lisa-secrets-access/scripts/aws-bootstrap.mjs +2 -2
- package/plugins/lisa/skills/lisa-secrets-access/scripts/doctor-secrets.mjs +1 -1
- package/plugins/lisa/skills/lisa-secrets-access/scripts/publish-aws-bootstrap.mjs +4 -3
- package/plugins/lisa/skills/lisa-secrets-access/scripts/sync-secret-to-ci.mjs +1 -1
- package/plugins/lisa/skills/lisa-secrets-access/scripts/tools-from-notes.mjs +1 -1
- package/plugins/lisa/skills/lisa-setup-remote-env/scripts/toolchain.mjs +2 -2
- package/plugins/lisa/skills/lisa-setup-workstation/scripts/catalogue.mjs +32 -1
- package/plugins/lisa/skills/lisa-setup-workstation/scripts/cli.mjs +2 -2
- package/plugins/lisa/skills/lisa-setup-workstation/scripts/workstation.mjs +22 -7
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/scripts/design-bindings-probe.mjs +37 -8
- package/plugins/lisa-agy/scripts/design-intake-gate.mjs +23 -5
- package/plugins/lisa-agy/scripts/design-source-gate.mjs +5 -5
- package/plugins/lisa-agy/scripts/lifecycle-label-trust.mjs +1 -1
- package/plugins/lisa-agy/scripts/rollup-blocker-classification.mjs +41 -4
- package/plugins/lisa-agy/skills/lisa-detect-tooling/scripts/detect-tooling.mjs +3 -3
- package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/aws-bootstrap.mjs +2 -2
- package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/doctor-secrets.mjs +1 -1
- package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/publish-aws-bootstrap.mjs +4 -3
- package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/sync-secret-to-ci.mjs +1 -1
- package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/tools-from-notes.mjs +1 -1
- package/plugins/lisa-agy/skills/lisa-setup-remote-env/scripts/toolchain.mjs +2 -2
- package/plugins/lisa-agy/skills/lisa-setup-workstation/scripts/catalogue.mjs +32 -1
- package/plugins/lisa-agy/skills/lisa-setup-workstation/scripts/cli.mjs +2 -2
- package/plugins/lisa-agy/skills/lisa-setup-workstation/scripts/workstation.mjs +22 -7
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/hooks/threshold-ratchet-families.mjs +0 -8
- package/plugins/lisa-copilot/scripts/design-bindings-probe.mjs +37 -8
- package/plugins/lisa-copilot/scripts/design-intake-gate.mjs +23 -5
- package/plugins/lisa-copilot/scripts/design-source-gate.mjs +5 -5
- package/plugins/lisa-copilot/scripts/lifecycle-label-trust.mjs +1 -1
- package/plugins/lisa-copilot/scripts/rollup-blocker-classification.mjs +41 -4
- package/plugins/lisa-copilot/skills/lisa-detect-tooling/scripts/detect-tooling.mjs +3 -3
- package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/aws-bootstrap.mjs +2 -2
- package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/doctor-secrets.mjs +1 -1
- package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/publish-aws-bootstrap.mjs +4 -3
- package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/sync-secret-to-ci.mjs +1 -1
- package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/tools-from-notes.mjs +1 -1
- package/plugins/lisa-copilot/skills/lisa-setup-remote-env/scripts/toolchain.mjs +2 -2
- package/plugins/lisa-copilot/skills/lisa-setup-workstation/scripts/catalogue.mjs +32 -1
- package/plugins/lisa-copilot/skills/lisa-setup-workstation/scripts/cli.mjs +2 -2
- package/plugins/lisa-copilot/skills/lisa-setup-workstation/scripts/workstation.mjs +22 -7
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/hooks/threshold-ratchet-families.mjs +0 -8
- package/plugins/lisa-cursor/scripts/design-bindings-probe.mjs +37 -8
- package/plugins/lisa-cursor/scripts/design-intake-gate.mjs +23 -5
- package/plugins/lisa-cursor/scripts/design-source-gate.mjs +5 -5
- package/plugins/lisa-cursor/scripts/lifecycle-label-trust.mjs +1 -1
- package/plugins/lisa-cursor/scripts/rollup-blocker-classification.mjs +41 -4
- package/plugins/lisa-cursor/skills/lisa-detect-tooling/scripts/detect-tooling.mjs +3 -3
- package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/aws-bootstrap.mjs +2 -2
- package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/doctor-secrets.mjs +1 -1
- package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/publish-aws-bootstrap.mjs +4 -3
- package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/sync-secret-to-ci.mjs +1 -1
- package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/tools-from-notes.mjs +1 -1
- package/plugins/lisa-cursor/skills/lisa-setup-remote-env/scripts/toolchain.mjs +2 -2
- package/plugins/lisa-cursor/skills/lisa-setup-workstation/scripts/catalogue.mjs +32 -1
- package/plugins/lisa-cursor/skills/lisa-setup-workstation/scripts/cli.mjs +2 -2
- package/plugins/lisa-cursor/skills/lisa-setup-workstation/scripts/workstation.mjs +22 -7
- package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/hooks/threshold-ratchet-families.mjs +0 -8
- package/plugins/lisa-devin/scripts/design-bindings-probe.mjs +37 -8
- package/plugins/lisa-devin/scripts/design-intake-gate.mjs +23 -5
- package/plugins/lisa-devin/scripts/design-source-gate.mjs +5 -5
- package/plugins/lisa-devin/scripts/lifecycle-label-trust.mjs +1 -1
- package/plugins/lisa-devin/scripts/rollup-blocker-classification.mjs +41 -4
- package/plugins/lisa-devin/skills/lisa-detect-tooling/scripts/detect-tooling.mjs +3 -3
- package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/aws-bootstrap.mjs +2 -2
- package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/doctor-secrets.mjs +1 -1
- package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/publish-aws-bootstrap.mjs +4 -3
- package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/sync-secret-to-ci.mjs +1 -1
- package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/tools-from-notes.mjs +1 -1
- package/plugins/lisa-devin/skills/lisa-setup-remote-env/scripts/toolchain.mjs +2 -2
- package/plugins/lisa-devin/skills/lisa-setup-workstation/scripts/catalogue.mjs +32 -1
- package/plugins/lisa-devin/skills/lisa-setup-workstation/scripts/cli.mjs +2 -2
- package/plugins/lisa-devin/skills/lisa-setup-workstation/scripts/workstation.mjs +22 -7
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-agy/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/scripts/wiki-status.mjs +18 -0
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/scripts/wiki-status.mjs +18 -0
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/scripts/wiki-status.mjs +18 -0
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/scripts/wiki-status.mjs +18 -0
- package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/scripts/wiki-status.mjs +18 -0
- package/plugins/src/base/hooks/threshold-ratchet-families.mjs +0 -8
- package/plugins/src/base/scripts/design-bindings-probe.mjs +37 -8
- package/plugins/src/base/scripts/design-intake-gate.mjs +23 -5
- package/plugins/src/base/scripts/design-source-gate.mjs +5 -5
- package/plugins/src/base/scripts/lifecycle-label-trust.mjs +1 -1
- package/plugins/src/base/scripts/rollup-blocker-classification.mjs +41 -4
- package/plugins/src/base/skills/lisa-detect-tooling/scripts/detect-tooling.mjs +3 -3
- package/plugins/src/base/skills/lisa-secrets-access/scripts/aws-bootstrap.mjs +2 -2
- package/plugins/src/base/skills/lisa-secrets-access/scripts/doctor-secrets.mjs +1 -1
- package/plugins/src/base/skills/lisa-secrets-access/scripts/publish-aws-bootstrap.mjs +4 -3
- package/plugins/src/base/skills/lisa-secrets-access/scripts/sync-secret-to-ci.mjs +1 -1
- package/plugins/src/base/skills/lisa-secrets-access/scripts/tools-from-notes.mjs +1 -1
- package/plugins/src/base/skills/lisa-setup-remote-env/scripts/toolchain.mjs +2 -2
- package/plugins/src/base/skills/lisa-setup-workstation/scripts/catalogue.mjs +32 -1
- package/plugins/src/base/skills/lisa-setup-workstation/scripts/cli.mjs +2 -2
- package/plugins/src/base/skills/lisa-setup-workstation/scripts/workstation.mjs +22 -7
- package/plugins/src/wiki/scripts/wiki-status.mjs +18 -0
- package/rails/copy-overwrite/scripts/threshold-ratchet-families.mjs +0 -8
- package/scripts/check-learnings-budget.ts +4 -4
- package/scripts/check-typecheck-tests.mjs +119 -129
- package/scripts/check-whole-output-guards.mjs +12 -2
- package/scripts/generate-nightly-e2e-guard-certificate.mjs +6 -0
- package/scripts/lib/dependency-tree.mjs +7 -11
- package/scripts/lib/invoked-as-script.d.mts +5 -0
- package/scripts/lisa-ruleset-payload.mjs +1 -1
- package/scripts/measure-tmpdir-growth.mjs +21 -2
- package/scripts/reconcile-release-tags.mjs +3 -3
- package/scripts/two-channel-couplings.json +1 -1
- package/scripts/update-node-version.ts +1 -1
- package/typescript/copy-overwrite/scripts/check-nightly-e2e-health.mjs +1 -1
- package/typescript/copy-overwrite/scripts/threshold-ratchet-families.mjs +0 -8
- package/typescript/copy-overwrite/tsconfig.eslint.json +5 -1
- package/dist/configs/jest/cdk.d.ts +0 -33
- package/dist/configs/jest/cdk.d.ts.map +0 -1
- package/dist/configs/jest/cdk.js +0 -29
- package/dist/configs/jest/cdk.js.map +0 -1
- package/dist/configs/jest/nestjs.d.ts +0 -36
- package/dist/configs/jest/nestjs.d.ts.map +0 -1
- package/dist/configs/jest/nestjs.js +0 -49
- package/dist/configs/jest/nestjs.js.map +0 -1
- package/dist/configs/jest/typescript.d.ts +0 -29
- package/dist/configs/jest/typescript.d.ts.map +0 -1
- package/dist/configs/jest/typescript.js +0 -37
- package/dist/configs/jest/typescript.js.map +0 -1
|
@@ -193,8 +193,8 @@ export function exactVersionUrl(registry, name, version) {
|
|
|
193
193
|
* @param {object} timeout - Per-attempt deadline dependencies.
|
|
194
194
|
* @param {number} timeout.attemptTimeoutMs - Deadline in milliseconds.
|
|
195
195
|
* @param {() => AbortController} timeout.createAbortController - Controller factory.
|
|
196
|
-
* @param {
|
|
197
|
-
* @param {
|
|
196
|
+
* @param {(callback: () => void, ms: number) => unknown} timeout.setAttemptTimer - Timer scheduler; returns a handle.
|
|
197
|
+
* @param {(timer: unknown) => void} timeout.clearAttemptTimer - Clears a handle the scheduler returned.
|
|
198
198
|
* @returns {Promise<{verdict: string, detail: string}>} One attempt's outcome.
|
|
199
199
|
*/
|
|
200
200
|
async function askOnce(url, fetchImpl, version, timeout) {
|
|
@@ -262,6 +262,9 @@ const worthRetrying = verdict => verdict !== "published";
|
|
|
262
262
|
* @param {number} [options.attemptTimeoutMs] - Deadline for each attempt.
|
|
263
263
|
* @param {typeof fetch} [options.fetchImpl] - Injected for tests.
|
|
264
264
|
* @param {(ms: number) => Promise<void>} [options.sleep] - Injected for tests.
|
|
265
|
+
* @param {() => AbortController} [options.createAbortController] - Per-attempt controller factory; injected for tests.
|
|
266
|
+
* @param {(callback: () => void, ms: number) => unknown} [options.setAttemptTimer] - Arms each attempt's deadline and returns a handle; defaults to `setTimeout`.
|
|
267
|
+
* @param {(timer: unknown) => void} [options.clearAttemptTimer] - Clears a handle `setAttemptTimer` returned; defaults to `clearTimeout`.
|
|
265
268
|
* @returns {Promise<{verdict: string, detail: string, urls: string[]}>} Outcome.
|
|
266
269
|
*/
|
|
267
270
|
export async function verifyPublish({
|
|
@@ -83,30 +83,26 @@ const TSC_ERROR_PATTERN =
|
|
|
83
83
|
/^[ \t]*(?<file>[^\s(][^(\n]*?)\(\d+,\d+\): error TS\d+:/gmu;
|
|
84
84
|
|
|
85
85
|
/**
|
|
86
|
-
* The test-
|
|
86
|
+
* The test type-check wrapper's own failure header.
|
|
87
87
|
*
|
|
88
|
-
* `scripts/check-typecheck-tests.mjs` exits 1
|
|
89
|
-
* type-correctness
|
|
88
|
+
* `scripts/check-typecheck-tests.mjs` exits 1 under it, naming every file the
|
|
89
|
+
* compiler put in error, and that is a measured type-correctness failure:
|
|
90
90
|
*
|
|
91
|
-
* ❌ 1 file(s)
|
|
92
|
-
* ❌ 2 quarantined file(s) now type-check and must leave the list:
|
|
91
|
+
* ❌ 1 file(s) have type errors:
|
|
93
92
|
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
* repairs a quarantined file, that branch exits 1 with a named file list and
|
|
97
|
-
* — without this — lands in the residual bucket wearing `UNPROVABLE`, which is
|
|
98
|
-
* the word this fleet reads as "re-run it".
|
|
93
|
+
* Without this the run lands in the residual bucket wearing `UNPROVABLE`,
|
|
94
|
+
* which is the word this fleet reads as "re-run it" (CodySwannGT/lisa#3946).
|
|
99
95
|
*/
|
|
100
|
-
const
|
|
101
|
-
/^[ \t]*\u274C[ \t]*\d+
|
|
96
|
+
const TYPECHECK_WRAPPER_FAILURE_PATTERN =
|
|
97
|
+
/^[ \t]*\u274C[ \t]*\d+ file\(s\) have type errors:[ \t]*$/gmu;
|
|
102
98
|
|
|
103
99
|
/**
|
|
104
|
-
* One file the
|
|
100
|
+
* One file the type-check wrapper listed under its header, e.g. ` path.ts (1)`.
|
|
105
101
|
*
|
|
106
102
|
* Indentation is the delimiter because that is what the wrapper emits, and the
|
|
107
|
-
* trailing count is optional
|
|
103
|
+
* trailing count is optional so a list printed without counts still reads.
|
|
108
104
|
*/
|
|
109
|
-
const
|
|
105
|
+
const TYPECHECK_WRAPPER_FILE_PATTERN =
|
|
110
106
|
/^[ \t]+(\S+\.[cm]?[jt]sx?)(?:[ \t]+\(\d+\))?[ \t]*$/u;
|
|
111
107
|
|
|
112
108
|
/**
|
|
@@ -660,7 +656,7 @@ function tailLines(output) {
|
|
|
660
656
|
* Every file a type checker's output names as having errors.
|
|
661
657
|
*
|
|
662
658
|
* Two sources, unioned: tsc's own diagnostic lines, and the file list the test
|
|
663
|
-
*
|
|
659
|
+
* type-check wrapper prints under its own header. The wrapper's list is read
|
|
664
660
|
* by walking forward from the header until the indentation stops, which is
|
|
665
661
|
* exactly how the wrapper emits it.
|
|
666
662
|
* @param {string} output The gate command's combined output.
|
|
@@ -672,10 +668,10 @@ function findTypeErrorFiles(output) {
|
|
|
672
668
|
(match.groups?.file ?? "").trim()
|
|
673
669
|
);
|
|
674
670
|
for (const [index, line] of lines.entries()) {
|
|
675
|
-
if (!new RegExp(
|
|
671
|
+
if (!new RegExp(TYPECHECK_WRAPPER_FAILURE_PATTERN.source, "u").test(line))
|
|
676
672
|
continue;
|
|
677
673
|
for (const listed of lines.slice(index + 1)) {
|
|
678
|
-
const match =
|
|
674
|
+
const match = TYPECHECK_WRAPPER_FILE_PATTERN.exec(listed);
|
|
679
675
|
if (match === null) break;
|
|
680
676
|
files.push(match[1] ?? "");
|
|
681
677
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// This file is managed by Lisa and IS replaced on each `lisa` run.
|
|
2
|
+
// Do not edit directly — durable changes belong upstream in Lisa.
|
|
3
|
+
|
|
4
|
+
/** Whether the calling module was run as the CLI entry point, comparing real paths. */
|
|
5
|
+
export function invokedAsScript(moduleUrl: string, argv1?: string): boolean;
|
|
@@ -145,7 +145,7 @@ export function readHookSources(explicitPath) {
|
|
|
145
145
|
/**
|
|
146
146
|
* Which families any of these hook sources actually installs.
|
|
147
147
|
* @param {string[]} sources - Hook sources.
|
|
148
|
-
* @returns {
|
|
148
|
+
* @returns {Array<(typeof FAMILIES)[number]>} Families present, in registry order.
|
|
149
149
|
*/
|
|
150
150
|
export function detectFamilies(sources) {
|
|
151
151
|
return FAMILIES.filter(family =>
|
|
@@ -141,7 +141,7 @@ export function classifyEnvironment(value) {
|
|
|
141
141
|
* capability reports rows deleted or created — a read-only adapter that mutated
|
|
142
142
|
* is still a mutation, and the guard should not depend on it being named
|
|
143
143
|
* honestly.
|
|
144
|
-
* @param {object} fields - An envelope or envelope-shaped object
|
|
144
|
+
* @param {object | null | undefined} fields - An envelope or envelope-shaped object; absent reads as not destructive
|
|
145
145
|
* @returns {boolean} True when the run is destructive
|
|
146
146
|
*/
|
|
147
147
|
export function isDestructive(fields) {
|
|
@@ -210,7 +210,7 @@ function denyByEnvironment(environment) {
|
|
|
210
210
|
*
|
|
211
211
|
* This is the check the command envelope itself applies, so a destructive
|
|
212
212
|
* production run cannot be *reported* as a success by any adapter in any repo.
|
|
213
|
-
* @param {object} fields - An envelope or envelope-shaped object
|
|
213
|
+
* @param {object | null | undefined} fields - An envelope or envelope-shaped object; absent reads as not destructive
|
|
214
214
|
* @returns {{code: string, message: string}|null} The denial, if any
|
|
215
215
|
*/
|
|
216
216
|
export function destructiveDenial(fields) {
|
|
@@ -264,7 +264,7 @@ export function assertDestructiveAllowed(request) {
|
|
|
264
264
|
|
|
265
265
|
/**
|
|
266
266
|
* Read one `--flag value` / `--flag=value` option out of argv.
|
|
267
|
-
* @param {readonly string[]} argv - Arguments after the script name
|
|
267
|
+
* @param {readonly string[] | undefined} argv - Arguments after the script name; absent means a dry run
|
|
268
268
|
* @param {string} flag - The long flag to read, including leading dashes
|
|
269
269
|
* @returns {string|null} The value, or null when the flag is absent or empty
|
|
270
270
|
*/
|
|
@@ -285,7 +285,7 @@ function readOption(argv, flag) {
|
|
|
285
285
|
* instead of mutating. Mutating requires an explicit `--no-dry-run` or
|
|
286
286
|
* `--execute`, and passing `--dry-run` alongside either one keeps the dry run,
|
|
287
287
|
* so a stray flag can never silently upgrade a rehearsal into a real run.
|
|
288
|
-
* @param {readonly string[]} argv - Arguments after the script name
|
|
288
|
+
* @param {readonly string[] | undefined} argv - Arguments after the script name; absent means a dry run
|
|
289
289
|
* @returns {{dryRun: boolean, requestedStage: (string|null), idempotencyKey: (string|null)}} Parsed arguments
|
|
290
290
|
*/
|
|
291
291
|
export function parseDestructiveArgs(argv) {
|
|
@@ -237,12 +237,12 @@ function spawnExec(argv) {
|
|
|
237
237
|
* emptied a shared environment and left it empty, which is a worse state than
|
|
238
238
|
* the one it started in and one no later step can undo.
|
|
239
239
|
* @param {object} options Options.
|
|
240
|
-
* @param {string} [options.env] Target environment name. Mandatory.
|
|
240
|
+
* @param {string|undefined} [options.env] Target environment name. Mandatory; an absent one is refused, not defaulted.
|
|
241
241
|
* @param {readonly string[]} [options.verbs] Lifecycle verbs. Both are required;
|
|
242
242
|
* a caller may retain this compatibility input, but it cannot select a subset.
|
|
243
243
|
* @param {Record<string, string>} [options.scripts] The project's npm scripts.
|
|
244
244
|
* @param {string} [options.runner] Task-runner prefix, e.g. `bun run`.
|
|
245
|
-
* @param {(
|
|
245
|
+
* @param {(argv: string[]) => number|null} [options.exec] Executor; receives the argument vector, never a command line.
|
|
246
246
|
* @returns {{ok: boolean, reason: string|null, message: string, ran: string[]}} Outcome.
|
|
247
247
|
*/
|
|
248
248
|
export function prepareEnvironment({
|
|
@@ -77,6 +77,35 @@ import { fileURLToPath } from "node:url";
|
|
|
77
77
|
import { CACHE_FIELD } from "./lib/gate-pass-cache.mjs";
|
|
78
78
|
import { invokedAsScript } from "./lib/invoked-as-script.mjs";
|
|
79
79
|
|
|
80
|
+
/**
|
|
81
|
+
* One built-in invocation in {@link HARDCODED_INVOCATIONS}: a command written
|
|
82
|
+
* into a shipped artifact rather than resolved from the project's declaration.
|
|
83
|
+
* @typedef {object} InventoryEntry
|
|
84
|
+
* @property {string} gate Registry gate id that should govern it.
|
|
85
|
+
* @property {string} moment The moment it runs at.
|
|
86
|
+
* @property {string} surface Which kind of artifact carries it.
|
|
87
|
+
* @property {string} artifact Repository-relative path to that artifact.
|
|
88
|
+
* @property {string|null} job The workflow job id, or null off a workflow.
|
|
89
|
+
* @property {string} command What the built-in runs, descriptively.
|
|
90
|
+
* @property {readonly string[]} steps Workflow step names on its fallback path.
|
|
91
|
+
* @property {readonly string[]|null} seedRun Candidate seed tasks; null for the registry default, empty for none.
|
|
92
|
+
* @property {string} facade Whether the artifact consults a declaration first.
|
|
93
|
+
* @property {boolean} [unconditional] The fallback fails when its prover cannot run.
|
|
94
|
+
* @property {string} [hookEvent] The harness event a hook entry registers for.
|
|
95
|
+
*/
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* One moment's declaration for a gate: a bare level, or an object naming the
|
|
99
|
+
* level and, optionally, the task or the external check to await.
|
|
100
|
+
* @typedef {string | {level?: string, run?: string, await?: unknown}} MomentDeclaration
|
|
101
|
+
*/
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* A `gates` block: the optional task runner, then one entry per gate id
|
|
105
|
+
* mapping moment names to their declarations.
|
|
106
|
+
* @typedef {{runner?: string} & Record<string, Record<string, MomentDeclaration>>} GatesBlock
|
|
107
|
+
*/
|
|
108
|
+
|
|
80
109
|
/**
|
|
81
110
|
* The npm manifest filename, named once.
|
|
82
111
|
*
|
|
@@ -1976,7 +2005,7 @@ const QUALITY_FALLBACKS = Object.freeze({
|
|
|
1976
2005
|
* `QUALITY_JOB_GATES` — the same table `lisa doctor` and a consumer migrating
|
|
1977
2006
|
* off `skip_jobs` read — instead of being spelled out a second time here where
|
|
1978
2007
|
* the two copies could disagree.
|
|
1979
|
-
* @returns {
|
|
2008
|
+
* @returns {InventoryEntry[]} One frozen entry per façade job.
|
|
1980
2009
|
*/
|
|
1981
2010
|
function qualityInvocations() {
|
|
1982
2011
|
return Object.entries(QUALITY_FALLBACKS).map(([job, entry]) => {
|
|
@@ -2014,7 +2043,7 @@ function qualityInvocations() {
|
|
|
2014
2043
|
* @param {string} gate Registry gate id.
|
|
2015
2044
|
* @param {string} command What the built-in else-branch runs.
|
|
2016
2045
|
* @param {string[]|null} seedRun Candidate task names, or null for the registry default.
|
|
2017
|
-
* @returns {
|
|
2046
|
+
* @returns {InventoryEntry} A frozen inventory entry.
|
|
2018
2047
|
*/
|
|
2019
2048
|
function prePushInvocation(gate, command, seedRun) {
|
|
2020
2049
|
return Object.freeze({
|
|
@@ -2040,7 +2069,7 @@ function prePushInvocation(gate, command, seedRun) {
|
|
|
2040
2069
|
* @param {string} command What the built-in else-branch runs.
|
|
2041
2070
|
* @param {string[]|null} seedRun Candidate task names, or null for the registry default.
|
|
2042
2071
|
* @param {boolean} [unconditional] The fallback fails when its prover cannot run.
|
|
2043
|
-
* @returns {
|
|
2072
|
+
* @returns {InventoryEntry} A frozen inventory entry.
|
|
2044
2073
|
*/
|
|
2045
2074
|
function preCommitInvocation(gate, command, seedRun, unconditional = false) {
|
|
2046
2075
|
return Object.freeze({
|
|
@@ -2062,7 +2091,7 @@ function preCommitInvocation(gate, command, seedRun, unconditional = false) {
|
|
|
2062
2091
|
* @param {string} gate Registry gate id the tool proves.
|
|
2063
2092
|
* @param {string} artifact Repository-relative path to the source hook.
|
|
2064
2093
|
* @param {string} command The tool written into the script.
|
|
2065
|
-
* @returns {
|
|
2094
|
+
* @returns {InventoryEntry} A frozen inventory entry.
|
|
2066
2095
|
*/
|
|
2067
2096
|
function onEditInvocation(gate, artifact, command) {
|
|
2068
2097
|
return Object.freeze({
|
|
@@ -2128,7 +2157,7 @@ function onEditInvocation(gate, artifact, command) {
|
|
|
2128
2157
|
* @param {string} gate Registry gate id the built-in proves.
|
|
2129
2158
|
* @param {string} artifact Repository-relative path to the source hook.
|
|
2130
2159
|
* @param {string} command The check written into the script.
|
|
2131
|
-
* @returns {
|
|
2160
|
+
* @returns {InventoryEntry} A frozen inventory entry.
|
|
2132
2161
|
*/
|
|
2133
2162
|
function preToolRefusalInvocation(gate, artifact, command) {
|
|
2134
2163
|
return Object.freeze({
|
|
@@ -2188,6 +2217,7 @@ function preToolRefusalInvocation(gate, artifact, command) {
|
|
|
2188
2217
|
* an entry naming a step that is gone fails, and a façade job, a
|
|
2189
2218
|
* `lisa_gate_covers` call, or an `-on-edit.sh` source script with no entry
|
|
2190
2219
|
* fails too.
|
|
2220
|
+
* @type {readonly InventoryEntry[]}
|
|
2191
2221
|
*/
|
|
2192
2222
|
export const HARDCODED_INVOCATIONS = Object.freeze([
|
|
2193
2223
|
// ── Class A: the pre-push hook. Nine gated steps, nine written-in else
|
|
@@ -2415,7 +2445,7 @@ export function isDeclarableAt(gate, moment) {
|
|
|
2415
2445
|
* @param {string} [options.moment] Only invocations at this moment.
|
|
2416
2446
|
* @param {string} [options.surface] Only invocations on this surface.
|
|
2417
2447
|
* @param {string} [options.gate] Only invocations for this gate.
|
|
2418
|
-
* @returns {
|
|
2448
|
+
* @returns {InventoryEntry[]} Matching entries, in table order.
|
|
2419
2449
|
*/
|
|
2420
2450
|
export function hardcodedAt({ moment, surface, gate } = {}) {
|
|
2421
2451
|
return HARDCODED_INVOCATIONS.filter(
|
|
@@ -2563,30 +2593,6 @@ function reasonFor(entry, hit, declarable, moment) {
|
|
|
2563
2593
|
return `${entry.gate} is not declared at "${moment}", so the built-in runs.`;
|
|
2564
2594
|
}
|
|
2565
2595
|
|
|
2566
|
-
/**
|
|
2567
|
-
* A `gates` block that declares what the built-ins are proving today.
|
|
2568
|
-
*
|
|
2569
|
-
* SEEDING IS THE MECHANISM THAT RETIRES A FALLBACK, and it is only safe if the
|
|
2570
|
-
* seeded declaration runs the same thing the fallback did. Two rules enforce
|
|
2571
|
-
* that, and they are why this returns less than the full registry:
|
|
2572
|
-
*
|
|
2573
|
-
* * A gate is seeded only when the task that reproduces the built-in is a
|
|
2574
|
-
* script the project ACTUALLY HAS. Twenty of the registry's default tasks
|
|
2575
|
-
* are shipped by no template, so seeding by default would declare gates
|
|
2576
|
-
* whose prover does not exist — a red fleet, delivered by a version bump.
|
|
2577
|
-
* * A gate is seeded only at a moment the registry says it may be declared
|
|
2578
|
-
* at. `test-meaningfulness` runs at push and cannot be declared there;
|
|
2579
|
-
* seeding it would produce a config `validate` refuses.
|
|
2580
|
-
*
|
|
2581
|
-
* What is NOT seeded stays ungoverned, and stays reported by `unconfiguredAt`.
|
|
2582
|
-
* That is the honest outcome: this closes the gap it can prove it closes, and
|
|
2583
|
-
* leaves the rest visible rather than declaring it away.
|
|
2584
|
-
* @param {object} options Inputs.
|
|
2585
|
-
* @param {object} [options.gates] The existing gates block; its declarations win.
|
|
2586
|
-
* @param {Record<string, string>} [options.scripts] The project's package.json scripts.
|
|
2587
|
-
* @param {string} [options.runner] Task runner to record, when none is declared.
|
|
2588
|
-
* @returns {{gates: object, seeded: Array<{gate: string, moment: string, run: string|null}>, skipped: Array<{gate: string, moment: string, reason: string}>}} The merged block and what it did.
|
|
2589
|
-
*/
|
|
2590
2596
|
/**
|
|
2591
2597
|
* The pull-request jobs #3052 deleted because a declared gate leg proves the
|
|
2592
2598
|
* same property, with the gate each one proved and how that gate is seeded.
|
|
@@ -2620,6 +2626,30 @@ function runnerOwnedJobs() {
|
|
|
2620
2626
|
);
|
|
2621
2627
|
}
|
|
2622
2628
|
|
|
2629
|
+
/**
|
|
2630
|
+
* A `gates` block that declares what the built-ins are proving today.
|
|
2631
|
+
*
|
|
2632
|
+
* SEEDING IS THE MECHANISM THAT RETIRES A FALLBACK, and it is only safe if the
|
|
2633
|
+
* seeded declaration runs the same thing the fallback did. Two rules enforce
|
|
2634
|
+
* that, and they are why this returns less than the full registry:
|
|
2635
|
+
*
|
|
2636
|
+
* * A gate is seeded only when the task that reproduces the built-in is a
|
|
2637
|
+
* script the project ACTUALLY HAS. Twenty of the registry's default tasks
|
|
2638
|
+
* are shipped by no template, so seeding by default would declare gates
|
|
2639
|
+
* whose prover does not exist — a red fleet, delivered by a version bump.
|
|
2640
|
+
* * A gate is seeded only at a moment the registry says it may be declared
|
|
2641
|
+
* at. `test-meaningfulness` runs at push and cannot be declared there;
|
|
2642
|
+
* seeding it would produce a config `validate` refuses.
|
|
2643
|
+
*
|
|
2644
|
+
* What is NOT seeded stays ungoverned, and stays reported by `unconfiguredAt`.
|
|
2645
|
+
* That is the honest outcome: this closes the gap it can prove it closes, and
|
|
2646
|
+
* leaves the rest visible rather than declaring it away.
|
|
2647
|
+
* @param {object} options Inputs.
|
|
2648
|
+
* @param {GatesBlock} [options.gates] The existing gates block; its declarations win.
|
|
2649
|
+
* @param {Record<string, string>} [options.scripts] The project's package.json scripts.
|
|
2650
|
+
* @param {string} [options.runner] Task runner to record, when none is declared.
|
|
2651
|
+
* @returns {{gates: GatesBlock, seeded: Array<{gate: string, moment: string, run: string|null}>, skipped: Array<{gate: string, moment: string, reason: string}>}} The merged block and what it did.
|
|
2652
|
+
*/
|
|
2623
2653
|
export function seedGates({ gates = {}, scripts = {}, runner } = {}) {
|
|
2624
2654
|
const seeded = [];
|
|
2625
2655
|
const skipped = [];
|
|
@@ -3872,6 +3902,7 @@ function declaredLevel(entry) {
|
|
|
3872
3902
|
* @param {object} options.gates The gates block.
|
|
3873
3903
|
* @param {Record<string, string>|null} [options.scripts] The project's package scripts, or null when unknown.
|
|
3874
3904
|
* @param {Record<string, string>} [options.outsideFacade] Gates proved by a step the façade does not represent. A SEAM, not configuration: the shipped table is empty today, and a branch nothing can reach is a branch nothing tests.
|
|
3905
|
+
* @param {{moments?: string[], families?: string[]}} [options.executedMoments] Moments this repository actually runs gates at; defaults to none.
|
|
3875
3906
|
* @returns {Array<{gate: string, moment: string, level: string, verdict: string, detail: string}>} One finding per declaration that is not plainly executable.
|
|
3876
3907
|
*/
|
|
3877
3908
|
export function classifyDeclaredExecutors({
|
|
@@ -229,7 +229,7 @@ import {
|
|
|
229
229
|
* @property {Ruleset[]} rulesets Branch-target rulesets, in full.
|
|
230
230
|
* @property {LiveContext[]} contexts Every required context they carry.
|
|
231
231
|
* @property {Record<string, *>} settings Repository settings.
|
|
232
|
-
* @property {Record<string,
|
|
232
|
+
* @property {Record<string, unknown>} signals Ruleset-surface policy: boolean signals plus the policy ruleset's shape fields.
|
|
233
233
|
*/
|
|
234
234
|
|
|
235
235
|
/**
|
|
@@ -835,7 +835,7 @@ function effectiveAwaitedRecords(awaited, records) {
|
|
|
835
835
|
* rather than against the project's decision.
|
|
836
836
|
* @param {object} options Comparison inputs.
|
|
837
837
|
* @param {object} options.policy The `policy` block.
|
|
838
|
-
* @param {{settings?: Record<string, *>, signals?: Record<string,
|
|
838
|
+
* @param {{settings?: Record<string, *>, signals?: Record<string, unknown>}} options.live The two
|
|
839
839
|
* surfaces a policy field can be observed on. Narrower than `LivePolicy` on
|
|
840
840
|
* purpose: this is everything the comparison reads.
|
|
841
841
|
* @returns {SettingsDrift} Findings.
|
|
@@ -1025,7 +1025,7 @@ export function awaitedPins(gates, moment) {
|
|
|
1025
1025
|
* the declaration says which one owns each context, so a repair can write it
|
|
1026
1026
|
* where it was declared instead of wherever the single fallback target points.
|
|
1027
1027
|
* @param {object} [requiredChecks] The `requiredChecks` map, by ruleset name.
|
|
1028
|
-
* @returns {{contexts: string[], homes: Record<string, string>, pins: Record<string, number>}} Declared checks.
|
|
1028
|
+
* @returns {{contexts: string[], homes: Record<string, string>, pins: Record<string, number>, records: Array<{context: string, ruleset: string, integration_id?: number}>}} Declared checks; `records` is the declaration itself, one per context per ruleset.
|
|
1029
1029
|
*/
|
|
1030
1030
|
export function declaredChecks(requiredChecks = {}) {
|
|
1031
1031
|
const contexts = [];
|
|
@@ -1174,6 +1174,8 @@ export function rulesetPayload(
|
|
|
1174
1174
|
* Ruleset-scoped contexts an external app posts.
|
|
1175
1175
|
* @param {Record<string, number>} [options.pins] Declared app id per awaited
|
|
1176
1176
|
* context.
|
|
1177
|
+
* @param {Record<string, string>} [options.homes] Declared ruleset per context,
|
|
1178
|
+
* from `declaredChecks`, so a repair lands where it was declared.
|
|
1177
1179
|
* @returns {RepairAction[]} Planned actions.
|
|
1178
1180
|
*/
|
|
1179
1181
|
export function planRepairs({
|
|
@@ -1521,7 +1521,7 @@ function gitRev(spec) {
|
|
|
1521
1521
|
*
|
|
1522
1522
|
* `tree` is the identity and `commit` is evidentiary: two commits share a tree
|
|
1523
1523
|
* after a rebase, and the tree is what the gates actually examined.
|
|
1524
|
-
* @returns {
|
|
1524
|
+
* @returns {{repository: string|null, tree: string|null, commit: string|null, ref: string|null}} The subject binding.
|
|
1525
1525
|
*/
|
|
1526
1526
|
function evidenceSubject() {
|
|
1527
1527
|
return {
|
|
@@ -1567,7 +1567,7 @@ function gateEvidence(outcome) {
|
|
|
1567
1567
|
* @param {string} [options.runner] The task-runner prefix.
|
|
1568
1568
|
* @param {Record<string,string>|null} [options.scripts] Project scripts.
|
|
1569
1569
|
* @param {string} options.observedAt When the run began, ISO-8601.
|
|
1570
|
-
* @returns {
|
|
1570
|
+
* @returns {{schema: string, verdict: string, subject: {repository: string|null, tree: string|null, commit: string|null, ref: string|null}, contract: {moment: string, gates_digest: string|null}, observed_at: string, gates: Array<{gate: string, status: string, level: string, label: string}>}} The evidence envelope.
|
|
1571
1571
|
*/
|
|
1572
1572
|
export function evidenceDocument({
|
|
1573
1573
|
moment,
|
|
@@ -571,8 +571,9 @@ const CHILD_TIMEOUT_MS = Number(
|
|
|
571
571
|
* convincingly.
|
|
572
572
|
* @param {string} command - Executable to run.
|
|
573
573
|
* @param {string[]} args - Arguments to pass.
|
|
574
|
-
* @
|
|
575
|
-
* @
|
|
574
|
+
* @template {boolean} [B=false]
|
|
575
|
+
* @param {{cwd?: string, env?: NodeJS.ProcessEnv, input?: string | Buffer, timeout?: number, maxBuffer?: number, allowFailure?: boolean, error?: string, binary?: B}} [options] - Spawn controls; `binary: true` returns stdout as a Buffer.
|
|
576
|
+
* @returns {{status: number | null, signal: NodeJS.Signals | null, error?: Error, pid: number, stdout: B extends true ? Buffer : string, stderr: string}} The spawnSync result, with stdout and stderr never null.
|
|
576
577
|
*/
|
|
577
578
|
export function run(command, args, options = {}) {
|
|
578
579
|
const result = spawnSync(command, args, {
|
|
@@ -230,7 +230,7 @@
|
|
|
230
230
|
"children": []
|
|
231
231
|
},
|
|
232
232
|
"lib/gate-failure-diagnosis.mjs": {
|
|
233
|
-
"sha256": "
|
|
233
|
+
"sha256": "16aa855e6eeaabb5d79db280a97d9a7ae60fbe849e66552b3bd74dd24dadfa34",
|
|
234
234
|
"staticImports": [
|
|
235
235
|
"node:fs",
|
|
236
236
|
"node:os"
|
|
@@ -1495,7 +1495,7 @@
|
|
|
1495
1495
|
"children": []
|
|
1496
1496
|
},
|
|
1497
1497
|
"lisa-commit-msg-gates.mjs": {
|
|
1498
|
-
"sha256": "
|
|
1498
|
+
"sha256": "f540f962ec9aaa0f65610f3e9c535cb1a7335c6c62ee028d00a1e6b03e25b54b",
|
|
1499
1499
|
"staticImports": [
|
|
1500
1500
|
"lib/invoked-as-script.mjs",
|
|
1501
1501
|
"node:fs",
|
|
@@ -1505,7 +1505,7 @@
|
|
|
1505
1505
|
"children": []
|
|
1506
1506
|
},
|
|
1507
1507
|
"lisa-gates.mjs": {
|
|
1508
|
-
"sha256": "
|
|
1508
|
+
"sha256": "73216a048fb468d2350857113aaa4d9bb661d98aeab3dbab481fb971b9d32c6e",
|
|
1509
1509
|
"staticImports": [
|
|
1510
1510
|
"lib/gate-pass-cache.mjs",
|
|
1511
1511
|
"lib/invoked-as-script.mjs",
|
|
@@ -1590,7 +1590,7 @@
|
|
|
1590
1590
|
"children": []
|
|
1591
1591
|
},
|
|
1592
1592
|
"lisa-run-gates.mjs": {
|
|
1593
|
-
"sha256": "
|
|
1593
|
+
"sha256": "d4043757ed79d62410c8962b631de774e41adc85c306083887f5c55c7423fb8f",
|
|
1594
1594
|
"staticImports": [
|
|
1595
1595
|
"lib/affected-tests.mjs",
|
|
1596
1596
|
"lib/bounded-spawn.mjs",
|
|
@@ -1628,7 +1628,7 @@
|
|
|
1628
1628
|
"children": []
|
|
1629
1629
|
},
|
|
1630
1630
|
"lisa-work-item.mjs": {
|
|
1631
|
-
"sha256": "
|
|
1631
|
+
"sha256": "46fb0606ccee999a75479ee479f92ac60f4fd62bbf5808e574380ff8df606e6f",
|
|
1632
1632
|
"staticImports": [
|
|
1633
1633
|
"lib/completion-authorization.mjs",
|
|
1634
1634
|
"lib/completion-proof-adapters.mjs",
|
|
@@ -1687,7 +1687,7 @@
|
|
|
1687
1687
|
"children": []
|
|
1688
1688
|
},
|
|
1689
1689
|
"threshold-ratchet-families.mjs": {
|
|
1690
|
-
"sha256": "
|
|
1690
|
+
"sha256": "07d3dbd1230c29777d3ff5492431795aa62e64d1e77eb81d9487a350b4aa4b56",
|
|
1691
1691
|
"staticImports": [],
|
|
1692
1692
|
"dynamicImports": [],
|
|
1693
1693
|
"children": []
|
|
@@ -92,14 +92,6 @@ export const FAMILIES = [
|
|
|
92
92
|
match: /(^|\/)\.lisa\.config\.json$/,
|
|
93
93
|
kind: "allow-list",
|
|
94
94
|
},
|
|
95
|
-
{
|
|
96
|
-
// The #3811 quarantine. `allow-list` is exactly right here: the list may
|
|
97
|
-
// shrink freely, and ADDING a file — re-authorising type debt that the
|
|
98
|
-
// gate would otherwise refuse — is the change that needs a human to see it.
|
|
99
|
-
id: "typecheck-quarantine",
|
|
100
|
-
match: /(^|\/)typecheck-quarantine\.json$/,
|
|
101
|
-
kind: "allow-list",
|
|
102
|
-
},
|
|
103
95
|
{
|
|
104
96
|
id: "lighthouse",
|
|
105
97
|
match: /(^|\/)(?:lighthouserc-config|lighthouserc|\.lighthouserc)\.json$/,
|
|
@@ -6,173 +6,19 @@
|
|
|
6
6
|
/**
|
|
7
7
|
* ESLint 9 Flat Config - CDK Stack
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* eslint.cdk.ts (this file)
|
|
15
|
-
* └── eslint.typescript.ts
|
|
16
|
-
* └── eslint.base.ts
|
|
9
|
+
* Re-exports the CDK ESLint configuration from @codyswann/lisa. This file
|
|
10
|
+
* exists as a local sibling for projects that import stack config from a
|
|
11
|
+
* relative path. It used to carry its own copy of the configuration built on
|
|
12
|
+
* a local ./eslint.typescript, which Lisa deletes from every project, so it
|
|
13
|
+
* could not compile; the published factory is the one eslint.config.ts uses.
|
|
17
14
|
* @see https://eslint.org/docs/latest/use/configure/configuration-files-new
|
|
18
15
|
* @module eslint.cdk
|
|
19
16
|
*/
|
|
20
|
-
|
|
21
|
-
// Import TypeScript config and utilities
|
|
22
|
-
import {
|
|
23
|
-
codeOrganization,
|
|
24
|
-
defaultIgnores,
|
|
25
|
-
defaultThresholds,
|
|
26
|
-
getBaseConfigs,
|
|
27
|
-
getBaseLanguageOptions,
|
|
28
|
-
getJsFilesOverride,
|
|
29
|
-
getSharedFilesOverride,
|
|
30
|
-
getSharedRules,
|
|
31
|
-
getTestFilesOverride,
|
|
32
|
-
getTsFilesOverride,
|
|
33
|
-
getTsTestFilesOverride,
|
|
34
|
-
} from "./eslint.typescript";
|
|
35
|
-
|
|
36
|
-
// Re-export for downstream configs
|
|
37
17
|
export {
|
|
38
18
|
defaultIgnores,
|
|
39
19
|
defaultThresholds,
|
|
40
20
|
getBaseConfigs,
|
|
41
21
|
getBaseLanguageOptions,
|
|
22
|
+
getCdkConfig,
|
|
42
23
|
getSharedRules,
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
// CDK-specific ignores
|
|
46
|
-
const cdkIgnores = [
|
|
47
|
-
...defaultIgnores,
|
|
48
|
-
"cdk.out/**",
|
|
49
|
-
"*.js", // CDK generates JS files
|
|
50
|
-
"*.d.ts",
|
|
51
|
-
];
|
|
52
|
-
|
|
53
|
-
// CDK-specific rule adjustments layered over the shared base rules
|
|
54
|
-
const cdkRules = {
|
|
55
|
-
// Code organization
|
|
56
|
-
"code-organization/enforce-statement-order": "error",
|
|
57
|
-
|
|
58
|
-
// Configuration enforcement - prevent direct process.env access
|
|
59
|
-
// All configuration should go through config module
|
|
60
|
-
// @see .claude/rules/PROJECT_RULES.md
|
|
61
|
-
"no-restricted-syntax": [
|
|
62
|
-
"error",
|
|
63
|
-
{
|
|
64
|
-
selector: "MemberExpression[object.name='process'][property.name='env']",
|
|
65
|
-
message:
|
|
66
|
-
"Direct process.env access is forbidden. Use config module for type-safe configuration. See .claude/rules/PROJECT_RULES.md.",
|
|
67
|
-
},
|
|
68
|
-
],
|
|
69
|
-
|
|
70
|
-
// CDK uses classes for constructs and stacks
|
|
71
|
-
"functional/no-classes": "off",
|
|
72
|
-
|
|
73
|
-
// CDK constructs and stacks require documentation
|
|
74
|
-
"jsdoc/require-jsdoc": [
|
|
75
|
-
"error",
|
|
76
|
-
{
|
|
77
|
-
require: {
|
|
78
|
-
FunctionDeclaration: true,
|
|
79
|
-
MethodDefinition: true,
|
|
80
|
-
ClassDeclaration: true,
|
|
81
|
-
ArrowFunctionExpression: false,
|
|
82
|
-
FunctionExpression: false,
|
|
83
|
-
},
|
|
84
|
-
contexts: [
|
|
85
|
-
"TSInterfaceDeclaration",
|
|
86
|
-
"TSTypeAliasDeclaration",
|
|
87
|
-
"VariableDeclaration[declarations.0.init.type='ArrowFunctionExpression']:has([id.name=/^[A-Z]/])",
|
|
88
|
-
],
|
|
89
|
-
},
|
|
90
|
-
],
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
// Per-path rule relaxations for CDK project layout
|
|
94
|
-
const cdkPathOverrides = [
|
|
95
|
-
// CDK bin files - entry points can access process.env for stage selection
|
|
96
|
-
{
|
|
97
|
-
files: ["bin/**/*.ts"],
|
|
98
|
-
rules: {
|
|
99
|
-
"no-restricted-syntax": "off",
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
|
|
103
|
-
// Configuration files - allowed to use process.env directly
|
|
104
|
-
{
|
|
105
|
-
files: ["**/*config.*", "**/config/**/*.ts"],
|
|
106
|
-
rules: {
|
|
107
|
-
"no-restricted-syntax": "off",
|
|
108
|
-
},
|
|
109
|
-
},
|
|
110
|
-
|
|
111
|
-
// Lambda handlers - often have different constraints
|
|
112
|
-
{
|
|
113
|
-
files: ["**/lambda/**/*.ts", "**/lambdas/**/*.ts", "**/functions/**/*.ts"],
|
|
114
|
-
rules: {
|
|
115
|
-
// Lambda cold starts benefit from simpler code
|
|
116
|
-
"sonarjs/cognitive-complexity": ["error", 15],
|
|
117
|
-
},
|
|
118
|
-
},
|
|
119
|
-
];
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* Creates the CDK ESLint configuration.
|
|
123
|
-
* @param {object} options - Configuration options
|
|
124
|
-
* @param {string} options.tsconfigRootDir - Root directory for tsconfig.json
|
|
125
|
-
* @param {string[]} [options.ignorePatterns] - Patterns to ignore
|
|
126
|
-
* @param {object} [options.thresholds] - Threshold overrides
|
|
127
|
-
* @returns {Array} ESLint flat config array
|
|
128
|
-
*/
|
|
129
|
-
export function getCdkConfig({
|
|
130
|
-
tsconfigRootDir,
|
|
131
|
-
ignorePatterns = cdkIgnores,
|
|
132
|
-
thresholds = defaultThresholds,
|
|
133
|
-
}: {
|
|
134
|
-
tsconfigRootDir: string;
|
|
135
|
-
ignorePatterns?: string[];
|
|
136
|
-
thresholds?: typeof defaultThresholds;
|
|
137
|
-
}) {
|
|
138
|
-
return [
|
|
139
|
-
// Global ignores
|
|
140
|
-
{
|
|
141
|
-
ignores: ignorePatterns,
|
|
142
|
-
},
|
|
143
|
-
|
|
144
|
-
// Base configurations from shared module
|
|
145
|
-
...getBaseConfigs(),
|
|
146
|
-
|
|
147
|
-
// Base configuration for all files
|
|
148
|
-
{
|
|
149
|
-
languageOptions: getBaseLanguageOptions(),
|
|
150
|
-
plugins: {
|
|
151
|
-
"code-organization": codeOrganization,
|
|
152
|
-
},
|
|
153
|
-
rules: {
|
|
154
|
-
// Shared rules from base
|
|
155
|
-
...getSharedRules(thresholds),
|
|
156
|
-
...cdkRules,
|
|
157
|
-
},
|
|
158
|
-
},
|
|
159
|
-
|
|
160
|
-
// JavaScript files override
|
|
161
|
-
getJsFilesOverride(),
|
|
162
|
-
|
|
163
|
-
// Shared hooks and components
|
|
164
|
-
getSharedFilesOverride(),
|
|
165
|
-
|
|
166
|
-
// Test files
|
|
167
|
-
getTestFilesOverride(),
|
|
168
|
-
|
|
169
|
-
// TypeScript files - enable type-checked linting
|
|
170
|
-
getTsFilesOverride(["**/*.ts"], tsconfigRootDir),
|
|
171
|
-
|
|
172
|
-
// TypeScript test files - disable immutable-data
|
|
173
|
-
getTsTestFilesOverride(["**/*.test.ts", "**/*.spec.ts"]),
|
|
174
|
-
|
|
175
|
-
// Per-path CDK relaxations (bin, config, lambda handlers)
|
|
176
|
-
...cdkPathOverrides,
|
|
177
|
-
];
|
|
178
|
-
}
|
|
24
|
+
} from "@codyswann/lisa/eslint/cdk";
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
{
|
|
2
|
+
"//": "The program ESLint's type-aware rules read types from. It must resolve what the code really uses, or those rules see `any` and error types. It sets no `types` list, so it inherits the host's own (tsconfig.json, tsconfig.local.json) instead of overriding it; one here would also drop any ambient @types package the host names. This stack runs Vitest with `globals: true`, so `files` adds Vitest's global declarations on top. allowJs without checkJs lets TypeScript files import local .js/.mjs modules with inferred types instead of `any`, without type-checking the JavaScript.",
|
|
2
3
|
"extends": "./tsconfig.json",
|
|
3
4
|
"compilerOptions": {
|
|
4
5
|
"rootDir": ".",
|
|
5
6
|
"noEmit": true,
|
|
6
7
|
"allowImportingTsExtensions": true,
|
|
7
8
|
"module": "preserve",
|
|
8
|
-
"moduleResolution": "bundler"
|
|
9
|
+
"moduleResolution": "bundler",
|
|
10
|
+
"allowJs": true,
|
|
11
|
+
"checkJs": false
|
|
9
12
|
},
|
|
13
|
+
"files": ["node_modules/vitest/globals.d.ts"],
|
|
10
14
|
"include": ["**/*.ts"],
|
|
11
15
|
"exclude": ["node_modules", "dist", "cdk.out", "worktrees"]
|
|
12
16
|
}
|