audit-tools 0.30.3 → 0.30.5
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/auditStep.d.ts.map +1 -1
- package/dist/audit/cli/auditStep.js +24 -13
- package/dist/audit/cli/auditStep.js.map +1 -1
- package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
- package/dist/audit/cli/nextStepHelpers.js +11 -6
- package/dist/audit/cli/nextStepHelpers.js.map +1 -1
- package/dist/audit/cli/reviewRun.d.ts.map +1 -1
- package/dist/audit/cli/reviewRun.js +9 -4
- package/dist/audit/cli/reviewRun.js.map +1 -1
- package/dist/audit/contracts/schemaEnforcedEmit.d.ts +75 -0
- package/dist/audit/contracts/schemaEnforcedEmit.d.ts.map +1 -0
- package/dist/audit/contracts/schemaEnforcedEmit.js +131 -0
- package/dist/audit/contracts/schemaEnforcedEmit.js.map +1 -0
- package/dist/audit/contracts/workerSchemas.d.ts +22 -4
- package/dist/audit/contracts/workerSchemas.d.ts.map +1 -1
- package/dist/audit/contracts/wrapperResponse.d.ts +18 -18
- package/dist/audit/extractors/analyzers/acquisitionEngine.d.ts +140 -0
- package/dist/audit/extractors/analyzers/acquisitionEngine.d.ts.map +1 -0
- package/dist/audit/extractors/analyzers/acquisitionEngine.js +262 -0
- package/dist/audit/extractors/analyzers/acquisitionEngine.js.map +1 -0
- package/dist/audit/extractors/analyzers/registry.d.ts +2 -0
- package/dist/audit/extractors/analyzers/registry.d.ts.map +1 -1
- package/dist/audit/extractors/analyzers/registry.js +5 -0
- package/dist/audit/extractors/analyzers/registry.js.map +1 -1
- package/dist/audit/extractors/gitHistory.d.ts +46 -0
- package/dist/audit/extractors/gitHistory.d.ts.map +1 -0
- package/dist/audit/extractors/gitHistory.js +97 -0
- package/dist/audit/extractors/gitHistory.js.map +1 -0
- package/dist/audit/extractors/graph.d.ts +19 -1
- package/dist/audit/extractors/graph.d.ts.map +1 -1
- package/dist/audit/extractors/graph.js +31 -0
- package/dist/audit/extractors/graph.js.map +1 -1
- package/dist/audit/extractors/risk.d.ts +16 -0
- package/dist/audit/extractors/risk.d.ts.map +1 -1
- package/dist/audit/extractors/risk.js +28 -0
- package/dist/audit/extractors/risk.js.map +1 -1
- package/dist/audit/io/artifacts.d.ts +3 -1
- package/dist/audit/io/artifacts.d.ts.map +1 -1
- package/dist/audit/io/artifacts.js +1 -0
- package/dist/audit/io/artifacts.js.map +1 -1
- package/dist/audit/orchestrator/artifactFreshness.d.ts +2 -1
- package/dist/audit/orchestrator/artifactFreshness.d.ts.map +1 -1
- package/dist/audit/orchestrator/artifactFreshness.js +5 -15
- package/dist/audit/orchestrator/artifactFreshness.js.map +1 -1
- package/dist/audit/orchestrator/artifactMetadata.d.ts.map +1 -1
- package/dist/audit/orchestrator/artifactMetadata.js +24 -3
- package/dist/audit/orchestrator/artifactMetadata.js.map +1 -1
- package/dist/audit/orchestrator/dependencyMap.d.ts +7 -0
- package/dist/audit/orchestrator/dependencyMap.d.ts.map +1 -1
- package/dist/audit/orchestrator/dependencyMap.js +5 -1
- package/dist/audit/orchestrator/dependencyMap.js.map +1 -1
- package/dist/audit/orchestrator/executorRunners.d.ts.map +1 -1
- package/dist/audit/orchestrator/executorRunners.js +10 -9
- package/dist/audit/orchestrator/executorRunners.js.map +1 -1
- package/dist/audit/orchestrator/ingestionExecutors.d.ts.map +1 -1
- package/dist/audit/orchestrator/ingestionExecutors.js +5 -1
- package/dist/audit/orchestrator/ingestionExecutors.js.map +1 -1
- package/dist/audit/orchestrator/intentCheckpointGate.d.ts +129 -0
- package/dist/audit/orchestrator/intentCheckpointGate.d.ts.map +1 -0
- package/dist/audit/orchestrator/intentCheckpointGate.js +193 -0
- package/dist/audit/orchestrator/intentCheckpointGate.js.map +1 -0
- package/dist/audit/orchestrator/ledger.d.ts +30 -0
- package/dist/audit/orchestrator/ledger.d.ts.map +1 -0
- package/dist/audit/orchestrator/ledger.js +126 -0
- package/dist/audit/orchestrator/ledger.js.map +1 -0
- package/dist/audit/orchestrator/nextStep.d.ts +11 -29
- package/dist/audit/orchestrator/nextStep.d.ts.map +1 -1
- package/dist/audit/orchestrator/nextStep.js +11 -29
- package/dist/audit/orchestrator/nextStep.js.map +1 -1
- package/dist/audit/orchestrator/resultBaseline.d.ts +136 -0
- package/dist/audit/orchestrator/resultBaseline.d.ts.map +1 -0
- package/dist/audit/orchestrator/resultBaseline.js +138 -0
- package/dist/audit/orchestrator/resultBaseline.js.map +1 -0
- package/dist/audit/orchestrator/staleness.d.ts.map +1 -1
- package/dist/audit/orchestrator/staleness.js +25 -1
- package/dist/audit/orchestrator/staleness.js.map +1 -1
- package/dist/audit/quota/index.d.ts +32 -32
- package/dist/audit/types/artifactMetadata.d.ts +34 -0
- package/dist/audit/types/artifactMetadata.d.ts.map +1 -1
- package/dist/audit/types/artifactMetadata.js +10 -1
- package/dist/audit/types/artifactMetadata.js.map +1 -1
- package/dist/audit/types.d.ts +13 -4
- package/dist/audit/types.d.ts.map +1 -1
- package/dist/audit/types.js +8 -0
- package/dist/audit/types.js.map +1 -1
- package/dist/remediate/steps/nextStep.d.ts +11 -23
- package/dist/remediate/steps/nextStep.d.ts.map +1 -1
- package/dist/remediate/steps/nextStep.js +45 -43
- package/dist/remediate/steps/nextStep.js.map +1 -1
- package/dist/shared/contentKey.d.ts +83 -0
- package/dist/shared/contentKey.d.ts.map +1 -0
- package/dist/shared/contentKey.js +163 -0
- package/dist/shared/contentKey.js.map +1 -0
- package/dist/shared/friction/captureFrictionEvent.d.ts +50 -0
- package/dist/shared/friction/captureFrictionEvent.d.ts.map +1 -0
- package/dist/shared/friction/captureFrictionEvent.js +34 -0
- package/dist/shared/friction/captureFrictionEvent.js.map +1 -0
- package/dist/shared/friction/triage.d.ts +126 -0
- package/dist/shared/friction/triage.d.ts.map +1 -0
- package/dist/shared/friction/triage.js +149 -0
- package/dist/shared/friction/triage.js.map +1 -0
- package/dist/shared/git.d.ts +41 -0
- package/dist/shared/git.d.ts.map +1 -1
- package/dist/shared/git.js +119 -0
- package/dist/shared/git.js.map +1 -1
- package/dist/shared/index.d.ts +17 -5
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +11 -4
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/io/auditToolsPaths.d.ts +9 -0
- package/dist/shared/io/auditToolsPaths.d.ts.map +1 -1
- package/dist/shared/io/auditToolsPaths.js +11 -0
- package/dist/shared/io/auditToolsPaths.js.map +1 -1
- package/dist/shared/io/frictionCapture.d.ts +2 -0
- package/dist/shared/io/frictionCapture.d.ts.map +1 -1
- package/dist/shared/io/frictionCapture.js +1 -1
- package/dist/shared/io/frictionCapture.js.map +1 -1
- package/dist/shared/providers/providerFactory.d.ts +16 -1
- package/dist/shared/providers/providerFactory.d.ts.map +1 -1
- package/dist/shared/providers/providerFactory.js +43 -0
- package/dist/shared/providers/providerFactory.js.map +1 -1
- package/dist/shared/providers/types.d.ts +40 -0
- package/dist/shared/providers/types.d.ts.map +1 -1
- package/dist/shared/quota/capacity.d.ts +12 -12
- package/dist/shared/quota/quotaSource.d.ts +2 -2
- package/dist/shared/quota/types.d.ts +4 -4
- package/dist/shared/repair/brokeredDispatch.d.ts +147 -0
- package/dist/shared/repair/brokeredDispatch.d.ts.map +1 -0
- package/dist/shared/repair/brokeredDispatch.js +220 -0
- package/dist/shared/repair/brokeredDispatch.js.map +1 -0
- package/dist/shared/repair/emitValidateRepair.d.ts +124 -0
- package/dist/shared/repair/emitValidateRepair.d.ts.map +1 -0
- package/dist/shared/repair/emitValidateRepair.js +179 -0
- package/dist/shared/repair/emitValidateRepair.js.map +1 -0
- package/dist/shared/repair/index.d.ts +10 -0
- package/dist/shared/repair/index.d.ts.map +1 -0
- package/dist/shared/repair/index.js +3 -0
- package/dist/shared/repair/index.js.map +1 -0
- package/dist/shared/stableStringify.d.ts +14 -0
- package/dist/shared/stableStringify.d.ts.map +1 -0
- package/dist/shared/stableStringify.js +28 -0
- package/dist/shared/stableStringify.js.map +1 -0
- package/package.json +1 -1
- package/schemas/audit_result.schema.json +9 -0
- package/schemas/audit_results.schema.json +9 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ingestionExecutors.js","sourceRoot":"","sources":["../../../src/audit/orchestrator/ingestionExecutors.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,GAC7B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AAGvE,SAAS,kBAAkB,CAAC,KAA8B;IACxD,OAAO,MAAM,CAAC,WAAW,CACvB,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,IAAI,EAAE,CAAC,CAAC,CAC7E,CAAC;AACJ,CAAC;AAED,SAAS,6BAA6B,CAAC,MAItC;IACC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;QAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;IAChE,CAAC;IAED,MAAM,SAAS,GAAG,kBAAkB,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IAChE,MAAM,SAAS,GAAG,qBAAqB,CAAC,MA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AAO,EAAE,MAAM,CAAC,aAAa,IAAI,EAAE;QACnC,uBAAuB,EAAE,YAAY;KACtC,CAAC,CAAC;IAEH,OAAO;QACL,OAAO,EAAE,kBAAkB,CAAC,MAAM;QAClC,iBAAiB,EAAE;YACjB,gCAAgC;YAChC,GAAG,kBAAkB,CAAC,SAAS;SAChC;QACD,gBAAgB,EACd,UAAU,OAAO,CAAC,OAAO,CAAC,MAAM,8BAA8B;YAC9D,kBAAkB,CAAC,aAAa;KACnC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,iCAAiC,CAC/C,MAAsB,EACtB,eAAwC;IAExC,MAAM,OAAO,GAAG,YAAY,eAAe,CAAC,OAAO,CAAC,MAAM,6BAA6B,eAAe,CAAC,IAAI,GAAG,CAAC;IAC/G,OAAO;QACL,OAAO,EAAE;YACP,GAAG,MAAM;YACT,yBAAyB,EAAE,eAAe;YAC1C,eAAe,EAAE,SAAS;YAC1B,aAAa,EAAE,SAAS;YACxB,wBAAwB,EAAE,SAAS;YACnC,yBAAyB,EAAE,SAAS;YACpC,WAAW,EAAE,SAAS;YACtB,kBAAkB,EAAE,SAAS;YAC7B,aAAa,EAAE,SAAS;YACxB,YAAY,EAAE,SAAS;SACxB;QACD,iBAAiB,EAAE,CAAC,gCAAgC,CAAC;QACrD,gBAAgB,EAAE,OAAO;KAC1B,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import type { IntentCheckpoint } from 'audit-tools/shared';
|
|
2
|
+
/** A gate verdict over a (prior, new) intent_checkpoint pair. */
|
|
3
|
+
export type IntentCheckpointVerdict = 'unchanged' | 'changed';
|
|
4
|
+
/**
|
|
5
|
+
* The bounded LLM judge. Returns `true` iff the two normalized intent values are
|
|
6
|
+
* semantically EQUIVALENT. A judge that is uncertain, errors, or returns a
|
|
7
|
+
* non-boolean is treated as `changed` by the caller (fail-safe) — the judge
|
|
8
|
+
* itself need not encode that policy. Provider-agnostic: the host supplies the
|
|
9
|
+
* actual LLM call; the gate never reaches for a specific backend.
|
|
10
|
+
*/
|
|
11
|
+
export type SemanticEquivalenceJudge = (input: {
|
|
12
|
+
priorNormalized: string;
|
|
13
|
+
newNormalized: string;
|
|
14
|
+
}) => Promise<boolean> | boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Deterministic normalization config. Bumping any field bumps `gate_version` and
|
|
17
|
+
* invalidates every cached verdict. Kept as data (not code) so the version hash
|
|
18
|
+
* captures the active policy, not the module's source text.
|
|
19
|
+
*/
|
|
20
|
+
export interface NormalizeConfig {
|
|
21
|
+
/** Schema/recipe version of the normalization itself. Bump on any change. */
|
|
22
|
+
readonly version: string;
|
|
23
|
+
/**
|
|
24
|
+
* Checkpoint fields that carry SEMANTIC intent and participate in the normal
|
|
25
|
+
* form. Volatile/provenance fields (timestamps, confirmed_by, schema_version)
|
|
26
|
+
* are excluded so a benign re-confirm normalizes identically.
|
|
27
|
+
*/
|
|
28
|
+
readonly semanticFields: readonly (keyof IntentCheckpoint)[];
|
|
29
|
+
}
|
|
30
|
+
/** The single active normalization config (INV-O2-inv-5 input). */
|
|
31
|
+
export declare const DEFAULT_NORMALIZE_CONFIG: NormalizeConfig;
|
|
32
|
+
/** Static prompt-template version — bump on any judge-prompt change. */
|
|
33
|
+
export declare const INTENT_GATE_PROMPT_TEMPLATE_VERSION = "intent-checkpoint-judge-prompt/v1";
|
|
34
|
+
/**
|
|
35
|
+
* Deterministically normalize an intent_checkpoint value to its semantic normal
|
|
36
|
+
* form. Only `config.semanticFields` participate; values are canonically
|
|
37
|
+
* serialized (stable key order) so reordering/whitespace is invisible. An absent
|
|
38
|
+
* checkpoint normalizes to a stable empty marker so present-vs-absent is a real
|
|
39
|
+
* difference, not a crash.
|
|
40
|
+
*/
|
|
41
|
+
export declare function normalizeCheckpointValue(checkpoint: IntentCheckpoint | undefined, config?: NormalizeConfig): string;
|
|
42
|
+
/**
|
|
43
|
+
* Compute the LOCALLY-resolved `gate_version` cache key component:
|
|
44
|
+
* `hash(normalizeConfig) + judge-id token + prompt-template version`.
|
|
45
|
+
*
|
|
46
|
+
* NO network/API probe (INV-O2-inv-6): the judge id is a caller-supplied LOCAL
|
|
47
|
+
* token (e.g. a configured model id string already known to the host, or a
|
|
48
|
+
* sentinel like `'host'`), never a live capability query. Bumping the normalize
|
|
49
|
+
* config, the judge id, or the prompt template deterministically invalidates the
|
|
50
|
+
* verdict cache.
|
|
51
|
+
*/
|
|
52
|
+
export declare function computeGateVersion(input: {
|
|
53
|
+
normalizeConfig?: NormalizeConfig;
|
|
54
|
+
/** Locally-resolved judge id token. No probe; supplied by the host. */
|
|
55
|
+
judgeId: string;
|
|
56
|
+
promptTemplateVersion?: string;
|
|
57
|
+
}): string;
|
|
58
|
+
/** A cached verdict keyed on (priorNormalized, newNormalized, gate_version). */
|
|
59
|
+
export interface VerdictCache {
|
|
60
|
+
get(key: string): IntentCheckpointVerdict | undefined;
|
|
61
|
+
set(key: string, verdict: IntentCheckpointVerdict): void;
|
|
62
|
+
}
|
|
63
|
+
/** Build the deterministic verdict-cache key from the version-keyed trio. */
|
|
64
|
+
export declare function verdictCacheKey(priorNormalized: string, newNormalized: string, gateVersion: string): string;
|
|
65
|
+
/**
|
|
66
|
+
* The normalize-then-bounded-LLM-judge equivalence gate.
|
|
67
|
+
*
|
|
68
|
+
* 1. Normalize both values; equal normal forms ⟹ `unchanged`, no judge call.
|
|
69
|
+
* 2. Cache hit on (priorNormalized, newNormalized, gate_version) ⟹ cached verdict.
|
|
70
|
+
* 3. Otherwise run the bounded judge; FAIL-SAFE — uncertain/errored/non-boolean
|
|
71
|
+
* ⟹ `'changed'`. Cache and return.
|
|
72
|
+
*
|
|
73
|
+
* Pure decision: holds no lock and does no artifact IO. The lock-interleave
|
|
74
|
+
* discipline lives in `runIntentCheckpointGate`.
|
|
75
|
+
*/
|
|
76
|
+
export declare function intentCheckpointEquivalenceGate(input: {
|
|
77
|
+
prior: IntentCheckpoint | undefined;
|
|
78
|
+
next: IntentCheckpoint | undefined;
|
|
79
|
+
judge: SemanticEquivalenceJudge;
|
|
80
|
+
judgeId: string;
|
|
81
|
+
normalizeConfig?: NormalizeConfig;
|
|
82
|
+
promptTemplateVersion?: string;
|
|
83
|
+
cache?: VerdictCache;
|
|
84
|
+
}): Promise<{
|
|
85
|
+
verdict: IntentCheckpointVerdict;
|
|
86
|
+
gateVersion: string;
|
|
87
|
+
judged: boolean;
|
|
88
|
+
}>;
|
|
89
|
+
/**
|
|
90
|
+
* A monotonic ledger/version token capturing the artifact-tree state at read.
|
|
91
|
+
* Any interleaved append moves it; comparing the read-time token to the
|
|
92
|
+
* post-judge token detects an interleave that must force a re-derive.
|
|
93
|
+
*/
|
|
94
|
+
export type LedgerVersionToken = string;
|
|
95
|
+
/**
|
|
96
|
+
* Run the intent_checkpoint gate under the O2 lock-interleave discipline.
|
|
97
|
+
*
|
|
98
|
+
* The judge is SLOW and runs OUTSIDE the held lock. Sequence per attempt:
|
|
99
|
+
* 1. Acquire the lock; read the current ledger/version token; release.
|
|
100
|
+
* 2. Run the bounded equivalence gate (judge) UNLOCKED.
|
|
101
|
+
* 3. Re-acquire the lock; read the token again. If unchanged, COMMIT the verdict
|
|
102
|
+
* under the lock and return. If an interleaved append moved the token,
|
|
103
|
+
* release and re-derive (bounded to `maxAttempts`).
|
|
104
|
+
* 4. On attempt exhaustion, take the lock ACROSS the judge for one final
|
|
105
|
+
* guaranteed-committing derivation, recording the fallback firing through the
|
|
106
|
+
* best-effort friction sink (CE-010 residual — never blocks the commit).
|
|
107
|
+
*
|
|
108
|
+
* `withLock` is the artifact-tree lock wrapper (e.g. `withFileLock` bound to the
|
|
109
|
+
* artifact-tree lock path); `commit` persists the decided verdict under the held
|
|
110
|
+
* lock and is the single mutation point.
|
|
111
|
+
*/
|
|
112
|
+
export declare function runIntentCheckpointGate<T>(deps: {
|
|
113
|
+
withLock: <R>(fn: () => Promise<R>) => Promise<R>;
|
|
114
|
+
readLedgerToken: () => Promise<LedgerVersionToken>;
|
|
115
|
+
gate: () => Promise<{
|
|
116
|
+
verdict: IntentCheckpointVerdict;
|
|
117
|
+
gateVersion: string;
|
|
118
|
+
}>;
|
|
119
|
+
commit: (verdict: IntentCheckpointVerdict) => Promise<T>;
|
|
120
|
+
/** Best-effort friction recording of the lock-across-judge fallback firing. */
|
|
121
|
+
artifactsDir?: string;
|
|
122
|
+
runId?: string;
|
|
123
|
+
maxAttempts?: number;
|
|
124
|
+
}): Promise<{
|
|
125
|
+
verdict: IntentCheckpointVerdict;
|
|
126
|
+
committed: T;
|
|
127
|
+
usedFallback: boolean;
|
|
128
|
+
}>;
|
|
129
|
+
//# sourceMappingURL=intentCheckpointGate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intentCheckpointGate.d.ts","sourceRoot":"","sources":["../../../src/audit/orchestrator/intentCheckpointGate.ts"],"names":[],"mappings":"AAwCA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,iEAAiE;AACjE,MAAM,MAAM,uBAAuB,GAAG,WAAW,GAAG,SAAS,CAAC;AAE9D;;;;;;GAMG;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,KAAK,EAAE;IAC7C,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;CACvB,KAAK,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;AAEjC;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,6EAA6E;IAC7E,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,QAAQ,CAAC,cAAc,EAAE,SAAS,CAAC,MAAM,gBAAgB,CAAC,EAAE,CAAC;CAC9D;AAED,mEAAmE;AACnE,eAAO,MAAM,wBAAwB,EAAE,eAGtC,CAAC;AAEF,wEAAwE;AACxE,eAAO,MAAM,mCAAmC,sCAAsC,CAAC;AAEvF;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,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AE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;IAClD,eAAe,EAAE,MAAM,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACnD,IAAI,EAAE,MAAM,OAAO,CAAC;QAAE,OAAO,EAAE,uBAAuB,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/E,MAAM,EAAE,CAAC,OAAO,EAAE,uBAAuB,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;IACzD,+EAA+E;IAC/E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,uBAAuB,CAAC;IAAC,SAAS,EAAE,CAAC,CAAC;IAAC,YAAY,EAAE,OAAO,CAAA;CAAE,CAAC,CAsDrF"}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* O2 — the intent_checkpoint semantic-equivalence gate.
|
|
3
|
+
*
|
|
4
|
+
* The ONE place that decides whether a re-confirmed intent_checkpoint value is
|
|
5
|
+
* semantically EQUIVALENT to the prior one (so dependents need not re-stale) or
|
|
6
|
+
* CHANGED (so the `intent_checkpoint_current` obligation must re-fire and
|
|
7
|
+
* downstream artifacts re-derive). A raw byte/JSON compare over-stales: a host
|
|
8
|
+
* re-confirming the same intent with reordered keys, whitespace, or a benign
|
|
9
|
+
* rephrase would needlessly invalidate the whole planning tree. A pure structural
|
|
10
|
+
* compare under-stales: a genuine intent change phrased to hash-collide on the
|
|
11
|
+
* normalized form would be silently dropped. So the gate is
|
|
12
|
+
* normalize-then-bounded-LLM-judge:
|
|
13
|
+
*
|
|
14
|
+
* 1. NORMALIZE both values deterministically (`normalizeCheckpointValue`). Equal
|
|
15
|
+
* normal forms ⟹ `unchanged` with no judge call (the common, free case).
|
|
16
|
+
* 2. Otherwise a BOUNDED LLM judge decides semantic equivalence. The judge is
|
|
17
|
+
* FAIL-SAFE: any uncertain / errored / malformed verdict resolves to
|
|
18
|
+
* `'changed'` (INV-O2-fail-3) — the gate never silently treats an
|
|
19
|
+
* unverified pair as equivalent.
|
|
20
|
+
*
|
|
21
|
+
* VERSION-KEYED VERDICT CACHE (INV-O2-inv-5): a judge verdict is cached on
|
|
22
|
+
* `(priorValue, newValue, gate_version)`. `gate_version` is a LOCALLY-resolved
|
|
23
|
+
* token — `hash(normalizeConfig) + judge-id token + prompt-template version` —
|
|
24
|
+
* computed with NO network/API probe (INV-O2-inv-6). Bumping the normalize
|
|
25
|
+
* config, swapping the locally-resolved judge, or revising the prompt template
|
|
26
|
+
* invalidates every cached verdict deterministically; an unchanged trio is a
|
|
27
|
+
* cache hit so a re-confirm never re-pays the judge.
|
|
28
|
+
*
|
|
29
|
+
* LOCK INTERLEAVE DISCIPLINE (INV-O2-inv-7 / inv-8, the O2 lock contract): the
|
|
30
|
+
* judge is SLOW and MUST run OUTSIDE the artifact-tree lock. `runIntentCheckpointGate`
|
|
31
|
+
* therefore: reads a ledger/version token under the lock, releases, runs the
|
|
32
|
+
* judge unlocked, then RE-ACQUIRES the lock and compares the token captured at
|
|
33
|
+
* read against the token now. Any interleaved append (token moved) forces a
|
|
34
|
+
* re-derive — bounded to N attempts. On exhaustion it falls back to taking the
|
|
35
|
+
* lock ACROSS the judge for one final guaranteed-committing derivation, and
|
|
36
|
+
* records that fallback firing through the best-effort friction sink (CE-010
|
|
37
|
+
* residual: a contended friction append under the held non-reentrant lock is
|
|
38
|
+
* swallowed best-effort, never blocking the commit).
|
|
39
|
+
*/
|
|
40
|
+
import { captureFrictionEvent, hashContent, stableStringify } from 'audit-tools/shared';
|
|
41
|
+
/** The single active normalization config (INV-O2-inv-5 input). */
|
|
42
|
+
export const DEFAULT_NORMALIZE_CONFIG = {
|
|
43
|
+
version: 'intent-checkpoint-normalize/v1',
|
|
44
|
+
semanticFields: ['scope_summary', 'intent_summary', 'free_form_intent', 'constraint_clauses'],
|
|
45
|
+
};
|
|
46
|
+
/** Static prompt-template version — bump on any judge-prompt change. */
|
|
47
|
+
export const INTENT_GATE_PROMPT_TEMPLATE_VERSION = 'intent-checkpoint-judge-prompt/v1';
|
|
48
|
+
/**
|
|
49
|
+
* Deterministically normalize an intent_checkpoint value to its semantic normal
|
|
50
|
+
* form. Only `config.semanticFields` participate; values are canonically
|
|
51
|
+
* serialized (stable key order) so reordering/whitespace is invisible. An absent
|
|
52
|
+
* checkpoint normalizes to a stable empty marker so present-vs-absent is a real
|
|
53
|
+
* difference, not a crash.
|
|
54
|
+
*/
|
|
55
|
+
export function normalizeCheckpointValue(checkpoint, config = DEFAULT_NORMALIZE_CONFIG) {
|
|
56
|
+
if (!checkpoint)
|
|
57
|
+
return stableStringify({ __absent: true });
|
|
58
|
+
const projection = {};
|
|
59
|
+
for (const field of config.semanticFields) {
|
|
60
|
+
const value = checkpoint[field];
|
|
61
|
+
if (value !== undefined) {
|
|
62
|
+
// free_form_intent is whitespace-insensitive at the edges; clauses/objects
|
|
63
|
+
// are compared structurally via the stable serializer.
|
|
64
|
+
projection[field] =
|
|
65
|
+
typeof value === 'string' ? value.trim() : value;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return stableStringify(projection);
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Compute the LOCALLY-resolved `gate_version` cache key component:
|
|
72
|
+
* `hash(normalizeConfig) + judge-id token + prompt-template version`.
|
|
73
|
+
*
|
|
74
|
+
* NO network/API probe (INV-O2-inv-6): the judge id is a caller-supplied LOCAL
|
|
75
|
+
* token (e.g. a configured model id string already known to the host, or a
|
|
76
|
+
* sentinel like `'host'`), never a live capability query. Bumping the normalize
|
|
77
|
+
* config, the judge id, or the prompt template deterministically invalidates the
|
|
78
|
+
* verdict cache.
|
|
79
|
+
*/
|
|
80
|
+
export function computeGateVersion(input) {
|
|
81
|
+
const normalizeConfig = input.normalizeConfig ?? DEFAULT_NORMALIZE_CONFIG;
|
|
82
|
+
const promptTemplateVersion = input.promptTemplateVersion ?? INTENT_GATE_PROMPT_TEMPLATE_VERSION;
|
|
83
|
+
const configHash = hashContent(stableStringify(normalizeConfig), { length: 16 });
|
|
84
|
+
return `${configHash}:${input.judgeId}:${promptTemplateVersion}`;
|
|
85
|
+
}
|
|
86
|
+
/** Build the deterministic verdict-cache key from the version-keyed trio. */
|
|
87
|
+
export function verdictCacheKey(priorNormalized, newNormalized, gateVersion) {
|
|
88
|
+
return hashContent(stableStringify([priorNormalized, newNormalized, gateVersion]));
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* The normalize-then-bounded-LLM-judge equivalence gate.
|
|
92
|
+
*
|
|
93
|
+
* 1. Normalize both values; equal normal forms ⟹ `unchanged`, no judge call.
|
|
94
|
+
* 2. Cache hit on (priorNormalized, newNormalized, gate_version) ⟹ cached verdict.
|
|
95
|
+
* 3. Otherwise run the bounded judge; FAIL-SAFE — uncertain/errored/non-boolean
|
|
96
|
+
* ⟹ `'changed'`. Cache and return.
|
|
97
|
+
*
|
|
98
|
+
* Pure decision: holds no lock and does no artifact IO. The lock-interleave
|
|
99
|
+
* discipline lives in `runIntentCheckpointGate`.
|
|
100
|
+
*/
|
|
101
|
+
export async function intentCheckpointEquivalenceGate(input) {
|
|
102
|
+
const config = input.normalizeConfig ?? DEFAULT_NORMALIZE_CONFIG;
|
|
103
|
+
const priorNormalized = normalizeCheckpointValue(input.prior, config);
|
|
104
|
+
const newNormalized = normalizeCheckpointValue(input.next, config);
|
|
105
|
+
const gateVersion = computeGateVersion({
|
|
106
|
+
normalizeConfig: config,
|
|
107
|
+
judgeId: input.judgeId,
|
|
108
|
+
promptTemplateVersion: input.promptTemplateVersion,
|
|
109
|
+
});
|
|
110
|
+
if (priorNormalized === newNormalized) {
|
|
111
|
+
return { verdict: 'unchanged', gateVersion, judged: false };
|
|
112
|
+
}
|
|
113
|
+
const cacheKey = verdictCacheKey(priorNormalized, newNormalized, gateVersion);
|
|
114
|
+
const cached = input.cache?.get(cacheKey);
|
|
115
|
+
if (cached !== undefined) {
|
|
116
|
+
return { verdict: cached, gateVersion, judged: false };
|
|
117
|
+
}
|
|
118
|
+
let verdict;
|
|
119
|
+
try {
|
|
120
|
+
const equivalent = await input.judge({ priorNormalized, newNormalized });
|
|
121
|
+
// FAIL-SAFE: only an explicit `true` resolves to unchanged; anything else
|
|
122
|
+
// (false, non-boolean, undefined) is treated as changed.
|
|
123
|
+
verdict = equivalent === true ? 'unchanged' : 'changed';
|
|
124
|
+
}
|
|
125
|
+
catch {
|
|
126
|
+
// FAIL-SAFE: a judge error never silently passes as equivalent.
|
|
127
|
+
verdict = 'changed';
|
|
128
|
+
}
|
|
129
|
+
input.cache?.set(cacheKey, verdict);
|
|
130
|
+
return { verdict, gateVersion, judged: true };
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Run the intent_checkpoint gate under the O2 lock-interleave discipline.
|
|
134
|
+
*
|
|
135
|
+
* The judge is SLOW and runs OUTSIDE the held lock. Sequence per attempt:
|
|
136
|
+
* 1. Acquire the lock; read the current ledger/version token; release.
|
|
137
|
+
* 2. Run the bounded equivalence gate (judge) UNLOCKED.
|
|
138
|
+
* 3. Re-acquire the lock; read the token again. If unchanged, COMMIT the verdict
|
|
139
|
+
* under the lock and return. If an interleaved append moved the token,
|
|
140
|
+
* release and re-derive (bounded to `maxAttempts`).
|
|
141
|
+
* 4. On attempt exhaustion, take the lock ACROSS the judge for one final
|
|
142
|
+
* guaranteed-committing derivation, recording the fallback firing through the
|
|
143
|
+
* best-effort friction sink (CE-010 residual — never blocks the commit).
|
|
144
|
+
*
|
|
145
|
+
* `withLock` is the artifact-tree lock wrapper (e.g. `withFileLock` bound to the
|
|
146
|
+
* artifact-tree lock path); `commit` persists the decided verdict under the held
|
|
147
|
+
* lock and is the single mutation point.
|
|
148
|
+
*/
|
|
149
|
+
export async function runIntentCheckpointGate(deps) {
|
|
150
|
+
const maxAttempts = deps.maxAttempts ?? 3;
|
|
151
|
+
for (let attempt = 0; attempt < maxAttempts; attempt += 1) {
|
|
152
|
+
// (1) Capture the read-time token under the lock, then release.
|
|
153
|
+
const readToken = await deps.withLock(() => deps.readLedgerToken());
|
|
154
|
+
// (2) Run the slow judge UNLOCKED.
|
|
155
|
+
const { verdict } = await deps.gate();
|
|
156
|
+
// (3) Re-acquire; if no interleave, commit under the lock.
|
|
157
|
+
const outcome = await deps.withLock(async () => {
|
|
158
|
+
const nowToken = await deps.readLedgerToken();
|
|
159
|
+
if (nowToken !== readToken) {
|
|
160
|
+
// Interleaved append — bail out of this attempt and re-derive.
|
|
161
|
+
return { committed: undefined, interleaved: true };
|
|
162
|
+
}
|
|
163
|
+
const committed = await deps.commit(verdict);
|
|
164
|
+
return { committed, interleaved: false };
|
|
165
|
+
});
|
|
166
|
+
if (!outcome.interleaved) {
|
|
167
|
+
return { verdict, committed: outcome.committed, usedFallback: false };
|
|
168
|
+
}
|
|
169
|
+
// else: token moved during the unlocked judge — loop and re-derive.
|
|
170
|
+
}
|
|
171
|
+
// (4) Attempts exhausted under repeated contention: take the lock ACROSS the
|
|
172
|
+
// judge for one final guaranteed-committing derivation. Record the fallback
|
|
173
|
+
// firing best-effort (CE-010 residual: a contended friction append under the
|
|
174
|
+
// held non-reentrant lock is swallowed best-effort, never blocking the commit).
|
|
175
|
+
return deps.withLock(async () => {
|
|
176
|
+
if (deps.artifactsDir && deps.runId) {
|
|
177
|
+
// Fire-and-forget but awaited: captureFrictionEvent is itself best-effort
|
|
178
|
+
// and never throws, so it can never block the commit below.
|
|
179
|
+
await captureFrictionEvent(deps.artifactsDir, deps.runId, {
|
|
180
|
+
id: `intent-gate-lock-across-judge-fallback:${deps.runId}`,
|
|
181
|
+
category: 'trap',
|
|
182
|
+
severity: 'low',
|
|
183
|
+
area: 'intent_checkpoint gate',
|
|
184
|
+
note: 'intent_checkpoint gate fell back to taking the lock across the LLM judge after ' +
|
|
185
|
+
`${maxAttempts} interleaved re-derive attempts; one guaranteed-committing derivation ran under the held lock.`,
|
|
186
|
+
}, 'audit-code');
|
|
187
|
+
}
|
|
188
|
+
const { verdict } = await deps.gate();
|
|
189
|
+
const committed = await deps.commit(verdict);
|
|
190
|
+
return { verdict, committed, usedFallback: true };
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
//# sourceMappingURL=intentCheckpointGate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intentCheckpointGate.js","sourceRoot":"","sources":["../../../src/audit/orchestrator/intentCheckpointGate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAkCxF,mEAAmE;AACnE,MAAM,CAAC,MAAM,wBAAwB,GAAoB;IACvD,OAAO,EAAE,gCAAgC;IACzC,cAAc,EAAE,CAAC,eAAe,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,oBAAoB,CAAC;CAC9F,CAAC;AAEF,wEAAwE;AACxE,MAAM,CAAC,MAAM,mCAAmC,GAAG,mCAAmC,CAAC;AAEvF;;;;;;GAMG;AACH,MAAM,UAAU,wBAAwB,CACtC,UAAwC,EACxC,SAA0B,wBAAwB;IAElD,IAAI,CAAC,UAAU;QAAE,OAAO,eAAe,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IAC5D,MAAM,UAAU,GAA4B,EAAE,CAAC;IAC/C,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,cAAc,EAAE,CAAC;QAC1C,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;QAChC,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,2EAA2E;YAC3E,uDAAuD;YACvD,UAAU,CAAC,KAAe,CAAC;gBACzB,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC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CAAC;QACD,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;QACtC,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC7C,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;IACpD,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { AuditResult } from "../types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Stamp a result with its seam-derived ledger keys (instance_id, identity_key,
|
|
4
|
+
* idempotency_key) when they are not already present. Idempotent: a record that
|
|
5
|
+
* already carries an idempotency_key keeps its identity/idempotency keys (so a
|
|
6
|
+
* replay hashes identically), and only re-mints an absent instance_id.
|
|
7
|
+
*/
|
|
8
|
+
export declare function stampLedgerKeys(result: AuditResult): AuditResult;
|
|
9
|
+
/**
|
|
10
|
+
* Append incoming results to the existing ledger, append-only and IDEMPOTENT on
|
|
11
|
+
* idempotency_key. Each appended record gets a fresh instance_id; a replay (an
|
|
12
|
+
* incoming result whose idempotency_key already exists in the ledger OR collides
|
|
13
|
+
* with an earlier record in the same batch) is a no-op. Distinct idempotency_keys
|
|
14
|
+
* always both persist — never merged, never last-writer-wins (fail-2).
|
|
15
|
+
*
|
|
16
|
+
* The existing ledger is returned by reference-extended copy; existing records
|
|
17
|
+
* are left untouched (append-only).
|
|
18
|
+
*/
|
|
19
|
+
export declare function appendResultsToLedger(existing: AuditResult[] | undefined, incoming: AuditResult[]): AuditResult[];
|
|
20
|
+
/**
|
|
21
|
+
* Re-associate ledger records to tasks. Groups one-to-many by `identity_key`
|
|
22
|
+
* (multiple distinct results legitimately share a coordinate — base vs. deepening
|
|
23
|
+
* / steward) and resolves logical identity by `idempotency_key`. Records are
|
|
24
|
+
* stamped on read if a legacy entry predates the keys, so a ledger written before
|
|
25
|
+
* O2 still groups correctly. RETAIN-UNASSIGNED: every record appears in exactly
|
|
26
|
+
* one group keyed by its identity_key — none is dropped because its task is
|
|
27
|
+
* absent (INV-3); the caller decides what to do with a group whose task is gone.
|
|
28
|
+
*/
|
|
29
|
+
export declare function groupLedgerByIdentity(ledger: AuditResult[]): Map<string, AuditResult[]>;
|
|
30
|
+
//# sourceMappingURL=ledger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ledger.d.ts","sourceRoot":"","sources":["../../../src/audit/orchestrator/ledger.ts"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAoB/C;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,WAAW,GAAG,WAAW,CAwBhE;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,WAAW,EAAE,GAAG,SAAS,EACnC,QAAQ,EAAE,WAAW,EAAE,GACtB,WAAW,EAAE,CAkBf;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,WAAW,EAAE,GACpB,GAAG,CAAC,MAAM,EAAE,WAAW,EAAE,CAAC,CAS5B"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* O2 — the append-only, instance-keyed, idempotent audit-results ledger.
|
|
3
|
+
*
|
|
4
|
+
* `audit_results.jsonl` is the cumulative store of every accepted AuditResult.
|
|
5
|
+
* This module is the SOLE place the ledger grows, so its three invariants hold
|
|
6
|
+
* by construction (never by a caller remembering them):
|
|
7
|
+
*
|
|
8
|
+
* - APPEND-ONLY, INSTANCE-KEYED (INV-1 / CE-001 / fail-2): every appended record
|
|
9
|
+
* carries a fresh per-record `instance_id` minted from the shared seam
|
|
10
|
+
* (`newInstanceId`). The ledger keys on this, so identity_key / idempotency_key
|
|
11
|
+
* are grouping/idempotency keys, NEVER primary keys — distinct records are never
|
|
12
|
+
* merged or last-writer-wins'd.
|
|
13
|
+
*
|
|
14
|
+
* - IDEMPOTENT ON idempotency_key (INV-2 / CE-001b / fail-4): a record is appended
|
|
15
|
+
* only when no existing record shares its `idempotency_key`. A replay of the same
|
|
16
|
+
* logical result is therefore a no-op. Two genuinely-different same-coordinate
|
|
17
|
+
* results (base vs. deepening / steward / re-dispatch) carry distinct
|
|
18
|
+
* discriminators → distinct idempotency_keys → both persist (CE-001).
|
|
19
|
+
*
|
|
20
|
+
* - RETAIN-UNASSIGNED (INV-3): re-association groups records to tasks by
|
|
21
|
+
* `identity_key` one-to-many and resolves logical identity by `idempotency_key`.
|
|
22
|
+
* A result whose owning task is absent from the active manifest is NEVER pruned —
|
|
23
|
+
* it stays in the ledger, just un-associated.
|
|
24
|
+
*
|
|
25
|
+
* All three keys are imported from the single content-key seam
|
|
26
|
+
* (`src/shared/contentKey.ts`); this module never re-derives a key.
|
|
27
|
+
*/
|
|
28
|
+
import { buildResultContentDiscriminator, identityKey, idempotencyKey, newInstanceId, } from "audit-tools/shared";
|
|
29
|
+
/**
|
|
30
|
+
* Deterministic, TOOL-OWNED mapping from a result's coordinate to its emit
|
|
31
|
+
* source. The discriminator recipe lives in the seam; the SOURCE selection lives
|
|
32
|
+
* here because it is audit-domain knowledge: selective-deepening / steward tasks
|
|
33
|
+
* are minted with `deepening:` / `steward:` task-id prefixes (see
|
|
34
|
+
* `selectiveDeepening/shared.ts#taskIdFor`), so a deepening or steward result
|
|
35
|
+
* that shares a base result's {unit_id, lens, pass_id} coordinate legitimately
|
|
36
|
+
* gets a DISTINCT idempotency_key and both persist (CE-001). Anything else is a
|
|
37
|
+
* base result. (Re-dispatch attempts are not yet stamped on results; when O3
|
|
38
|
+
* adds an attempt counter it maps to `source: 'redispatch'` here.)
|
|
39
|
+
*/
|
|
40
|
+
function emitSourceFor(result) {
|
|
41
|
+
const taskId = result.task_id ?? "";
|
|
42
|
+
if (taskId.startsWith("steward:"))
|
|
43
|
+
return "steward";
|
|
44
|
+
if (taskId.startsWith("deepening:"))
|
|
45
|
+
return "deepening";
|
|
46
|
+
return "base";
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Stamp a result with its seam-derived ledger keys (instance_id, identity_key,
|
|
50
|
+
* idempotency_key) when they are not already present. Idempotent: a record that
|
|
51
|
+
* already carries an idempotency_key keeps its identity/idempotency keys (so a
|
|
52
|
+
* replay hashes identically), and only re-mints an absent instance_id.
|
|
53
|
+
*/
|
|
54
|
+
export function stampLedgerKeys(result) {
|
|
55
|
+
const identity_key = result.identity_key ??
|
|
56
|
+
identityKey({
|
|
57
|
+
unit_id: result.unit_id,
|
|
58
|
+
lens: result.lens,
|
|
59
|
+
pass_id: result.pass_id,
|
|
60
|
+
});
|
|
61
|
+
const idempotency_key = result.idempotency_key ??
|
|
62
|
+
idempotencyKey({
|
|
63
|
+
unit_id: result.unit_id,
|
|
64
|
+
lens: result.lens,
|
|
65
|
+
pass_id: result.pass_id,
|
|
66
|
+
result_content_discriminator: buildResultContentDiscriminator({
|
|
67
|
+
source: emitSourceFor(result),
|
|
68
|
+
}),
|
|
69
|
+
});
|
|
70
|
+
return {
|
|
71
|
+
...result,
|
|
72
|
+
instance_id: result.instance_id ?? newInstanceId(),
|
|
73
|
+
identity_key,
|
|
74
|
+
idempotency_key,
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Append incoming results to the existing ledger, append-only and IDEMPOTENT on
|
|
79
|
+
* idempotency_key. Each appended record gets a fresh instance_id; a replay (an
|
|
80
|
+
* incoming result whose idempotency_key already exists in the ledger OR collides
|
|
81
|
+
* with an earlier record in the same batch) is a no-op. Distinct idempotency_keys
|
|
82
|
+
* always both persist — never merged, never last-writer-wins (fail-2).
|
|
83
|
+
*
|
|
84
|
+
* The existing ledger is returned by reference-extended copy; existing records
|
|
85
|
+
* are left untouched (append-only).
|
|
86
|
+
*/
|
|
87
|
+
export function appendResultsToLedger(existing, incoming) {
|
|
88
|
+
const ledger = [...(existing ?? [])];
|
|
89
|
+
const seen = new Set();
|
|
90
|
+
for (const record of ledger) {
|
|
91
|
+
const key = record.idempotency_key;
|
|
92
|
+
if (typeof key === "string")
|
|
93
|
+
seen.add(key);
|
|
94
|
+
}
|
|
95
|
+
for (const raw of incoming) {
|
|
96
|
+
const stamped = stampLedgerKeys(raw);
|
|
97
|
+
const key = stamped.idempotency_key;
|
|
98
|
+
if (seen.has(key)) {
|
|
99
|
+
// Replay of an already-ingested logical result — no-op (INV-2).
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
seen.add(key);
|
|
103
|
+
ledger.push(stamped);
|
|
104
|
+
}
|
|
105
|
+
return ledger;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Re-associate ledger records to tasks. Groups one-to-many by `identity_key`
|
|
109
|
+
* (multiple distinct results legitimately share a coordinate — base vs. deepening
|
|
110
|
+
* / steward) and resolves logical identity by `idempotency_key`. Records are
|
|
111
|
+
* stamped on read if a legacy entry predates the keys, so a ledger written before
|
|
112
|
+
* O2 still groups correctly. RETAIN-UNASSIGNED: every record appears in exactly
|
|
113
|
+
* one group keyed by its identity_key — none is dropped because its task is
|
|
114
|
+
* absent (INV-3); the caller decides what to do with a group whose task is gone.
|
|
115
|
+
*/
|
|
116
|
+
export function groupLedgerByIdentity(ledger) {
|
|
117
|
+
const byIdentity = new Map();
|
|
118
|
+
for (const raw of ledger) {
|
|
119
|
+
const record = stampLedgerKeys(raw);
|
|
120
|
+
const group = byIdentity.get(record.identity_key) ?? [];
|
|
121
|
+
group.push(record);
|
|
122
|
+
byIdentity.set(record.identity_key, group);
|
|
123
|
+
}
|
|
124
|
+
return byIdentity;
|
|
125
|
+
}
|
|
126
|
+
//# sourceMappingURL=ledger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ledger.js","sourceRoot":"","sources":["../../../src/audit/orchestrator/ledger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,EA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,IAAI,MAAM,EAAE,CAAC;QAC5B,MAAM,GAAG,GAAG,MAAM,CAAC,eAAe,CAAC;QACnC,IAAI,OAAO,GAAG,KAAK,QAAQ;YAAE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC7C,CAAC;IACD,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE,CAAC;QAC3B,MAAM,OAAO,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;QACrC,MAAM,GAAG,GAAG,OAAO,CAAC,eAAgB,CAAC;QACrC,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YAClB,gEAAgE;YAChE,SAAS;QACX,CAAC;QACD,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACd,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACvB,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,qBAAqB,CACnC,MAAqB;IAErB,MAAM,UAAU,GAAG,IAAI,GAAG,EAAyB,CAAC;IACpD,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;QACzB,MAAM,MAAM,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;QACpC,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,YAAa,CAAC,IAAI,EAAE,CAAC;QACzD,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACnB,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,YAAa,EAAE,KAAK,CAAC,CAAC;IAC9C,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type FrictionTriageDecision } from "audit-tools/shared";
|
|
1
2
|
import type { ArtifactBundle } from "../io/artifacts.js";
|
|
2
3
|
import type { AuditObligation, AuditState } from "../types/auditState.js";
|
|
3
4
|
export interface NextStepDecision {
|
|
@@ -15,35 +16,16 @@ export declare const FRICTION_CAPTURE_OBLIGATION_ID = "friction_capture_current"
|
|
|
15
16
|
export declare const PRIORITY: string[];
|
|
16
17
|
export declare function findObligation(obligations: AuditObligation[]): AuditObligation | undefined;
|
|
17
18
|
export declare function decideNextStep(bundle: ArtifactBundle): NextStepDecision;
|
|
18
|
-
/** The terminal friction-capture close-out decision for the audit half. */
|
|
19
|
-
export interface AuditFrictionCloseoutDecision {
|
|
20
|
-
/**
|
|
21
|
-
* "capture" → the close-out must fire this pass (a friction step is emitted and a
|
|
22
|
-
* degrade-clean record persisted). "captured" → already recorded for this run_id;
|
|
23
|
-
* the close-out is satisfied and the run proceeds to its complete/present terminal.
|
|
24
|
-
*/
|
|
25
|
-
action: "capture" | "captured";
|
|
26
|
-
/** The run_id-keyed friction record path (always set, for the handoff pointer). */
|
|
27
|
-
recordPath: string;
|
|
28
|
-
}
|
|
29
19
|
/**
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* the close-out fires at most once per run.
|
|
40
|
-
* - PARITY: identical shape + persist helper to the remediate side (single-sourced
|
|
41
|
-
* in `audit-tools/shared`), so the two halves cannot drift.
|
|
42
|
-
* - NEVER couples to any repo's backlog doc — the record lives under the run's own
|
|
43
|
-
* artifacts dir.
|
|
44
|
-
*
|
|
45
|
-
* Returns "capture" the first time (the host should be prompted to optionally enrich
|
|
46
|
-
* the persisted record), "captured" thereafter.
|
|
20
|
+
* The terminal friction-TRIAGE close-out for the audit half. Thin delegation to the
|
|
21
|
+
* single-sourced `decideFrictionTriage` (`audit-tools/shared`) so the triage shape,
|
|
22
|
+
* disposition vocabulary, blocking semantics, and close-out logic cannot drift from
|
|
23
|
+
* the remediate half. Drops the former false-green (an empty up-front record no
|
|
24
|
+
* longer satisfies): the close-out blocks ("dispose") until every captured
|
|
25
|
+
* mechanical event AND every surfaced agent-feedback reflection carries a
|
|
26
|
+
* disposition; an empty set (zero events AND zero reflections) is trivially
|
|
27
|
+
* "disposed". Keyed only off `(artifactsDir, runId)`; never coupled to any repo's
|
|
28
|
+
* backlog doc.
|
|
47
29
|
*/
|
|
48
|
-
export declare function decideAuditFrictionCloseout(artifactsDir: string, runId: string): Promise<
|
|
30
|
+
export declare function decideAuditFrictionCloseout(artifactsDir: string, runId: string): Promise<FrictionTriageDecision>;
|
|
49
31
|
//# sourceMappingURL=nextStep.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nextStep.d.ts","sourceRoot":"","sources":["../../../src/audit/orchestrator/nextStep.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"nextStep.d.ts","sourceRoot":"","sources":["../../../src/audit/orchestrator/nextStep.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAI1E,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,UAAU,CAAC;IAClB,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,6BAA6B,CAAC;AAEzE,eAAO,MAAM,QAAQ,EAAE,MAAM,EAwB5B,CAAC;AAMF,wBAAgB,cAAc,CAC5B,WAAW,EAAE,eAAe,EAAE,GAC7B,eAAe,GAAG,SAAS,CAE7B;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,cAAc,GAAG,gBAAgB,CAqCvE;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,2BAA2B,CAC/C,YAAY,EAAE,MAAM,EACpB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,sBAAsB,CAAC,CAEjC"}
|