cabloy 5.1.220 → 5.1.222
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/.cabloy-version +1 -1
- package/.github/workflows/agent-governance.yml +2 -2
- package/.github/workflows/create-cabloy.yml +2 -2
- package/.github/workflows/docs-pages.yml +2 -2
- package/.github/workflows/playwright-e2e.yml +4 -4
- package/.github/workflows/vona-cov-pg.yml +2 -2
- package/.github/workflows/vona-test-crud.yml +2 -2
- package/.github/workflows/vona-test-mysql.yml +2 -2
- package/.github/workflows/vona-test-pg.yml +2 -2
- package/.github/workflows/vona-test-sqlite3.yml +2 -2
- package/.github/workflows/vona-tsc.yml +2 -2
- package/.github/workflows/zova-ui.yml +2 -2
- package/CHANGELOG.md +22 -0
- package/package.json +4 -3
- package/repo-agent-governance/managed-assets.json +15 -15
- package/repo-agent-governance/policies/repository.md +1 -0
- package/repo-agent-governance/skills/cabloy-backend-scaffold/SKILL.md +5 -1
- package/repo-agent-governance/skills/cabloy-backend-scaffold/references/follow-up-checklist.md +7 -5
- package/repo-agent-governance/skills/cabloy-frontend-scaffold/SKILL.md +5 -1
- package/repo-agent-governance/skills/cabloy-frontend-scaffold/references/follow-up-checklist.md +6 -4
- package/repo-docs/backend/unit-testing.md +5 -1
- package/repo-docs/frontend/openapi-sdk-guide.md +2 -0
- package/repo-docs/frontend/scripts.md +8 -0
- package/repo-docs/reference/repo-scripts.md +5 -1
- package/scripts/generateOpenapiIsolated.ts +18 -1
- package/scripts/runIsolatedTest.test.ts +9 -1
- package/scripts/runIsolatedTest.ts +81 -18
- package/scripts/strictGenerationDiagnostics.test.ts +1009 -0
- package/scripts/strictGenerationDiagnostics.ts +61 -0
- package/vona/package.original.json +3 -2
- package/vona/packages-cli/cabloy-cli/package.json +1 -1
- package/vona/packages-cli/cli/package.json +1 -1
- package/vona/packages-cli/cli-set-api/package.json +1 -1
- package/vona/packages-cli/cli-set-api/src/lib/bean/cli.bin.dev.ts +14 -4
- package/vona/packages-cli/cli-set-api/src/lib/bean/toolsBin/generateEntryFiles.ts +6 -1
- package/vona/packages-cli/cli-set-api/src/lib/bean/toolsBin/generateVonaMeta.ts +2 -10
- package/vona/packages-cli/cli-set-api/src/lib/bean/toolsBin/validateGenerationPaths.ts +27 -0
- package/vona/packages-cli/cli-set-api/test/binDevLifecycle.test.ts +1 -1
- package/vona/packages-cli/cli-set-api/test/strictGenerationPrivacy.test.ts +439 -0
- package/vona/packages-utils/process-helper/package.json +1 -1
- package/vona/packages-utils/process-helper/src/index.test.ts +62 -0
- package/vona/packages-utils/process-helper/src/index.ts +9 -4
- package/vona/packages-vona/vona/package.json +1 -1
- package/vona/packages-vona/vona-core/package.json +1 -1
- package/vona/packages-vona/vona-core/src/lib/core/completedReadiness.test.ts +558 -0
- package/vona/packages-vona/vona-core/src/lib/core/completedReadiness.ts +389 -0
- package/vona/packages-vona/vona-core/src/lib/core/context.ts +3 -0
- package/vona/packages-vona/vona-core/src/lib/core/index.ts +11 -0
- package/vona/packages-vona/vona-core/src/lib/core/logger/appLogger.ts +10 -2
- package/vona/packages-vona/vona-core/src/lib/core/logger/diagnosticLogger.test.ts +268 -68
- package/vona/packages-vona/vona-core/src/lib/core/meta.ts +5 -0
- package/vona/packages-vona/vona-core/src/lib/core/testFreshness.ts +3 -9
- package/vona/packages-vona/vona-core/src/lib/core/testStrictMode.ts +9 -0
- package/vona/packages-vona/vona-core/src/lib/framework/start.test.ts +10 -0
- package/vona/packages-vona/vona-core/src/lib/framework/start.ts +8 -0
- package/vona/packages-vona/vona-mock/package.json +1 -1
- package/vona/pnpm-lock.yaml +542 -236
- package/vona/src/suite-vendor/a-vona/modules/a-core/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-executor/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-executor/src/bean/bean.executor.ts +124 -4
- package/vona/src/suite-vendor/a-vona/modules/a-executor/src/types/executor.ts +7 -0
- package/vona/src/suite-vendor/a-vona/modules/a-executor/test/readyExisting.test.ts +423 -0
- package/vona/src/suite-vendor/a-vona/modules/a-executor/test/readyExistingCommit.test.ts +174 -0
- package/vona/src/suite-vendor/a-vona/modules/a-instance/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-instance/src/bean/bean.instance.ts +3 -1
- package/vona/src/suite-vendor/a-vona/modules/a-instance/src/lib/existingReadyAdmission.ts +125 -0
- package/vona/src/suite-vendor/a-vona/modules/a-instance/src/service/instance.ts +72 -25
- package/vona/src/suite-vendor/a-vona/modules/a-instance/test/existingReadyAdmission.test.ts +949 -0
- package/vona/src/suite-vendor/a-vona/modules/a-logger/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-logger/test/middlewareSystem.httpLog.test.ts +61 -59
- package/vona/src/suite-vendor/a-vona/modules/a-mail/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-mail/src/service/mail.ts +5 -0
- package/vona/src/suite-vendor/a-vona/modules/a-ormdialect/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-ormdialect/src/index.ts +11 -0
- package/vona/src/suite-vendor/a-vona/modules/a-ormdialect/src/lib/protectedSqliteRegistry.ts +356 -0
- package/vona/src/suite-vendor/a-vona/modules/a-startup/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-startup/test/devSeed.test.ts +61 -2
- package/vona/src/suite-vendor/a-vona/package.json +1 -1
- package/zova/package.original.json +3 -3
- package/zova/packages-cli/cli/package.json +4 -4
- package/zova/packages-cli/cli-set-front/package.json +2 -2
- package/zova/packages-cli/cli-set-front/src/lib/common/restDependencyVersions.ts +22 -1
- package/zova/packages-cli/cli-set-front/test/restDependencies.test.ts +137 -0
- package/zova/packages-zova/zova/package.json +2 -2
- package/zova/pnpm-lock.yaml +448 -641
- package/zova/src/suite-vendor/a-zova/modules/a-zova/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/package.json +2 -2
|
@@ -14,6 +14,13 @@ import {
|
|
|
14
14
|
sendTestClaimEvent,
|
|
15
15
|
startTestClaimBroker,
|
|
16
16
|
} from '../vona/packages-vona/vona-core/src/lib/core/testClaim.ts';
|
|
17
|
+
import {
|
|
18
|
+
discardNativeOutput,
|
|
19
|
+
guardianStdio,
|
|
20
|
+
reportIsolatedDiagnostic,
|
|
21
|
+
strictGenerationFailure,
|
|
22
|
+
usesStrictGeneration,
|
|
23
|
+
} from './strictGenerationDiagnostics.ts';
|
|
17
24
|
import {
|
|
18
25
|
cleanTestClaim,
|
|
19
26
|
parseTestClaimTtlSeconds,
|
|
@@ -94,7 +101,16 @@ export async function startOwnedProcess(
|
|
|
94
101
|
cwd: string,
|
|
95
102
|
env: NodeJS.ProcessEnv,
|
|
96
103
|
): Promise<OwnedProcess> {
|
|
97
|
-
|
|
104
|
+
const strict = usesStrictGeneration(env);
|
|
105
|
+
if (process.platform === 'win32') {
|
|
106
|
+
return startWindowsOwnedProcess(
|
|
107
|
+
command,
|
|
108
|
+
args,
|
|
109
|
+
cwd,
|
|
110
|
+
env,
|
|
111
|
+
strict ? discardNativeOutput() : undefined,
|
|
112
|
+
);
|
|
113
|
+
}
|
|
98
114
|
const processId = randomUUID();
|
|
99
115
|
const managed = hasTestClaimTransport(env);
|
|
100
116
|
const registration = { id: processId, role: 'guardian', stage: 'pending' as const };
|
|
@@ -102,7 +118,7 @@ export async function startOwnedProcess(
|
|
|
102
118
|
const guardian: ChildProcess = spawn(process.execPath, [GUARDIAN_FILE], {
|
|
103
119
|
cwd: ROOT_DIR,
|
|
104
120
|
env,
|
|
105
|
-
stdio:
|
|
121
|
+
stdio: guardianStdio(strict),
|
|
106
122
|
detached: true,
|
|
107
123
|
});
|
|
108
124
|
let drained: GuardianResult | undefined;
|
|
@@ -335,9 +351,15 @@ export async function withIsolatedVona<T>(
|
|
|
335
351
|
callback: () => Promise<T>,
|
|
336
352
|
dependencies: IsolatedVonaDependencies = { start: startOwnedProcess, ready: waitForReady },
|
|
337
353
|
): Promise<T> {
|
|
354
|
+
const strict = usesStrictGeneration(env);
|
|
338
355
|
const readyKey = randomBytes(32).toString('hex');
|
|
339
356
|
const command = getIsolatedVonaCommand(port, env, readyKey);
|
|
340
|
-
|
|
357
|
+
let server: OwnedProcess;
|
|
358
|
+
try {
|
|
359
|
+
server = await dependencies.start(command.command, command.args, command.cwd, command.env);
|
|
360
|
+
} catch (error) {
|
|
361
|
+
throw strict ? strictGenerationFailure('startup') : error;
|
|
362
|
+
}
|
|
341
363
|
let stopping = false;
|
|
342
364
|
let exitedEarly = false;
|
|
343
365
|
void server.wait().then(
|
|
@@ -351,7 +373,9 @@ export async function withIsolatedVona<T>(
|
|
|
351
373
|
let interrupted = false;
|
|
352
374
|
const onInterrupt = () => {
|
|
353
375
|
interrupted = true;
|
|
354
|
-
void server
|
|
376
|
+
void server
|
|
377
|
+
.stop()
|
|
378
|
+
.catch(error => reportIsolatedDiagnostic(strict, 'interrupt-stop-failed', error));
|
|
355
379
|
};
|
|
356
380
|
process.on('SIGINT', onInterrupt);
|
|
357
381
|
process.on('SIGTERM', onInterrupt);
|
|
@@ -398,19 +422,22 @@ export async function withIsolatedVona<T>(
|
|
|
398
422
|
if (interrupted) throw new Error('Isolated Vona run interrupted');
|
|
399
423
|
result = await callback();
|
|
400
424
|
} catch (error) {
|
|
401
|
-
operationError =
|
|
425
|
+
operationError = strict
|
|
426
|
+
? strictGenerationFailure(ready ? 'operation' : 'startup', error)
|
|
427
|
+
: toError(error);
|
|
402
428
|
} finally {
|
|
403
429
|
stopping = true;
|
|
404
430
|
try {
|
|
405
431
|
await shutdown();
|
|
406
432
|
} catch (error) {
|
|
407
|
-
shutdownError = toError(error);
|
|
433
|
+
shutdownError = strict ? strictGenerationFailure('shutdown') : toError(error);
|
|
408
434
|
} finally {
|
|
409
435
|
process.off('SIGINT', onInterrupt);
|
|
410
436
|
process.off('SIGTERM', onInterrupt);
|
|
411
437
|
}
|
|
412
438
|
}
|
|
413
439
|
if (operationError && shutdownError) {
|
|
440
|
+
if (strict) throw strictGenerationFailure('operation-and-shutdown');
|
|
414
441
|
throw new AggregateError(
|
|
415
442
|
[operationError, shutdownError],
|
|
416
443
|
'Isolated Vona operation and shutdown failed',
|
|
@@ -427,11 +454,19 @@ export async function runIsolatedProcess(
|
|
|
427
454
|
cwd: string,
|
|
428
455
|
env: NodeJS.ProcessEnv,
|
|
429
456
|
) {
|
|
430
|
-
const
|
|
457
|
+
const strict = usesStrictGeneration(env);
|
|
458
|
+
let child: OwnedProcess;
|
|
459
|
+
try {
|
|
460
|
+
child = await startOwnedProcess(command, args, cwd, env);
|
|
461
|
+
} catch (error) {
|
|
462
|
+
throw strict ? strictGenerationFailure('generator') : error;
|
|
463
|
+
}
|
|
431
464
|
let interrupted = false;
|
|
432
465
|
const onInterrupt = () => {
|
|
433
466
|
interrupted = true;
|
|
434
|
-
void child
|
|
467
|
+
void child
|
|
468
|
+
.stop()
|
|
469
|
+
.catch(error => reportIsolatedDiagnostic(strict, 'interrupt-stop-failed', error));
|
|
435
470
|
};
|
|
436
471
|
process.on('SIGINT', onInterrupt);
|
|
437
472
|
process.on('SIGTERM', onInterrupt);
|
|
@@ -440,6 +475,8 @@ export async function runIsolatedProcess(
|
|
|
440
475
|
if (result.failed || interrupted || result.result?.code !== 0) {
|
|
441
476
|
throw new Error(`Isolated test exited: ${result.result?.signal ?? result.result?.code}`);
|
|
442
477
|
}
|
|
478
|
+
} catch (error) {
|
|
479
|
+
throw strict ? strictGenerationFailure('generator') : error;
|
|
443
480
|
} finally {
|
|
444
481
|
process.off('SIGINT', onInterrupt);
|
|
445
482
|
process.off('SIGTERM', onInterrupt);
|
|
@@ -576,6 +613,20 @@ export async function withIsolatedRun<T>(
|
|
|
576
613
|
rootDir = ROOT_DIR,
|
|
577
614
|
options: IsolatedRunOptions = {},
|
|
578
615
|
): Promise<T> {
|
|
616
|
+
try {
|
|
617
|
+
return await withIsolatedRunInternal(kind, callback, rootDir, options);
|
|
618
|
+
} catch (error) {
|
|
619
|
+
throw options.skipExpiredClaimReaping ? strictGenerationFailure('preparation', error) : error;
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
async function withIsolatedRunInternal<T>(
|
|
624
|
+
kind: 'unit' | 'cov' | 'e2e' | 'contract',
|
|
625
|
+
callback: (context: IsolatedRunContext) => Promise<T>,
|
|
626
|
+
rootDir: string,
|
|
627
|
+
options: IsolatedRunOptions,
|
|
628
|
+
): Promise<T> {
|
|
629
|
+
const strict = options.skipExpiredClaimReaping === true;
|
|
579
630
|
resolveCabloyEdition(rootDir);
|
|
580
631
|
const vonaDir = resolve(rootDir, 'vona');
|
|
581
632
|
await reapBeforeIsolatedRun(kind, vonaDir, options);
|
|
@@ -632,21 +683,33 @@ export async function withIsolatedRun<T>(
|
|
|
632
683
|
await broker?.update({ type: 'status', status: 'failed' }).catch(() => {
|
|
633
684
|
console.error('Could not record failed test status; claim retained');
|
|
634
685
|
});
|
|
635
|
-
throw error;
|
|
686
|
+
throw strict ? strictGenerationFailure('run', error) : error;
|
|
636
687
|
} finally {
|
|
637
688
|
if (!completed) {
|
|
638
|
-
|
|
689
|
+
reportIsolatedDiagnostic(
|
|
690
|
+
strict,
|
|
691
|
+
'failed-resources-retained',
|
|
692
|
+
`Isolated test claim and resources retained for inspection: ${claimPath}`,
|
|
693
|
+
);
|
|
639
694
|
}
|
|
640
695
|
await broker?.close();
|
|
641
696
|
}
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
697
|
+
try {
|
|
698
|
+
const cleanup = await cleanTestClaim(claimPath, {
|
|
699
|
+
projectPath: vonaDir,
|
|
700
|
+
isInactive: claim => isTestClaimInactive(claim, true),
|
|
701
|
+
warn: message => reportIsolatedDiagnostic(strict, 'cleanup-warning', message),
|
|
702
|
+
});
|
|
703
|
+
if (cleanup.status !== 'cleaned') {
|
|
704
|
+
reportIsolatedDiagnostic(
|
|
705
|
+
strict,
|
|
706
|
+
'cleanup-incomplete-claim-retained',
|
|
707
|
+
`Isolated test claim retained for inspection: ${claimPath}`,
|
|
708
|
+
);
|
|
709
|
+
throw new Error('Isolated test succeeded but resource cleanup did not complete');
|
|
710
|
+
}
|
|
711
|
+
} catch (error) {
|
|
712
|
+
throw strict ? strictGenerationFailure('cleanup') : error;
|
|
650
713
|
}
|
|
651
714
|
return result as T;
|
|
652
715
|
}
|