@codyswann/lisa 4.44.0 → 4.44.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/dist/configs/vitest/coverage-reports-directory.d.ts +70 -0
- package/dist/configs/vitest/coverage-reports-directory.d.ts.map +1 -1
- package/dist/configs/vitest/coverage-reports-directory.js +180 -2
- package/dist/configs/vitest/coverage-reports-directory.js.map +1 -1
- package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +1 -0
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/package.json +4 -4
- 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-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/.claude-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-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-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-openclaw/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-agy/plugin.json +1 -1
- package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-cursor/.claude-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-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-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-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
|
@@ -30,6 +30,76 @@ export declare const COVERAGE_REPORTS_DIR_ENV = "LISA_COVERAGE_REPORTS_DIR";
|
|
|
30
30
|
* @returns Root-relative path, POSIX-separated as Vitest's own default is.
|
|
31
31
|
*/
|
|
32
32
|
export declare function coverageRunDirectory(owner: number, startedAt: number, suffix: string): string;
|
|
33
|
+
/**
|
|
34
|
+
* Publish one finished run's artifacts to the stable directory, then drop it.
|
|
35
|
+
*
|
|
36
|
+
* ## Why isolation alone is not enough
|
|
37
|
+
*
|
|
38
|
+
* `reportsDirectory` is the only lever the provider offers, so isolating the
|
|
39
|
+
* scratch necessarily moves the REPORTS with it. An unpinned run therefore
|
|
40
|
+
* writes `coverage/.runs/<run>/lcov.info` and never writes `coverage/lcov.info`
|
|
41
|
+
* again.
|
|
42
|
+
*
|
|
43
|
+
* A project upgrading to that behaviour does not get a missing-file error. Its
|
|
44
|
+
* Sonar keeps reading **the file left there before the upgrade**, indefinitely,
|
|
45
|
+
* and reports a coverage number that has quietly stopped moving — a wrong value
|
|
46
|
+
* that looks like a real one, which is the same failure isolation removed from
|
|
47
|
+
* concurrent runs, relocated one layer out to consumers.
|
|
48
|
+
*
|
|
49
|
+
* ## Why this is safe where a mid-run shared directory is not
|
|
50
|
+
*
|
|
51
|
+
* Ordering. The provider runs `reportCoverage` -> `generateReports` ->
|
|
52
|
+
* `cleanAfterRun`, and this runs later still, at process exit. It therefore
|
|
53
|
+
* moves COMPLETED files, never files a writer is partway through — which is
|
|
54
|
+
* precisely the distinction that makes the shared-directory `rm` destructive
|
|
55
|
+
* and this move benign.
|
|
56
|
+
*
|
|
57
|
+
* Two concurrent runs publishing together is last-writer-wins per file, and can
|
|
58
|
+
* leave `lcov.info` from one beside `index.html` from another. That cost is
|
|
59
|
+
* accepted deliberately: each run still reported its own correct number, and
|
|
60
|
+
* nothing here can delete a directory another run is writing into.
|
|
61
|
+
* @param directory - Reports directory as {@link coverageReportsDirectory} returned it
|
|
62
|
+
* @param expectedName - The run-directory basename this process minted
|
|
63
|
+
* @returns True when this run's own directory was published and removed
|
|
64
|
+
*/
|
|
65
|
+
export declare function publishCoverageRunDirectory(directory: string, expectedName: string): boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Remove a run directory this process minted, and nothing else.
|
|
68
|
+
*
|
|
69
|
+
* The fallback when publishing could not happen, and the guard is the same one:
|
|
70
|
+
* the basename must be the name this process generated, so a mis-wired caller
|
|
71
|
+
* removes nothing rather than removing a directory another run is writing into.
|
|
72
|
+
* @param directory - Reports directory as {@link coverageReportsDirectory} returned it
|
|
73
|
+
* @param expectedName - The run-directory basename this process minted
|
|
74
|
+
* @returns True when the path was this run's own
|
|
75
|
+
*/
|
|
76
|
+
export declare function removeOwnCoverageRunDirectory(directory: string, expectedName: string): boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Remove run directories belonging to runs that are no longer alive.
|
|
79
|
+
*
|
|
80
|
+
* Publishing happens at process exit, so an ordinary run leaves nothing behind.
|
|
81
|
+
* A run that is `SIGKILL`ed does — and on a contended machine that is routine
|
|
82
|
+
* rather than exceptional, so without this `coverage/.runs/` accrues one
|
|
83
|
+
* directory per killed run with nothing ever removing them.
|
|
84
|
+
*
|
|
85
|
+
* ## Why liveness is legitimate here and not in a lock
|
|
86
|
+
*
|
|
87
|
+
* Reclaiming an abandoned directory is not adjudicating ownership of a
|
|
88
|
+
* contended resource, and the asymmetry is what makes it safe: a false KEEP is
|
|
89
|
+
* inert debris, and a false REMOVE is impossible, because a live run's own pid
|
|
90
|
+
* always probes alive. The lock this module refuses has the opposite asymmetry
|
|
91
|
+
* — there, a wrong answer releases a lock somebody is holding.
|
|
92
|
+
*
|
|
93
|
+
* It introduces no second authority. {@link parseRunRootName} and
|
|
94
|
+
* {@link isProcessAlive} are the scratch namespace's existing parser and
|
|
95
|
+
* liveness probe, and these directories are named by {@link runRootName}, so
|
|
96
|
+
* that parser reads them unchanged. Anything it does not recognise is left
|
|
97
|
+
* alone.
|
|
98
|
+
* @param runsRoot - Directory holding the run directories
|
|
99
|
+
* @param alive - Liveness probe; defaults to the shared one
|
|
100
|
+
* @returns Basenames of the directories removed
|
|
101
|
+
*/
|
|
102
|
+
export declare function reclaimAbandonedCoverageRunDirectories(runsRoot?: string, alive?: (owner: number) => boolean): readonly string[];
|
|
33
103
|
/**
|
|
34
104
|
* Resolves the coverage reports directory for this run.
|
|
35
105
|
* @param environment - Environment to read; defaults to this process's.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coverage-reports-directory.d.ts","sourceRoot":"","sources":["../../../src/configs/vitest/coverage-reports-directory.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"coverage-reports-directory.d.ts","sourceRoot":"","sources":["../../../src/configs/vitest/coverage-reports-directory.ts"],"names":[],"mappings":"AAuEA;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,UAAU,CAAC;AAEzC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,wBAAwB,8BAA8B,CAAC;AAkBpE;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,GACb,MAAM,CAER;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,GACnB,OAAO,CAyBT;AAED;;;;;;;;;GASG;AACH,wBAAgB,6BAA6B,CAC3C,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,GACnB,OAAO,CAWT;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,sCAAsC,CACpD,QAAQ,GAAE,MAAoD,EAC9D,KAAK,GAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAwB,GACjD,SAAS,MAAM,EAAE,CAenB;AAYD;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,WAAW,GAAE,MAAM,CAAC,UAAgB,GACnC,MAAM,CAcR;AAkCD;;;;;;GAMG;AACH,wBAAgB,6BAA6B,IAAI,IAAI,CAGpD"}
|
|
@@ -59,8 +59,11 @@
|
|
|
59
59
|
* @module configs/vitest/coverage-reports-directory
|
|
60
60
|
*/
|
|
61
61
|
import { randomBytes } from "node:crypto";
|
|
62
|
+
import * as fs from "node:fs";
|
|
63
|
+
import * as path from "node:path";
|
|
62
64
|
import { env, pid } from "node:process";
|
|
63
|
-
import { runRootName } from "./scratch-namespace-authority.js";
|
|
65
|
+
import { parseRunRootName, runRootName, } from "./scratch-namespace-authority.js";
|
|
66
|
+
import { isProcessAlive } from "./scratch-sweep.js";
|
|
64
67
|
/**
|
|
65
68
|
* Directory under `coverage/` holding one run's isolated output.
|
|
66
69
|
*
|
|
@@ -84,6 +87,17 @@ export const COVERAGE_RUNS_DIR = ".runs";
|
|
|
84
87
|
export const COVERAGE_REPORTS_DIR_ENV = "LISA_COVERAGE_REPORTS_DIR";
|
|
85
88
|
/** Bytes of randomness disambiguating two runs started in the same millisecond. */
|
|
86
89
|
const SUFFIX_BYTES = 4;
|
|
90
|
+
/** The stable directory a checkout's coverage artifacts are read from. */
|
|
91
|
+
const COVERAGE_BASE = "coverage";
|
|
92
|
+
/**
|
|
93
|
+
* The provider's own scratch subdirectory, named so it is never published.
|
|
94
|
+
*
|
|
95
|
+
* `cleanAfterRun` removes it before the process exits, so in practice it is
|
|
96
|
+
* already gone by the time anything publishes. Skipping it explicitly means a
|
|
97
|
+
* run killed between report generation and exit cannot copy a half-written
|
|
98
|
+
* `coverage-<n>.json` up to the stable path, where another run would read it.
|
|
99
|
+
*/
|
|
100
|
+
const COVERAGE_SCRATCH_DIR = ".tmp";
|
|
87
101
|
/**
|
|
88
102
|
* Builds the relative reports directory for one run.
|
|
89
103
|
*
|
|
@@ -97,6 +111,134 @@ const SUFFIX_BYTES = 4;
|
|
|
97
111
|
export function coverageRunDirectory(owner, startedAt, suffix) {
|
|
98
112
|
return `coverage/${COVERAGE_RUNS_DIR}/${runRootName(owner, startedAt, suffix)}`;
|
|
99
113
|
}
|
|
114
|
+
/**
|
|
115
|
+
* Publish one finished run's artifacts to the stable directory, then drop it.
|
|
116
|
+
*
|
|
117
|
+
* ## Why isolation alone is not enough
|
|
118
|
+
*
|
|
119
|
+
* `reportsDirectory` is the only lever the provider offers, so isolating the
|
|
120
|
+
* scratch necessarily moves the REPORTS with it. An unpinned run therefore
|
|
121
|
+
* writes `coverage/.runs/<run>/lcov.info` and never writes `coverage/lcov.info`
|
|
122
|
+
* again.
|
|
123
|
+
*
|
|
124
|
+
* A project upgrading to that behaviour does not get a missing-file error. Its
|
|
125
|
+
* Sonar keeps reading **the file left there before the upgrade**, indefinitely,
|
|
126
|
+
* and reports a coverage number that has quietly stopped moving — a wrong value
|
|
127
|
+
* that looks like a real one, which is the same failure isolation removed from
|
|
128
|
+
* concurrent runs, relocated one layer out to consumers.
|
|
129
|
+
*
|
|
130
|
+
* ## Why this is safe where a mid-run shared directory is not
|
|
131
|
+
*
|
|
132
|
+
* Ordering. The provider runs `reportCoverage` -> `generateReports` ->
|
|
133
|
+
* `cleanAfterRun`, and this runs later still, at process exit. It therefore
|
|
134
|
+
* moves COMPLETED files, never files a writer is partway through — which is
|
|
135
|
+
* precisely the distinction that makes the shared-directory `rm` destructive
|
|
136
|
+
* and this move benign.
|
|
137
|
+
*
|
|
138
|
+
* Two concurrent runs publishing together is last-writer-wins per file, and can
|
|
139
|
+
* leave `lcov.info` from one beside `index.html` from another. That cost is
|
|
140
|
+
* accepted deliberately: each run still reported its own correct number, and
|
|
141
|
+
* nothing here can delete a directory another run is writing into.
|
|
142
|
+
* @param directory - Reports directory as {@link coverageReportsDirectory} returned it
|
|
143
|
+
* @param expectedName - The run-directory basename this process minted
|
|
144
|
+
* @returns True when this run's own directory was published and removed
|
|
145
|
+
*/
|
|
146
|
+
export function publishCoverageRunDirectory(directory, expectedName) {
|
|
147
|
+
if (path.basename(directory) !== expectedName)
|
|
148
|
+
return false;
|
|
149
|
+
const from = path.resolve(process.cwd(), directory);
|
|
150
|
+
// Two levels up from `<base>/coverage/.runs/<run>` is `<base>/coverage`.
|
|
151
|
+
// Derived from the run directory rather than from `process.cwd()` so the
|
|
152
|
+
// pair travels together: a caller that states one has stated both, and a
|
|
153
|
+
// test can exercise this against a temporary tree without changing
|
|
154
|
+
// directory.
|
|
155
|
+
const stable = path.dirname(path.dirname(from));
|
|
156
|
+
try {
|
|
157
|
+
if (!fs.existsSync(from))
|
|
158
|
+
return false;
|
|
159
|
+
for (const entry of fs.readdirSync(from)) {
|
|
160
|
+
if (entry === COVERAGE_SCRATCH_DIR)
|
|
161
|
+
continue;
|
|
162
|
+
const target = path.join(stable, entry);
|
|
163
|
+
fs.rmSync(target, { recursive: true, force: true });
|
|
164
|
+
fs.renameSync(path.join(from, entry), target);
|
|
165
|
+
}
|
|
166
|
+
fs.rmSync(from, { recursive: true, force: true });
|
|
167
|
+
return true;
|
|
168
|
+
}
|
|
169
|
+
catch {
|
|
170
|
+
// Best effort. A run that cannot publish its artifacts has still measured
|
|
171
|
+
// and reported its coverage correctly, and failing over it would turn a
|
|
172
|
+
// tidiness problem into the red gate this module exists to prevent.
|
|
173
|
+
return false;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Remove a run directory this process minted, and nothing else.
|
|
178
|
+
*
|
|
179
|
+
* The fallback when publishing could not happen, and the guard is the same one:
|
|
180
|
+
* the basename must be the name this process generated, so a mis-wired caller
|
|
181
|
+
* removes nothing rather than removing a directory another run is writing into.
|
|
182
|
+
* @param directory - Reports directory as {@link coverageReportsDirectory} returned it
|
|
183
|
+
* @param expectedName - The run-directory basename this process minted
|
|
184
|
+
* @returns True when the path was this run's own
|
|
185
|
+
*/
|
|
186
|
+
export function removeOwnCoverageRunDirectory(directory, expectedName) {
|
|
187
|
+
if (path.basename(directory) !== expectedName)
|
|
188
|
+
return false;
|
|
189
|
+
try {
|
|
190
|
+
fs.rmSync(path.resolve(process.cwd(), directory), {
|
|
191
|
+
recursive: true,
|
|
192
|
+
force: true,
|
|
193
|
+
});
|
|
194
|
+
return true;
|
|
195
|
+
}
|
|
196
|
+
catch {
|
|
197
|
+
return false;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Remove run directories belonging to runs that are no longer alive.
|
|
202
|
+
*
|
|
203
|
+
* Publishing happens at process exit, so an ordinary run leaves nothing behind.
|
|
204
|
+
* A run that is `SIGKILL`ed does — and on a contended machine that is routine
|
|
205
|
+
* rather than exceptional, so without this `coverage/.runs/` accrues one
|
|
206
|
+
* directory per killed run with nothing ever removing them.
|
|
207
|
+
*
|
|
208
|
+
* ## Why liveness is legitimate here and not in a lock
|
|
209
|
+
*
|
|
210
|
+
* Reclaiming an abandoned directory is not adjudicating ownership of a
|
|
211
|
+
* contended resource, and the asymmetry is what makes it safe: a false KEEP is
|
|
212
|
+
* inert debris, and a false REMOVE is impossible, because a live run's own pid
|
|
213
|
+
* always probes alive. The lock this module refuses has the opposite asymmetry
|
|
214
|
+
* — there, a wrong answer releases a lock somebody is holding.
|
|
215
|
+
*
|
|
216
|
+
* It introduces no second authority. {@link parseRunRootName} and
|
|
217
|
+
* {@link isProcessAlive} are the scratch namespace's existing parser and
|
|
218
|
+
* liveness probe, and these directories are named by {@link runRootName}, so
|
|
219
|
+
* that parser reads them unchanged. Anything it does not recognise is left
|
|
220
|
+
* alone.
|
|
221
|
+
* @param runsRoot - Directory holding the run directories
|
|
222
|
+
* @param alive - Liveness probe; defaults to the shared one
|
|
223
|
+
* @returns Basenames of the directories removed
|
|
224
|
+
*/
|
|
225
|
+
export function reclaimAbandonedCoverageRunDirectories(runsRoot = path.join(COVERAGE_BASE, COVERAGE_RUNS_DIR), alive = isProcessAlive) {
|
|
226
|
+
const root = path.resolve(process.cwd(), runsRoot);
|
|
227
|
+
try {
|
|
228
|
+
const abandoned = fs.readdirSync(root).filter(name => {
|
|
229
|
+
const owner = parseRunRootName(name);
|
|
230
|
+
return owner !== undefined && !alive(owner.pid);
|
|
231
|
+
});
|
|
232
|
+
for (const name of abandoned)
|
|
233
|
+
fs.rmSync(path.join(root, name), { recursive: true, force: true });
|
|
234
|
+
return abandoned;
|
|
235
|
+
}
|
|
236
|
+
catch {
|
|
237
|
+
// An absent or unreadable runs directory is not an error: nothing to
|
|
238
|
+
// reclaim is the ordinary state on a checkout that has never run coverage.
|
|
239
|
+
return [];
|
|
240
|
+
}
|
|
241
|
+
}
|
|
100
242
|
/**
|
|
101
243
|
* The path this process's coverage output belongs in.
|
|
102
244
|
*
|
|
@@ -115,9 +257,44 @@ export function coverageReportsDirectory(environment = env) {
|
|
|
115
257
|
const override = environment[COVERAGE_REPORTS_DIR_ENV];
|
|
116
258
|
if (override !== undefined && override.trim() !== "")
|
|
117
259
|
return override;
|
|
118
|
-
pinned.current
|
|
260
|
+
if (pinned.current === undefined) {
|
|
261
|
+
const name = runRootName(pid, Date.now(), randomBytes(SUFFIX_BYTES).toString("hex"));
|
|
262
|
+
pinned.current = `${COVERAGE_BASE}/${COVERAGE_RUNS_DIR}/${name}`;
|
|
263
|
+
registerRunLifecycle(pinned.current, name);
|
|
264
|
+
}
|
|
119
265
|
return pinned.current;
|
|
120
266
|
}
|
|
267
|
+
/**
|
|
268
|
+
* Whether this process has already armed its reclaim and publish steps.
|
|
269
|
+
*
|
|
270
|
+
* Field named `current` to match {@link pinned}, and not by accident: the
|
|
271
|
+
* project's `functional/immutable-data` rule permits mutation only through
|
|
272
|
+
* `*.current`, `*.value` and `*.displayName`. Renaming it makes the file
|
|
273
|
+
* stop linting.
|
|
274
|
+
*/
|
|
275
|
+
const lifecycle = { current: false };
|
|
276
|
+
/**
|
|
277
|
+
* Reclaim abandoned directories now, and publish this run's own at exit.
|
|
278
|
+
*
|
|
279
|
+
* Armed once per process, from the same place the directory is minted, so the
|
|
280
|
+
* two cannot disagree about which run they belong to. A pinned run never
|
|
281
|
+
* reaches here: the pinned directory belongs to whoever set the pin, and is
|
|
282
|
+
* left exactly as it was found.
|
|
283
|
+
* @param directory - This run's reports directory
|
|
284
|
+
* @param name - Its basename, which is the ownership proof both steps check
|
|
285
|
+
*/
|
|
286
|
+
function registerRunLifecycle(directory, name) {
|
|
287
|
+
if (lifecycle.current)
|
|
288
|
+
return;
|
|
289
|
+
lifecycle.current = true;
|
|
290
|
+
// Before minting anything of our own: this run's directory does not exist
|
|
291
|
+
// yet and its pid is alive regardless, so it can never be its own victim.
|
|
292
|
+
reclaimAbandonedCoverageRunDirectories();
|
|
293
|
+
process.once("exit", () => {
|
|
294
|
+
if (!publishCoverageRunDirectory(directory, name))
|
|
295
|
+
removeOwnCoverageRunDirectory(directory, name);
|
|
296
|
+
});
|
|
297
|
+
}
|
|
121
298
|
/**
|
|
122
299
|
* Discards the memoized value.
|
|
123
300
|
*
|
|
@@ -127,5 +304,6 @@ export function coverageReportsDirectory(environment = env) {
|
|
|
127
304
|
*/
|
|
128
305
|
export function resetCoverageReportsDirectory() {
|
|
129
306
|
pinned.current = undefined;
|
|
307
|
+
lifecycle.current = false;
|
|
130
308
|
}
|
|
131
309
|
//# sourceMappingURL=coverage-reports-directory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coverage-reports-directory.js","sourceRoot":"","sources":["../../../src/configs/vitest/coverage-reports-directory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,
|
|
1
|
+
{"version":3,"file":"coverage-reports-directory.js","sourceRoot":"","sources":["../../../src/configs/vitest/coverage-reports-directory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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jC,MAAM,IAAI,GAAG,WAAW,CACtB,GAAG,EACH,IAAI,CAAC,GAAG,EAAE,EACV,WAAW,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAC1C,CAAC;QACF,MAAM,CAAC,OAAO,GAAG,GAAG,aAAa,IAAI,iBAAiB,IAAI,IAAI,EAAE,CAAC;QACjE,oBAAoB,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC7C,CAAC;IACD,OAAO,MAAM,CAAC,OAAO,CAAC;AACxB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,SAAS,GAAyB,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;AAE3D;;;;;;;;;GASG;AACH,SAAS,oBAAoB,CAAC,SAAiB,EAAE,IAAY;IAC3D,IAAI,SAAS,CAAC,OAAO;QAAE,OAAO;IAC9B,SAAS,CAAC,OAAO,GAAG,IAAI,CAAC;IACzB,0EAA0E;IAC1E,0EAA0E;IAC1E,sCAAsC,EAAE,CAAC;IACzC,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE;QACxB,IAAI,CAAC,2BAA2B,CAAC,SAAS,EAAE,IAAI,CAAC;YAC/C,6BAA6B,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IACnD,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,6BAA6B;IAC3C,MAAM,CAAC,OAAO,GAAG,SAAS,CAAC;IAC3B,SAAS,CAAC,OAAO,GAAG,KAAK,CAAC;AAC5B,CAAC"}
|
|
@@ -34,9 +34,9 @@ export const NIGHTLY_E2E_GUARD_BEHAVIOR_CERTIFICATES = Object.freeze({
|
|
|
34
34
|
}),
|
|
35
35
|
dfd2fef680de5ef03e63075e8a61c62ca4d95cdfdff6201939b79c748d3397f6: Object.freeze({
|
|
36
36
|
contractVersion: "1.9.0",
|
|
37
|
-
packageVersions: Object.freeze(["4.44.
|
|
37
|
+
packageVersions: Object.freeze(["4.44.1"]),
|
|
38
38
|
provenances: Object.freeze([
|
|
39
|
-
"workspace package @codyswann/lisa@4.44.
|
|
39
|
+
"workspace package @codyswann/lisa@4.44.1 (typescript/copy-overwrite/scripts/check-nightly-e2e-health.mjs)",
|
|
40
40
|
]),
|
|
41
41
|
}),
|
|
42
42
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upstream-evidence-manifest.d.ts","sourceRoot":"","sources":["../../src/core/upstream-evidence-manifest.ts"],"names":[],"mappings":"AACA,iFAAiF;AACjF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAwkFpE,CAAC;AAEL,4EAA4E;AAC5E,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"upstream-evidence-manifest.d.ts","sourceRoot":"","sources":["../../src/core/upstream-evidence-manifest.ts"],"names":[],"mappings":"AACA,iFAAiF;AACjF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAwkFpE,CAAC;AAEL,4EAA4E;AAC5E,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CA00QjE,CAAC;AAEL,sFAAsF;AACtF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAk6I/D,CAAC"}
|
|
@@ -8494,6 +8494,7 @@ export const UPSTREAM_SURFACE_MANIFEST = Object.freeze({
|
|
|
8494
8494
|
"tests/unit/config/coderabbit-labeling-scope.test.ts": true,
|
|
8495
8495
|
"tests/unit/config/conflict-prover-consumer-layouts.test.ts": true,
|
|
8496
8496
|
"tests/unit/config/coverage-include-guard.test.ts": true,
|
|
8497
|
+
"tests/unit/config/coverage-publish-reclaim.test.ts": true,
|
|
8497
8498
|
"tests/unit/config/coverage-scratch-isolation.test.ts": true,
|
|
8498
8499
|
"tests/unit/config/coverage-unit-scope-thresholds.test.ts": true,
|
|
8499
8500
|
"tests/unit/config/coverage-unit-script-runner-parity.test.ts": true,
|