audit-tools 0.50.13 → 0.50.15
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/audit/cli/nextStepHelpers.js +1 -1
- package/dist/audit/cli/nextStepHelpers.js.map +1 -1
- package/dist/audit/cli/prompts.js +3 -3
- package/dist/audit/cli/reviewRun.js +1 -1
- package/dist/audit/cli/reviewRun.js.map +1 -1
- package/dist/audit/cli.d.ts.map +1 -1
- package/dist/audit/cli.js +6 -1
- package/dist/audit/cli.js.map +1 -1
- package/dist/audit/orchestrator/ingestionExecutors.js +1 -1
- package/dist/audit/orchestrator/ingestionExecutors.js.map +1 -1
- package/dist/audit/reporting/mergeFindings.js +1 -1
- package/dist/audit/reporting/mergeFindings.js.map +1 -1
- package/dist/audit/reporting/workBlocks.js +1 -1
- package/dist/audit/reporting/workBlocks.js.map +1 -1
- package/dist/remediate/steps/nextStep.js +1 -1
- package/dist/remediate/steps/nextStep.js.map +1 -1
- package/dist/shared/loopCorePaths.d.ts.map +1 -1
- package/dist/shared/loopCorePaths.js +0 -1
- package/dist/shared/loopCorePaths.js.map +1 -1
- package/dist/shared/tooling/allowlistedExec.d.ts +4 -4
- package/dist/shared/tooling/allowlistedExec.js +7 -7
- package/package.json +5 -5
- package/wrapper/audit-code-wrapper-lib.mjs +5 -2
- package/dist/audit/adapters/astGrep.d.ts +0 -30
- package/dist/audit/adapters/astGrep.d.ts.map +0 -1
- package/dist/audit/adapters/astGrep.js +0 -46
- package/dist/audit/adapters/astGrep.js.map +0 -1
- package/dist/audit/adapters/codeql.d.ts +0 -47
- package/dist/audit/adapters/codeql.d.ts.map +0 -1
- package/dist/audit/adapters/codeql.js +0 -52
- package/dist/audit/adapters/codeql.js.map +0 -1
- package/dist/audit/adapters/coverageSummary.d.ts +0 -9
- package/dist/audit/adapters/coverageSummary.d.ts.map +0 -1
- package/dist/audit/adapters/coverageSummary.js +0 -18
- package/dist/audit/adapters/coverageSummary.js.map +0 -1
- package/dist/audit/adapters/eslint.d.ts +0 -14
- package/dist/audit/adapters/eslint.d.ts.map +0 -1
- package/dist/audit/adapters/eslint.js +0 -28
- package/dist/audit/adapters/eslint.js.map +0 -1
- package/dist/audit/adapters/npmAudit.d.ts +0 -16
- package/dist/audit/adapters/npmAudit.d.ts.map +0 -1
- package/dist/audit/adapters/npmAudit.js +0 -24
- package/dist/audit/adapters/npmAudit.js.map +0 -1
- package/dist/audit/adapters/semgrep.d.ts +0 -42
- package/dist/audit/adapters/semgrep.d.ts.map +0 -1
- package/dist/audit/adapters/semgrep.js +0 -93
- package/dist/audit/adapters/semgrep.js.map +0 -1
- package/dist/audit/cli/dispatch.d.ts +0 -10
- package/dist/audit/cli/dispatch.d.ts.map +0 -1
- package/dist/audit/cli/dispatch.js +0 -10
- package/dist/audit/cli/dispatch.js.map +0 -1
- package/dist/audit/cli/paths.d.ts +0 -2
- package/dist/audit/cli/paths.d.ts.map +0 -1
- package/dist/audit/cli/paths.js +0 -10
- package/dist/audit/cli/paths.js.map +0 -1
- package/dist/audit/orchestrator/chunking.d.ts +0 -6
- package/dist/audit/orchestrator/chunking.d.ts.map +0 -1
- package/dist/audit/orchestrator/chunking.js +0 -14
- package/dist/audit/orchestrator/chunking.js.map +0 -1
- package/dist/audit/orchestrator/continuityScore.d.ts +0 -2
- package/dist/audit/orchestrator/continuityScore.d.ts.map +0 -1
- package/dist/audit/orchestrator/continuityScore.js +0 -9
- package/dist/audit/orchestrator/continuityScore.js.map +0 -1
- package/dist/audit/orchestrator/fileAnchors.d.ts +0 -69
- package/dist/audit/orchestrator/fileAnchors.d.ts.map +0 -1
- package/dist/audit/orchestrator/fileAnchors.js +0 -314
- package/dist/audit/orchestrator/fileAnchors.js.map +0 -1
- package/dist/audit/orchestrator/knipGraphCrosscheck.d.ts +0 -65
- package/dist/audit/orchestrator/knipGraphCrosscheck.d.ts.map +0 -1
- package/dist/audit/orchestrator/knipGraphCrosscheck.js +0 -85
- package/dist/audit/orchestrator/knipGraphCrosscheck.js.map +0 -1
- package/dist/audit/orchestrator/selectiveDeepening.d.ts +0 -3
- package/dist/audit/orchestrator/selectiveDeepening.d.ts.map +0 -1
- package/dist/audit/orchestrator/selectiveDeepening.js +0 -7
- package/dist/audit/orchestrator/selectiveDeepening.js.map +0 -1
- package/dist/audit/orchestrator.d.ts +0 -7
- package/dist/audit/orchestrator.d.ts.map +0 -1
- package/dist/audit/orchestrator.js +0 -60
- package/dist/audit/orchestrator.js.map +0 -1
- package/dist/audit/reporting/findingRanks.d.ts +0 -2
- package/dist/audit/reporting/findingRanks.d.ts.map +0 -1
- package/dist/audit/reporting/findingRanks.js +0 -7
- package/dist/audit/reporting/findingRanks.js.map +0 -1
- package/dist/audit/types/workerResult.d.ts +0 -14
- package/dist/audit/types/workerResult.d.ts.map +0 -1
- package/dist/audit/types/workerResult.js +0 -2
- package/dist/audit/types/workerResult.js.map +0 -1
- package/dist/audit/validation/anchorGrounding.d.ts +0 -59
- package/dist/audit/validation/anchorGrounding.d.ts.map +0 -1
- package/dist/audit/validation/anchorGrounding.js +0 -187
- package/dist/audit/validation/anchorGrounding.js.map +0 -1
- package/dist/audit/validation/quoteGrounding.d.ts +0 -18
- package/dist/audit/validation/quoteGrounding.d.ts.map +0 -1
- package/dist/audit/validation/quoteGrounding.js +0 -18
- package/dist/audit/validation/quoteGrounding.js.map +0 -1
- package/dist/remediate/state/accessMemory.d.ts +0 -53
- package/dist/remediate/state/accessMemory.d.ts.map +0 -1
- package/dist/remediate/state/accessMemory.js +0 -105
- package/dist/remediate/state/accessMemory.js.map +0 -1
- package/dist/remediate/steps/dispatch.d.ts +0 -4
- package/dist/remediate/steps/dispatch.d.ts.map +0 -1
- package/dist/remediate/steps/dispatch.js +0 -12
- package/dist/remediate/steps/dispatch.js.map +0 -1
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { coerceJsonObjectArg, isRecord } from "audit-tools/shared";
|
|
2
|
-
function assertStringArray(value, label) {
|
|
3
|
-
if (!Array.isArray(value) || value.some((item) => typeof item !== "string")) {
|
|
4
|
-
throw new TypeError(`${label} must be an array of strings.`);
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
function assertUnitManifest(value) {
|
|
8
|
-
if (!isRecord(value) || !Array.isArray(value.units)) {
|
|
9
|
-
throw new TypeError("buildAuditTasks requires unitManifest.units to be an array.");
|
|
10
|
-
}
|
|
11
|
-
value.units.forEach((unit, index) => {
|
|
12
|
-
const label = `unitManifest.units[${index}]`;
|
|
13
|
-
if (!isRecord(unit)) {
|
|
14
|
-
throw new TypeError(`${label} must be an object.`);
|
|
15
|
-
}
|
|
16
|
-
if (typeof unit.unit_id !== "string" || unit.unit_id.length === 0) {
|
|
17
|
-
throw new TypeError(`${label}.unit_id must be a non-empty string.`);
|
|
18
|
-
}
|
|
19
|
-
if (typeof unit.name !== "string" || unit.name.length === 0) {
|
|
20
|
-
throw new TypeError(`${label}.name must be a non-empty string.`);
|
|
21
|
-
}
|
|
22
|
-
assertStringArray(unit.files, `${label}.files`);
|
|
23
|
-
assertStringArray(unit.required_lenses, `${label}.required_lenses`);
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
function normalizedOptions(rawOptions) {
|
|
27
|
-
const options = coerceJsonObjectArg(rawOptions, "buildAuditTasks options");
|
|
28
|
-
if (options.pass_prefix !== undefined && typeof options.pass_prefix !== "string") {
|
|
29
|
-
throw new TypeError("buildAuditTasks options.pass_prefix must be a string.");
|
|
30
|
-
}
|
|
31
|
-
if (options.limit_lenses !== undefined) {
|
|
32
|
-
assertStringArray(options.limit_lenses, "buildAuditTasks options.limit_lenses");
|
|
33
|
-
}
|
|
34
|
-
return {
|
|
35
|
-
passPrefix: options.pass_prefix ?? "pass",
|
|
36
|
-
allowed: options.limit_lenses ? new Set(options.limit_lenses) : null,
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
export function buildAuditTasks(unitManifest, options = {}) {
|
|
40
|
-
assertUnitManifest(unitManifest);
|
|
41
|
-
const { allowed, passPrefix } = normalizedOptions(options);
|
|
42
|
-
const tasks = [];
|
|
43
|
-
for (const unit of unitManifest.units) {
|
|
44
|
-
for (const lens of unit.required_lenses) {
|
|
45
|
-
if (allowed && !allowed.has(lens)) {
|
|
46
|
-
continue;
|
|
47
|
-
}
|
|
48
|
-
tasks.push({
|
|
49
|
-
task_id: `${unit.unit_id}:${lens}`,
|
|
50
|
-
unit_id: unit.unit_id,
|
|
51
|
-
pass_id: `${passPrefix}:${lens}`,
|
|
52
|
-
lens,
|
|
53
|
-
file_paths: unit.files,
|
|
54
|
-
rationale: `Audit ${unit.name} under the ${lens} lens.`,
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
return tasks;
|
|
59
|
-
}
|
|
60
|
-
//# sourceMappingURL=orchestrator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrator.js","sourceRoot":"","sources":["../../src/audit/orchestrator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAWnE,SAAS,iBAAiB,CACxB,KAAc,EACd,KAAa;IAEb,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,EAAE,CAAC;QAC5E,MAAM,IAAI,SAAS,CAAC,GAAG,KAAK,+BAA+B,CAAC,CAAC;IAC/D,CAAC;AACH,CAAC;AAED,SAAS,kBAAkB,CACzB,KAAc;IAEd,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;QACpD,MAAM,IAAI,SAAS,CAAC,6DAA6D,CAAC,CAAC;IACrF,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,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E,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,YAAwB,CAAC,CAAC,CAAC,CAAC,IAAI;KACjF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,eAAe,CAC7B,YAA0B,EAC1B,UAAqC,EAAE;IAEvC,kBAAkB,CAAC,YAAY,CAAC,CAAC;IACjC,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAC3D,MAAM,KAAK,GAAgB,EAAE,CAAC;IAE9B,KAAK,MAAM,IAAI,IAAI,YAAY,CAAC,KAAK,EAAE,CAAC;QACtC,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,eAAe,EAAE,CAAC;YACxC,IAAI,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;gBAClC,SAAS;YACX,CAAC;YAED,KAAK,CAAC,IAAI,CAAC;gBACT,OAAO,EAAE,GAAG,IAAI,CAAC,OAAO,IAAI,IAAI,EAAE;gBAClC,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,OAAO,EAAE,GAAG,UAAU,IAAI,IAAI,EAAE;gBAChC,IAAI;gBACJ,UAAU,EAAE,IAAI,CAAC,KAAK;gBACtB,SAAS,EAAE,SAAS,IAAI,CAAC,IAAI,cAAc,IAAI,QAAQ;aACxD,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"findingRanks.d.ts","sourceRoot":"","sources":["../../../src/audit/reporting/findingRanks.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
// Severity / confidence ranking is single-sourced in audit-tools/shared
|
|
2
|
-
// (derived from the canonical SEVERITIES/CONFIDENCES tuples so it can never
|
|
3
|
-
// drift). This module re-exports the shared functions under the existing import
|
|
4
|
-
// path so the auditor's reporting code (workBlocks, mergeFindings) keeps working
|
|
5
|
-
// without each package hand-copying a rank table.
|
|
6
|
-
export { severityRank, confidenceRank, severityCompare } from "audit-tools/shared";
|
|
7
|
-
//# sourceMappingURL=findingRanks.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"findingRanks.js","sourceRoot":"","sources":["../../../src/audit/reporting/findingRanks.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,4EAA4E;AAC5E,gFAAgF;AAChF,iFAAiF;AACjF,kDAAkD;AAClD,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export type WorkerResultStatus = "completed" | "blocked" | "failed" | "no_progress";
|
|
2
|
-
export interface WorkerResult {
|
|
3
|
-
contract_version: "audit-code-worker-result/v1alpha1";
|
|
4
|
-
run_id: string;
|
|
5
|
-
obligation_id: string | null;
|
|
6
|
-
status: WorkerResultStatus;
|
|
7
|
-
progress_made: boolean;
|
|
8
|
-
selected_executor: string | null;
|
|
9
|
-
artifacts_written: string[];
|
|
10
|
-
summary: string;
|
|
11
|
-
next_likely_step: string | null;
|
|
12
|
-
errors: string[];
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=workerResult.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workerResult.d.ts","sourceRoot":"","sources":["../../../src/audit/types/workerResult.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAC1B,WAAW,GACX,SAAS,GACT,QAAQ,GACR,aAAa,CAAC;AAElB,MAAM,WAAW,YAAY;IAC3B,gBAAgB,EAAE,mCAAmC,CAAC;IACtD,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,MAAM,EAAE,kBAAkB,CAAC;IAC3B,aAAa,EAAE,OAAO,CAAC;IACvB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workerResult.js","sourceRoot":"","sources":["../../../src/audit/types/workerResult.ts"],"names":[],"mappings":""}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Executable-anchor grounding for behavior claims (S7 tier-2).
|
|
3
|
-
*
|
|
4
|
-
* Tier-1 (quoteGrounding) proves a finding *cites code that exists*. It cannot
|
|
5
|
-
* prove a *behavior* claim — "there is a cycle", "this symbol is unused", "this
|
|
6
|
-
* throws". Those are exactly the claims that shipped as **not real** in the
|
|
7
|
-
* 452-self-audit (a hallucinated cycle, two const-compare mistakes), caught only
|
|
8
|
-
* by deterministically re-running `madge`/`grep`. Tier-2 attaches a read-only
|
|
9
|
-
* command to such a claim, the tool runs it, and the confirmed bit is the tool's
|
|
10
|
-
* run — never the model's word. A refuting run quarantines the finding.
|
|
11
|
-
*
|
|
12
|
-
* SAFETY. The command is model-authored, so it runs only when both its
|
|
13
|
-
* executable AND its arguments pass the shared **default-deny allowlist**
|
|
14
|
-
* (`isAllowedAnchorCommand` — CRIT ARC-a06a3945: validates args, not just the
|
|
15
|
-
* executable, so `rg --pre`, `ast-grep --rewrite`, non-read-only git, etc. are
|
|
16
|
-
* refused). It runs under a timeout, with the host-signalling env stripped, and
|
|
17
|
-
* never via a shell — all owned by the shared `runAllowlistedReadOnlyCommand`
|
|
18
|
-
* runner. Anything off the allowlist is *skipped* (recorded, not run) and the
|
|
19
|
-
* finding falls back to tier-1 grounding. The whole pass can be disabled with
|
|
20
|
-
* `AUDIT_CODE_DISABLE_ANCHORS=1`; the per-anchor timeout (60s default) can be
|
|
21
|
-
* raised with `AUDIT_CODE_ANCHOR_TIMEOUT_MS` for slow checks on large repos.
|
|
22
|
-
*/
|
|
23
|
-
import { ANCHOR_ALLOWLIST, GIT_READONLY_SUBCOMMANDS, isAllowedAnchorCommand } from "audit-tools/shared";
|
|
24
|
-
import type { AllowlistedExecRunner, Finding, FindingGrounding } from "audit-tools/shared";
|
|
25
|
-
export { isAllowedAnchorCommand, ANCHOR_ALLOWLIST, GIT_READONLY_SUBCOMMANDS };
|
|
26
|
-
/** Default per-anchor wall-clock budget; a slower command is killed and inconclusive. */
|
|
27
|
-
export declare const ANCHOR_TIMEOUT_MS = 60000;
|
|
28
|
-
/**
|
|
29
|
-
* The effective per-anchor timeout. The 60s default suits the common anchors
|
|
30
|
-
* (madge/grep/rg/git) but a legitimately slow check on a large repo would be
|
|
31
|
-
* silently killed → `inconclusive`; `AUDIT_CODE_ANCHOR_TIMEOUT_MS` (a positive
|
|
32
|
-
* integer in ms) lets an operator raise it per run without code changes. Read
|
|
33
|
-
* per-call to mirror `AUDIT_CODE_DISABLE_ANCHORS` (no import-time capture).
|
|
34
|
-
*/
|
|
35
|
-
export declare function resolveAnchorTimeoutMs(env?: NodeJS.ProcessEnv): number;
|
|
36
|
-
export type AnchorRunner = AllowlistedExecRunner;
|
|
37
|
-
/** Verdict of an anchor run, folded into the finding's grounding by the caller. */
|
|
38
|
-
export interface AnchorResult {
|
|
39
|
-
status: "confirmed" | "refuted" | "inconclusive" | "skipped";
|
|
40
|
-
summary: string;
|
|
41
|
-
/** Last lines of the command output, for display. */
|
|
42
|
-
evidence?: string[];
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Run a finding's executable anchor (if any) and return the verdict. Pure of any
|
|
46
|
-
* finding mutation — the caller folds the result into `grounding` via
|
|
47
|
-
* {@link combineGroundingWithAnchor}. Returns `undefined` when the finding has
|
|
48
|
-
* no anchor (nothing to run).
|
|
49
|
-
*/
|
|
50
|
-
export declare function verifyFindingAnchor(repoRoot: string, finding: Finding, run?: AnchorRunner): Promise<AnchorResult | undefined>;
|
|
51
|
-
/**
|
|
52
|
-
* Fold an anchor verdict into the quote-and-verify (tier-1) grounding. A
|
|
53
|
-
* confirming run grounds the finding (a verified behavior claim outranks a
|
|
54
|
-
* missing quote); a refuting run quarantines it (the cited code may exist, but
|
|
55
|
-
* the behavior claim is false); an inconclusive/skipped/absent anchor leaves the
|
|
56
|
-
* tier-1 verdict in place.
|
|
57
|
-
*/
|
|
58
|
-
export declare function combineGroundingWithAnchor(tier1: FindingGrounding, anchor: AnchorResult | undefined): FindingGrounding;
|
|
59
|
-
//# sourceMappingURL=anchorGrounding.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"anchorGrounding.d.ts","sourceRoot":"","sources":["../../../src/audit/validation/anchorGrounding.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAEL,gBAAgB,EAChB,wBAAwB,EACxB,sBAAsB,EAGvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EACV,qBAAqB,EAGrB,OAAO,EACP,gBAAgB,EACjB,MAAM,oBAAoB,CAAC;AAK5B,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,CAAC;AAE9E,yFAAyF;AACzF,eAAO,MAAM,iBAAiB,QAA8B,CAAC;AAE7D;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,MAAM,CAGR;AAED,MAAM,MAAM,YAAY,GAAG,qBAAqB,CAAC;AASjD,mFAAmF;AACnF,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,WAAW,GAAG,SAAS,GAAG,cAAc,GAAG,SAAS,CAAC;IAC7D,OAAO,EAAE,MAAM,CAAC;IAChB,qDAAqD;IACrD,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAsDD;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACvC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,OAAO,EAChB,GAAG,GAAE,YAAkC,GACtC,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CA6EnC;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,gBAAgB,EACvB,MAAM,EAAE,YAAY,GAAG,SAAS,GAC/B,gBAAgB,CAalB"}
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Executable-anchor grounding for behavior claims (S7 tier-2).
|
|
3
|
-
*
|
|
4
|
-
* Tier-1 (quoteGrounding) proves a finding *cites code that exists*. It cannot
|
|
5
|
-
* prove a *behavior* claim — "there is a cycle", "this symbol is unused", "this
|
|
6
|
-
* throws". Those are exactly the claims that shipped as **not real** in the
|
|
7
|
-
* 452-self-audit (a hallucinated cycle, two const-compare mistakes), caught only
|
|
8
|
-
* by deterministically re-running `madge`/`grep`. Tier-2 attaches a read-only
|
|
9
|
-
* command to such a claim, the tool runs it, and the confirmed bit is the tool's
|
|
10
|
-
* run — never the model's word. A refuting run quarantines the finding.
|
|
11
|
-
*
|
|
12
|
-
* SAFETY. The command is model-authored, so it runs only when both its
|
|
13
|
-
* executable AND its arguments pass the shared **default-deny allowlist**
|
|
14
|
-
* (`isAllowedAnchorCommand` — CRIT ARC-a06a3945: validates args, not just the
|
|
15
|
-
* executable, so `rg --pre`, `ast-grep --rewrite`, non-read-only git, etc. are
|
|
16
|
-
* refused). It runs under a timeout, with the host-signalling env stripped, and
|
|
17
|
-
* never via a shell — all owned by the shared `runAllowlistedReadOnlyCommand`
|
|
18
|
-
* runner. Anything off the allowlist is *skipped* (recorded, not run) and the
|
|
19
|
-
* finding falls back to tier-1 grounding. The whole pass can be disabled with
|
|
20
|
-
* `AUDIT_CODE_DISABLE_ANCHORS=1`; the per-anchor timeout (60s default) can be
|
|
21
|
-
* raised with `AUDIT_CODE_ANCHOR_TIMEOUT_MS` for slow checks on large repos.
|
|
22
|
-
*/
|
|
23
|
-
import { ALLOWLISTED_EXEC_TIMEOUT_MS, ANCHOR_ALLOWLIST, GIT_READONLY_SUBCOMMANDS, isAllowedAnchorCommand, normalizeForMatch, runAllowlistedReadOnlyCommand, } from "audit-tools/shared";
|
|
24
|
-
// Re-export the allowlist authority so existing audit-code import sites
|
|
25
|
-
// (`../validation/anchorGrounding.js`) keep working — the implementation is now
|
|
26
|
-
// single-sourced in shared (drift-plan E2; CRIT arg-validation).
|
|
27
|
-
export { isAllowedAnchorCommand, ANCHOR_ALLOWLIST, GIT_READONLY_SUBCOMMANDS };
|
|
28
|
-
/** Default per-anchor wall-clock budget; a slower command is killed and inconclusive. */
|
|
29
|
-
export const ANCHOR_TIMEOUT_MS = ALLOWLISTED_EXEC_TIMEOUT_MS;
|
|
30
|
-
/**
|
|
31
|
-
* The effective per-anchor timeout. The 60s default suits the common anchors
|
|
32
|
-
* (madge/grep/rg/git) but a legitimately slow check on a large repo would be
|
|
33
|
-
* silently killed → `inconclusive`; `AUDIT_CODE_ANCHOR_TIMEOUT_MS` (a positive
|
|
34
|
-
* integer in ms) lets an operator raise it per run without code changes. Read
|
|
35
|
-
* per-call to mirror `AUDIT_CODE_DISABLE_ANCHORS` (no import-time capture).
|
|
36
|
-
*/
|
|
37
|
-
export function resolveAnchorTimeoutMs(env = process.env) {
|
|
38
|
-
const override = Number(env.AUDIT_CODE_ANCHOR_TIMEOUT_MS);
|
|
39
|
-
return Number.isFinite(override) && override > 0 ? override : ANCHOR_TIMEOUT_MS;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* The single read-only command runner for anchor verification — the shared
|
|
43
|
-
* allowlisted runner (argv-only, env-stripped, timeout-killed). Exposed under
|
|
44
|
-
* the local name so injected test runners and callers are unchanged.
|
|
45
|
-
*/
|
|
46
|
-
const defaultAnchorRunner = runAllowlistedReadOnlyCommand;
|
|
47
|
-
function tailEvidence(output) {
|
|
48
|
-
const lines = output.trim().length > 0 ? output.trim().split(/\r?\n/) : [];
|
|
49
|
-
if (lines.length <= 10)
|
|
50
|
-
return lines;
|
|
51
|
-
return [
|
|
52
|
-
`[... truncated: showing last 10 of ${lines.length} lines ...]`,
|
|
53
|
-
...lines.slice(-10),
|
|
54
|
-
];
|
|
55
|
-
}
|
|
56
|
-
function truncate(text, max = 80) {
|
|
57
|
-
return text.length > max ? `${text.slice(0, max)}…` : text;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Evaluate whether the run satisfies the declared confirm_if condition. Returns
|
|
61
|
-
* `null` when the condition is malformed (output_* with no text), so the caller
|
|
62
|
-
* records the anchor inconclusive rather than guessing a polarity.
|
|
63
|
-
*/
|
|
64
|
-
function evaluateExpectation(expectation, exitCode, output) {
|
|
65
|
-
switch (expectation.kind) {
|
|
66
|
-
case "exit_zero":
|
|
67
|
-
return {
|
|
68
|
-
confirmed: exitCode === 0,
|
|
69
|
-
detail: `command exited ${exitCode} (confirmed iff exit 0)`,
|
|
70
|
-
};
|
|
71
|
-
case "exit_nonzero":
|
|
72
|
-
return {
|
|
73
|
-
confirmed: exitCode !== null && exitCode !== 0,
|
|
74
|
-
detail: `command exited ${exitCode} (confirmed iff non-zero exit)`,
|
|
75
|
-
};
|
|
76
|
-
case "output_includes":
|
|
77
|
-
case "output_excludes": {
|
|
78
|
-
if (typeof expectation.text !== "string" || expectation.text.trim() === "") {
|
|
79
|
-
return null;
|
|
80
|
-
}
|
|
81
|
-
const present = normalizeForMatch(output).includes(normalizeForMatch(expectation.text));
|
|
82
|
-
const confirmed = expectation.kind === "output_includes" ? present : !present;
|
|
83
|
-
return {
|
|
84
|
-
confirmed,
|
|
85
|
-
detail: `output ${present ? "contains" : "does not contain"} "${truncate(expectation.text)}"`,
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Run a finding's executable anchor (if any) and return the verdict. Pure of any
|
|
92
|
-
* finding mutation — the caller folds the result into `grounding` via
|
|
93
|
-
* {@link combineGroundingWithAnchor}. Returns `undefined` when the finding has
|
|
94
|
-
* no anchor (nothing to run).
|
|
95
|
-
*/
|
|
96
|
-
export async function verifyFindingAnchor(repoRoot, finding, run = defaultAnchorRunner) {
|
|
97
|
-
const anchor = finding.executable_anchor;
|
|
98
|
-
if (!anchor ||
|
|
99
|
-
!Array.isArray(anchor.command) ||
|
|
100
|
-
anchor.command.length === 0 ||
|
|
101
|
-
!anchor.confirm_if) {
|
|
102
|
-
return undefined;
|
|
103
|
-
}
|
|
104
|
-
if (process.env.AUDIT_CODE_DISABLE_ANCHORS === "1") {
|
|
105
|
-
return {
|
|
106
|
-
status: "skipped",
|
|
107
|
-
summary: "executable-anchor verification disabled (AUDIT_CODE_DISABLE_ANCHORS=1)",
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
if (!isAllowedAnchorCommand(anchor.command)) {
|
|
111
|
-
return {
|
|
112
|
-
status: "skipped",
|
|
113
|
-
summary: `\`${anchor.command.join(" ")}\` is not on the inspection-only anchor allowlist (executable or arguments refused); not auto-run`,
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
const timeoutMs = resolveAnchorTimeoutMs();
|
|
117
|
-
const outcome = await run(anchor.command, repoRoot, timeoutMs);
|
|
118
|
-
const display = anchor.command.join(" ");
|
|
119
|
-
if (outcome.spawn_error) {
|
|
120
|
-
return {
|
|
121
|
-
status: "inconclusive",
|
|
122
|
-
summary: `could not run anchor \`${display}\`: ${outcome.spawn_error}`,
|
|
123
|
-
evidence: tailEvidence(outcome.output),
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
if (outcome.timed_out) {
|
|
127
|
-
return {
|
|
128
|
-
status: "inconclusive",
|
|
129
|
-
summary: `anchor \`${display}\` timed out after ${timeoutMs}ms`,
|
|
130
|
-
evidence: tailEvidence(outcome.output),
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
// Truncated output is checked BEFORE evaluateExpectation, and only matters
|
|
134
|
-
// for the two output-matching kinds — exit_zero/exit_nonzero read exitCode,
|
|
135
|
-
// never `output`, so a chatty-but-truncated run cannot corrupt an exit-code
|
|
136
|
-
// verdict. For output_includes/output_excludes, a truncated capture must
|
|
137
|
-
// never let absence-in-the-captured-prefix decide the verdict in EITHER
|
|
138
|
-
// direction (a missing "includes" match may be sitting in the dropped tail;
|
|
139
|
-
// a missing "excludes" match may be too) — so the outcome is inconclusive
|
|
140
|
-
// regardless of what the truncated prefix happened to contain.
|
|
141
|
-
if (outcome.truncated &&
|
|
142
|
-
(anchor.confirm_if.kind === "output_includes" ||
|
|
143
|
-
anchor.confirm_if.kind === "output_excludes")) {
|
|
144
|
-
return {
|
|
145
|
-
status: "inconclusive",
|
|
146
|
-
summary: `anchor \`${display}\` output was truncated at the capture cap before ${anchor.confirm_if.kind} could be evaluated — cannot confirm or refute from a partial capture`,
|
|
147
|
-
evidence: tailEvidence(outcome.output),
|
|
148
|
-
};
|
|
149
|
-
}
|
|
150
|
-
const verdict = evaluateExpectation(anchor.confirm_if, outcome.exit_code, outcome.output);
|
|
151
|
-
if (verdict === null) {
|
|
152
|
-
return {
|
|
153
|
-
status: "inconclusive",
|
|
154
|
-
summary: `malformed anchor: ${anchor.confirm_if.kind} requires a non-empty \`text\``,
|
|
155
|
-
evidence: tailEvidence(outcome.output),
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
return {
|
|
159
|
-
status: verdict.confirmed ? "confirmed" : "refuted",
|
|
160
|
-
summary: `${verdict.confirmed ? "confirmed" : "REFUTED"} by \`${display}\` — ${verdict.detail}`,
|
|
161
|
-
evidence: tailEvidence(outcome.output),
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* Fold an anchor verdict into the quote-and-verify (tier-1) grounding. A
|
|
166
|
-
* confirming run grounds the finding (a verified behavior claim outranks a
|
|
167
|
-
* missing quote); a refuting run quarantines it (the cited code may exist, but
|
|
168
|
-
* the behavior claim is false); an inconclusive/skipped/absent anchor leaves the
|
|
169
|
-
* tier-1 verdict in place.
|
|
170
|
-
*/
|
|
171
|
-
export function combineGroundingWithAnchor(tier1, anchor) {
|
|
172
|
-
if (!anchor)
|
|
173
|
-
return tier1;
|
|
174
|
-
if (anchor.status === "confirmed")
|
|
175
|
-
return { status: "grounded" };
|
|
176
|
-
if (anchor.status === "refuted") {
|
|
177
|
-
// A refuting run DISPROVED the claim — distinct from tier-1 `ungrounded`
|
|
178
|
-
// ("couldn't verify"). It is quarantined-EXCLUDED at synthesis, not merely
|
|
179
|
-
// surfaced, so it can never merge as actionable fact.
|
|
180
|
-
return {
|
|
181
|
-
status: "refuted",
|
|
182
|
-
reason: `executable anchor refuted the claim: ${anchor.summary}`,
|
|
183
|
-
};
|
|
184
|
-
}
|
|
185
|
-
return tier1;
|
|
186
|
-
}
|
|
187
|
-
//# sourceMappingURL=anchorGrounding.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"anchorGrounding.js","sourceRoot":"","sources":["../../../src/audit/validation/anchorGrounding.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EACL,2BAA2B,EAC3B,gBAAgB,EAChB,wBAAwB,EACxB,sBAAsB,EACtB,iBAAiB,EACjB,6BAA6B,GAC9B,MAAM,oBAAoB,CAAC;AAS5B,wEAAwE;AACxE,gFAAgF;AAChF,iEAAiE;AACjE,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,CAAC;AAE9E,yFAAyF;AACzF,MAAM,CAAC,MAAM,iBAAiB,GAAG,2BAA2B,CAAC;AAE7D;;;;;;GAMG;AACH,MAAM,UAAU,sBAAsB,CACpC,MAAyB,OAAO,CAAC,GAAG;IAEpC,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;IAC1D,OAAO,MAAM,C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
|
-
* (`shared/src/validation/findingGrounding.ts`) so the auditor, the conceptual-
|
|
6
|
-
* review grounding, and the remediator all consume ONE implementation rather
|
|
7
|
-
* than each carrying a copy (drift-plan E3 + P7). This module re-exports them so
|
|
8
|
-
* the existing `../validation/quoteGrounding.js` import sites are unchanged.
|
|
9
|
-
*
|
|
10
|
-
* The safeguard is attached to the *claim*: every finding cites a verbatim span
|
|
11
|
-
* (`affected_files[].quoted_text`); the tool re-reads that span from disk and
|
|
12
|
-
* content-matches it (whitespace/CRLF-normalized, matched on content not line
|
|
13
|
-
* numbers). The confirmed bit is the tool's re-check, never the model's word; a
|
|
14
|
-
* finding whose quote does not re-verify (or that carries no quote) is
|
|
15
|
-
* `ungrounded` — surfaced, never silently admitted as a confirmed finding.
|
|
16
|
-
*/
|
|
17
|
-
export { normalizeForMatch, quoteMatches, verifyFindingGrounding, type SourceReader, } from "audit-tools/shared";
|
|
18
|
-
//# sourceMappingURL=quoteGrounding.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"quoteGrounding.d.ts","sourceRoot":"","sources":["../../../src/audit/validation/quoteGrounding.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,sBAAsB,EACtB,KAAK,YAAY,GAClB,MAAM,oBAAoB,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Quote-and-verify grounding for audit findings (S7 anti-hallucination).
|
|
3
|
-
*
|
|
4
|
-
* The primitives now live in `audit-tools/shared`
|
|
5
|
-
* (`shared/src/validation/findingGrounding.ts`) so the auditor, the conceptual-
|
|
6
|
-
* review grounding, and the remediator all consume ONE implementation rather
|
|
7
|
-
* than each carrying a copy (drift-plan E3 + P7). This module re-exports them so
|
|
8
|
-
* the existing `../validation/quoteGrounding.js` import sites are unchanged.
|
|
9
|
-
*
|
|
10
|
-
* The safeguard is attached to the *claim*: every finding cites a verbatim span
|
|
11
|
-
* (`affected_files[].quoted_text`); the tool re-reads that span from disk and
|
|
12
|
-
* content-matches it (whitespace/CRLF-normalized, matched on content not line
|
|
13
|
-
* numbers). The confirmed bit is the tool's re-check, never the model's word; a
|
|
14
|
-
* finding whose quote does not re-verify (or that carries no quote) is
|
|
15
|
-
* `ungrounded` — surfaced, never silently admitted as a confirmed finding.
|
|
16
|
-
*/
|
|
17
|
-
export { normalizeForMatch, quoteMatches, verifyFindingGrounding, } from "audit-tools/shared";
|
|
18
|
-
//# sourceMappingURL=quoteGrounding.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"quoteGrounding.js","sourceRoot":"","sources":["../../../src/audit/validation/quoteGrounding.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,sBAAsB,GAEvB,MAAM,oBAAoB,CAAC"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import type { AccessMemory } from "audit-tools/shared";
|
|
2
|
-
import type { RemediationState } from "./store.js";
|
|
3
|
-
import type { RemediationBlock } from "./types.js";
|
|
4
|
-
/**
|
|
5
|
-
* Remediate-side parity of the audit access-memory harvest (context-efficiency
|
|
6
|
-
* track, increment 2c): populate `access_memory.edited_count` from the files
|
|
7
|
-
* remediation landed edits on, so continuity works in both orchestrators.
|
|
8
|
-
*
|
|
9
|
-
* Attribution is per-ITEM and restricted to `resolved` items — the only status
|
|
10
|
-
* that lands an actual diff. `resolved_no_change` (verified but zero diff), skips
|
|
11
|
-
* (`ignored`/`deemed_inappropriate`) and `blocked` items edit nothing and are
|
|
12
|
-
* excluded. Each resolved item's edited surface is its block's `touched_files`.
|
|
13
|
-
* This is the
|
|
14
|
-
* DECLARED edit surface, not a live git diff: it's the only CUMULATIVE,
|
|
15
|
-
* git-independent source (worktree branches for earlier waves are already
|
|
16
|
-
* merged/gone), and the ownership-disjoint scheduler + post-merge attribution hold
|
|
17
|
-
* an item to that surface, so declared ≈ actual by construction. Re-derived fresh
|
|
18
|
-
* from state each merge (no read-modify-write, no double-count, idempotent).
|
|
19
|
-
*
|
|
20
|
-
* Recency lives in STEP-ORDINAL space, never wall-clock: blocks are ordered
|
|
21
|
-
* deterministically by `(phase_ordinal, block_id)` — the foundations→consumers
|
|
22
|
-
* execution order — and an item's ordinal is its block's index in that order.
|
|
23
|
-
* `total_ordinals` is the full block count, so recency (`last_ordinal /
|
|
24
|
-
* total_ordinals`) is stable as more blocks complete. Pure + deterministic: same
|
|
25
|
-
* state → byte-identical record.
|
|
26
|
-
*/
|
|
27
|
-
export declare function deriveRemediationAccessMemory(state: RemediationState): AccessMemory;
|
|
28
|
-
/**
|
|
29
|
-
* Read the remediation `access_memory.json` (written at the artifacts root by the
|
|
30
|
-
* merge — see {@link deriveRemediationAccessMemory}) back for the continuity
|
|
31
|
-
* consumer. Absent (first dispatch pass, before any merge) OR malformed ⇒
|
|
32
|
-
* `undefined` = no bias, matching the scorer's empty-map contract. Never throws —
|
|
33
|
-
* a bad record degrades silently rather than failing dispatch (enforce-in-tooling,
|
|
34
|
-
* crash-safe like the graph/extractor read path).
|
|
35
|
-
*/
|
|
36
|
-
export declare function readRemediationAccessMemory(artifactsDir: string): Promise<AccessMemory | undefined>;
|
|
37
|
-
/**
|
|
38
|
-
* Remediate-side continuity CONSUMER (context-efficiency track, increment 2d) —
|
|
39
|
-
* the mirror of audit's `orderReviewPackets` bias. Turns the harvested
|
|
40
|
-
* `access_memory` into a per-BLOCK continuity mass that biases file-ownership
|
|
41
|
-
* sub-wave admission (`ownershipSubWaves`, via `OwnershipSchedulerNode.continuity`)
|
|
42
|
-
* toward blocks whose files earlier waves already touched.
|
|
43
|
-
*
|
|
44
|
-
* Remediate has NO dependency graph at dispatch, so the shared scorer runs in its
|
|
45
|
-
* seed-only mode (`graphBundle: undefined`) — a pure recency×frequency ordering
|
|
46
|
-
* (edited-weighted), which is the valid weaker signal for a graphless consumer.
|
|
47
|
-
* Each block's mass is the single-sourced {@link continuityMassForPaths} reducer
|
|
48
|
-
* over its declared file surface, keyed by `block_id`. Returns an empty map when
|
|
49
|
-
* there is no signal yet (no/empty access-memory) ⇒ the scheduler falls back to
|
|
50
|
-
* its pure `block_id` ordering, byte-identical to pre-2d.
|
|
51
|
-
*/
|
|
52
|
-
export declare function computeBlockContinuityScores(accessMemory: AccessMemory | undefined, blocks: readonly RemediationBlock[], scopeForBlock: (block: RemediationBlock) => readonly string[]): Map<string, number>;
|
|
53
|
-
//# sourceMappingURL=accessMemory.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"accessMemory.d.ts","sourceRoot":"","sources":["../../../src/remediate/state/accessMemory.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAoB,MAAM,oBAAoB,CAAC;AASzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,gBAAgB,GACtB,YAAY,CA8Bd;AAKD;;;;;;;GAOG;AACH,wBAAsB,2BAA2B,CAC/C,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAUnC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,4BAA4B,CAC1C,YAAY,EAAE,YAAY,GAAG,SAAS,EACtC,MAAM,EAAE,SAAS,gBAAgB,EAAE,EACnC,aAAa,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,SAAS,MAAM,EAAE,GAC5D,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CASrB"}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { join } from "node:path";
|
|
2
|
-
import { compareCodeUnits, deriveAccessMemoryFromEvents, readOptionalJsonFile, AccessMemorySchema, computeContinuityScores, continuityMassForPaths, } from "audit-tools/shared";
|
|
3
|
-
/**
|
|
4
|
-
* Remediate-side parity of the audit access-memory harvest (context-efficiency
|
|
5
|
-
* track, increment 2c): populate `access_memory.edited_count` from the files
|
|
6
|
-
* remediation landed edits on, so continuity works in both orchestrators.
|
|
7
|
-
*
|
|
8
|
-
* Attribution is per-ITEM and restricted to `resolved` items — the only status
|
|
9
|
-
* that lands an actual diff. `resolved_no_change` (verified but zero diff), skips
|
|
10
|
-
* (`ignored`/`deemed_inappropriate`) and `blocked` items edit nothing and are
|
|
11
|
-
* excluded. Each resolved item's edited surface is its block's `touched_files`.
|
|
12
|
-
* This is the
|
|
13
|
-
* DECLARED edit surface, not a live git diff: it's the only CUMULATIVE,
|
|
14
|
-
* git-independent source (worktree branches for earlier waves are already
|
|
15
|
-
* merged/gone), and the ownership-disjoint scheduler + post-merge attribution hold
|
|
16
|
-
* an item to that surface, so declared ≈ actual by construction. Re-derived fresh
|
|
17
|
-
* from state each merge (no read-modify-write, no double-count, idempotent).
|
|
18
|
-
*
|
|
19
|
-
* Recency lives in STEP-ORDINAL space, never wall-clock: blocks are ordered
|
|
20
|
-
* deterministically by `(phase_ordinal, block_id)` — the foundations→consumers
|
|
21
|
-
* execution order — and an item's ordinal is its block's index in that order.
|
|
22
|
-
* `total_ordinals` is the full block count, so recency (`last_ordinal /
|
|
23
|
-
* total_ordinals`) is stable as more blocks complete. Pure + deterministic: same
|
|
24
|
-
* state → byte-identical record.
|
|
25
|
-
*/
|
|
26
|
-
export function deriveRemediationAccessMemory(state) {
|
|
27
|
-
const blocks = [...(state.plan?.blocks ?? [])].sort((a, b) => {
|
|
28
|
-
const phaseDelta = (a.phase_ordinal ?? 0) - (b.phase_ordinal ?? 0);
|
|
29
|
-
if (phaseDelta !== 0)
|
|
30
|
-
return phaseDelta;
|
|
31
|
-
return compareCodeUnits(a.block_id, b.block_id);
|
|
32
|
-
});
|
|
33
|
-
const ordinalByBlock = new Map(blocks.map((block, index) => [block.block_id, index]));
|
|
34
|
-
const blockById = new Map(blocks.map((block) => [block.block_id, block]));
|
|
35
|
-
// Sort items by finding_id so the (already path-sorted) core sees a stable
|
|
36
|
-
// stream regardless of state.items key insertion order.
|
|
37
|
-
const items = Object.values(state.items ?? {}).sort((a, b) => compareCodeUnits(a.finding_id, b.finding_id));
|
|
38
|
-
const events = [];
|
|
39
|
-
for (const item of items) {
|
|
40
|
-
if (item.status !== "resolved")
|
|
41
|
-
continue; // only an actual diff counts as an edit
|
|
42
|
-
const ordinal = ordinalByBlock.get(item.block_id) ?? 0;
|
|
43
|
-
const surface = blockById.get(item.block_id)?.touched_files ?? [];
|
|
44
|
-
for (const path of new Set(surface)) {
|
|
45
|
-
if (!path)
|
|
46
|
-
continue;
|
|
47
|
-
events.push({ path, edited: true, ordinal });
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return deriveAccessMemoryFromEvents(events, {
|
|
51
|
-
totalOrdinals: blocks.length,
|
|
52
|
-
runId: state.plan?.plan_id,
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
/** Canonical on-disk name of the per-run access-memory record (both orchestrators). */
|
|
56
|
-
const ACCESS_MEMORY_FILENAME = "access_memory.json";
|
|
57
|
-
/**
|
|
58
|
-
* Read the remediation `access_memory.json` (written at the artifacts root by the
|
|
59
|
-
* merge — see {@link deriveRemediationAccessMemory}) back for the continuity
|
|
60
|
-
* consumer. Absent (first dispatch pass, before any merge) OR malformed ⇒
|
|
61
|
-
* `undefined` = no bias, matching the scorer's empty-map contract. Never throws —
|
|
62
|
-
* a bad record degrades silently rather than failing dispatch (enforce-in-tooling,
|
|
63
|
-
* crash-safe like the graph/extractor read path).
|
|
64
|
-
*/
|
|
65
|
-
export async function readRemediationAccessMemory(artifactsDir) {
|
|
66
|
-
let raw;
|
|
67
|
-
try {
|
|
68
|
-
raw = await readOptionalJsonFile(join(artifactsDir, ACCESS_MEMORY_FILENAME));
|
|
69
|
-
}
|
|
70
|
-
catch {
|
|
71
|
-
return undefined; // unreadable / invalid JSON → no bias
|
|
72
|
-
}
|
|
73
|
-
if (raw === undefined)
|
|
74
|
-
return undefined;
|
|
75
|
-
const parsed = AccessMemorySchema.safeParse(raw);
|
|
76
|
-
return parsed.success ? parsed.data : undefined;
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Remediate-side continuity CONSUMER (context-efficiency track, increment 2d) —
|
|
80
|
-
* the mirror of audit's `orderReviewPackets` bias. Turns the harvested
|
|
81
|
-
* `access_memory` into a per-BLOCK continuity mass that biases file-ownership
|
|
82
|
-
* sub-wave admission (`ownershipSubWaves`, via `OwnershipSchedulerNode.continuity`)
|
|
83
|
-
* toward blocks whose files earlier waves already touched.
|
|
84
|
-
*
|
|
85
|
-
* Remediate has NO dependency graph at dispatch, so the shared scorer runs in its
|
|
86
|
-
* seed-only mode (`graphBundle: undefined`) — a pure recency×frequency ordering
|
|
87
|
-
* (edited-weighted), which is the valid weaker signal for a graphless consumer.
|
|
88
|
-
* Each block's mass is the single-sourced {@link continuityMassForPaths} reducer
|
|
89
|
-
* over its declared file surface, keyed by `block_id`. Returns an empty map when
|
|
90
|
-
* there is no signal yet (no/empty access-memory) ⇒ the scheduler falls back to
|
|
91
|
-
* its pure `block_id` ordering, byte-identical to pre-2d.
|
|
92
|
-
*/
|
|
93
|
-
export function computeBlockContinuityScores(accessMemory, blocks, scopeForBlock) {
|
|
94
|
-
const scores = computeContinuityScores(accessMemory, undefined);
|
|
95
|
-
if (scores.size === 0)
|
|
96
|
-
return new Map();
|
|
97
|
-
const byBlock = new Map();
|
|
98
|
-
for (const block of blocks) {
|
|
99
|
-
const mass = continuityMassForPaths(scopeForBlock(block), scores);
|
|
100
|
-
if (mass > 0)
|
|
101
|
-
byBlock.set(block.block_id, mass);
|
|
102
|
-
}
|
|
103
|
-
return byBlock;
|
|
104
|
-
}
|
|
105
|
-
//# sourceMappingURL=accessMemory.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3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C,MAAM,MAAM,GAAG,kBAAkB,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IACjD,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;AAClD,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,4BAA4B,CAC1C,YAAsC,EACtC,MAAmC,EACnC,aAA6D;IAE7D,MAAM,MAAM,GAAG,uBAAuB,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;IAChE,IAAI,MAAM,CAAC,IAAI,KAAK,CAAC;QAAE,OAAO,IAAI,GAAG,EAAE,CAAC;IACxC,MAAM,OAAO,GAAG,IAAI,GAAG,EAAkB,CAAC;IAC1C,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,MAAM,IAAI,GAAG,sBAAsB,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,CAAC;QAClE,IAAI,IAAI,GAAG,CAAC;YAAE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IAClD,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { readExtractedPlanIfPresent } from "./dispatch/marshal.js";
|
|
2
|
-
export type { CurrentRemediationHostState, PreparedRemediationHostHandoff, RemediationHostIngestSummary, RemediationHostWorkItem, RemediationHostWorkload, UnsupportedRetiredRemediationState, } from "./dispatch/hostHandoff.js";
|
|
3
|
-
export { ingestRemediationHostResults, prepareRemediationHostHandoff, remediationHostResultFilePath, } from "./dispatch/hostHandoff.js";
|
|
4
|
-
//# sourceMappingURL=dispatch.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dispatch.d.ts","sourceRoot":"","sources":["../../../src/remediate/steps/dispatch.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAGnE,YAAY,EACV,2BAA2B,EAC3B,8BAA8B,EAC9B,4BAA4B,EAC5B,uBAAuB,EACvB,uBAAuB,EACvB,kCAAkC,GACnC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,4BAA4B,EAC5B,6BAA6B,EAC7B,6BAA6B,GAC9B,MAAM,2BAA2B,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// ---------------------------------------------------------------------------
|
|
2
|
-
// dispatch.ts — thin barrel
|
|
3
|
-
//
|
|
4
|
-
// The implementation was split into cohesive sibling modules under
|
|
5
|
-
// `./dispatch/` (CP-NODE-7). This file re-exports the modules' public surface so
|
|
6
|
-
// consumers that import from `steps/dispatch.js` keep working unchanged. New
|
|
7
|
-
// code may import directly from the submodules; the barrel is the aggregate.
|
|
8
|
-
// ---------------------------------------------------------------------------
|
|
9
|
-
// --- planning-pipeline handoff reader ---
|
|
10
|
-
export { readExtractedPlanIfPresent } from "./dispatch/marshal.js";
|
|
11
|
-
export { ingestRemediationHostResults, prepareRemediationHostHandoff, remediationHostResultFilePath, } from "./dispatch/hostHandoff.js";
|
|
12
|
-
//# sourceMappingURL=dispatch.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dispatch.js","sourceRoot":"","sources":["../../../src/remediate/steps/dispatch.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,4BAA4B;AAC5B,EAAE;AACF,mEAAmE;AACnE,iFAAiF;AACjF,6EAA6E;AAC7E,6EAA6E;AAC7E,8EAA8E;AAE9E,2CAA2C;AAC3C,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAWnE,OAAO,EACL,4BAA4B,EAC5B,6BAA6B,EAC7B,6BAA6B,GAC9B,MAAM,2BAA2B,CAAC"}
|