audit-tools 0.30.29 → 0.30.30
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/remediate/steps/dispatch.d.ts +9 -6
- package/dist/remediate/steps/dispatch.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch.js +11 -5
- package/dist/remediate/steps/dispatch.js.map +1 -1
- package/dist/remediate/steps/gateCommands.d.ts +39 -0
- package/dist/remediate/steps/gateCommands.d.ts.map +1 -0
- package/dist/remediate/steps/gateCommands.js +61 -0
- package/dist/remediate/steps/gateCommands.js.map +1 -0
- package/dist/remediate/steps/nextStep.d.ts +3 -28
- package/dist/remediate/steps/nextStep.d.ts.map +1 -1
- package/dist/remediate/steps/nextStep.js +32 -45
- package/dist/remediate/steps/nextStep.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { existsSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
/**
|
|
4
|
+
* Whether `root` is the audit-tools monorepo — the repo the tool-owned final
|
|
5
|
+
* gate's suite (INV-RS-10, literally the audit-tools build/check/per-package
|
|
6
|
+
* commands) applies to. The gate's command list is audit-tools-specific by
|
|
7
|
+
* design (this remediation run remediates the audit-tools monorepo), so it is
|
|
8
|
+
* scoped to that structure rather than fabricated for an arbitrary target repo.
|
|
9
|
+
*/
|
|
10
|
+
export function isAuditToolsMonorepo(root) {
|
|
11
|
+
// Single-package layout: the three subsystems are inlined under src/ and both
|
|
12
|
+
// bins live at the repo root. (Name kept for continuity; it is now one package.)
|
|
13
|
+
return (existsSync(join(root, "src", "shared")) &&
|
|
14
|
+
existsSync(join(root, "src", "audit")) &&
|
|
15
|
+
existsSync(join(root, "src", "remediate")) &&
|
|
16
|
+
existsSync(join(root, "audit-code.mjs")) &&
|
|
17
|
+
existsSync(join(root, "remediate-code.mjs")));
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The tool-owned final-gate command list (INV-RS-10) for the audit-tools
|
|
21
|
+
* monorepo. Pure and deterministic so tests can assert: it is non-vacuous
|
|
22
|
+
* (always > 0 build + check + unit commands) for the audit-tools structure,
|
|
23
|
+
* never references `plan.test_command`, every UNIT command is build-free, and no
|
|
24
|
+
* package's unit suite appears twice (single-flight — CE-001). Returns `[]` when
|
|
25
|
+
* `root` is not the audit-tools monorepo (the audit-tools-specific suite is
|
|
26
|
+
* inapplicable there — see `runToolOwnedFinalGate`).
|
|
27
|
+
*/
|
|
28
|
+
export function toolOwnedFinalGateCommands(root) {
|
|
29
|
+
if (!isAuditToolsMonorepo(root))
|
|
30
|
+
return [];
|
|
31
|
+
return [
|
|
32
|
+
{ argv: ["npm", "run", "build"], build_free: false, layer: "build" },
|
|
33
|
+
{ argv: ["npm", "run", "check"], build_free: true, layer: "check" },
|
|
34
|
+
// BUILD-FREE unit suites at the repo root (single package — no `npm -w`, never
|
|
35
|
+
// `npm test`, which prepends a build). node:test for shared+audit, vitest for remediate.
|
|
36
|
+
{
|
|
37
|
+
argv: ["node", "--import", "tsx/esm", "--test", "tests/shared/*.test.mjs", "tests/audit/*.test.mjs"],
|
|
38
|
+
build_free: true,
|
|
39
|
+
layer: "unit",
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
argv: ["npx", "vitest", "run"],
|
|
43
|
+
build_free: true,
|
|
44
|
+
layer: "unit",
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* The pinned argv for the per-node merged-base cross-package check (INV-2): the
|
|
50
|
+
* `check`-layer (typecheck) command from the tool-owned gate set, derived from the
|
|
51
|
+
* repo structure rather than a hardcoded string. Catches a cross-package type break
|
|
52
|
+
* that a per-node worktree verify cannot (its `@audit-tools` junction resolves to an
|
|
53
|
+
* unfaithful main). Returns `null` when the audit-tools suite is inapplicable
|
|
54
|
+
* (non-monorepo target) — the merged-base check is then skipped, exactly as the old
|
|
55
|
+
* explicit-`null` did, rather than fabricating a check command for an arbitrary repo.
|
|
56
|
+
*/
|
|
57
|
+
export function mergedBaseCheckArgv(root) {
|
|
58
|
+
const check = toolOwnedFinalGateCommands(root).find((c) => c.layer === "check");
|
|
59
|
+
return check ? check.argv : null;
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=gateCommands.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gateCommands.js","sourceRoot":"","sources":["../../../src/remediate/steps/gateCommands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAsBjC;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAY;IAC/C,8EAA8E;IAC9E,iFAAiF;IACjF,OAAO,CACL,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;QACvC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;QACtC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC;QAC1C,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;QACxC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,oBAAoB,CAAC,CAAC,CAC7C,CAAC;AACJ,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,0BAA0B,CAAC,IAAY;IACrD,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC;QAAE,OAAO,EAAE,CAAC;IAC3C,OAAO;QACL,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE;QACpE,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE;QACnE,+EAA+E;QAC/E,yFAAyF;QACzF;YACE,IAAI,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,yBAAyB,EAAE,wBAAwB,CAAC;YACpG,UAAU,EAAE,IAAI;YAChB,KAAK,EAAE,MAAM;SACd;QACD;YACE,IAAI,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC;YAC9B,UAAU,EAAE,IAAI;YAChB,KAAK,EAAE,MAAM;SACd;KACF,CAAC;AACJ,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CAAC,IAAY;IAC9C,MAAM,KAAK,GAAG,0BAA0B,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,OAAO,CAAC,CAAC;IAChF,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AACnC,CAAC"}
|
|
@@ -4,6 +4,7 @@ import { type FrictionTriageDecision, type InterpretedIntent, type SessionConfig
|
|
|
4
4
|
import { type WorktreeNodeWorker } from "./dispatch.js";
|
|
5
5
|
import type { RemediationStep, RemediationDispatchPlan } from "./types.js";
|
|
6
6
|
import { isTerminalStatus, isVerifiedCompleteStatus } from "../state/itemStatus.js";
|
|
7
|
+
import { isAuditToolsMonorepo, toolOwnedFinalGateCommands, type FinalGateCommandSpec } from "./gateCommands.js";
|
|
7
8
|
import type { IntentCheckpoint } from "audit-tools/shared";
|
|
8
9
|
export interface NextStepOptions {
|
|
9
10
|
root?: string;
|
|
@@ -312,34 +313,8 @@ export declare function executeInProcessPartition(params: {
|
|
|
312
313
|
*/
|
|
313
314
|
sourceByPoolId?: Map<string, DispatchableSource>;
|
|
314
315
|
}): Promise<InProcessPartitionResult>;
|
|
315
|
-
|
|
316
|
-
export
|
|
317
|
-
argv: string[];
|
|
318
|
-
/** True for commands that neither build nor run a build-prepending test script. */
|
|
319
|
-
build_free: boolean;
|
|
320
|
-
/** The package this command's unit suite targets (single-flight key), if any. */
|
|
321
|
-
package_dir?: string;
|
|
322
|
-
/** Which layer of the floor this belongs to. */
|
|
323
|
-
layer: "build" | "check" | "unit";
|
|
324
|
-
}
|
|
325
|
-
/**
|
|
326
|
-
* Whether `root` is the audit-tools monorepo — the repo the tool-owned final
|
|
327
|
-
* gate's suite (INV-RS-10, literally the audit-tools build/check/per-package
|
|
328
|
-
* commands) applies to. The gate's command list is audit-tools-specific by
|
|
329
|
-
* design (this remediation run remediates the audit-tools monorepo), so it is
|
|
330
|
-
* scoped to that structure rather than fabricated for an arbitrary target repo.
|
|
331
|
-
*/
|
|
332
|
-
export declare function isAuditToolsMonorepo(root: string): boolean;
|
|
333
|
-
/**
|
|
334
|
-
* The tool-owned final-gate command list (INV-RS-10) for the audit-tools
|
|
335
|
-
* monorepo. Pure and deterministic so tests can assert: it is non-vacuous
|
|
336
|
-
* (always > 0 build + check + unit commands) for the audit-tools structure,
|
|
337
|
-
* never references `plan.test_command`, every UNIT command is build-free, and no
|
|
338
|
-
* package's unit suite appears twice (single-flight — CE-001). Returns `[]` when
|
|
339
|
-
* `root` is not the audit-tools monorepo (the audit-tools-specific suite is
|
|
340
|
-
* inapplicable there — see `runToolOwnedFinalGate`).
|
|
341
|
-
*/
|
|
342
|
-
export declare function toolOwnedFinalGateCommands(root: string): FinalGateCommandSpec[];
|
|
316
|
+
export { isAuditToolsMonorepo, toolOwnedFinalGateCommands };
|
|
317
|
+
export type { FinalGateCommandSpec };
|
|
343
318
|
/** A command's recorded outcome within a gate run. */
|
|
344
319
|
export interface FinalGateCommandResult {
|
|
345
320
|
argv: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nextStep.d.ts","sourceRoot":"","sources":["../../../src/remediate/steps/nextStep.ts"],"names":[],"mappings":"AAGA,OAAO,EAAc,KAAK,gBAAgB,EAAE,KA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AAuF;AACvF,eAAO,MAAM,8BAA8B,+BAA+B,CAAC;AAC3E,eAAO,MAAM,oCAAoC,kDACA,CAAC;AAElD,MAAM,WAAW,6BAA6B;IAC5C,cAAc,EAAE,OAAO,oCAAoC,CAAC;IAC5D,6EAA6E;IAC7E,WAAW,EAAE,iBAAiB,CAAC;IAC/B;;;;OAIG;IACH,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,wBAAsB,kCAAkC,CACtD,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,gBAAgB,GAAG,SAAS,GACvC,OAAO,CAAC,6BAA6B,GAAG,IAAI,CAAC,CA6B/C"}
|
|
@@ -19,6 +19,7 @@ import { deduplicateCrossLensFindings, fixupBlocksAfterDedup, } from "../dedup/c
|
|
|
19
19
|
import { checkAffectedFileIntegrity } from "../utils/fileIntegrity.js";
|
|
20
20
|
import { resolveIntakeStep } from "./intakeResolver.js";
|
|
21
21
|
import { runCommand } from "../utils/commands.js";
|
|
22
|
+
import { isAuditToolsMonorepo, toolOwnedFinalGateCommands, } from "./gateCommands.js";
|
|
22
23
|
import { buildNextContractPipelineStep, shouldEnterContractPipeline, writePathASeedFromFindings, } from "./contractPipeline.js";
|
|
23
24
|
import { evaluateFastPath, buildLeanExtractedPlan, distinctAffectedFiles, interpretLeanLightReviewVerdict, LEAN_LIGHT_REVIEW_SCHEMA_VERSION, } from "./leanFastPath.js";
|
|
24
25
|
import { contractArtifactExists, contractPipelineDir, } from "../contractPipeline/artifactStore.js";
|
|
@@ -779,51 +780,37 @@ export async function executeInProcessPartition(params) {
|
|
|
779
780
|
}));
|
|
780
781
|
return { nodes };
|
|
781
782
|
}
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
// BUILD-FREE unit suites at the repo root (single package — no `npm -w`, never
|
|
814
|
-
// `npm test`, which prepends a build). node:test for shared+audit, vitest for remediate.
|
|
815
|
-
{
|
|
816
|
-
argv: ["node", "--import", "tsx/esm", "--test", "tests/shared/*.test.mjs", "tests/audit/*.test.mjs"],
|
|
817
|
-
build_free: true,
|
|
818
|
-
layer: "unit",
|
|
819
|
-
},
|
|
820
|
-
{
|
|
821
|
-
argv: ["npx", "vitest", "run"],
|
|
822
|
-
build_free: true,
|
|
823
|
-
layer: "unit",
|
|
824
|
-
},
|
|
825
|
-
];
|
|
826
|
-
}
|
|
783
|
+
// ---------------------------------------------------------------------------
|
|
784
|
+
// Tool-owned final completion gate (INV-RS-10) + coarse re-block (INV-RS-09)
|
|
785
|
+
// ---------------------------------------------------------------------------
|
|
786
|
+
//
|
|
787
|
+
// INV-RS-10: the final completion gate is a TOOL-OWNED, NON-VACUOUS suite that
|
|
788
|
+
// is INDEPENDENT of any `plan.test_command`. A run can only land green when this
|
|
789
|
+
// suite passes; a vacuous/unset `plan.test_command` can never substitute for it.
|
|
790
|
+
// The suite is executed through the env-scrubbing `runTracked` path
|
|
791
|
+
// (`runCommand`), which strips CLAUDECODE / CLAUDE_CODE_* so the gate runs in a
|
|
792
|
+
// clean environment regardless of the host session.
|
|
793
|
+
//
|
|
794
|
+
// Hard floor (always run, in order — single package, single-flight build — CE-001):
|
|
795
|
+
// 1. npm run build (one tsc build for the whole package)
|
|
796
|
+
// 2. npm run check (typecheck, no emit)
|
|
797
|
+
// 3. BUILD-FREE unit suites at the repo root, each invoked directly so dist is
|
|
798
|
+
// never rebuilt or raced:
|
|
799
|
+
// - shared+audit: node --import tsx/esm --test tests/shared/*.test.mjs tests/audit/*.test.mjs
|
|
800
|
+
// - remediate-code: npx vitest run
|
|
801
|
+
//
|
|
802
|
+
// CE-002: the hard floor is scoped to build + typecheck + unit. The
|
|
803
|
+
// runtime/packaged-bin smoke surface (the `verify:release` smokes) is recorded
|
|
804
|
+
// as a DECLARED RESIDUAL the floor does not gate, rather than run inline — the
|
|
805
|
+
// packaged-bin smokes are the known Windows-flaky / EPERM surface and an in-loop
|
|
806
|
+
// gate must converge deterministically, so they are surfaced for a separate
|
|
807
|
+
// pass instead of being able to strand the run.
|
|
808
|
+
// `FinalGateCommandSpec`, `isAuditToolsMonorepo`, and `toolOwnedFinalGateCommands`
|
|
809
|
+
// are single-sourced in the leaf module `gateCommands.ts` (so `dispatch.ts` can
|
|
810
|
+
// derive the same pinned merged-base check without an import cycle). Imported above
|
|
811
|
+
// for local use here and re-exported to preserve this module's public surface +
|
|
812
|
+
// test imports.
|
|
813
|
+
export { isAuditToolsMonorepo, toolOwnedFinalGateCommands };
|
|
827
814
|
/**
|
|
828
815
|
* Run the tool-owned final gate (INV-RS-10). Each command runs through
|
|
829
816
|
* `runCommand` → shared `runTracked`, which scrubs CLAUDECODE / CLAUDE_CODE_*.
|