@dzhechkov/harness-core 0.8.6 → 0.8.11
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/.dz-manifest.json +361 -97
- package/README.md +48 -1
- package/dist/amendment-trace.d.ts.map +1 -1
- package/dist/amendment-trace.js +12 -1
- package/dist/amendment-trace.js.map +1 -1
- package/dist/codex-invoke.d.ts +73 -0
- package/dist/codex-invoke.d.ts.map +1 -0
- package/dist/codex-invoke.js +80 -0
- package/dist/codex-invoke.js.map +1 -0
- package/dist/compounding.d.ts +54 -0
- package/dist/compounding.d.ts.map +1 -1
- package/dist/compounding.js +221 -1
- package/dist/compounding.js.map +1 -1
- package/dist/discrimination-gate.d.ts +63 -3
- package/dist/discrimination-gate.d.ts.map +1 -1
- package/dist/discrimination-gate.js +113 -16
- package/dist/discrimination-gate.js.map +1 -1
- package/dist/eta.d.ts +92 -0
- package/dist/eta.d.ts.map +1 -0
- package/dist/eta.js +488 -0
- package/dist/eta.js.map +1 -0
- package/dist/event-chain.d.ts +30 -0
- package/dist/event-chain.d.ts.map +1 -1
- package/dist/event-chain.js +24 -0
- package/dist/event-chain.js.map +1 -1
- package/dist/feature-adr-checkpoints.js +1 -1
- package/dist/feature-adr-decision-recall.d.ts +167 -0
- package/dist/feature-adr-decision-recall.d.ts.map +1 -0
- package/dist/feature-adr-decision-recall.js +519 -0
- package/dist/feature-adr-decision-recall.js.map +1 -0
- package/dist/feature-adr-landing.d.ts +37 -0
- package/dist/feature-adr-landing.d.ts.map +1 -0
- package/dist/feature-adr-landing.js +59 -0
- package/dist/feature-adr-landing.js.map +1 -0
- package/dist/feature-adr-routing.d.ts +2 -2
- package/dist/feature-adr-routing.d.ts.map +1 -1
- package/dist/feature-adr-routing.js +7 -11
- package/dist/feature-adr-routing.js.map +1 -1
- package/dist/guard-promotion.d.ts +41 -0
- package/dist/guard-promotion.d.ts.map +1 -1
- package/dist/guard-promotion.js +218 -4
- package/dist/guard-promotion.js.map +1 -1
- package/dist/guard-volume.d.ts +108 -0
- package/dist/guard-volume.d.ts.map +1 -0
- package/dist/guard-volume.js +536 -0
- package/dist/guard-volume.js.map +1 -0
- package/dist/guard.d.ts +17 -0
- package/dist/guard.d.ts.map +1 -1
- package/dist/guard.js +92 -4
- package/dist/guard.js.map +1 -1
- package/dist/index.d.ts +24 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -5
- package/dist/index.js.map +1 -1
- package/dist/integration-apply.d.ts +25 -0
- package/dist/integration-apply.d.ts.map +1 -0
- package/dist/integration-apply.js +299 -0
- package/dist/integration-apply.js.map +1 -0
- package/dist/integration-evidence.d.ts +46 -0
- package/dist/integration-evidence.d.ts.map +1 -0
- package/dist/integration-evidence.js +44 -0
- package/dist/integration-evidence.js.map +1 -0
- package/dist/integration-probe-worker.d.ts +22 -0
- package/dist/integration-probe-worker.d.ts.map +1 -0
- package/dist/integration-probe-worker.js +334 -0
- package/dist/integration-probe-worker.js.map +1 -0
- package/dist/integrations-verify.d.ts +60 -0
- package/dist/integrations-verify.d.ts.map +1 -0
- package/dist/integrations-verify.js +194 -0
- package/dist/integrations-verify.js.map +1 -0
- package/dist/lesson-generalization.d.ts +29 -0
- package/dist/lesson-generalization.d.ts.map +1 -0
- package/dist/lesson-generalization.js +84 -0
- package/dist/lesson-generalization.js.map +1 -0
- package/dist/mutation-gate.d.ts +39 -36
- package/dist/mutation-gate.d.ts.map +1 -1
- package/dist/mutation-gate.js +111 -5
- package/dist/mutation-gate.js.map +1 -1
- package/dist/operations.d.ts +27 -0
- package/dist/operations.d.ts.map +1 -1
- package/dist/operations.js +186 -7
- package/dist/operations.js.map +1 -1
- package/dist/patterns.d.ts +27 -1
- package/dist/patterns.d.ts.map +1 -1
- package/dist/patterns.js +211 -45
- package/dist/patterns.js.map +1 -1
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +27 -5
- package/dist/plugin.js.map +1 -1
- package/dist/recommend.d.ts +4 -5
- package/dist/recommend.d.ts.map +1 -1
- package/dist/recommend.js +110 -45
- package/dist/recommend.js.map +1 -1
- package/dist/registry.d.ts +32 -1
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +165 -9
- package/dist/registry.js.map +1 -1
- package/dist/run-records.d.ts +3 -0
- package/dist/run-records.d.ts.map +1 -1
- package/dist/run-records.js +18 -0
- package/dist/run-records.js.map +1 -1
- package/dist/score.d.ts +95 -0
- package/dist/score.d.ts.map +1 -1
- package/dist/score.js +274 -2
- package/dist/score.js.map +1 -1
- package/dist/setup.d.ts.map +1 -1
- package/dist/setup.js +20 -17
- package/dist/setup.js.map +1 -1
- package/dist/skill-selection.d.ts +72 -0
- package/dist/skill-selection.d.ts.map +1 -0
- package/dist/skill-selection.js +76 -0
- package/dist/skill-selection.js.map +1 -0
- package/dist/stem.d.ts +12 -0
- package/dist/stem.d.ts.map +1 -0
- package/dist/stem.js +89 -0
- package/dist/stem.js.map +1 -0
- package/dist/target-integrations.d.ts +65 -0
- package/dist/target-integrations.d.ts.map +1 -0
- package/dist/target-integrations.js +152 -0
- package/dist/target-integrations.js.map +1 -0
- package/dist/telemetry-vocabulary.d.ts +7 -0
- package/dist/telemetry-vocabulary.d.ts.map +1 -1
- package/dist/telemetry-vocabulary.js +29 -0
- package/dist/telemetry-vocabulary.js.map +1 -1
- package/dist/vector-tier.d.ts +6 -1
- package/dist/vector-tier.d.ts.map +1 -1
- package/dist/vector-tier.js +32 -7
- package/dist/vector-tier.js.map +1 -1
- package/package.json +7 -6
- package/sbom.json +772 -112
- package/src/amendment-trace.ts +12 -1
- package/src/codex-invoke.ts +138 -0
- package/src/compounding.ts +300 -1
- package/src/discrimination-gate.ts +183 -19
- package/src/eta.ts +590 -0
- package/src/event-chain.ts +41 -0
- package/src/feature-adr-checkpoints.ts +1 -1
- package/src/feature-adr-decision-recall.ts +652 -0
- package/src/feature-adr-landing.ts +109 -0
- package/src/feature-adr-routing.ts +7 -11
- package/src/guard-promotion.ts +245 -4
- package/src/guard-volume.ts +752 -0
- package/src/guard.ts +110 -4
- package/src/index.ts +73 -6
- package/src/integration-apply.ts +332 -0
- package/src/integration-evidence.ts +89 -0
- package/src/integration-probe-worker.ts +310 -0
- package/src/integration-receipts/claude-code/mcp/2.1.235.json +35 -0
- package/src/integrations-verify.ts +258 -0
- package/src/lesson-generalization.ts +115 -0
- package/src/mutation-gate.ts +165 -5
- package/src/operations.ts +207 -7
- package/src/patterns.ts +252 -43
- package/src/plugin.ts +27 -5
- package/src/recommend.ts +116 -46
- package/src/registry.ts +144 -11
- package/src/run-records.ts +23 -0
- package/src/score.ts +361 -3
- package/src/setup.ts +20 -17
- package/src/skill-selection.ts +111 -0
- package/src/stem.ts +87 -0
- package/src/target-integrations.ts +225 -0
- package/src/telemetry-vocabulary.ts +36 -0
- package/src/vector-tier.ts +44 -14
|
@@ -137,12 +137,103 @@ export interface ClassifyResultRow {
|
|
|
137
137
|
readonly tipEvidence?: ExecutionEvidence;
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
+
/** A CLOSED runner selection derived from the target package, never a command copied from package.json. */
|
|
141
|
+
export type RunnerSelection =
|
|
142
|
+
| {
|
|
143
|
+
readonly kind: 'vitest';
|
|
144
|
+
readonly command: 'npx vitest run';
|
|
145
|
+
readonly runnerName: 'vitest';
|
|
146
|
+
readonly how: 'scripts.test' | 'dev-dependency';
|
|
147
|
+
}
|
|
148
|
+
| {
|
|
149
|
+
readonly kind: 'node-test';
|
|
150
|
+
readonly command: 'node --test';
|
|
151
|
+
readonly runnerName: 'node --test';
|
|
152
|
+
readonly how: 'scripts.test';
|
|
153
|
+
}
|
|
154
|
+
| {
|
|
155
|
+
readonly kind: 'unsupported';
|
|
156
|
+
readonly runnerName: string;
|
|
157
|
+
readonly scriptsTest: string | null;
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
export type PlannedRunnerSelection =
|
|
161
|
+
| RunnerSelection
|
|
162
|
+
| {
|
|
163
|
+
readonly kind: 'explicit';
|
|
164
|
+
readonly command: string;
|
|
165
|
+
readonly runnerName: string;
|
|
166
|
+
readonly how: 'explicit-flag';
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
export interface BaseRefResolution {
|
|
170
|
+
readonly requestedRef: string;
|
|
171
|
+
readonly resolvedRef: string;
|
|
172
|
+
readonly how: 'explicit-ref' | 'merge-base';
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Select one of the two runner families this instrument can measure honestly.
|
|
177
|
+
*
|
|
178
|
+
* The package script is used only for classification. Its flags and shell text are never spliced
|
|
179
|
+
* into a command: a wrapper or a third runner family is an explicit unsupported result. Vitest in
|
|
180
|
+
* devDependencies is the sole tie-break when scripts.test is absent; it still maps to the fixed
|
|
181
|
+
* command template below.
|
|
182
|
+
*/
|
|
183
|
+
export function selectRunner(scriptsTest: string | null, devDeps: readonly string[]): RunnerSelection {
|
|
184
|
+
const script = typeof scriptsTest === 'string' && scriptsTest.trim() ? scriptsTest.trim() : null;
|
|
185
|
+
const tokens = script?.split(/\s+/) ?? [];
|
|
186
|
+
const hasShellControl = script !== null && /[\0`$;&|<>()\n\r]/.test(script);
|
|
187
|
+
|
|
188
|
+
if (!hasShellControl) {
|
|
189
|
+
const vitestOffset =
|
|
190
|
+
tokens[0] === 'vitest'
|
|
191
|
+
? 0
|
|
192
|
+
: tokens[0] === 'npx' && tokens[1] === 'vitest'
|
|
193
|
+
? 1
|
|
194
|
+
: tokens[0] === 'pnpm' && tokens[1] === 'exec' && tokens[2] === 'vitest'
|
|
195
|
+
? 2
|
|
196
|
+
: -1;
|
|
197
|
+
if (vitestOffset >= 0) {
|
|
198
|
+
return { kind: 'vitest', command: 'npx vitest run', runnerName: 'vitest', how: 'scripts.test' };
|
|
199
|
+
}
|
|
200
|
+
if (tokens[0] === 'node' && tokens[1] === '--test') {
|
|
201
|
+
return { kind: 'node-test', command: 'node --test', runnerName: 'node --test', how: 'scripts.test' };
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
const deps = Array.isArray(devDeps) ? devDeps : [];
|
|
206
|
+
if (script === null && deps.some((dep) => dep === 'vitest')) {
|
|
207
|
+
return { kind: 'vitest', command: 'npx vitest run', runnerName: 'vitest', how: 'dev-dependency' };
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
return { kind: 'unsupported', runnerName: tokens[0] ?? 'none', scriptsTest: script };
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/** Resolve an audited pre-feature ref supplied by the executor. HEAD never wins over a merge-base. */
|
|
214
|
+
export function resolveDiscriminationBaseRef(requestedRef: string, mergeBaseRef?: string): BaseRefResolution {
|
|
215
|
+
const requested = typeof requestedRef === 'string' ? requestedRef.trim() : '';
|
|
216
|
+
const mergeBase = typeof mergeBaseRef === 'string' ? mergeBaseRef.trim() : '';
|
|
217
|
+
if (requested === 'HEAD' && mergeBase) {
|
|
218
|
+
return { requestedRef: requested, resolvedRef: mergeBase, how: 'merge-base' };
|
|
219
|
+
}
|
|
220
|
+
return { requestedRef: requested, resolvedRef: requested, how: 'explicit-ref' };
|
|
221
|
+
}
|
|
222
|
+
|
|
140
223
|
export interface DiscriminationPlanInput {
|
|
141
224
|
/** the git ref of pre-feature HEAD — the "base" the property test must fail against. */
|
|
142
225
|
readonly baseRef: string;
|
|
226
|
+
/** merge-base already measured by the executor; mandatory to displace a sweeping HEAD. */
|
|
227
|
+
readonly mergeBaseRef?: string;
|
|
143
228
|
/** property test(s) mapped from the ADR Confirmation. Empty ⇒ CANNOT_ISOLATE. */
|
|
144
229
|
readonly propertyTests: readonly PropertyTestRef[];
|
|
145
|
-
/**
|
|
230
|
+
/** repo-relative directory owning the TARGET package.json; `.` when the repository root owns it. */
|
|
231
|
+
readonly packageDir?: string;
|
|
232
|
+
/** TARGET package.json scripts.test. It is classified, never executed verbatim. */
|
|
233
|
+
readonly packageTestScript?: string | null;
|
|
234
|
+
/** TARGET package devDependency names, used only for the documented vitest tie-break. */
|
|
235
|
+
readonly packageDevDependencies?: readonly string[];
|
|
236
|
+
/** explicit safe escape hatch. Absence derives from packageTestScript; unsafe input refuses. */
|
|
146
237
|
readonly runner?: string;
|
|
147
238
|
}
|
|
148
239
|
|
|
@@ -151,19 +242,33 @@ export interface DiscriminationPlan {
|
|
|
151
242
|
readonly runnable: boolean;
|
|
152
243
|
/** why not runnable, when `runnable` is false. */
|
|
153
244
|
readonly reason?: string;
|
|
245
|
+
/** Plan-time state. REFUSE is non-passing; PENDING says execution evidence is still required. */
|
|
246
|
+
readonly verdict: 'PENDING' | 'REFUSE';
|
|
247
|
+
/** A plan alone has measured nothing; in particular every refusal is false. */
|
|
248
|
+
readonly measurementValid: false;
|
|
249
|
+
readonly primaryAction: PrimaryAction;
|
|
154
250
|
/** the sanitized base ref actually used. */
|
|
155
251
|
readonly baseRef: string;
|
|
252
|
+
readonly baseRefResolution: BaseRefResolution;
|
|
253
|
+
readonly runnerSelection: PlannedRunnerSelection;
|
|
254
|
+
readonly packageDir: string;
|
|
156
255
|
/** the accepted, sanitized targets. */
|
|
157
256
|
readonly targets: readonly PropertyTestRef[];
|
|
158
257
|
/** refs rejected by sanitation, with the reason — surfaced so a rejection is never silent. */
|
|
159
258
|
readonly rejected: readonly { readonly file: string; readonly reason: string }[];
|
|
160
259
|
/**
|
|
161
|
-
* Ordered shell steps the caller runs: add
|
|
162
|
-
*
|
|
260
|
+
* Ordered shell steps the caller runs: add the complete detached revision at baseRef, run the selected
|
|
261
|
+
* package-scoped command over positional targets, then remove the worktree. No lone-file tree is valid.
|
|
163
262
|
* `{{WORKTREE}}` is a placeholder the caller substitutes with a fresh temp dir path it owns — the engine
|
|
164
263
|
* never invents a filesystem path. Commands use only sanitized tokens.
|
|
165
264
|
*/
|
|
166
265
|
readonly commands: readonly string[];
|
|
266
|
+
/** The detached worktree itself supplies the complete revision; no lone-file copy is an isolation tree. */
|
|
267
|
+
readonly isolation: {
|
|
268
|
+
readonly materialization: 'full-revision-tree';
|
|
269
|
+
readonly revision: string;
|
|
270
|
+
readonly overlays: readonly string[];
|
|
271
|
+
};
|
|
167
272
|
}
|
|
168
273
|
|
|
169
274
|
export interface ClassifyInput {
|
|
@@ -228,7 +333,6 @@ const SAFE_REF = /^[A-Za-z0-9_][A-Za-z0-9_./~^@{}-]{0,199}$/;
|
|
|
228
333
|
* relative file, and anything exotic is safer rejected (and surfaced) than quoted-and-hoped.
|
|
229
334
|
*/
|
|
230
335
|
const UNSAFE_PATH = /(^\/)|(^[A-Za-z]:)|(^~)|(^-)|(\/-)|(\.\.(\/|\\|$))|[\0`$;&|<>*?"'\n\r\t \\]/;
|
|
231
|
-
const DEFAULT_RUNNER = 'npx vitest run';
|
|
232
336
|
/** a runner must be a plain command with flags — no shell metacharacters that could chain a second command. */
|
|
233
337
|
const UNSAFE_RUNNER = /[\0`$;&|<>()\n\r]/;
|
|
234
338
|
|
|
@@ -244,15 +348,42 @@ function sanitizeName(name: string): string | null {
|
|
|
244
348
|
* ordered worktree commands. Returns `runnable:false` with a reason when there is nothing safe to run.
|
|
245
349
|
*/
|
|
246
350
|
export function planDiscriminationCheck(input: DiscriminationPlanInput): DiscriminationPlan {
|
|
247
|
-
const
|
|
351
|
+
const requestedBaseRef = typeof input.baseRef === 'string' ? input.baseRef.trim() : '';
|
|
352
|
+
const baseRefResolution = resolveDiscriminationBaseRef(requestedBaseRef, input.mergeBaseRef);
|
|
353
|
+
const baseRef = baseRefResolution.resolvedRef;
|
|
354
|
+
const packageDirRaw = typeof input.packageDir === 'string' ? input.packageDir.trim().replace(/\/$/, '') : '.';
|
|
355
|
+
const packageDir = packageDirRaw || '.';
|
|
248
356
|
const rejected: { file: string; reason: string }[] = [];
|
|
357
|
+
const explicitRunner = typeof input.runner === 'string' && input.runner.trim() ? input.runner.trim() : null;
|
|
358
|
+
const runnerName = explicitRunner?.split(/\s+/)[0] ?? 'none';
|
|
359
|
+
const runnerSelection: PlannedRunnerSelection = explicitRunner
|
|
360
|
+
? { kind: 'explicit', command: explicitRunner, runnerName, how: 'explicit-flag' }
|
|
361
|
+
: selectRunner(input.packageTestScript ?? null, input.packageDevDependencies ?? []);
|
|
362
|
+
const isolation = { materialization: 'full-revision-tree', revision: baseRef, overlays: [] } as const;
|
|
363
|
+
|
|
364
|
+
const refuse = (reason: string, action: PrimaryAction = 'fix-runner-invocation'): DiscriminationPlan => ({
|
|
365
|
+
runnable: false,
|
|
366
|
+
reason,
|
|
367
|
+
verdict: 'REFUSE',
|
|
368
|
+
measurementValid: false,
|
|
369
|
+
primaryAction: action,
|
|
370
|
+
baseRef,
|
|
371
|
+
baseRefResolution,
|
|
372
|
+
runnerSelection,
|
|
373
|
+
packageDir,
|
|
374
|
+
targets: [],
|
|
375
|
+
rejected,
|
|
376
|
+
commands: [],
|
|
377
|
+
isolation,
|
|
378
|
+
});
|
|
249
379
|
|
|
250
|
-
if (!SAFE_REF.test(baseRef)) {
|
|
251
|
-
return
|
|
380
|
+
if (!SAFE_REF.test(requestedBaseRef) || !SAFE_REF.test(baseRef)) {
|
|
381
|
+
return refuse('unsafe-or-missing-base-ref');
|
|
252
382
|
}
|
|
253
383
|
|
|
254
|
-
|
|
255
|
-
|
|
384
|
+
if (packageDir !== '.' && UNSAFE_PATH.test(packageDir)) {
|
|
385
|
+
return refuse('unsafe-package-dir');
|
|
386
|
+
}
|
|
256
387
|
|
|
257
388
|
const targets: PropertyTestRef[] = [];
|
|
258
389
|
const seen = new Set<string>();
|
|
@@ -260,6 +391,10 @@ export function planDiscriminationCheck(input: DiscriminationPlanInput): Discrim
|
|
|
260
391
|
const file = t && typeof t.file === 'string' ? t.file.trim() : '';
|
|
261
392
|
if (!file) { rejected.push({ file: String(t?.file ?? ''), reason: 'empty-path' }); continue; }
|
|
262
393
|
if (UNSAFE_PATH.test(file)) { rejected.push({ file, reason: 'unsafe-path' }); continue; }
|
|
394
|
+
if (packageDir !== '.' && !file.startsWith(`${packageDir}/`)) {
|
|
395
|
+
rejected.push({ file, reason: 'outside-target-package' });
|
|
396
|
+
continue;
|
|
397
|
+
}
|
|
263
398
|
const name = t && typeof t.name === 'string' ? sanitizeName(t.name) : null;
|
|
264
399
|
if (t && typeof t.name === 'string' && name === null) { rejected.push({ file, reason: 'unsafe-test-name' }); continue; }
|
|
265
400
|
const key = `${file}|${name ?? ''}`;
|
|
@@ -269,22 +404,51 @@ export function planDiscriminationCheck(input: DiscriminationPlanInput): Discrim
|
|
|
269
404
|
}
|
|
270
405
|
|
|
271
406
|
if (targets.length === 0) {
|
|
272
|
-
|
|
407
|
+
const plan = refuse('no-isolable-test', 'map-a-test');
|
|
408
|
+
return { ...plan, targets };
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
if (explicitRunner !== null && UNSAFE_RUNNER.test(explicitRunner)) {
|
|
412
|
+
const plan = refuse(`unsafe-runner:${runnerName}`);
|
|
413
|
+
return { ...plan, targets };
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
if (runnerSelection.kind === 'unsupported') {
|
|
417
|
+
const plan = refuse(`unsupported-runner:${runnerSelection.runnerName}`);
|
|
418
|
+
return { ...plan, targets };
|
|
273
419
|
}
|
|
274
420
|
|
|
275
421
|
// `{{WORKTREE}}` is substituted by the caller with a temp dir IT owns; the engine never invents a path.
|
|
276
|
-
//
|
|
277
|
-
//
|
|
422
|
+
// `git worktree add` materialises the complete base revision. No lone property-test copy is emitted:
|
|
423
|
+
// a copied test without its sibling source/config tree is not an isolated revision and cannot measure.
|
|
278
424
|
const commands: string[] = [`git worktree add --detach {{WORKTREE}} ${baseRef}`];
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
const
|
|
283
|
-
|
|
284
|
-
|
|
425
|
+
const relativeToPackage = (file: string): string => (packageDir === '.' ? file : file.slice(packageDir.length + 1));
|
|
426
|
+
const fileArgs = [...new Set(targets.map((t) => relativeToPackage(t.file)))].map((f) => `'${f}'`).join(' ');
|
|
427
|
+
const testNames = targets.filter((t) => t.name).map((t) => t.name as string);
|
|
428
|
+
const nameFilters =
|
|
429
|
+
runnerSelection.kind === 'node-test'
|
|
430
|
+
? testNames.map((name) => `--test-name-pattern '${name}'`).join(' ')
|
|
431
|
+
: testNames.map((name) => `-t '${name}'`).join(' ');
|
|
432
|
+
const runner = runnerSelection.command;
|
|
433
|
+
const runnerArgs = `${runner}${nameFilters ? ` ${nameFilters}` : ''} ${fileArgs}`;
|
|
434
|
+
const worktreePackageDir = packageDir === '.' ? '{{WORKTREE}}' : `{{WORKTREE}}/${packageDir}`;
|
|
435
|
+
commands.push(`( cd "${worktreePackageDir}" && ${runnerArgs} )`);
|
|
285
436
|
commands.push(`git worktree remove --force {{WORKTREE}}`);
|
|
286
437
|
|
|
287
|
-
return {
|
|
438
|
+
return {
|
|
439
|
+
runnable: true,
|
|
440
|
+
verdict: 'PENDING',
|
|
441
|
+
measurementValid: false,
|
|
442
|
+
primaryAction: 'none',
|
|
443
|
+
baseRef,
|
|
444
|
+
baseRefResolution,
|
|
445
|
+
runnerSelection,
|
|
446
|
+
packageDir,
|
|
447
|
+
targets,
|
|
448
|
+
rejected,
|
|
449
|
+
commands,
|
|
450
|
+
isolation,
|
|
451
|
+
};
|
|
288
452
|
}
|
|
289
453
|
|
|
290
454
|
|