@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
|
@@ -26,7 +26,36 @@
|
|
|
26
26
|
* @module catalogue
|
|
27
27
|
*/
|
|
28
28
|
|
|
29
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* One platform's pinned artifact for a release-archive install.
|
|
31
|
+
* @typedef {object} PlatformArtifact
|
|
32
|
+
* @property {string} url Exact-version download URL.
|
|
33
|
+
* @property {string} sha256 Checksum published with the release.
|
|
34
|
+
* @property {string} [binary] Path of the executable inside the archive.
|
|
35
|
+
* @property {string} [install] Archive kind, when it differs from the entry's.
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* One installable (or asserted) thing on a workstation.
|
|
40
|
+
* @typedef {object} CatalogueEntry
|
|
41
|
+
* @property {string} name Catalogue name.
|
|
42
|
+
* @property {string} label Human name.
|
|
43
|
+
* @property {string} kind How it is installed, or `required` / `manual` / `none`.
|
|
44
|
+
* @property {string} [binary] Executable name, when it differs from `name`.
|
|
45
|
+
* @property {string} [note] Why it is installed the way it is.
|
|
46
|
+
* @property {string} [version] Pinned version.
|
|
47
|
+
* @property {string} [package] npm package, for `npm-global`.
|
|
48
|
+
* @property {string} [script] Vendor install script URL.
|
|
49
|
+
* @property {string} [binDir] Where a vendor script puts the executable.
|
|
50
|
+
* @property {string} [minVersion] Lowest acceptable version of a required tool.
|
|
51
|
+
* @property {boolean} [selfUpdates] Whether the tool updates itself.
|
|
52
|
+
* @property {Record<string, PlatformArtifact>} [platforms] Per-platform artifacts.
|
|
53
|
+
*/
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Lisa's supported coding agents. Kept in sync with the harness list.
|
|
57
|
+
* @type {CatalogueEntry[]}
|
|
58
|
+
*/
|
|
30
59
|
export const AGENTS = [
|
|
31
60
|
{
|
|
32
61
|
name: "claude",
|
|
@@ -99,6 +128,7 @@ export const AGENTS = [
|
|
|
99
128
|
* Only the SELECTED provider is installed. Installing all of them would put
|
|
100
129
|
* four unused credential CLIs on a machine, each an extra thing to keep patched
|
|
101
130
|
* for no benefit.
|
|
131
|
+
* @type {CatalogueEntry[]}
|
|
102
132
|
*/
|
|
103
133
|
export const PROVIDERS = [
|
|
104
134
|
{
|
|
@@ -178,6 +208,7 @@ export const PROVIDERS = [
|
|
|
178
208
|
|
|
179
209
|
/**
|
|
180
210
|
* Tools every workstation needs regardless of project or provider.
|
|
211
|
+
* @type {CatalogueEntry[]}
|
|
181
212
|
*/
|
|
182
213
|
export const TOOLS = [
|
|
183
214
|
{
|
|
@@ -69,8 +69,8 @@ export async function loadPinnedInstaller() {
|
|
|
69
69
|
* describes a project — so the seam is made explicit here rather than by giving
|
|
70
70
|
* the catalogue a shape it does not otherwise need. `kind` becomes `install`;
|
|
71
71
|
* everything else the manifest reads is already named the same.
|
|
72
|
-
* @param {
|
|
73
|
-
* @returns {
|
|
72
|
+
* @param {import("./catalogue.mjs").CatalogueEntry} entry Catalogue entry.
|
|
73
|
+
* @returns {Record<string, unknown> & {name: string, install: string}} A `remoteEnv.tools` style entry.
|
|
74
74
|
*/
|
|
75
75
|
export function toManifestEntry(entry) {
|
|
76
76
|
const { kind, label, binDir, note, selfUpdates, ...rest } = entry;
|
|
@@ -118,11 +118,26 @@ export function provenance(path) {
|
|
|
118
118
|
return "other";
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
+
/**
|
|
122
|
+
* What the workstation installer will do about one entry, and why.
|
|
123
|
+
* @typedef {object} PlanRow
|
|
124
|
+
* @property {string} name Executable name.
|
|
125
|
+
* @property {string} label Human name.
|
|
126
|
+
* @property {string} kind How it would be installed.
|
|
127
|
+
* @property {string|null} path Where it is already installed, or null.
|
|
128
|
+
* @property {string|null} version Its installed version, when present.
|
|
129
|
+
* @property {string} from Provenance of an existing install.
|
|
130
|
+
* @property {boolean} checksummed Whether an install is checksum-verified.
|
|
131
|
+
* @property {string} action `present`, `install`, `manual` or `blocked`.
|
|
132
|
+
* @property {string} reason Plain-language reason for the action.
|
|
133
|
+
* @property {string} [group] `agent`, `provider` or `tool`, once planned.
|
|
134
|
+
*/
|
|
135
|
+
|
|
121
136
|
/**
|
|
122
137
|
* Decide what to do about one catalogue entry.
|
|
123
|
-
* @param {
|
|
138
|
+
* @param {{name: string, label: string, kind: string, note?: string}} entry Catalogue entry.
|
|
124
139
|
* @param {object} [deps] Injected probes, for tests.
|
|
125
|
-
* @returns {
|
|
140
|
+
* @returns {PlanRow} A plan row.
|
|
126
141
|
*/
|
|
127
142
|
export function planEntry(entry, deps = {}) {
|
|
128
143
|
const find = deps.locate ?? locate;
|
|
@@ -169,7 +184,7 @@ export function planEntry(entry, deps = {}) {
|
|
|
169
184
|
/**
|
|
170
185
|
* Build the full plan across agents and tools.
|
|
171
186
|
* @param {object} [options] Selection and injected probes.
|
|
172
|
-
* @returns {
|
|
187
|
+
* @returns {PlanRow[]} Plan rows, each with its `group`.
|
|
173
188
|
*/
|
|
174
189
|
export function planWorkstation(options = {}) {
|
|
175
190
|
const wanted = options.agents ?? null;
|
|
@@ -210,7 +225,7 @@ export function planWorkstation(options = {}) {
|
|
|
210
225
|
* typo that quietly provisions the wrong credential manager is worse than one
|
|
211
226
|
* that stops.
|
|
212
227
|
* @param {string|null|undefined} name Requested provider.
|
|
213
|
-
* @returns {
|
|
228
|
+
* @returns {import("./catalogue.mjs").CatalogueEntry|null} Entry, or null when none was requested.
|
|
214
229
|
*/
|
|
215
230
|
export function resolveProvider(name) {
|
|
216
231
|
if (name === null || name === undefined) return null;
|
|
@@ -226,9 +241,9 @@ export function resolveProvider(name) {
|
|
|
226
241
|
|
|
227
242
|
/**
|
|
228
243
|
* Plan the selected credential manager.
|
|
229
|
-
* @param {
|
|
244
|
+
* @param {import("./catalogue.mjs").CatalogueEntry} provider Catalogue entry.
|
|
230
245
|
* @param {object} [deps] Injected probes, for tests.
|
|
231
|
-
* @returns {
|
|
246
|
+
* @returns {PlanRow} A plan row.
|
|
232
247
|
*/
|
|
233
248
|
export function planProvider(provider, deps = {}) {
|
|
234
249
|
if (provider.kind === "none") {
|
|
@@ -251,7 +266,7 @@ export function planProvider(provider, deps = {}) {
|
|
|
251
266
|
|
|
252
267
|
/**
|
|
253
268
|
* Render the plan for a human.
|
|
254
|
-
* @param {
|
|
269
|
+
* @param {readonly PlanRow[]} plan Plan rows.
|
|
255
270
|
* @returns {string} Report text.
|
|
256
271
|
*/
|
|
257
272
|
export function renderPlan(plan) {
|
|
@@ -199,6 +199,15 @@ function nextActionFor(verdict, connectorName, reason) {
|
|
|
199
199
|
return `Run /lisa-wiki:ingest --source ${connectorName}.`;
|
|
200
200
|
}
|
|
201
201
|
|
|
202
|
+
/**
|
|
203
|
+
* Build the reader-facing freshness report for every enabled connector.
|
|
204
|
+
* @param {object} [options] Inputs.
|
|
205
|
+
* @param {string} [options.configPath] Path to the wiki config JSON.
|
|
206
|
+
* @param {string} [options.wikiRoot] Wiki directory; defaults to `wiki`.
|
|
207
|
+
* @param {Date} [options.now] The instant freshness is judged at.
|
|
208
|
+
* @param {number} [options.staleAfterDays] Age at which an observation is stale.
|
|
209
|
+
* @returns {{generatedAt: string, configPath: string, wikiRoot: string, items: Array<{connector: string, sideEffects: string, verdict: string, evidence: string[], lastObserved: string, reason: string, nextAction: string}>}} The report.
|
|
210
|
+
*/
|
|
202
211
|
export function createWikiFreshnessReport({
|
|
203
212
|
configPath = "wiki/lisa-wiki.config.json",
|
|
204
213
|
wikiRoot,
|
|
@@ -228,6 +237,15 @@ export function createWikiFreshnessReport({
|
|
|
228
237
|
};
|
|
229
238
|
}
|
|
230
239
|
|
|
240
|
+
/**
|
|
241
|
+
* Read each enabled connector's freshness facts from the wiki, without writing.
|
|
242
|
+
* @param {object} [options] Inputs.
|
|
243
|
+
* @param {string} [options.configPath] Path to the wiki config JSON.
|
|
244
|
+
* @param {string} [options.wikiRoot] Wiki directory; defaults to `wiki`.
|
|
245
|
+
* @param {Date} [options.now] The instant freshness is judged at.
|
|
246
|
+
* @param {number} [options.staleAfterDays] Age at which an observation is stale.
|
|
247
|
+
* @returns {{configPath: string, wikiRoot: string, connectors: Array<{connector: string, sideEffects: string, verdict: string, evidencePaths: string[], lastObservedDate: string|undefined, reason: string, nextAction: string}>}} Absolute paths and one record per connector.
|
|
248
|
+
*/
|
|
231
249
|
export function parseWikiSourceFreshness({
|
|
232
250
|
configPath = "wiki/lisa-wiki.config.json",
|
|
233
251
|
wikiRoot,
|
|
@@ -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$/,
|
|
@@ -40,7 +40,7 @@ type BudgetChecker = Pick<
|
|
|
40
40
|
"checkLearningsBudget" | "formatBudgetVerdict" | "formatDiagnosticPath"
|
|
41
41
|
>;
|
|
42
42
|
|
|
43
|
-
const REPO_ROOT = path.resolve(import.meta.
|
|
43
|
+
const REPO_ROOT = path.resolve(import.meta.dirname, "..");
|
|
44
44
|
|
|
45
45
|
const TEMPLATE_LEARNINGS_FILE = path.resolve(
|
|
46
46
|
REPO_ROOT,
|
|
@@ -221,7 +221,7 @@ async function check(checker: BudgetChecker, file: string): Promise<void> {
|
|
|
221
221
|
* @returns Canonical budget-checker functions
|
|
222
222
|
*/
|
|
223
223
|
async function loadBudgetChecker(): Promise<BudgetChecker> {
|
|
224
|
-
const packageRoot = path.resolve(import.meta.
|
|
224
|
+
const packageRoot = path.resolve(import.meta.dirname, "..");
|
|
225
225
|
const sourceTypescript = path.join(
|
|
226
226
|
packageRoot,
|
|
227
227
|
"src",
|
|
@@ -247,7 +247,7 @@ async function loadBudgetChecker(): Promise<BudgetChecker> {
|
|
|
247
247
|
async function loadOverflowResolver(): Promise<
|
|
248
248
|
typeof OverflowPathModule.resolveLearningsOverflowFile
|
|
249
249
|
> {
|
|
250
|
-
const packageRoot = path.resolve(import.meta.
|
|
250
|
+
const packageRoot = path.resolve(import.meta.dirname, "..");
|
|
251
251
|
const sourceTypescript = path.join(
|
|
252
252
|
packageRoot,
|
|
253
253
|
"src",
|
|
@@ -269,7 +269,7 @@ async function loadOverflowResolver(): Promise<
|
|
|
269
269
|
async function loadConfiguredLearningsResolver(): Promise<
|
|
270
270
|
typeof ConfiguredPathModule.resolveLearningsFileFromRawConfig
|
|
271
271
|
> {
|
|
272
|
-
const packageRoot = path.resolve(import.meta.
|
|
272
|
+
const packageRoot = path.resolve(import.meta.dirname, "..");
|
|
273
273
|
const sourceTypescript = path.join(
|
|
274
274
|
packageRoot,
|
|
275
275
|
"src",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* Type-check `tests/` and
|
|
3
|
+
* Type-check `tests/` and fail on any error, in any file.
|
|
4
4
|
*
|
|
5
5
|
* WHY THIS EXISTS. The required `type-correctness` gate compiles `tsconfig.json`,
|
|
6
6
|
* whose `include` is `src/**\/*`, so it compiled 0 of 1385 test files and reported
|
|
@@ -8,33 +8,19 @@
|
|
|
8
8
|
* (CodySwannGT/lisa#3811). Test files here are not incidental: they hold fixture
|
|
9
9
|
* builders, shape assertions and harnesses other suites import.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* immediately**, and only the files that were already failing are exempt.
|
|
11
|
+
* THERE IS NO EXEMPTION LIST. The gate once held a file-level quarantine of
|
|
12
|
+
* files that were already failing when the program was switched on, ratcheted
|
|
13
|
+
* so it could only shrink. CodySwannGT/lisa#4923 emptied it and deleted it: an
|
|
14
|
+
* exemption list is debt with a mechanism attached, and the mechanism outlives
|
|
15
|
+
* the reason. Every file in the program is now held to the same rule — one type
|
|
16
|
+
* error anywhere fails the gate.
|
|
18
17
|
*
|
|
19
|
-
* IT
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* `typecheck-quarantine.json` is additionally watched by the existing
|
|
27
|
-
* threshold-ratchet as an `allow-list` family, so *adding* an entry is flagged
|
|
28
|
-
* by a gate somebody already reads.
|
|
29
|
-
*
|
|
30
|
-
* IT REFUSES TO ANSWER FROM AN UNRESOLVABLE TREE (CodySwannGT/lisa#3913). The
|
|
31
|
-
* second of those ratchet directions is the destructive one: it names files and
|
|
32
|
-
* tells a reader to delete their quarantine entries. With an empty
|
|
33
|
-
* `node_modules` the compiler cannot start, nothing is compiled, no diagnostic
|
|
34
|
-
* is parsed — and "no diagnostic for this file" is exactly the shape of "this
|
|
35
|
-
* file was fixed". The gate reported all 370 quarantined files as cleared and
|
|
36
|
-
* instructed their removal, which is a destructive edit ordered on the strength
|
|
37
|
-
* of a comparison whose inputs never resolved.
|
|
18
|
+
* IT REFUSES TO ANSWER FROM AN UNRESOLVABLE TREE (CodySwannGT/lisa#3913). With
|
|
19
|
+
* an empty `node_modules` the compiler cannot start, nothing is compiled and no
|
|
20
|
+
* diagnostic is parsed. Under the old quarantine that emptiness read as "every
|
|
21
|
+
* quarantined file was fixed" and ordered a destructive edit; without one it
|
|
22
|
+
* would read as a clean run. Either way it is a verdict about a program nobody
|
|
23
|
+
* compiled, so it is refused rather than reported.
|
|
38
24
|
*
|
|
39
25
|
* So there are two ways this refuses instead of reporting, and the second is
|
|
40
26
|
* the general one:
|
|
@@ -54,6 +40,13 @@
|
|
|
54
40
|
* token out of this header to decide the gate is probeable at all — without it
|
|
55
41
|
* this sits in that sweep's declared blind spot.
|
|
56
42
|
*
|
|
43
|
+
* `--project` POINTS IT AT ANOTHER PROGRAM. `tsconfig.eslint.json` is the
|
|
44
|
+
* program ESLint's type-aware rules read their types from; it once reported
|
|
45
|
+
* 5,294 errors while lint passed, so those rules were reasoning over `any` and
|
|
46
|
+
* error types (CodySwannGT/lisa#4927). `bun run typecheck:eslint` runs this
|
|
47
|
+
* same gate over it — same rules, same refusals, no exemption list — so that
|
|
48
|
+
* program cannot rot unseen again. Without the flag it checks the test program.
|
|
49
|
+
*
|
|
57
50
|
* WHAT IS DELIBERATELY NOT DONE HERE: the declared `lib` is not widened. tsc
|
|
58
51
|
* emits "Try changing the 'lib' compiler option to 'es2023' or later" on the
|
|
59
52
|
* ES2023 array APIs, and taking that suggestion would have erased the
|
|
@@ -63,7 +56,6 @@
|
|
|
63
56
|
* @module scripts/check-typecheck-tests
|
|
64
57
|
*/
|
|
65
58
|
import { spawnSync } from "node:child_process";
|
|
66
|
-
import { readFileSync } from "node:fs";
|
|
67
59
|
import * as path from "node:path";
|
|
68
60
|
import process from "node:process";
|
|
69
61
|
import { fileURLToPath } from "node:url";
|
|
@@ -81,8 +73,40 @@ const DEFAULT_ROOT = path.resolve(
|
|
|
81
73
|
".."
|
|
82
74
|
);
|
|
83
75
|
|
|
84
|
-
/** The
|
|
85
|
-
const
|
|
76
|
+
/** The project the gate compiles when no `--project` is given. */
|
|
77
|
+
const DEFAULT_PROJECT = "tsconfig.tests.json";
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* How each known program is named in the report and the refusal. The test
|
|
81
|
+
* program's wording is a contract: `gate-failure-diagnosis.mjs` and the tests
|
|
82
|
+
* pinning this gate read it.
|
|
83
|
+
* @type {Readonly<Record<string, { gate: string, program: string }>>}
|
|
84
|
+
*/
|
|
85
|
+
const PROGRAMS = {
|
|
86
|
+
"tsconfig.tests.json": {
|
|
87
|
+
gate: "type-correctness (tests)",
|
|
88
|
+
program: "the test program",
|
|
89
|
+
},
|
|
90
|
+
"tsconfig.eslint.json": {
|
|
91
|
+
gate: "type-correctness (eslint program)",
|
|
92
|
+
program: "the ESLint program",
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Name a program for the report: a known one by its fixed wording, any other
|
|
98
|
+
* by its config file, so a new project never prints as the test program.
|
|
99
|
+
* @param {string} project - The tsconfig path, relative to the root.
|
|
100
|
+
* @returns {{ gate: string, program: string }} The gate name and program noun.
|
|
101
|
+
*/
|
|
102
|
+
export function describeProgram(project) {
|
|
103
|
+
return (
|
|
104
|
+
PROGRAMS[project] ?? {
|
|
105
|
+
gate: `type-correctness (${project})`,
|
|
106
|
+
program: `the ${project} program`,
|
|
107
|
+
}
|
|
108
|
+
);
|
|
109
|
+
}
|
|
86
110
|
|
|
87
111
|
/**
|
|
88
112
|
* Where the compiler is spawned from, relative to the root: the TypeScript
|
|
@@ -90,9 +114,9 @@ const GATE = "type-correctness (tests)";
|
|
|
90
114
|
* program about ten times faster than `tsc` (CodySwannGT/lisa#4614, #4695). On
|
|
91
115
|
* this program it puts the same set of files in error as `tsc`, though error
|
|
92
116
|
* counts, codes and wording can differ — which is enough, because this gate
|
|
93
|
-
*
|
|
94
|
-
* across compilers. Its bin is a plain Node script, so it is
|
|
95
|
-
* `node` exactly as `tsc` was.
|
|
117
|
+
* asks only whether any file is in error and names the files, never compares
|
|
118
|
+
* raw diagnostics across compilers. Its bin is a plain Node script, so it is
|
|
119
|
+
* spawned under `node` exactly as `tsc` was.
|
|
96
120
|
*/
|
|
97
121
|
const TSC = path.join(
|
|
98
122
|
"node_modules",
|
|
@@ -105,29 +129,6 @@ const TSC = path.join(
|
|
|
105
129
|
/** Matches `path/to/file.ts(12,34): error TS1234: message`. */
|
|
106
130
|
const ERROR_LINE = /^(?<file>[^(]+)\((?<line>\d+),\d+\): error (?<code>TS\d+):/;
|
|
107
131
|
|
|
108
|
-
/**
|
|
109
|
-
* Read the quarantined paths.
|
|
110
|
-
* @param {string} root - The directory holding the quarantine.
|
|
111
|
-
* @returns {{files: string[], reason: string} | null} The parsed quarantine, or
|
|
112
|
-
* `null` when it could not be read — an unreadable list is a refusal, not a
|
|
113
|
-
* pass, because that file is what makes this gate green.
|
|
114
|
-
*/
|
|
115
|
-
function readQuarantine(root) {
|
|
116
|
-
const quarantine = path.join(root, "typecheck-quarantine.json");
|
|
117
|
-
try {
|
|
118
|
-
const parsed = JSON.parse(readFileSync(quarantine, "utf-8"));
|
|
119
|
-
return { files: parsed.files ?? [], reason: parsed.reason ?? "" };
|
|
120
|
-
} catch (error) {
|
|
121
|
-
console.error(
|
|
122
|
-
`check-typecheck-tests: cannot read ${path.relative(root, quarantine)} — ${error.message}`
|
|
123
|
-
);
|
|
124
|
-
console.error(
|
|
125
|
-
"That file is what makes this gate green, so an unreadable one is a refusal, not a pass."
|
|
126
|
-
);
|
|
127
|
-
return null;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
132
|
/**
|
|
132
133
|
* Parse the compiler's output into a per-file error count.
|
|
133
134
|
* @param {string} output - Combined stdout and stderr.
|
|
@@ -148,45 +149,37 @@ function parseDiagnostics(output) {
|
|
|
148
149
|
/**
|
|
149
150
|
* The refusal issued when nothing was compiled.
|
|
150
151
|
*
|
|
151
|
-
* The denial names the
|
|
152
|
-
* the
|
|
153
|
-
*
|
|
154
|
-
* has to deny both, not just the first.
|
|
152
|
+
* The denial names the inference a reader draws from an empty diagnostic set —
|
|
153
|
+
* that the test program type-checks — because that is exactly what was not
|
|
154
|
+
* established.
|
|
155
155
|
*
|
|
156
|
-
* NO FILE IS NAMED HERE, deliberately
|
|
157
|
-
*
|
|
158
|
-
* would be followed exactly as often as the finding it replaces.
|
|
156
|
+
* NO FILE IS NAMED HERE, deliberately: nothing was compiled, so nothing is
|
|
157
|
+
* known about any file.
|
|
159
158
|
*
|
|
159
|
+
* @param {{ gate: string, program: string }} named - The program's names.
|
|
160
160
|
* @param {string} because - Why the measurement could not happen.
|
|
161
|
-
* @param {number} quarantined - How many entries went unexamined.
|
|
162
161
|
* @param {string} fix - The action that repairs THIS cause. Named per call
|
|
163
162
|
* site rather than fixed, because telling someone to install dependencies
|
|
164
163
|
* they already have is how a refusal gets dismissed as noise.
|
|
165
164
|
* @returns {string} The refusal block.
|
|
166
165
|
*/
|
|
167
|
-
function refuseUnmeasurable(
|
|
166
|
+
function refuseUnmeasurable(named, because, fix) {
|
|
168
167
|
return cannotMeasure({
|
|
169
|
-
gate:
|
|
170
|
-
denial: `that
|
|
168
|
+
gate: named.gate,
|
|
169
|
+
denial: `that ${named.program} type-checks`,
|
|
171
170
|
because,
|
|
172
|
-
remedy:
|
|
173
|
-
`${fix} Do NOT edit typecheck-quarantine.json on the strength of ` +
|
|
174
|
-
`this — no file was compiled, so nothing was established about any ` +
|
|
175
|
-
`entry in it.`,
|
|
171
|
+
remedy: `${fix} No file was compiled, so nothing was established about any of them.`,
|
|
176
172
|
});
|
|
177
173
|
}
|
|
178
174
|
|
|
179
175
|
/**
|
|
180
176
|
* Run the gate.
|
|
181
|
-
* @param {string} root - Directory to resolve the project
|
|
177
|
+
* @param {string} root - Directory to resolve the project under.
|
|
178
|
+
* @param {string} [project] - The tsconfig to compile, relative to the root.
|
|
182
179
|
* @returns {number} The process exit code.
|
|
183
180
|
*/
|
|
184
|
-
export function main(root) {
|
|
185
|
-
const
|
|
186
|
-
if (quarantine === null) return 1;
|
|
187
|
-
const quarantined = quarantine.files;
|
|
188
|
-
const exempt = new Set(quarantined);
|
|
189
|
-
|
|
181
|
+
export function main(root, project = DEFAULT_PROJECT) {
|
|
182
|
+
const named = describeProgram(project);
|
|
190
183
|
// PRECONDITION. Checked before the spawn rather than inferred from it: the
|
|
191
184
|
// spawn SUCCEEDS with an empty `node_modules` — node starts, and it is node
|
|
192
185
|
// that cannot find the module — so `tsc.error` never fires and the failure
|
|
@@ -195,8 +188,8 @@ export function main(root) {
|
|
|
195
188
|
if (missing.length > 0) {
|
|
196
189
|
console.error(
|
|
197
190
|
refuseUnmeasurable(
|
|
191
|
+
named,
|
|
198
192
|
`the TypeScript native compiler (tsgo) is not installed — no file at ${missing[0]}.`,
|
|
199
|
-
quarantined.length,
|
|
200
193
|
`Run \`${INSTALL_COMMAND}\`, then re-run this gate.`
|
|
201
194
|
)
|
|
202
195
|
);
|
|
@@ -211,7 +204,7 @@ export function main(root) {
|
|
|
211
204
|
"--pretty",
|
|
212
205
|
"false",
|
|
213
206
|
"-p",
|
|
214
|
-
path.join(root,
|
|
207
|
+
path.join(root, project),
|
|
215
208
|
],
|
|
216
209
|
{ cwd: root, encoding: "utf-8", maxBuffer: 64 * 1024 * 1024 }
|
|
217
210
|
);
|
|
@@ -228,10 +221,10 @@ export function main(root) {
|
|
|
228
221
|
);
|
|
229
222
|
|
|
230
223
|
// POSTCONDITION, and the general form of the same defect. The compiler
|
|
231
|
-
// signalled failure and produced nothing this gate can read
|
|
232
|
-
//
|
|
233
|
-
//
|
|
234
|
-
// is a clean run, and it reports normally.
|
|
224
|
+
// signalled failure and produced nothing this gate can read — a broken
|
|
225
|
+
// tsconfig, an OOM, a crash. Reporting that as a pass would be a verdict
|
|
226
|
+
// about a program nobody compiled. A ZERO exit with no diagnostics is not
|
|
227
|
+
// this: it is a clean run, and it reports normally.
|
|
235
228
|
if (ranVacuously(tsc.status, errorsByFile.size)) {
|
|
236
229
|
const firstLine = `${tsc.stderr ?? ""}${tsc.stdout ?? ""}`
|
|
237
230
|
.split("\n")
|
|
@@ -239,83 +232,80 @@ export function main(root) {
|
|
|
239
232
|
.find(Boolean);
|
|
240
233
|
console.error(
|
|
241
234
|
refuseUnmeasurable(
|
|
235
|
+
named,
|
|
242
236
|
`tsgo exited ${tsc.status} without emitting one diagnostic this gate ` +
|
|
243
|
-
`could parse, so the
|
|
237
|
+
`could parse, so the check had no subject.` +
|
|
244
238
|
`${firstLine ? ` First output line: ${firstLine}` : ""}`,
|
|
245
|
-
quarantined.length,
|
|
246
239
|
"Fix the cause named above, then re-run this gate."
|
|
247
240
|
)
|
|
248
241
|
);
|
|
249
242
|
return 1;
|
|
250
243
|
}
|
|
251
244
|
|
|
252
|
-
const offenders = [...errorsByFile.keys()]
|
|
253
|
-
.filter(file => !exempt.has(file))
|
|
254
|
-
.sort();
|
|
255
|
-
const cleared = quarantined.filter(file => !errorsByFile.has(file)).sort();
|
|
256
|
-
|
|
245
|
+
const offenders = [...errorsByFile.keys()].sort();
|
|
257
246
|
const totalErrors = [...errorsByFile.values()].reduce((sum, n) => sum + n, 0);
|
|
258
247
|
console.log(
|
|
259
|
-
`${
|
|
260
|
-
`${quarantined.length} quarantined.`
|
|
248
|
+
`${named.gate}: ${errorsByFile.size} file(s) with ${totalErrors} error(s).`
|
|
261
249
|
);
|
|
262
250
|
|
|
263
251
|
if (offenders.length > 0) {
|
|
264
252
|
console.error("");
|
|
265
|
-
console.error(
|
|
266
|
-
`❌ ${offenders.length} file(s) outside the quarantine have type errors:`
|
|
267
|
-
);
|
|
253
|
+
console.error(`❌ ${offenders.length} file(s) have type errors:`);
|
|
268
254
|
for (const file of offenders) {
|
|
269
255
|
console.error(` ${file} (${errorsByFile.get(file)})`);
|
|
270
256
|
}
|
|
271
257
|
console.error("");
|
|
272
258
|
console.error(
|
|
273
|
-
"Fix
|
|
274
|
-
);
|
|
275
|
-
console.error(
|
|
276
|
-
"only shrinks, and the threshold-ratchet flags additions to it."
|
|
277
|
-
);
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
if (cleared.length > 0) {
|
|
281
|
-
console.error("");
|
|
282
|
-
console.error(
|
|
283
|
-
`❌ ${cleared.length} quarantined file(s) now type-check and must leave the list:`
|
|
284
|
-
);
|
|
285
|
-
for (const file of cleared) console.error(` ${file}`);
|
|
286
|
-
console.error("");
|
|
287
|
-
console.error(
|
|
288
|
-
"Remove them from typecheck-quarantine.json. A list that keeps entries"
|
|
289
|
-
);
|
|
290
|
-
console.error(
|
|
291
|
-
"after they are fixed would re-authorise them if they ever regressed."
|
|
259
|
+
"Fix each at its cause. There is no exemption list: every file in"
|
|
292
260
|
);
|
|
261
|
+
console.error(`${named.program} is type-checked, and one error fails it.`);
|
|
262
|
+
return 1;
|
|
293
263
|
}
|
|
294
264
|
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
console.log(
|
|
298
|
-
"✅ No type errors outside the quarantine, and no stale quarantine entries."
|
|
299
|
-
);
|
|
265
|
+
const program =
|
|
266
|
+
named.program.charAt(0).toUpperCase() + named.program.slice(1);
|
|
267
|
+
console.log(`✅ ${program} type-checks with no errors.`);
|
|
300
268
|
return 0;
|
|
301
269
|
}
|
|
302
270
|
|
|
303
271
|
/**
|
|
304
|
-
*
|
|
272
|
+
* Read the value following `flag`, or undefined when the flag is absent.
|
|
305
273
|
* @param {ReadonlyArray<string>} argv - Arguments after the script name.
|
|
306
|
-
* @
|
|
274
|
+
* @param {string} flag - The flag, e.g. `--root`.
|
|
275
|
+
* @returns {string | undefined} The flag's value.
|
|
307
276
|
*/
|
|
308
|
-
|
|
309
|
-
const
|
|
310
|
-
if (
|
|
311
|
-
const value = argv[
|
|
277
|
+
function flagValue(argv, flag) {
|
|
278
|
+
const index = argv.indexOf(flag);
|
|
279
|
+
if (index === -1) return undefined;
|
|
280
|
+
const value = argv[index + 1];
|
|
312
281
|
if (value === undefined) {
|
|
313
|
-
console.error(
|
|
282
|
+
console.error(`check-typecheck-tests: ${flag} requires a value`);
|
|
314
283
|
process.exit(2);
|
|
315
284
|
}
|
|
316
|
-
return
|
|
285
|
+
return value;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Resolve the root from `--root <dir>`, defaulting to the repository.
|
|
290
|
+
* @param {ReadonlyArray<string>} argv - Arguments after the script name.
|
|
291
|
+
* @returns {string} The absolute root.
|
|
292
|
+
*/
|
|
293
|
+
export function rootFrom(argv) {
|
|
294
|
+
const value = flagValue(argv, "--root");
|
|
295
|
+
return value === undefined ? DEFAULT_ROOT : path.resolve(value);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Resolve the project from `--project <tsconfig>`, relative to the root and
|
|
300
|
+
* defaulting to the test program.
|
|
301
|
+
* @param {ReadonlyArray<string>} argv - Arguments after the script name.
|
|
302
|
+
* @returns {string} The tsconfig path relative to the root.
|
|
303
|
+
*/
|
|
304
|
+
export function projectFrom(argv) {
|
|
305
|
+
return flagValue(argv, "--project") ?? DEFAULT_PROJECT;
|
|
317
306
|
}
|
|
318
307
|
|
|
319
308
|
if (invokedAsScript(import.meta.url)) {
|
|
320
|
-
process.
|
|
309
|
+
const argv = process.argv.slice(2);
|
|
310
|
+
process.exit(main(rootFrom(argv), projectFrom(argv)));
|
|
321
311
|
}
|
|
@@ -442,11 +442,21 @@ export function byPosition(left, right) {
|
|
|
442
442
|
return (left.position ?? 0) - (right.position ?? 0);
|
|
443
443
|
}
|
|
444
444
|
|
|
445
|
+
/**
|
|
446
|
+
* One scope whose whole-output guard leaves transform steps unaccounted for.
|
|
447
|
+
* @typedef {object} GuardFinding
|
|
448
|
+
* @property {string} file Repository-relative path.
|
|
449
|
+
* @property {string} scope The scope's name, or `<module>` / `<anonymous>`.
|
|
450
|
+
* @property {number} steps Transform steps counted, an iterated step as two.
|
|
451
|
+
* @property {Array<{line: number, test: string, operands: string[]}>} guards Whole-output guards in the scope.
|
|
452
|
+
* @property {Array<{line: number, anchor: string}>} unaccounted Steps no anchor assertion accounts for, in source order.
|
|
453
|
+
*/
|
|
454
|
+
|
|
445
455
|
/**
|
|
446
456
|
* Turn one scope's evidence into a finding, or `null`.
|
|
447
457
|
* @param {object} evidence - Collected evidence for the scope.
|
|
448
458
|
* @param {string} file - Repository-relative path, for reporting.
|
|
449
|
-
* @returns {
|
|
459
|
+
* @returns {GuardFinding | null} A finding, or `null` when the scope is sound.
|
|
450
460
|
*/
|
|
451
461
|
export function judgeScope(evidence, file) {
|
|
452
462
|
const stepCount = evidence.steps.reduce(
|
|
@@ -513,7 +523,7 @@ export function collectFiles(root, repoRoot) {
|
|
|
513
523
|
* Run the sweep over a tree.
|
|
514
524
|
* @param {string} repoRoot - Absolute path of the tree to inspect.
|
|
515
525
|
* @param {readonly string[]} [roots] - Sub-directories to scan.
|
|
516
|
-
* @returns {{ inspected: number, files: number, findings:
|
|
526
|
+
* @returns {{ inspected: number, files: number, findings: GuardFinding[] }} Report.
|
|
517
527
|
*/
|
|
518
528
|
export function sweep(repoRoot, roots = SCANNED_ROOTS) {
|
|
519
529
|
const report = { inspected: 0, files: 0, findings: [] };
|
|
@@ -70,6 +70,12 @@ export const RETAINED_RELEASES = Object.freeze([
|
|
|
70
70
|
// to the 50 releases from v4.22.13 through v4.26.0 (#3500), found only after
|
|
71
71
|
// the fact. Adding the ref here is what stops this change repeating it.
|
|
72
72
|
"v4.50.3",
|
|
73
|
+
// The guard every release from at least v4.111.2 through v5.14.2 shipped
|
|
74
|
+
// (sha256 d1b26caeaf65…). Retained in the commit that corrects a JSDoc type
|
|
75
|
+
// in the workspace guard (#4923): the edit changes the file's digest, so
|
|
76
|
+
// without this ref regeneration would revoke the certificate those installed
|
|
77
|
+
// releases rely on, the #3500 regression again.
|
|
78
|
+
"v5.14.2",
|
|
73
79
|
]);
|
|
74
80
|
|
|
75
81
|
const digest = bytes => createHash("sha256").update(bytes).digest("hex");
|