@opensip-cli/fitness 0.1.6 → 0.1.8
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/README.md +2 -2
- package/dist/__tests__/fit-execute-opts.test.js +2 -2
- package/dist/__tests__/fit-execute-opts.test.js.map +1 -1
- package/dist/__tests__/public-api.test.js +2 -1
- package/dist/__tests__/public-api.test.js.map +1 -1
- package/dist/__tests__/tool.test.js +24 -13
- package/dist/__tests__/tool.test.js.map +1 -1
- package/dist/cli/__tests__/fit-gate-mode.test.js +1 -1
- package/dist/cli/__tests__/fit-gate-mode.test.js.map +1 -1
- package/dist/cli/__tests__/fit-modes-live.test.d.ts +1 -1
- package/dist/cli/__tests__/fit-modes-live.test.js +13 -6
- package/dist/cli/__tests__/fit-modes-live.test.js.map +1 -1
- package/dist/cli/__tests__/fit-runner-progress.test.d.ts +2 -0
- package/dist/cli/__tests__/fit-runner-progress.test.d.ts.map +1 -0
- package/dist/cli/__tests__/fit-runner-progress.test.js +30 -0
- package/dist/cli/__tests__/fit-runner-progress.test.js.map +1 -0
- package/dist/cli/__tests__/report-data.test.js +3 -3
- package/dist/cli/__tests__/report-data.test.js.map +1 -1
- package/dist/cli/fit/__tests__/display-fold.test.js +2 -2
- package/dist/cli/fit/__tests__/display-fold.test.js.map +1 -1
- package/dist/cli/fit/__tests__/fit-export-command-spec.test.d.ts +9 -0
- package/dist/cli/fit/__tests__/fit-export-command-spec.test.d.ts.map +1 -0
- package/dist/cli/fit/__tests__/fit-export-command-spec.test.js +75 -0
- package/dist/cli/fit/__tests__/fit-export-command-spec.test.js.map +1 -0
- package/dist/cli/fit/check-loader.d.ts +1 -1
- package/dist/cli/fit/check-loader.js +1 -1
- package/dist/cli/fit/config-loader.d.ts +1 -1
- package/dist/cli/fit/config-loader.js +1 -1
- package/dist/cli/fit/envelope-view.d.ts.map +1 -1
- package/dist/cli/fit/envelope-view.js +2 -14
- package/dist/cli/fit/envelope-view.js.map +1 -1
- package/dist/cli/fit/fit-aux-command-specs.d.ts +27 -17
- package/dist/cli/fit/fit-aux-command-specs.d.ts.map +1 -1
- package/dist/cli/fit/fit-aux-command-specs.js +91 -53
- package/dist/cli/fit/fit-aux-command-specs.js.map +1 -1
- package/dist/cli/fit/recipe-selector.test.js +2 -2
- package/dist/cli/fit/recipe-selector.test.js.map +1 -1
- package/dist/cli/fit/result-builders.d.ts +29 -19
- package/dist/cli/fit/result-builders.d.ts.map +1 -1
- package/dist/cli/fit/result-builders.js +29 -24
- package/dist/cli/fit/result-builders.js.map +1 -1
- package/dist/cli/fit-modes.d.ts.map +1 -1
- package/dist/cli/fit-modes.js +7 -4
- package/dist/cli/fit-modes.js.map +1 -1
- package/dist/cli/fit-runner-progress.d.ts +12 -0
- package/dist/cli/fit-runner-progress.d.ts.map +1 -0
- package/dist/cli/fit-runner-progress.js +25 -0
- package/dist/cli/fit-runner-progress.js.map +1 -0
- package/dist/cli/fit-runner-views.d.ts +1 -1
- package/dist/cli/fit-runner-views.js +1 -1
- package/dist/cli/fit-runner.d.ts.map +1 -1
- package/dist/cli/fit-runner.js +51 -16
- package/dist/cli/fit-runner.js.map +1 -1
- package/dist/cli/fit-worker.d.ts.map +1 -1
- package/dist/cli/fit-worker.js +1 -0
- package/dist/cli/fit-worker.js.map +1 -1
- package/dist/cli/fit.d.ts +5 -3
- package/dist/cli/fit.d.ts.map +1 -1
- package/dist/cli/fit.js +6 -4
- package/dist/cli/fit.js.map +1 -1
- package/dist/framework/__tests__/concurrent-file-cache.test.d.ts +24 -0
- package/dist/framework/__tests__/concurrent-file-cache.test.d.ts.map +1 -0
- package/dist/framework/__tests__/concurrent-file-cache.test.js +151 -0
- package/dist/framework/__tests__/concurrent-file-cache.test.js.map +1 -0
- package/dist/framework/__tests__/define-check.test.js +38 -1
- package/dist/framework/__tests__/define-check.test.js.map +1 -1
- package/dist/framework/__tests__/define-regex-list-check.test.js +5 -1
- package/dist/framework/__tests__/define-regex-list-check.test.js.map +1 -1
- package/dist/framework/__tests__/execution-context.globalexcludes-parity.test.js +3 -1
- package/dist/framework/__tests__/execution-context.globalexcludes-parity.test.js.map +1 -1
- package/dist/framework/__tests__/execution-context.test.js +32 -9
- package/dist/framework/__tests__/execution-context.test.js.map +1 -1
- package/dist/framework/__tests__/file-accessor.test.js +7 -4
- package/dist/framework/__tests__/file-accessor.test.js.map +1 -1
- package/dist/framework/__tests__/file-cache-autoclear.test.d.ts +25 -0
- package/dist/framework/__tests__/file-cache-autoclear.test.d.ts.map +1 -0
- package/dist/framework/__tests__/file-cache-autoclear.test.js +116 -0
- package/dist/framework/__tests__/file-cache-autoclear.test.js.map +1 -0
- package/dist/framework/__tests__/register-helpers.test.js +2 -2
- package/dist/framework/__tests__/register-helpers.test.js.map +1 -1
- package/dist/framework/__tests__/scope-registry.test.js +2 -2
- package/dist/framework/__tests__/scope-registry.test.js.map +1 -1
- package/dist/framework/define-check.d.ts.map +1 -1
- package/dist/framework/define-check.js +9 -0
- package/dist/framework/define-check.js.map +1 -1
- package/dist/framework/execution-context.d.ts +9 -2
- package/dist/framework/execution-context.d.ts.map +1 -1
- package/dist/framework/execution-context.js +20 -6
- package/dist/framework/execution-context.js.map +1 -1
- package/dist/framework/file-accessor.d.ts +12 -0
- package/dist/framework/file-accessor.d.ts.map +1 -1
- package/dist/framework/file-accessor.js +8 -3
- package/dist/framework/file-accessor.js.map +1 -1
- package/dist/framework/file-cache.d.ts +11 -1
- package/dist/framework/file-cache.d.ts.map +1 -1
- package/dist/framework/file-cache.js +11 -1
- package/dist/framework/file-cache.js.map +1 -1
- package/dist/framework/ignore-processing.d.ts.map +1 -1
- package/dist/framework/ignore-processing.js +26 -11
- package/dist/framework/ignore-processing.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/persistence/session-replay.d.ts +8 -3
- package/dist/persistence/session-replay.d.ts.map +1 -1
- package/dist/persistence/session-replay.js +7 -8
- package/dist/persistence/session-replay.js.map +1 -1
- package/dist/persistence/session-replay.test.js +9 -7
- package/dist/persistence/session-replay.test.js.map +1 -1
- package/dist/plugins/__tests__/loader.test.js +2 -2
- package/dist/plugins/__tests__/loader.test.js.map +1 -1
- package/dist/recipes/__tests__/run-one-check.test.js +16 -1
- package/dist/recipes/__tests__/run-one-check.test.js.map +1 -1
- package/dist/recipes/__tests__/service.test.js +46 -3
- package/dist/recipes/__tests__/service.test.js.map +1 -1
- package/dist/recipes/service.d.ts +8 -1
- package/dist/recipes/service.d.ts.map +1 -1
- package/dist/recipes/service.js +33 -4
- package/dist/recipes/service.js.map +1 -1
- package/dist/scope-augmentation.d.ts +26 -1
- package/dist/scope-augmentation.d.ts.map +1 -1
- package/dist/signalers/schema.d.ts +1 -1
- package/dist/tool.d.ts +4 -3
- package/dist/tool.d.ts.map +1 -1
- package/dist/tool.js +67 -85
- package/dist/tool.js.map +1 -1
- package/package.json +14 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fit-modes.js","sourceRoot":"","sources":["../../src/cli/fit-modes.ts"],"names":[],"mappings":"AAAA,uLAAuL;AACvL,uNAAuN;AACvN;;;;;;;;;;;GAWG;AAEH,OAAO,EACL,UAAU,EACV,sBAAsB,GAIvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,WAAW,GAIZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAExE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,UA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allback, ProgressEvent } from '@opensip-cli/cli-ui';
|
|
2
|
+
import type { SignalEnvelope } from '@opensip-cli/contracts';
|
|
3
|
+
export interface CheckCountLabelInput {
|
|
4
|
+
readonly running: number;
|
|
5
|
+
readonly available: number;
|
|
6
|
+
readonly verbose: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function progressTotal(event: ProgressEvent): number | null;
|
|
9
|
+
export declare function firstUnitCount(envelope: SignalEnvelope): number;
|
|
10
|
+
export declare function checkCountLabel({ running, available, verbose }: CheckCountLabelInput): string;
|
|
11
|
+
export declare function withCheckCountFromProgress(subscribe: (cb: ProgressCallback) => void, onCheckCount: (checkCount: number) => void): (cb: ProgressCallback) => void;
|
|
12
|
+
//# sourceMappingURL=fit-runner-progress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fit-runner-progress.d.ts","sourceRoot":"","sources":["../../src/cli/fit-runner-progress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE7D,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,GAAG,IAAI,CAEjE;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,cAAc,GAAG,MAAM,CAE/D;AAED,wBAAgB,eAAe,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,oBAAoB,GAAG,MAAM,CAK7F;AAED,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,CAAC,EAAE,EAAE,gBAAgB,KAAK,IAAI,EACzC,YAAY,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,GACzC,CAAC,EAAE,EAAE,gBAAgB,KAAK,IAAI,CAUhC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export function progressTotal(event) {
|
|
2
|
+
return event.type === 'stage-progress' ? event.total : null;
|
|
3
|
+
}
|
|
4
|
+
export function firstUnitCount(envelope) {
|
|
5
|
+
return envelope.verdict.summary.total;
|
|
6
|
+
}
|
|
7
|
+
export function checkCountLabel({ running, available, verbose }) {
|
|
8
|
+
const runningLabel = `${running} running`;
|
|
9
|
+
if (!verbose)
|
|
10
|
+
return runningLabel;
|
|
11
|
+
const filtered = Math.max(available - running, 0);
|
|
12
|
+
return `${runningLabel}, ${available} available, ${filtered} filtered`;
|
|
13
|
+
}
|
|
14
|
+
export function withCheckCountFromProgress(subscribe, onCheckCount) {
|
|
15
|
+
return (cb) => {
|
|
16
|
+
subscribe((event) => {
|
|
17
|
+
const total = progressTotal(event);
|
|
18
|
+
if (total !== null) {
|
|
19
|
+
onCheckCount(total);
|
|
20
|
+
}
|
|
21
|
+
cb(event);
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=fit-runner-progress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fit-runner-progress.js","sourceRoot":"","sources":["../../src/cli/fit-runner-progress.ts"],"names":[],"mappings":"AASA,MAAM,UAAU,aAAa,CAAC,KAAoB;IAChD,OAAO,KAAK,CAAC,IAAI,KAAK,gBAAgB,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;AAC9D,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,QAAwB;IACrD,OAAO,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC;AACxC,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAwB;IACnF,MAAM,YAAY,GAAG,GAAG,OAAO,UAAU,CAAC;IAC1C,IAAI,CAAC,OAAO;QAAE,OAAO,YAAY,CAAC;IAClC,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,GAAG,OAAO,EAAE,CAAC,CAAC,CAAC;IAClD,OAAO,GAAG,YAAY,KAAK,SAAS,eAAe,QAAQ,WAAW,CAAC;AACzE,CAAC;AAED,MAAM,UAAU,0BAA0B,CACxC,SAAyC,EACzC,YAA0C;IAE1C,OAAO,CAAC,EAAE,EAAE,EAAE;QACZ,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE;YAClB,MAAM,KAAK,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;YACnC,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;gBACnB,YAAY,CAAC,KAAK,CAAC,CAAC;YACtB,CAAC;YACD,EAAE,CAAC,KAAK,CAAC,CAAC;QACZ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -22,7 +22,7 @@ export declare function ResultsTable({ rows, }: {
|
|
|
22
22
|
* the run (plugin load failures, unknown languages in config, missing
|
|
23
23
|
* check packages, etc.).
|
|
24
24
|
*
|
|
25
|
-
* These come through
|
|
25
|
+
* These come through the run's collected warnings rather than direct stderr
|
|
26
26
|
* writes — emitting them during an active Ink render desyncs the renderer's
|
|
27
27
|
* frame tracking. Rendering them here through Ink keeps the live view's
|
|
28
28
|
* frame contract intact.
|
|
@@ -80,7 +80,7 @@ export function ResultsTable({ rows, }) {
|
|
|
80
80
|
* the run (plugin load failures, unknown languages in config, missing
|
|
81
81
|
* check packages, etc.).
|
|
82
82
|
*
|
|
83
|
-
* These come through
|
|
83
|
+
* These come through the run's collected warnings rather than direct stderr
|
|
84
84
|
* writes — emitting them during an active Ink render desyncs the renderer's
|
|
85
85
|
* frame tracking. Rendering them here through Ink keeps the live view's
|
|
86
86
|
* frame contract intact.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fit-runner.d.ts","sourceRoot":"","sources":["../../src/cli/fit-runner.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;
|
|
1
|
+
{"version":3,"file":"fit-runner.d.ts","sourceRoot":"","sources":["../../src/cli/fit-runner.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AA4BH,OAAO,EACL,KAAK,UAAU,EAIhB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAIL,KAAK,eAAe,EACpB,KAAK,iBAAiB,EAEvB,MAAM,mBAAmB,CAAC;AAc3B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAgXxD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/C;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,aAAa,CACjC,IAAI,EAAE,UAAU,EAChB,kBAAkB,CAAC,EAAE,SAAS,GAAG,eAAe,EAChD,OAAO,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,iBAAiB,CAAC,CAgC5B"}
|
package/dist/cli/fit-runner.js
CHANGED
|
@@ -26,12 +26,13 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
26
26
|
import { mkdtempSync, rmSync, writeFileSync } from 'node:fs';
|
|
27
27
|
import { tmpdir } from 'node:os';
|
|
28
28
|
import { join } from 'node:path';
|
|
29
|
-
import { Banner, ClockProvider, ErrorMessage, LiveProgress, normalizeBannerSize, ProjectHeader, renderToInk, RunFooterHints, RunHeader, RunSummary, RunTimingProvider, ThemeProvider, UpdateHint,
|
|
30
|
-
import { runOffThreadOrInProcess, currentScope, } from '@opensip-cli/core';
|
|
31
|
-
import { Box, Static,
|
|
29
|
+
import { Banner, ClockProvider, ErrorMessage, LiveProgress, normalizeBannerSize, ProjectHeader, renderToInk, RunFooterHints, RunHeader, RunSummary, RunTimingProvider, shouldRenderRunFooterHints, shouldRenderRunUnitTable, ThemeProvider, UpdateHint, DEFAULT_RUN_FOOTER_HINTS, viewFindingsGroups, } from '@opensip-cli/cli-ui';
|
|
30
|
+
import { runOffThreadOrInProcess, currentScope, liveEngineCorrelation, } from '@opensip-cli/core';
|
|
31
|
+
import { Box, Static, useApp, render } from 'ink';
|
|
32
32
|
import React, { useEffect, useState } from 'react';
|
|
33
33
|
import { envelopeToFitRows } from './fit/envelope-view.js';
|
|
34
34
|
import { buildFitnessSessionPayload } from './fit/result-builders.js';
|
|
35
|
+
import { checkCountLabel, firstUnitCount, withCheckCountFromProgress, } from './fit-runner-progress.js';
|
|
35
36
|
import { ResultsTable, WarningsBlock } from './fit-runner-views.js';
|
|
36
37
|
import { ensureChecksLoaded, executeFit, getEnabledCheckCount } from './fit.js';
|
|
37
38
|
// Theme constants used by tool-specific sub-components below. The shared
|
|
@@ -61,15 +62,28 @@ function executeFitWithProgress(args, emit) {
|
|
|
61
62
|
onProgress: (completed, total) => emit({ type: 'stage-progress', stage: 'checks', completed, total }),
|
|
62
63
|
});
|
|
63
64
|
}
|
|
65
|
+
function rememberCheckCount(current, checkCount) {
|
|
66
|
+
if (current.phase !== 'running')
|
|
67
|
+
return current;
|
|
68
|
+
if (current.checkCount === checkCount)
|
|
69
|
+
return current;
|
|
70
|
+
return { ...current, checkCount };
|
|
71
|
+
}
|
|
64
72
|
function FitRunner({ args, setExitCode, onEnvelope, onSession, liveContext, }) {
|
|
65
73
|
const { exit } = useApp();
|
|
66
74
|
const [state, setState] = useState({ phase: 'loading' });
|
|
75
|
+
const rememberProgressTotal = (total) => {
|
|
76
|
+
setState((current) => rememberCheckCount(current, total));
|
|
77
|
+
};
|
|
67
78
|
useEffect(() => {
|
|
68
79
|
let cancelled = false;
|
|
69
80
|
void (async () => {
|
|
70
|
-
// Phase 1: Load checks
|
|
81
|
+
// Phase 1: Load checks so the worker has a populated registry. Do not use
|
|
82
|
+
// the registry count for the header: it is the available enabled-check
|
|
83
|
+
// count, before recipe/config runtime filters such as disabledChecks.
|
|
84
|
+
// The authoritative run count arrives on the first progress event.
|
|
71
85
|
await ensureChecksLoaded(args.cwd);
|
|
72
|
-
const
|
|
86
|
+
const availableCount = getEnabledCheckCount();
|
|
73
87
|
if (cancelled)
|
|
74
88
|
return;
|
|
75
89
|
// Execute OFF the main process (ADR-0028): fork the CLI to `fit-run-worker`,
|
|
@@ -82,11 +96,22 @@ function FitRunner({ args, setExitCode, onEnvelope, onSession, liveContext, }) {
|
|
|
82
96
|
const specDir = mkdtempSync(join(tmpdir(), 'fit-worker-'));
|
|
83
97
|
const specPath = join(specDir, 'spec.json');
|
|
84
98
|
writeFileSync(specPath, JSON.stringify(args), 'utf8');
|
|
99
|
+
// Forward the parent run's correlation bag (composition root, Phase 0) so
|
|
100
|
+
// the forked live-engine worker's logs attribute to this run — symmetric to
|
|
101
|
+
// the spawn-path shard-runner. The transport injects OPENSIP_RUN_ID from
|
|
102
|
+
// currentScope()?.runId (B1); the descriptor omits runId and marks the
|
|
103
|
+
// live-engine fork via workerKind.
|
|
104
|
+
const correlation = liveEngineCorrelation(currentScope()?.correlation);
|
|
85
105
|
const run = runOffThreadOrInProcess({
|
|
86
|
-
descriptor: {
|
|
106
|
+
descriptor: {
|
|
107
|
+
command: process.argv[1] ?? '',
|
|
108
|
+
argv: ['fit-run-worker', specPath],
|
|
109
|
+
...(correlation ? { correlation } : {}),
|
|
110
|
+
},
|
|
87
111
|
inProcess: (emit) => executeFitWithProgress(args, emit),
|
|
88
112
|
});
|
|
89
|
-
|
|
113
|
+
const subscribe = withCheckCountFromProgress(run.onProgress, rememberProgressTotal);
|
|
114
|
+
setState({ phase: 'running', checkCount: null, availableCount, subscribe });
|
|
90
115
|
let fitResult;
|
|
91
116
|
try {
|
|
92
117
|
fitResult = await run.result;
|
|
@@ -103,6 +128,7 @@ function FitRunner({ args, setExitCode, onEnvelope, onSession, liveContext, }) {
|
|
|
103
128
|
return;
|
|
104
129
|
}
|
|
105
130
|
const { result } = fitResult;
|
|
131
|
+
const warnings = fitResult.warnings ?? [];
|
|
106
132
|
// ADR-0035: the host owns the findings exit. The live renderer returns the
|
|
107
133
|
// envelope to `setUpFitLiveView`, which calls `deliverSignals`; the root
|
|
108
134
|
// sets the exit from `envelope.verdict.passed` there. No setExitCode here.
|
|
@@ -123,7 +149,13 @@ function FitRunner({ args, setExitCode, onEnvelope, onSession, liveContext, }) {
|
|
|
123
149
|
// now (ADR-0011): `renderFitLive` returns this envelope and the tool's
|
|
124
150
|
// `registerLiveView` callback delivers it once the Ink app exits.
|
|
125
151
|
onEnvelope?.(result.envelope);
|
|
126
|
-
setState({
|
|
152
|
+
setState({
|
|
153
|
+
phase: 'done',
|
|
154
|
+
result,
|
|
155
|
+
warnings,
|
|
156
|
+
checkCount: firstUnitCount(result.envelope),
|
|
157
|
+
availableCount,
|
|
158
|
+
});
|
|
127
159
|
setTimeout(() => exit(), 100);
|
|
128
160
|
})();
|
|
129
161
|
return () => {
|
|
@@ -144,6 +176,7 @@ function FitRunner({ args, setExitCode, onEnvelope, onSession, liveContext, }) {
|
|
|
144
176
|
// known. RunHeader's metadata only changes once (when loading→running), and
|
|
145
177
|
// after that it's stable for the rest of the run — perfect Static fit.
|
|
146
178
|
const checkCount = state.phase === 'running' || state.phase === 'done' ? state.checkCount : null;
|
|
179
|
+
const availableCount = state.phase === 'running' || state.phase === 'done' ? state.availableCount : null;
|
|
147
180
|
const staticItems = computeStaticItems(args.quiet === true, checkCount);
|
|
148
181
|
// Presentation settings resolved once in the pre-action hook. The live
|
|
149
182
|
// view runs inside that scope, so it reads the same banner size + version
|
|
@@ -161,7 +194,14 @@ function FitRunner({ args, setExitCode, onEnvelope, onSession, liveContext, }) {
|
|
|
161
194
|
}
|
|
162
195
|
const metadata = [
|
|
163
196
|
{ label: 'Recipe', value: recipe },
|
|
164
|
-
{
|
|
197
|
+
{
|
|
198
|
+
label: 'Checks',
|
|
199
|
+
value: checkCountLabel({
|
|
200
|
+
running: checkCount ?? 0,
|
|
201
|
+
available: availableCount ?? checkCount ?? 0,
|
|
202
|
+
verbose: args.verbose === true,
|
|
203
|
+
}),
|
|
204
|
+
},
|
|
165
205
|
];
|
|
166
206
|
return (_jsx(RunHeader, { tool: FIT_TOOL_TITLE, description: FIT_TOOL_DESCRIPTION, metadata: metadata }, item));
|
|
167
207
|
};
|
|
@@ -176,6 +216,7 @@ function FitRunner({ args, setExitCode, onEnvelope, onSession, liveContext, }) {
|
|
|
176
216
|
case 'done': {
|
|
177
217
|
const { envelope, verboseDetail } = state.result;
|
|
178
218
|
const { summary } = envelope.verdict;
|
|
219
|
+
const renderPolicy = { verbose: args.verbose === true };
|
|
179
220
|
// Host-owned timing (via provider from liveContext or outer host wrap):
|
|
180
221
|
// omit explicit durationMs so RunSummary reads from RunTimingProvider.
|
|
181
222
|
// The displayed Duration now matches the value stamped into StoredSession
|
|
@@ -189,13 +230,7 @@ function FitRunner({ args, setExitCode, onEnvelope, onSession, liveContext, }) {
|
|
|
189
230
|
: undefined;
|
|
190
231
|
const summaryEl = (_jsx(RunSummary, { passed: envelope.verdict.passed, errors: summary.errors, warnings: summary.warnings }));
|
|
191
232
|
const timedSummary = liveContext?.runSession ? (_jsx(RunTimingProvider, { timer: liveContext.runSession.timing, children: summaryEl })) : (summaryEl);
|
|
192
|
-
return (_jsxs(_Fragment, { children: [staticHeader, _jsxs(Box, { flexDirection: "column", children: [!args.quiet &&
|
|
193
|
-
VERBOSE_DETAIL_HINT,
|
|
194
|
-
{
|
|
195
|
-
text: 'opensip report for HTML report',
|
|
196
|
-
bold: ['opensip report'],
|
|
197
|
-
},
|
|
198
|
-
] })), !args.quiet && state.result.configFound === false && (_jsx(Box, { paddingLeft: 2, children: _jsxs(Text, { dimColor: true, children: ["No config file found. Run ", _jsx(Text, { bold: true, children: "opensip init" }), " to customize targets and settings."] }) }))] })] }));
|
|
233
|
+
return (_jsxs(_Fragment, { children: [staticHeader, _jsxs(Box, { flexDirection: "column", children: [!args.quiet && shouldRenderRunUnitTable(renderPolicy) && (_jsx(Box, { paddingTop: 1, flexDirection: "column", children: _jsx(ResultsTable, { rows: envelopeToFitRows(envelope) }) })), timedSummary, !args.quiet && state.warnings.length > 0 && (_jsx(WarningsBlock, { warnings: state.warnings })), !args.quiet && findingsDetail !== undefined && (_jsx(Box, { children: renderToInk(viewFindingsGroups(findingsDetail.groups)) })), !args.quiet && shouldRenderRunFooterHints(renderPolicy) && (_jsx(RunFooterHints, { hints: DEFAULT_RUN_FOOTER_HINTS }))] })] }));
|
|
199
234
|
}
|
|
200
235
|
case 'error': {
|
|
201
236
|
return _jsx(ErrorMessage, { message: state.result.message, suggestion: state.result.suggestion });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fit-runner.js","sourceRoot":"","sources":["../../src/cli/fit-runner.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EACL,MAAM,EACN,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,mBAAmB,EACnB,aAAa,EACb,WAAW,EACX,cAAc,EACd,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,aAAa,EACb,UAAU,EACV,
|
|
1
|
+
{"version":3,"file":"fit-runner.js","sourceRoot":"","sources":["../../src/cli/fit-runner.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAA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Root":"","sources":["../../src/cli/fit-worker.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;GAeG;AAIH,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,cAAc,EAEpB,MAAM,mBAAmB,CAAC;AAgB3B;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAsBtE;AAED,2EAA2E;AAC3E,eAAO,MAAM,uBAAuB,EAAE,WAAW,CAAC,OAAO,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"fit-worker.d.ts","sourceRoot":"","sources":["../../src/cli/fit-worker.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;GAeG;AAIH,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,cAAc,EAEpB,MAAM,mBAAmB,CAAC;AAgB3B;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAsBtE;AAED,2EAA2E;AAC3E,eAAO,MAAM,uBAAuB,EAAE,WAAW,CAAC,OAAO,EAAE,cAAc,CAiBvE,CAAC"}
|
package/dist/cli/fit-worker.js
CHANGED
|
@@ -53,6 +53,7 @@ export async function executeFitWorker(specPath) {
|
|
|
53
53
|
/** `fit-run-worker` — [internal] headless fit run, IPC progress/result. */
|
|
54
54
|
export const fitRunWorkerCommandSpec = defineCommand({
|
|
55
55
|
name: 'fit-run-worker',
|
|
56
|
+
visibility: 'internal',
|
|
56
57
|
description: '[internal] Run fit headless and stream progress + result over IPC (forked by the live view)',
|
|
57
58
|
commonFlags: [],
|
|
58
59
|
args: [{ name: 'specPath', description: 'Path to a JSON FitOptions spec file' }],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fit-worker.js","sourceRoot":"","sources":["../../src/cli/fit-worker.ts"],"names":[],"mappings":"AAAA,iSAAiS;AACjS;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,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AAK,EAAE,OAAO,EAAiB,EAAE;QACxC,MAAM,QAAQ,GAAI,OAAyC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QAC7E,MAAM,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IACnC,CAAC;CACF,CAAC,CAAC"}
|
package/dist/cli/fit.d.ts
CHANGED
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
* - `fit/display-registry.ts` — merged check display map
|
|
14
14
|
* - `fit/config-loader.ts` — config parse + language validation
|
|
15
15
|
* - `fit/recipe-selector.ts` — recipe-pick + run
|
|
16
|
-
* - `fit/result-builders.ts` — SignalEnvelope /
|
|
16
|
+
* - `fit/result-builders.ts` — SignalEnvelope / RunPresentation / session persist
|
|
17
17
|
*
|
|
18
18
|
* This file re-exports the public surface (`executeFit`,
|
|
19
19
|
* `ensureChecksLoaded`, and the display accessors) so existing consumers
|
|
20
20
|
* (`opensip-cli`, `report-data.ts`, the fitness `index.ts` barrel) keep
|
|
21
21
|
* resolving the same names.
|
|
22
22
|
*/
|
|
23
|
-
import type { FitOptions, SignalEnvelope,
|
|
23
|
+
import type { FitOptions, SignalEnvelope, RunPresentation, ErrorResult } from '@opensip-cli/contracts';
|
|
24
24
|
export { ensureChecksLoaded, getEnabledCheckCount, getLoadWarnings, getPluginLoadErrors, } from './fit/check-loader.js';
|
|
25
25
|
export { getDisplayName, getIcon } from './fit/display-registry.js';
|
|
26
26
|
/**
|
|
@@ -65,10 +65,12 @@ export interface ExecuteFitOptions {
|
|
|
65
65
|
* those reads be safe.
|
|
66
66
|
*/
|
|
67
67
|
export declare function executeFit(args: FitOptions, opts?: ExecuteFitOptions): Promise<{
|
|
68
|
-
result:
|
|
68
|
+
result: RunPresentation;
|
|
69
69
|
envelope: SignalEnvelope;
|
|
70
|
+
warnings?: readonly string[];
|
|
70
71
|
} | {
|
|
71
72
|
result: ErrorResult;
|
|
72
73
|
envelope?: undefined;
|
|
74
|
+
warnings?: undefined;
|
|
73
75
|
}>;
|
|
74
76
|
//# sourceMappingURL=fit.d.ts.map
|
package/dist/cli/fit.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fit.d.ts","sourceRoot":"","sources":["../../src/cli/fit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;
|
|
1
|
+
{"version":3,"file":"fit.d.ts","sourceRoot":"","sources":["../../src/cli/fit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAkBH,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,eAAe,EACf,WAAW,EACZ,MAAM,wBAAwB,CAAC;AAShC,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,eAAe,EACf,mBAAmB,GACpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAMpE;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,iBAAiB;IAChC,UAAU,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzD;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,UAAU,CAC9B,IAAI,EAAE,UAAU,EAChB,IAAI,GAAE,iBAAsB,GAC3B,OAAO,CAMN;IAAE,MAAM,EAAE,eAAe,CAAC;IAAC,QAAQ,EAAE,cAAc,CAAC;IAAC,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GACnF;IAAE,MAAM,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;CAAE,CACtE,CAgGA"}
|
package/dist/cli/fit.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* - `fit/display-registry.ts` — merged check display map
|
|
14
14
|
* - `fit/config-loader.ts` — config parse + language validation
|
|
15
15
|
* - `fit/recipe-selector.ts` — recipe-pick + run
|
|
16
|
-
* - `fit/result-builders.ts` — SignalEnvelope /
|
|
16
|
+
* - `fit/result-builders.ts` — SignalEnvelope / RunPresentation / session persist
|
|
17
17
|
*
|
|
18
18
|
* This file re-exports the public surface (`executeFit`,
|
|
19
19
|
* `ensureChecksLoaded`, and the display accessors) so existing consumers
|
|
@@ -28,7 +28,7 @@ import { ensureChecksLoaded, getLoadWarnings } from './fit/check-loader.js';
|
|
|
28
28
|
import { loadFitConfig, validateLanguagesAgainstAdapters } from './fit/config-loader.js';
|
|
29
29
|
import { runRecipeOrAdHoc, selectRecipe } from './fit/recipe-selector.js';
|
|
30
30
|
import { resolvedFitnessConfig } from './fit/resolved-fitness-config.js';
|
|
31
|
-
import { buildFitEnvelope, buildFitCallbacks,
|
|
31
|
+
import { buildFitEnvelope, buildFitCallbacks, buildFitPresentation, } from './fit/result-builders.js';
|
|
32
32
|
// ---------------------------------------------------------------------------
|
|
33
33
|
// Re-exports — preserve the public surface that external consumers
|
|
34
34
|
// (`opensip-cli`, `report-data.ts`, fitness's barrel) import from
|
|
@@ -125,13 +125,12 @@ export async function executeFit(args, opts = {}) {
|
|
|
125
125
|
// through the result rather than direct stderr writes so the live renderer
|
|
126
126
|
// can surface them without breaking Ink's frame tracking.
|
|
127
127
|
const warnings = [...getLoadWarnings(), ...validationWarnings];
|
|
128
|
-
const result =
|
|
128
|
+
const result = buildFitPresentation({
|
|
129
129
|
args,
|
|
130
130
|
fitnessResult,
|
|
131
131
|
envelope,
|
|
132
132
|
signalersConfig,
|
|
133
133
|
recipeName,
|
|
134
|
-
warnings,
|
|
135
134
|
});
|
|
136
135
|
logger.info({
|
|
137
136
|
evt: 'cli.fit.complete',
|
|
@@ -144,6 +143,9 @@ export async function executeFit(args, opts = {}) {
|
|
|
144
143
|
return {
|
|
145
144
|
result,
|
|
146
145
|
envelope,
|
|
146
|
+
// warnings ride as a sibling field (not on the presentation): the non-Ink
|
|
147
|
+
// paths surface them via emitWarningsToStderr, the live runner in its summary.
|
|
148
|
+
...(warnings.length > 0 ? { warnings } : {}),
|
|
147
149
|
};
|
|
148
150
|
}
|
|
149
151
|
//# sourceMappingURL=fit.js.map
|
package/dist/cli/fit.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fit.js","sourceRoot":"","sources":["../../src/cli/fit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,gCAAgC,EAAE,MAAM,wBAAwB,CAAC;AACzF,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,
|
|
1
|
+
{"version":3,"file":"fit.js","sourceRoot":"","sources":["../../src/cli/fit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,gCAAgC,EAAE,MAAM,wBAAwB,CAAC;AAC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AAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC7C,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Acceptance test for the instance-vs-global FileCache bug
|
|
3
|
+
* (parallel-tool-invocations Phase 1).
|
|
4
|
+
*
|
|
5
|
+
* Was RED on the Phase-0 tree: two logical runs shared the module singleton
|
|
6
|
+
* `fileCache`, so one run's `clear()` evicted the other's entries. Phase 1 gives
|
|
7
|
+
* each `RunScope` its OWN `scope.fitness.fileCache` (built by the fitness tool's
|
|
8
|
+
* `contributeScope()`), so an unrelated run's `clear()` can no longer touch
|
|
9
|
+
* another run's cache. This rewrite onto two distinct scope-owned caches flips
|
|
10
|
+
* it green.
|
|
11
|
+
*
|
|
12
|
+
* The fitness engine's own tests must NOT import `@opensip-cli/test-support`
|
|
13
|
+
* (the package graph would go cyclic), so we construct the `RunScope`s directly
|
|
14
|
+
* from `@opensip-cli/core` and populate each scope's fitness subscope via the
|
|
15
|
+
* fitness tool's `contributeScope()` (through core's `applyToolContributeScope`,
|
|
16
|
+
* the same unwrap-and-install seam production uses). Phase 4 adds interleaving + identity
|
|
17
|
+
* cases on top of this:
|
|
18
|
+
* - distinct object identity (`scopeA.fitness.fileCache !== scopeB.fitness.fileCache`,
|
|
19
|
+
* read through the same `currentScope()?.fitness?.fileCache` seam production uses);
|
|
20
|
+
* - explicit-await interleaving (A prewarms → B clears its OWN cache mid-flight →
|
|
21
|
+
* A reads and still sees its prewarmed entries; no cross-eviction).
|
|
22
|
+
*/
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=concurrent-file-cache.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"concurrent-file-cache.test.d.ts","sourceRoot":"","sources":["../../../src/framework/__tests__/concurrent-file-cache.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG"}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Acceptance test for the instance-vs-global FileCache bug
|
|
3
|
+
* (parallel-tool-invocations Phase 1).
|
|
4
|
+
*
|
|
5
|
+
* Was RED on the Phase-0 tree: two logical runs shared the module singleton
|
|
6
|
+
* `fileCache`, so one run's `clear()` evicted the other's entries. Phase 1 gives
|
|
7
|
+
* each `RunScope` its OWN `scope.fitness.fileCache` (built by the fitness tool's
|
|
8
|
+
* `contributeScope()`), so an unrelated run's `clear()` can no longer touch
|
|
9
|
+
* another run's cache. This rewrite onto two distinct scope-owned caches flips
|
|
10
|
+
* it green.
|
|
11
|
+
*
|
|
12
|
+
* The fitness engine's own tests must NOT import `@opensip-cli/test-support`
|
|
13
|
+
* (the package graph would go cyclic), so we construct the `RunScope`s directly
|
|
14
|
+
* from `@opensip-cli/core` and populate each scope's fitness subscope via the
|
|
15
|
+
* fitness tool's `contributeScope()` (through core's `applyToolContributeScope`,
|
|
16
|
+
* the same unwrap-and-install seam production uses). Phase 4 adds interleaving + identity
|
|
17
|
+
* cases on top of this:
|
|
18
|
+
* - distinct object identity (`scopeA.fitness.fileCache !== scopeB.fitness.fileCache`,
|
|
19
|
+
* read through the same `currentScope()?.fitness?.fileCache` seam production uses);
|
|
20
|
+
* - explicit-await interleaving (A prewarms → B clears its OWN cache mid-flight →
|
|
21
|
+
* A reads and still sees its prewarmed entries; no cross-eviction).
|
|
22
|
+
*/
|
|
23
|
+
import { mkdtempSync, rmSync, writeFileSync } from 'node:fs';
|
|
24
|
+
import { tmpdir } from 'node:os';
|
|
25
|
+
import path from 'node:path';
|
|
26
|
+
import { applyToolContributeScope, RunScope, runWithScope, runWithScopeSync, } from '@opensip-cli/core';
|
|
27
|
+
import { describe, expect, it } from 'vitest';
|
|
28
|
+
import { fitnessTool } from '../../tool.js';
|
|
29
|
+
/** Build a fresh RunScope carrying its OWN scope.fitness.fileCache. */
|
|
30
|
+
function makeScopeWithCache() {
|
|
31
|
+
const scope = new RunScope();
|
|
32
|
+
applyToolContributeScope(scope, fitnessTool);
|
|
33
|
+
const cache = scope.fitness?.fileCache;
|
|
34
|
+
if (!cache)
|
|
35
|
+
throw new Error('expected scope.fitness.fileCache to be installed');
|
|
36
|
+
return { scope, cache };
|
|
37
|
+
}
|
|
38
|
+
describe('concurrent fit runs do not share a file cache', () => {
|
|
39
|
+
it('run A clear() must not evict run B entries (each scope owns its own cache)', async () => {
|
|
40
|
+
const dir = mkdtempSync(path.join(tmpdir(), 'opensip-concurrent-cache-'));
|
|
41
|
+
const fileB = path.join(dir, 'run-b.ts');
|
|
42
|
+
const contentB = 'export const b = 1;\n';
|
|
43
|
+
writeFileSync(fileB, contentB);
|
|
44
|
+
// Two independent runs → two independent scope-owned caches.
|
|
45
|
+
const runA = makeScopeWithCache();
|
|
46
|
+
const runB = makeScopeWithCache();
|
|
47
|
+
// The two scopes carry DISTINCT cache instances (no shared module singleton).
|
|
48
|
+
expect(runA.cache).not.toBe(runB.cache);
|
|
49
|
+
try {
|
|
50
|
+
// Run B reads its file → cached in run B's OWN cache.
|
|
51
|
+
await runB.cache.get(fileB);
|
|
52
|
+
expect(runB.cache.getCached(fileB)).toBe(contentB);
|
|
53
|
+
// Run A finishes and clears ITS cache. With per-scope caches this cannot
|
|
54
|
+
// reach run B's entries (the Phase-0 bug was both runs sharing one Map).
|
|
55
|
+
runA.cache.clear();
|
|
56
|
+
// Run B's entry survives the unrelated run's clear().
|
|
57
|
+
expect(runB.cache.getCached(fileB)).toBe(contentB);
|
|
58
|
+
}
|
|
59
|
+
finally {
|
|
60
|
+
runA.scope.dispose();
|
|
61
|
+
runB.scope.dispose();
|
|
62
|
+
rmSync(dir, { recursive: true, force: true });
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
it('each scope.fitness.fileCache is a distinct object identity', () => {
|
|
66
|
+
// The spec success criterion: two scopes never alias the same cache object.
|
|
67
|
+
// (The old module singleton would have made `currentScope()?.fitness?.fileCache`
|
|
68
|
+
// resolve to the SAME instance for both runs.)
|
|
69
|
+
const runA = makeScopeWithCache();
|
|
70
|
+
const runB = makeScopeWithCache();
|
|
71
|
+
try {
|
|
72
|
+
// Read through the scope seam exactly like production
|
|
73
|
+
// (currentScope()?.fitness?.fileCache), not the captured locals.
|
|
74
|
+
const fromA = runWithScopeSync(runA.scope, () => runA.scope.fitness?.fileCache);
|
|
75
|
+
const fromB = runWithScopeSync(runB.scope, () => runB.scope.fitness?.fileCache);
|
|
76
|
+
expect(fromA).toBe(runA.cache);
|
|
77
|
+
expect(fromB).toBe(runB.cache);
|
|
78
|
+
expect(fromA).not.toBe(fromB);
|
|
79
|
+
}
|
|
80
|
+
finally {
|
|
81
|
+
runA.scope.dispose();
|
|
82
|
+
runB.scope.dispose();
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
it('interleaving: A prewarms, B clears mid-flight, A still reads its own entries', async () => {
|
|
86
|
+
// The spec's interleaving success criterion. Two scopes run under
|
|
87
|
+
// `runWithScope` (the concurrency-safe binding); explicit `await` points
|
|
88
|
+
// hand control back and forth so run B's clear() lands BETWEEN run A's
|
|
89
|
+
// prewarm and run A's read. With per-scope caches, B clearing its OWN
|
|
90
|
+
// cache cannot evict A's entries (the Phase-0 bug was both runs sharing
|
|
91
|
+
// one Map, so B.clear() would have wiped A's prewarmed content).
|
|
92
|
+
const dir = mkdtempSync(path.join(tmpdir(), 'opensip-interleave-cache-'));
|
|
93
|
+
const fileA = path.join(dir, 'run-a.ts');
|
|
94
|
+
const fileB = path.join(dir, 'run-b.ts');
|
|
95
|
+
const contentA = 'export const a = 1;\n';
|
|
96
|
+
const contentB = 'export const b = 2;\n';
|
|
97
|
+
writeFileSync(fileA, contentA);
|
|
98
|
+
writeFileSync(fileB, contentB);
|
|
99
|
+
const runA = makeScopeWithCache();
|
|
100
|
+
const runB = makeScopeWithCache();
|
|
101
|
+
expect(runA.cache).not.toBe(runB.cache);
|
|
102
|
+
// A barrier pair that lets the two bodies hand control back and forth at
|
|
103
|
+
// explicit points (deterministic interleaving, no reliance on timer races).
|
|
104
|
+
let releaseB;
|
|
105
|
+
const bMayClear = new Promise((resolve) => {
|
|
106
|
+
releaseB = resolve;
|
|
107
|
+
});
|
|
108
|
+
let releaseA;
|
|
109
|
+
const aMayRead = new Promise((resolve) => {
|
|
110
|
+
releaseA = resolve;
|
|
111
|
+
});
|
|
112
|
+
try {
|
|
113
|
+
const aResult = runWithScope(runA.scope, async () => {
|
|
114
|
+
// 1. A prewarms its OWN cache (reads fileA into run A's cache).
|
|
115
|
+
await runA.cache.get(fileA);
|
|
116
|
+
expect(runA.cache.getCached(fileA)).toBe(contentA);
|
|
117
|
+
// 2. Yield: let B clear its cache now.
|
|
118
|
+
releaseB();
|
|
119
|
+
await aMayRead;
|
|
120
|
+
// 4. A reads AFTER B.clear() — served from A's own (uncleared) cache.
|
|
121
|
+
// Assert it's the cached value, and that the cache still reports the
|
|
122
|
+
// entry (a disk re-read would re-populate, masking eviction; here we
|
|
123
|
+
// assert the *synchronous* cached hit survived B's clear()).
|
|
124
|
+
expect(runA.cache.getCached(fileA)).toBe(contentA);
|
|
125
|
+
return runA.cache.getCached(fileA);
|
|
126
|
+
});
|
|
127
|
+
const bResult = runWithScope(runB.scope, async () => {
|
|
128
|
+
await bMayClear;
|
|
129
|
+
// 3. B prewarms then clears its OWN cache while A is mid-flight.
|
|
130
|
+
await runB.cache.get(fileB);
|
|
131
|
+
expect(runB.cache.getCached(fileB)).toBe(contentB);
|
|
132
|
+
runB.cache.clear();
|
|
133
|
+
expect(runB.cache.getCached(fileB)).toBeUndefined();
|
|
134
|
+
// Hand control back to A so it reads post-clear.
|
|
135
|
+
releaseA();
|
|
136
|
+
});
|
|
137
|
+
const [aValue] = await Promise.all([aResult, bResult]);
|
|
138
|
+
// A's entry was served from A's cache, unaffected by B's clear().
|
|
139
|
+
expect(aValue).toBe(contentA);
|
|
140
|
+
// A's cache is still intact; B's was cleared. No cross-eviction.
|
|
141
|
+
expect(runA.cache.getCached(fileA)).toBe(contentA);
|
|
142
|
+
expect(runB.cache.getCached(fileB)).toBeUndefined();
|
|
143
|
+
}
|
|
144
|
+
finally {
|
|
145
|
+
runA.scope.dispose();
|
|
146
|
+
runB.scope.dispose();
|
|
147
|
+
rmSync(dir, { recursive: true, force: true });
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
});
|
|
151
|
+
//# sourceMappingURL=concurrent-file-cache.test.js.map
|