@codyswann/lisa 5.14.3 → 6.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdk/copy-overwrite/eslint.cdk.ts +7 -161
- package/cdk/copy-overwrite/tsconfig.eslint.json +5 -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/nightly-e2e-guard-behavior-certificate.js +2 -2
- 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 +33 -18
- 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 +7 -9
- 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-agy/plugin.json +1 -1
- 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-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
- 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-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
- package/scripts/check-learnings-budget.ts +4 -4
- package/scripts/check-self-dependency-pin.mjs +172 -5
- package/scripts/check-typecheck-tests.mjs +88 -20
- package/scripts/push-self-pin-raise.sh +79 -0
- package/scripts/raise-self-dependency-pin.mjs +166 -0
- package/scripts/two-channel-couplings.json +125 -9
- package/scripts/update-node-version.ts +1 -1
- package/scripts/verify-self-pin-raise.mjs +487 -0
- 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
|
@@ -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",
|
|
@@ -10,9 +10,12 @@
|
|
|
10
10
|
* own `name` is `@codyswann/lisa` is restricted to security pins, so the
|
|
11
11
|
* self-pin phase never runs. That exemption is right — a package should not
|
|
12
12
|
* acquire a dependency on a published copy of itself as a side effect of
|
|
13
|
-
* applying to itself — and it
|
|
14
|
-
* repository whose pin no automation
|
|
15
|
-
* the
|
|
13
|
+
* applying to itself — and it had a consequence nobody wrote down: **the one
|
|
14
|
+
* repository whose pin no automation corrected was the one that ships the
|
|
15
|
+
* automation.** The correction now lives on the release path instead:
|
|
16
|
+
* `scripts/raise-self-dependency-pin.mjs`, run by the self-pin-raise
|
|
17
|
+
* workflow's `prepare_self_pin_raise` and `push_self_pin_raise` jobs after
|
|
18
|
+
* every publish and hourly (#4951). This check is what proves those jobs did their work.
|
|
16
19
|
*
|
|
17
20
|
* The result was measured twice. #2279 (2026-08-04) moved the floor to
|
|
18
21
|
* `^2.328.0` because it was 130 releases behind. #3662 (2026-09-03) moved it
|
|
@@ -312,6 +315,118 @@ export async function checkSelfPin({
|
|
|
312
315
|
};
|
|
313
316
|
}
|
|
314
317
|
|
|
318
|
+
/**
|
|
319
|
+
* The two packument shapes a registry serves. The full document is what this
|
|
320
|
+
* check reads; the abbreviated install document is what Bun's resolver reads.
|
|
321
|
+
* They are cached separately, so one can list a release the other does not.
|
|
322
|
+
*/
|
|
323
|
+
const PACKUMENT_SHAPES = [
|
|
324
|
+
{ name: "full", accept: "application/json" },
|
|
325
|
+
{ name: "abbreviated", accept: "application/vnd.npm.install-v1+json" },
|
|
326
|
+
];
|
|
327
|
+
|
|
328
|
+
/** How many times the packument is read before the release is given up on. */
|
|
329
|
+
const LISTED_POLLS = 40;
|
|
330
|
+
|
|
331
|
+
/** Delay between packument reads: 40 polls span ten minutes. */
|
|
332
|
+
const LISTED_POLL_DELAY_MS = 15_000;
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* Whether one packument shape lists a version.
|
|
336
|
+
* @param {string} url - The packument URL.
|
|
337
|
+
* @param {string} accept - The shape's media type.
|
|
338
|
+
* @param {string} version - The release to look for.
|
|
339
|
+
* @param {typeof fetch} fetchImpl - Injected for tests.
|
|
340
|
+
* @returns {Promise<{listed: boolean, detail: string}>} The answer.
|
|
341
|
+
*/
|
|
342
|
+
async function shapeLists(url, accept, version, fetchImpl) {
|
|
343
|
+
try {
|
|
344
|
+
const response = await fetchImpl(url, { headers: { accept } });
|
|
345
|
+
if (!response.ok) {
|
|
346
|
+
return { listed: false, detail: `HTTP ${response.status} from ${url}` };
|
|
347
|
+
}
|
|
348
|
+
const packument = await response.json();
|
|
349
|
+
return packument?.versions?.[version] === undefined
|
|
350
|
+
? { listed: false, detail: `the packument does not list ${version} yet` }
|
|
351
|
+
: { listed: true, detail: `the packument lists ${version}` };
|
|
352
|
+
} catch (error) {
|
|
353
|
+
return { listed: false, detail: `network: ${error.message} (${url})` };
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* Wait, with a bound, until both packument shapes list a release.
|
|
359
|
+
*
|
|
360
|
+
* The exact-version endpoint can serve a release before the packument lists
|
|
361
|
+
* it. Both `check:self-pin` (newest listed version) and Bun's resolver (the
|
|
362
|
+
* abbreviated packument) read the packument, so a raise proved before it lists
|
|
363
|
+
* the release would compare `^7.0.0` against 6.x and fail for a reason that is
|
|
364
|
+
* only propagation lag.
|
|
365
|
+
* @param {object} options - Version, registry, fetch seam, poll budget and sleep seam.
|
|
366
|
+
* @returns {Promise<{listed: boolean, detail: string}>} Whether both shapes list it.
|
|
367
|
+
*/
|
|
368
|
+
export async function awaitListed({
|
|
369
|
+
version,
|
|
370
|
+
registry = DEFAULT_REGISTRY,
|
|
371
|
+
fetchImpl = fetch,
|
|
372
|
+
polls = LISTED_POLLS,
|
|
373
|
+
sleep = () =>
|
|
374
|
+
new Promise(resolve => setTimeout(resolve, LISTED_POLL_DELAY_MS)),
|
|
375
|
+
}) {
|
|
376
|
+
const url = `${registry}/${SELF_PACKAGE}`;
|
|
377
|
+
const poll = async number => {
|
|
378
|
+
const answers = await Promise.all(
|
|
379
|
+
PACKUMENT_SHAPES.map(shape =>
|
|
380
|
+
shapeLists(url, shape.accept, version, fetchImpl)
|
|
381
|
+
)
|
|
382
|
+
);
|
|
383
|
+
const missing = answers.flatMap((answer, index) =>
|
|
384
|
+
answer.listed ? [] : [`${PACKUMENT_SHAPES[index].name}: ${answer.detail}`]
|
|
385
|
+
);
|
|
386
|
+
if (missing.length === 0) {
|
|
387
|
+
return { listed: true, detail: `both packument shapes list ${version}` };
|
|
388
|
+
}
|
|
389
|
+
if (number >= polls) {
|
|
390
|
+
return {
|
|
391
|
+
listed: false,
|
|
392
|
+
detail: `after ${polls} reads, ${missing.join("; ")}`,
|
|
393
|
+
};
|
|
394
|
+
}
|
|
395
|
+
await sleep();
|
|
396
|
+
return poll(number + 1);
|
|
397
|
+
};
|
|
398
|
+
return poll(1);
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* The newest version the registry will actually serve, for a caller that
|
|
403
|
+
* needs a version to raise to rather than a verdict on a manifest.
|
|
404
|
+
* @param {object} options - Registry and the same seams as {@link checkSelfPin}.
|
|
405
|
+
* @returns {Promise<{version: string | null, detail: string}>} The newest installable release.
|
|
406
|
+
*/
|
|
407
|
+
export async function newestInstallableVersion({
|
|
408
|
+
registry = DEFAULT_REGISTRY,
|
|
409
|
+
fetchImpl = fetch,
|
|
410
|
+
attempts = 3,
|
|
411
|
+
sleep = () => new Promise(resolve => setTimeout(resolve, 2000)),
|
|
412
|
+
injected = {},
|
|
413
|
+
}) {
|
|
414
|
+
const { packument, detail } = await fetchPackument({
|
|
415
|
+
registry,
|
|
416
|
+
packageName: SELF_PACKAGE,
|
|
417
|
+
fetchImpl,
|
|
418
|
+
attempts,
|
|
419
|
+
sleep,
|
|
420
|
+
});
|
|
421
|
+
if (packument === null) return { version: null, detail };
|
|
422
|
+
const found = await newestInstallable({
|
|
423
|
+
candidates: publishedVersionsDescending(packument),
|
|
424
|
+
registry,
|
|
425
|
+
injected: { fetchImpl, ...injected },
|
|
426
|
+
});
|
|
427
|
+
return { version: found.version, detail: found.detail };
|
|
428
|
+
}
|
|
429
|
+
|
|
315
430
|
/** Exit code for each verdict. `unprovable` blocks: nothing was proved. */
|
|
316
431
|
const FAILING_VERDICTS = new Set(["stale", "unprovable"]);
|
|
317
432
|
|
|
@@ -349,8 +464,12 @@ function failureReport(outcome, registry) {
|
|
|
349
464
|
`❌ ${SELF_PACKAGE} is pinned at "${outcome.spec}" and ${outcome.detail}.\n` +
|
|
350
465
|
` Compared against ${registry} — NOT the session plugin cache and NOT\n` +
|
|
351
466
|
` the marketplace clone, both of which can name a different version.\n` +
|
|
352
|
-
`
|
|
353
|
-
`
|
|
467
|
+
` The release raises this pin itself: the self-pin-raise workflow's\n` +
|
|
468
|
+
` prepare_self_pin_raise job runs scripts/raise-self-dependency-pin.mjs\n` +
|
|
469
|
+
` right after the publish lands and again every hour, and\n` +
|
|
470
|
+
` push_self_pin_raise pushes the raise to main (#4951). Red here means\n` +
|
|
471
|
+
` those jobs have not landed for ${outcome.newest} yet, or the last run\n` +
|
|
472
|
+
` failed — that run is where the cause is. Rebase once it lands.\n`
|
|
354
473
|
);
|
|
355
474
|
}
|
|
356
475
|
return (
|
|
@@ -368,6 +487,12 @@ function failureReport(outcome, registry) {
|
|
|
368
487
|
*/
|
|
369
488
|
export async function main(argv, injected = {}) {
|
|
370
489
|
const registry = option(argv, "--registry", DEFAULT_REGISTRY);
|
|
490
|
+
if (argv.includes("--await-listed")) {
|
|
491
|
+
return mainAwaitListed(argv, registry, injected);
|
|
492
|
+
}
|
|
493
|
+
if (argv.includes("--newest-installable")) {
|
|
494
|
+
return mainNewestInstallable(registry, injected);
|
|
495
|
+
}
|
|
371
496
|
const manifestPath = option(argv, "--manifest", defaultManifestPath());
|
|
372
497
|
const outcome = await checkSelfPin({
|
|
373
498
|
manifest: JSON.parse(readFileSync(manifestPath, "utf8")),
|
|
@@ -387,6 +512,48 @@ export async function main(argv, injected = {}) {
|
|
|
387
512
|
return 1;
|
|
388
513
|
}
|
|
389
514
|
|
|
515
|
+
/**
|
|
516
|
+
* `--await-listed <version>`: exit 0 once both packument shapes list it.
|
|
517
|
+
* @param {string[]} argv - Arguments after the script path.
|
|
518
|
+
* @param {string} registry - The registry origin.
|
|
519
|
+
* @param {object} injected - Test seams forwarded to {@link awaitListed}.
|
|
520
|
+
* @returns {Promise<number>} Process exit code.
|
|
521
|
+
*/
|
|
522
|
+
async function mainAwaitListed(argv, registry, injected) {
|
|
523
|
+
const version = option(argv, "--await-listed", "");
|
|
524
|
+
if (!semver.valid(version) || semver.prerelease(version) !== null) {
|
|
525
|
+
process.stderr.write(
|
|
526
|
+
`❌ --await-listed needs a release version, not "${version}"\n`
|
|
527
|
+
);
|
|
528
|
+
return 1;
|
|
529
|
+
}
|
|
530
|
+
const outcome = await awaitListed({ version, registry, ...injected });
|
|
531
|
+
process.stdout.write(
|
|
532
|
+
`${VERDICT_PREFIX} ${outcome.listed ? "listed" : "not-listed"} ` +
|
|
533
|
+
`package=${SELF_PACKAGE} version=${version} — ${outcome.detail}\n`
|
|
534
|
+
);
|
|
535
|
+
return outcome.listed ? 0 : 1;
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
/**
|
|
539
|
+
* `--newest-installable`: print only the newest installable release, so a
|
|
540
|
+
* workflow step can capture it.
|
|
541
|
+
* @param {string} registry - The registry origin.
|
|
542
|
+
* @param {object} injected - Test seams forwarded to {@link newestInstallableVersion}.
|
|
543
|
+
* @returns {Promise<number>} Process exit code: 1 when nothing was proved.
|
|
544
|
+
*/
|
|
545
|
+
async function mainNewestInstallable(registry, injected) {
|
|
546
|
+
const found = await newestInstallableVersion({ registry, ...injected });
|
|
547
|
+
if (found.version === null) {
|
|
548
|
+
process.stderr.write(
|
|
549
|
+
`❌ Could not prove which ${SELF_PACKAGE} release is newest: ${found.detail}\n`
|
|
550
|
+
);
|
|
551
|
+
return 1;
|
|
552
|
+
}
|
|
553
|
+
process.stdout.write(`${found.version}\n`);
|
|
554
|
+
return 0;
|
|
555
|
+
}
|
|
556
|
+
|
|
390
557
|
/* c8 ignore start -- CLI wiring, exercised through main() in tests */
|
|
391
558
|
if (invokedAsScript(import.meta.url)) {
|
|
392
559
|
main(process.argv.slice(2))
|