audit-tools 0.30.5 → 0.30.7
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/dispatch/packetPrompt.d.ts.map +1 -1
- package/dist/audit/cli/dispatch/packetPrompt.js +9 -0
- package/dist/audit/cli/dispatch/packetPrompt.js.map +1 -1
- package/dist/audit/orchestrator/dependencyMap.js +2 -1
- package/dist/audit/orchestrator/dependencyMap.js.map +1 -1
- package/dist/audit/orchestrator/state.d.ts.map +1 -1
- package/dist/audit/orchestrator/state.js +2 -1
- package/dist/audit/orchestrator/state.js.map +1 -1
- package/dist/audit/orchestrator/synthesisExecutors.d.ts.map +1 -1
- package/dist/audit/orchestrator/synthesisExecutors.js +3 -2
- package/dist/audit/orchestrator/synthesisExecutors.js.map +1 -1
- package/dist/remediate/dispatch/amendmentClaim.d.ts +7 -0
- package/dist/remediate/dispatch/amendmentClaim.d.ts.map +1 -1
- package/dist/remediate/dispatch/amendmentClaim.js +7 -0
- package/dist/remediate/dispatch/amendmentClaim.js.map +1 -1
- package/dist/remediate/dispatch/ownershipRegistry.d.ts +88 -2
- package/dist/remediate/dispatch/ownershipRegistry.d.ts.map +1 -1
- package/dist/remediate/dispatch/ownershipRegistry.js +224 -11
- package/dist/remediate/dispatch/ownershipRegistry.js.map +1 -1
- package/dist/remediate/dispatch/ownershipScheduler.d.ts +48 -0
- package/dist/remediate/dispatch/ownershipScheduler.d.ts.map +1 -0
- package/dist/remediate/dispatch/ownershipScheduler.js +100 -0
- package/dist/remediate/dispatch/ownershipScheduler.js.map +1 -0
- package/dist/remediate/steps/nextStep.d.ts +17 -2
- package/dist/remediate/steps/nextStep.d.ts.map +1 -1
- package/dist/remediate/steps/nextStep.js +44 -22
- package/dist/remediate/steps/nextStep.js.map +1 -1
- package/dist/shared/repair/brokeredDispatch.d.ts +1 -1
- package/package.json +3 -2
|
@@ -10,8 +10,51 @@
|
|
|
10
10
|
* Stale in-flight claims (node ID not in the current implementation DAG) are
|
|
11
11
|
* purged on load.
|
|
12
12
|
*/
|
|
13
|
-
import { writeFileSync, readFileSync, mkdirSync } from "node:fs";
|
|
14
|
-
import { dirname } from "node:path";
|
|
13
|
+
import { writeFileSync, readFileSync, mkdirSync, realpathSync } from "node:fs";
|
|
14
|
+
import { dirname, isAbsolute, resolve, sep } from "node:path";
|
|
15
|
+
/**
|
|
16
|
+
* Whether the host filesystem is case-insensitive for path identity. win32 and
|
|
17
|
+
* darwin default to case-insensitive volumes; linux is case-sensitive. Used so
|
|
18
|
+
* `src/A.ts` and `src/a.ts` collide on a Windows/macOS volume (one physical
|
|
19
|
+
* file) but stay distinct on Linux — INV-SOO-09 canonical physical-file identity.
|
|
20
|
+
*/
|
|
21
|
+
const CASE_INSENSITIVE_FS = process.platform === "win32" || process.platform === "darwin";
|
|
22
|
+
/**
|
|
23
|
+
* The single-sourced path canonicalization for ownership identity (INV-SOO-09).
|
|
24
|
+
*
|
|
25
|
+
* Resolves a path to a stable physical-file key: absolute (against `root` when
|
|
26
|
+
* supplied, else cwd), `..`/`.`-collapsed (via `resolve`), separators normalized
|
|
27
|
+
* to `/`, and case-folded on a case-insensitive filesystem. All spellings of one
|
|
28
|
+
* file therefore collide, closing the rel/abs/case/`..` mismatch (CE-004).
|
|
29
|
+
*
|
|
30
|
+
* Symlink identity is a RECORDED RESIDUAL, not silently treated as disjoint
|
|
31
|
+
* (INV-SOO-09 / fail-3): when `resolveSymlinks` is set and the path exists, the
|
|
32
|
+
* realpath is folded in so `link.ts → x.ts` collides; when realpath is
|
|
33
|
+
* unavailable (path absent, or FS symlink resolution out of scope) the lexical
|
|
34
|
+
* canonical key is used and the unresolved case degrades to the downstream merge
|
|
35
|
+
* guard rather than being asserted disjoint here.
|
|
36
|
+
*
|
|
37
|
+
* This is the ONLY normalization scheme for ownership identity — callers must
|
|
38
|
+
* not introduce a second one (failure-mode: path-identity mismatch).
|
|
39
|
+
*/
|
|
40
|
+
export function canonicalizeFilePath(path, opts = {}) {
|
|
41
|
+
const { root, resolveSymlinks = false } = opts;
|
|
42
|
+
let abs = isAbsolute(path)
|
|
43
|
+
? resolve(path)
|
|
44
|
+
: resolve(root ?? process.cwd(), path);
|
|
45
|
+
if (resolveSymlinks) {
|
|
46
|
+
try {
|
|
47
|
+
abs = realpathSync(abs);
|
|
48
|
+
}
|
|
49
|
+
catch {
|
|
50
|
+
// Symlink/realpath unavailable (path absent or FS resolution out of scope):
|
|
51
|
+
// keep the lexical key — the unresolved symlink case is a recorded residual
|
|
52
|
+
// handled by the downstream merge guard, never asserted disjoint here.
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
const slashed = abs.split(sep).join("/");
|
|
56
|
+
return CASE_INSENSITIVE_FS ? slashed.toLowerCase() : slashed;
|
|
57
|
+
}
|
|
15
58
|
/**
|
|
16
59
|
* OwnershipRegistry tracks write-scope ownership per DAG node.
|
|
17
60
|
*
|
|
@@ -32,11 +75,26 @@ export class OwnershipRegistry {
|
|
|
32
75
|
* claimed this path via an amendment.
|
|
33
76
|
*/
|
|
34
77
|
amendmentClaims = new Map();
|
|
78
|
+
/**
|
|
79
|
+
* canonical path → nodeId: scheduling-time in-flight WRITER claim. Lifted from
|
|
80
|
+
* the merge-time amendment signal into scheduling-time admission (INV-SOO):
|
|
81
|
+
* the rolling scheduler holds at most one in-flight writer per canonical path,
|
|
82
|
+
* so same-file nodes serialize while different-file nodes parallelize. Keyed by
|
|
83
|
+
* `canonicalizeFilePath` so all spellings of one file collide (INV-SOO-09).
|
|
84
|
+
*/
|
|
85
|
+
inFlightClaims = new Map();
|
|
35
86
|
/** Optional path for checkpoint persistence. When provided, every mutation
|
|
36
87
|
* atomically writes the registry state to this path. */
|
|
37
88
|
checkpointPath;
|
|
38
|
-
|
|
89
|
+
/** Repo root for canonicalizing relative scope/claim paths to physical identity. */
|
|
90
|
+
root;
|
|
91
|
+
constructor(checkpointPath, root) {
|
|
39
92
|
this.checkpointPath = checkpointPath;
|
|
93
|
+
this.root = root;
|
|
94
|
+
}
|
|
95
|
+
/** Canonicalize a path to physical-file identity under this registry's root. */
|
|
96
|
+
canon(path) {
|
|
97
|
+
return canonicalizeFilePath(path, { root: this.root });
|
|
40
98
|
}
|
|
41
99
|
/**
|
|
42
100
|
* Initialize the registry from the implementation DAG nodes. Each node's
|
|
@@ -62,22 +120,48 @@ export class OwnershipRegistry {
|
|
|
62
120
|
* - `'contended'` — path has been claimed by a live parallel sibling; routes to seam protocol.
|
|
63
121
|
*/
|
|
64
122
|
claimAmendment(nodeId, path) {
|
|
65
|
-
|
|
123
|
+
const key = this.canon(path);
|
|
124
|
+
// Check if path is in any OTHER node's contract scope (canonical identity).
|
|
66
125
|
for (const [scopeNodeId, scopePaths] of this.contractScopes) {
|
|
67
|
-
if (scopeNodeId !== nodeId &&
|
|
126
|
+
if (scopeNodeId !== nodeId && this._scopeHasCanonical(scopePaths, key)) {
|
|
68
127
|
return "owned";
|
|
69
128
|
}
|
|
70
129
|
}
|
|
71
|
-
// Check if path has already been amendment-claimed by a live parallel sibling
|
|
72
|
-
|
|
130
|
+
// Check if path has already been amendment-claimed by a live parallel sibling
|
|
131
|
+
// (canonical identity, so a differently-spelled same file collides).
|
|
132
|
+
const existingClaimant = this._amendmentClaimantByCanonical(key);
|
|
73
133
|
if (existingClaimant !== undefined && existingClaimant !== nodeId) {
|
|
74
134
|
return "contended";
|
|
75
135
|
}
|
|
76
|
-
// Grant:
|
|
136
|
+
// Grant-time disjointness (INV-SOO-06 / CE-001): refuse a scope-widening grant
|
|
137
|
+
// onto a file another in-flight node is actively writing, so a post-admission
|
|
138
|
+
// grant can never make the in-flight owned-file union non-disjoint.
|
|
139
|
+
const inFlightOwner = this.inFlightClaims.get(key);
|
|
140
|
+
if (inFlightOwner !== undefined && inFlightOwner !== nodeId) {
|
|
141
|
+
return "contended";
|
|
142
|
+
}
|
|
143
|
+
// Grant: record the claim under the ORIGINAL spelling (merge attribution reads
|
|
144
|
+
// the raw path); canonical identity is applied on comparison, not on storage.
|
|
77
145
|
this.amendmentClaims.set(path, nodeId);
|
|
78
146
|
this._persist();
|
|
79
147
|
return "granted";
|
|
80
148
|
}
|
|
149
|
+
/** The node holding an amendment claim whose canonical key matches `canonicalKey`. */
|
|
150
|
+
_amendmentClaimantByCanonical(canonicalKey) {
|
|
151
|
+
for (const [p, claimant] of this.amendmentClaims) {
|
|
152
|
+
if (this.canon(p) === canonicalKey)
|
|
153
|
+
return claimant;
|
|
154
|
+
}
|
|
155
|
+
return undefined;
|
|
156
|
+
}
|
|
157
|
+
/** Whether a contract-scope set contains a path with the given canonical key. */
|
|
158
|
+
_scopeHasCanonical(scopePaths, canonicalKey) {
|
|
159
|
+
for (const p of scopePaths) {
|
|
160
|
+
if (this.canon(p) === canonicalKey)
|
|
161
|
+
return true;
|
|
162
|
+
}
|
|
163
|
+
return false;
|
|
164
|
+
}
|
|
81
165
|
/**
|
|
82
166
|
* Release all amendment claims for `nodeId`. Call when a node finishes
|
|
83
167
|
* (merge or triage). Makes the previously claimed files available again.
|
|
@@ -114,18 +198,147 @@ export class OwnershipRegistry {
|
|
|
114
198
|
* the path is unowned.
|
|
115
199
|
*/
|
|
116
200
|
contractOwner(path) {
|
|
201
|
+
const key = this.canon(path);
|
|
117
202
|
for (const [nodeId, scopePaths] of this.contractScopes) {
|
|
118
|
-
if (
|
|
203
|
+
if (this._scopeHasCanonical(scopePaths, key))
|
|
119
204
|
return nodeId;
|
|
120
205
|
}
|
|
121
206
|
return undefined;
|
|
122
207
|
}
|
|
123
208
|
/**
|
|
124
209
|
* Return the node ID that has an in-flight amendment claim for this path, or
|
|
125
|
-
* undefined if uncontended.
|
|
210
|
+
* undefined if uncontended. Canonical identity (INV-SOO-09).
|
|
126
211
|
*/
|
|
127
212
|
amendmentClaimant(path) {
|
|
128
|
-
|
|
213
|
+
// Exact-spelling hit first (cheap), else canonical match.
|
|
214
|
+
return (this.amendmentClaims.get(path) ??
|
|
215
|
+
this._amendmentClaimantByCanonical(this.canon(path)));
|
|
216
|
+
}
|
|
217
|
+
// ── Scheduling-time file-ownership queries (INV-SOO) ───────────────────────
|
|
218
|
+
/**
|
|
219
|
+
* Canonical write-scope of a node for scheduling: its contract scope ∪ live
|
|
220
|
+
* amendment claims, each canonicalized to physical-file identity (INV-SOO-09).
|
|
221
|
+
*/
|
|
222
|
+
canonicalScope(nodeId) {
|
|
223
|
+
const out = new Set();
|
|
224
|
+
for (const p of this.contractScopes.get(nodeId) ?? [])
|
|
225
|
+
out.add(this.canon(p));
|
|
226
|
+
for (const [key, claimant] of this.amendmentClaims) {
|
|
227
|
+
if (claimant === nodeId)
|
|
228
|
+
out.add(key);
|
|
229
|
+
}
|
|
230
|
+
return out;
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* The union of canonical file paths owned by currently in-flight nodes (their
|
|
234
|
+
* scheduling claims). The scheduling-time complement of the merge-time owner
|
|
235
|
+
* signal — a path in this set has a live writer, so a same-file node must wait
|
|
236
|
+
* (INV-SOO-01).
|
|
237
|
+
*/
|
|
238
|
+
filesClaimedByInFlight() {
|
|
239
|
+
return new Set(this.inFlightClaims.keys());
|
|
240
|
+
}
|
|
241
|
+
/** The node holding the in-flight scheduling claim on `path`, or undefined. */
|
|
242
|
+
inFlightOwner(path) {
|
|
243
|
+
return this.inFlightClaims.get(this.canon(path));
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Whether `nodeId`'s declared write-scope is file-ownership-DISJOINT from the
|
|
247
|
+
* current in-flight set — i.e. it shares no canonical path with any OTHER
|
|
248
|
+
* in-flight node, so it can be admitted without two in-flight writers per file
|
|
249
|
+
* (INV-SOO-01).
|
|
250
|
+
*
|
|
251
|
+
* Conservative empty-scope gating (INV-SOO-01 / CE-008): a node whose declared
|
|
252
|
+
* scope canonicalizes to the EMPTY set (unresolved/undeclared) is treated as
|
|
253
|
+
* NON-disjoint — it is NOT admitted as vacuously-disjoint, because an
|
|
254
|
+
* under-declared writer could collide with anything. Such a node admits only
|
|
255
|
+
* when no other node is in flight (`requireSoloWhenEmpty`).
|
|
256
|
+
*/
|
|
257
|
+
isFileOwnershipDisjoint(nodeId, declaredScope) {
|
|
258
|
+
const scope = new Set();
|
|
259
|
+
for (const p of declaredScope)
|
|
260
|
+
scope.add(this.canon(p));
|
|
261
|
+
if (scope.size === 0) {
|
|
262
|
+
// Empty/unresolved scope: disjoint only if nothing else is in flight.
|
|
263
|
+
for (const owner of this.inFlightClaims.values()) {
|
|
264
|
+
if (owner !== nodeId)
|
|
265
|
+
return false;
|
|
266
|
+
}
|
|
267
|
+
return true;
|
|
268
|
+
}
|
|
269
|
+
for (const key of scope) {
|
|
270
|
+
const owner = this.inFlightClaims.get(key);
|
|
271
|
+
if (owner !== undefined && owner !== nodeId)
|
|
272
|
+
return false;
|
|
273
|
+
}
|
|
274
|
+
return true;
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Record `nodeId`'s scheduling-time in-flight WRITER claim over `paths`
|
|
278
|
+
* (declared scope, canonicalized). Idempotent for a node re-claiming its own
|
|
279
|
+
* paths (a rate-limited re-queue). Call BEFORE dispatching the node.
|
|
280
|
+
*/
|
|
281
|
+
claimInFlight(nodeId, paths) {
|
|
282
|
+
let changed = false;
|
|
283
|
+
for (const p of paths) {
|
|
284
|
+
const key = this.canon(p);
|
|
285
|
+
const existing = this.inFlightClaims.get(key);
|
|
286
|
+
if (existing === nodeId)
|
|
287
|
+
continue;
|
|
288
|
+
// Caller guarantees disjointness via isFileOwnershipDisjoint; a foreign
|
|
289
|
+
// owner here is a precondition violation, surfaced rather than overwritten.
|
|
290
|
+
if (existing !== undefined && existing !== nodeId) {
|
|
291
|
+
throw new Error(`OwnershipRegistry.claimInFlight: ${key} already in-flight by ${existing}, ` +
|
|
292
|
+
`cannot claim for ${nodeId} (file-ownership-disjoint precondition violated).`);
|
|
293
|
+
}
|
|
294
|
+
this.inFlightClaims.set(key, nodeId);
|
|
295
|
+
changed = true;
|
|
296
|
+
}
|
|
297
|
+
if (changed)
|
|
298
|
+
this._persist();
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Release `nodeId`'s scheduling-time in-flight claims (and any amendment claims
|
|
302
|
+
* it holds). Call on a RELEASING disposition (INV-SOO-10):
|
|
303
|
+
* blocked-final / abandoned / merged / failed-no-retry / no-op-satisfied. A
|
|
304
|
+
* blocked-PENDING-triage node is still live and must NOT call this — it retains.
|
|
305
|
+
*/
|
|
306
|
+
releaseInFlight(nodeId) {
|
|
307
|
+
let changed = false;
|
|
308
|
+
for (const [key, owner] of this.inFlightClaims) {
|
|
309
|
+
if (owner === nodeId) {
|
|
310
|
+
this.inFlightClaims.delete(key);
|
|
311
|
+
changed = true;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
if (changed)
|
|
315
|
+
this._persist();
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* Atomic triage-retry claim hand-off A→A' (INV-SOO-07): transfer all of the
|
|
319
|
+
* failed node's in-flight + amendment claims to its successor in one step, so
|
|
320
|
+
* there is no observable window in which both hold the file, nor one in which a
|
|
321
|
+
* foreign same-file node is admitted between release and re-claim. A no-op when
|
|
322
|
+
* `fromNodeId === toNodeId`.
|
|
323
|
+
*/
|
|
324
|
+
handoffInFlight(fromNodeId, toNodeId) {
|
|
325
|
+
if (fromNodeId === toNodeId)
|
|
326
|
+
return;
|
|
327
|
+
let changed = false;
|
|
328
|
+
for (const [key, owner] of this.inFlightClaims) {
|
|
329
|
+
if (owner === fromNodeId) {
|
|
330
|
+
this.inFlightClaims.set(key, toNodeId);
|
|
331
|
+
changed = true;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
for (const [key, owner] of this.amendmentClaims) {
|
|
335
|
+
if (owner === fromNodeId) {
|
|
336
|
+
this.amendmentClaims.set(key, toNodeId);
|
|
337
|
+
changed = true;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
if (changed)
|
|
341
|
+
this._persist();
|
|
129
342
|
}
|
|
130
343
|
/** Serialize to a plain JSON-safe object. */
|
|
131
344
|
serialize() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ownershipRegistry.js","sourceRoot":"","sources":["../../../src/remediate/dispatch/ownershipRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"ownershipRegistry.js","sourceRoot":"","sources":["../../../src/remediate/dispatch/ownershipRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC/E,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAE9D;;;;;GAKG;AACH,MAAM,mBAAmB,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,IAAI,OAAO,CAAC,QAAQ,KAAK,QAAQ,CAAC;AAE1F;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,oBAAoB,CAClC,IAAY,EACZ,OAAqD,EAAE;IAEvD,MAAM,EAAE,IAAI,EAAE,eAAe,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC;IAC/C,IAAI,GAAG,GAAG,UAAU,CAAC,IAAI,CAAC;QACxB,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;QACf,CAAC,CAAC,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC;IACzC,IAAI,eAAe,EAAE,CAAC;QACpB,IAAI,CAAC;YACH,GAAG,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;QAC1B,CAAC;QAAC,MAAM,CAAC;YACP,4EAA4E;YAC5E,4EAA4E;YAC5E,uEAAuE;QACzE,CAAC;IACH,CAAC;IACD,MAAM,OAA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AW,CAAC;QAChB,IAAI,CAAC;YACH,GAAG,GAAG,YAAY,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;QAC7C,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,IAAI,IAAa,CAAC;QAClB,IAAI,CAAC;YACH,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACzB,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,IACE,OAAO,IAAI,KAAK,QAAQ;YACxB,IAAI,KAAK,IAAI;YACb,CAAC,CAAC,gBAAgB,IAAI,IAAI,CAAC;YAC3B,CAAC,CAAC,iBAAiB,IAAI,IAAI,CAAC,EAC5B,CAAC;YACD,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,OAAO,iBAAiB,CAAC,QAAQ,CAAC,IAA6B,EAAE,YAAY,EAAE,cAAc,CAAC,CAAC;IACjG,CAAC;CACF"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File-ownership-disjoint admission scheduling (INV-SOO-01..10).
|
|
3
|
+
*
|
|
4
|
+
* The rolling engine dispatches an eligible dependency LEVEL (deps verified-
|
|
5
|
+
* complete, INV-RS-01). Within a level the previous scheduler ordered nodes only
|
|
6
|
+
* by `block_id.localeCompare`, which let two same-file nodes run concurrently and
|
|
7
|
+
* collide at merge (the lost-update-guard-lands-1-rejects-N-1 starved-tail bug).
|
|
8
|
+
*
|
|
9
|
+
* This module replaces that numeric ordering with file-ownership-DISJOINT
|
|
10
|
+
* admission: a level is admitted in SUB-WAVES, each a maximal pairwise-file-
|
|
11
|
+
* disjoint subset of the still-pending nodes, chosen by a deterministic
|
|
12
|
+
* block_id tie-break AFTER the disjointness filter (INV-SOO-08). Same-file nodes
|
|
13
|
+
* therefore land in successive sub-waves (serialize, INV-SOO-01/02) while
|
|
14
|
+
* different-file nodes share a sub-wave (parallelize up to the quota cap the
|
|
15
|
+
* dispatcher itself enforces, INV-SOO-03/05). Path identity is the single
|
|
16
|
+
* canonical key from `canonicalizeFilePath` (INV-SOO-09); an empty/unresolved
|
|
17
|
+
* scope is conservatively NON-disjoint so it never batches with a peer
|
|
18
|
+
* (INV-SOO-01 / CE-008).
|
|
19
|
+
*
|
|
20
|
+
* Pure and deterministic — no I/O, no Set/Map iteration-order leak — so the
|
|
21
|
+
* admission order is reproducible and unit-testable against a precomputed level.
|
|
22
|
+
*/
|
|
23
|
+
/** A node as the ownership scheduler sees it: an id + its declared write-scope. */
|
|
24
|
+
export interface OwnershipSchedulerNode {
|
|
25
|
+
block_id: string;
|
|
26
|
+
/** Declared write-scope paths (repo-relative or absolute); empty ⇒ unresolved. */
|
|
27
|
+
write_paths: string[];
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Canonicalize a node's declared write-scope to physical-file identity keys.
|
|
31
|
+
* Empty input ⇒ empty set (handled conservatively by the disjointness gate).
|
|
32
|
+
*/
|
|
33
|
+
export declare function canonicalScopeKeys(node: OwnershipSchedulerNode, root?: string): Set<string>;
|
|
34
|
+
/**
|
|
35
|
+
* Partition a single eligible LEVEL into ordered file-ownership-disjoint
|
|
36
|
+
* SUB-WAVES. Each sub-wave is a maximal set of nodes whose canonical write-scopes
|
|
37
|
+
* are pairwise disjoint AND disjoint from a node with an empty scope only when it
|
|
38
|
+
* is alone (conservative empty-scope gating). Nodes are considered in ascending
|
|
39
|
+
* `block_id` order (the deterministic tie-break, INV-SOO-08), so the admitted
|
|
40
|
+
* subset of each sub-wave is identical across two runs over identical state.
|
|
41
|
+
*
|
|
42
|
+
* A node with an EMPTY canonical scope (unresolved/undeclared) is treated as
|
|
43
|
+
* conservatively NON-disjoint: it only enters a sub-wave by itself (it blocks and
|
|
44
|
+
* is blocked-by every peer), so it never batches with another writer
|
|
45
|
+
* (INV-SOO-01 / CE-008).
|
|
46
|
+
*/
|
|
47
|
+
export declare function ownershipSubWaves(level: OwnershipSchedulerNode[], root?: string): OwnershipSchedulerNode[][];
|
|
48
|
+
//# sourceMappingURL=ownershipScheduler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ownershipScheduler.d.ts","sourceRoot":"","sources":["../../../src/remediate/dispatch/ownershipScheduler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAIH,mFAAmF;AACnF,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,kFAAkF;IAClF,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,sBAAsB,EAC5B,IAAI,CAAC,EAAE,MAAM,GACZ,GAAG,CAAC,MAAM,CAAC,CAIb;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,sBAAsB,EAAE,EAC/B,IAAI,CAAC,EAAE,MAAM,GACZ,sBAAsB,EAAE,EAAE,CAwD5B"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File-ownership-disjoint admission scheduling (INV-SOO-01..10).
|
|
3
|
+
*
|
|
4
|
+
* The rolling engine dispatches an eligible dependency LEVEL (deps verified-
|
|
5
|
+
* complete, INV-RS-01). Within a level the previous scheduler ordered nodes only
|
|
6
|
+
* by `block_id.localeCompare`, which let two same-file nodes run concurrently and
|
|
7
|
+
* collide at merge (the lost-update-guard-lands-1-rejects-N-1 starved-tail bug).
|
|
8
|
+
*
|
|
9
|
+
* This module replaces that numeric ordering with file-ownership-DISJOINT
|
|
10
|
+
* admission: a level is admitted in SUB-WAVES, each a maximal pairwise-file-
|
|
11
|
+
* disjoint subset of the still-pending nodes, chosen by a deterministic
|
|
12
|
+
* block_id tie-break AFTER the disjointness filter (INV-SOO-08). Same-file nodes
|
|
13
|
+
* therefore land in successive sub-waves (serialize, INV-SOO-01/02) while
|
|
14
|
+
* different-file nodes share a sub-wave (parallelize up to the quota cap the
|
|
15
|
+
* dispatcher itself enforces, INV-SOO-03/05). Path identity is the single
|
|
16
|
+
* canonical key from `canonicalizeFilePath` (INV-SOO-09); an empty/unresolved
|
|
17
|
+
* scope is conservatively NON-disjoint so it never batches with a peer
|
|
18
|
+
* (INV-SOO-01 / CE-008).
|
|
19
|
+
*
|
|
20
|
+
* Pure and deterministic — no I/O, no Set/Map iteration-order leak — so the
|
|
21
|
+
* admission order is reproducible and unit-testable against a precomputed level.
|
|
22
|
+
*/
|
|
23
|
+
import { canonicalizeFilePath } from "./ownershipRegistry.js";
|
|
24
|
+
/**
|
|
25
|
+
* Canonicalize a node's declared write-scope to physical-file identity keys.
|
|
26
|
+
* Empty input ⇒ empty set (handled conservatively by the disjointness gate).
|
|
27
|
+
*/
|
|
28
|
+
export function canonicalScopeKeys(node, root) {
|
|
29
|
+
const out = new Set();
|
|
30
|
+
for (const p of node.write_paths)
|
|
31
|
+
out.add(canonicalizeFilePath(p, { root }));
|
|
32
|
+
return out;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Partition a single eligible LEVEL into ordered file-ownership-disjoint
|
|
36
|
+
* SUB-WAVES. Each sub-wave is a maximal set of nodes whose canonical write-scopes
|
|
37
|
+
* are pairwise disjoint AND disjoint from a node with an empty scope only when it
|
|
38
|
+
* is alone (conservative empty-scope gating). Nodes are considered in ascending
|
|
39
|
+
* `block_id` order (the deterministic tie-break, INV-SOO-08), so the admitted
|
|
40
|
+
* subset of each sub-wave is identical across two runs over identical state.
|
|
41
|
+
*
|
|
42
|
+
* A node with an EMPTY canonical scope (unresolved/undeclared) is treated as
|
|
43
|
+
* conservatively NON-disjoint: it only enters a sub-wave by itself (it blocks and
|
|
44
|
+
* is blocked-by every peer), so it never batches with another writer
|
|
45
|
+
* (INV-SOO-01 / CE-008).
|
|
46
|
+
*/
|
|
47
|
+
export function ownershipSubWaves(level, root) {
|
|
48
|
+
const ordered = [...level].sort((a, b) => a.block_id.localeCompare(b.block_id));
|
|
49
|
+
const scopeOf = new Map();
|
|
50
|
+
for (const n of ordered)
|
|
51
|
+
scopeOf.set(n.block_id, canonicalScopeKeys(n, root));
|
|
52
|
+
const remaining = [...ordered];
|
|
53
|
+
const subWaves = [];
|
|
54
|
+
while (remaining.length > 0) {
|
|
55
|
+
const wave = [];
|
|
56
|
+
const claimed = new Set();
|
|
57
|
+
let waveHasEmptyScopeNode = false;
|
|
58
|
+
const leftover = [];
|
|
59
|
+
for (const node of remaining) {
|
|
60
|
+
const scope = scopeOf.get(node.block_id);
|
|
61
|
+
const isEmpty = scope.size === 0;
|
|
62
|
+
// Empty-scope node admits only into an otherwise-empty sub-wave (solo).
|
|
63
|
+
if (isEmpty) {
|
|
64
|
+
if (wave.length === 0) {
|
|
65
|
+
wave.push(node);
|
|
66
|
+
waveHasEmptyScopeNode = true;
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
leftover.push(node);
|
|
70
|
+
}
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
// A real-scope node cannot share a wave with an empty-scope node, nor with
|
|
74
|
+
// any node it shares a canonical path with.
|
|
75
|
+
if (waveHasEmptyScopeNode) {
|
|
76
|
+
leftover.push(node);
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
let overlaps = false;
|
|
80
|
+
for (const key of scope) {
|
|
81
|
+
if (claimed.has(key)) {
|
|
82
|
+
overlaps = true;
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
if (overlaps) {
|
|
87
|
+
leftover.push(node);
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
for (const key of scope)
|
|
91
|
+
claimed.add(key);
|
|
92
|
+
wave.push(node);
|
|
93
|
+
}
|
|
94
|
+
subWaves.push(wave);
|
|
95
|
+
remaining.length = 0;
|
|
96
|
+
remaining.push(...leftover);
|
|
97
|
+
}
|
|
98
|
+
return subWaves;
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=ownershipScheduler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ownershipScheduler.js","sourceRoot":"","sources":["../../../src/remediate/dispatch/ownershipScheduler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAS9D;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAChC,IAA4B,EAC5B,IAAa;IAEb,MAAM,GAAG,GAAG,IAAI,GAAG,EAAU,CAAC;IAC9B,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,WAAW;QAAE,GAAG,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC7E,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,iBAAiB,CAC/B,KAA+B,EAC/B,IAAa;IAEb,MAAM,OAAO,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;IAChF,MAAM,OAAO,GAAG,IAAI,GAAG,EAAuB,CAAC;IAC/C,KAAK,MAAM,CAAC,IAAI,OAAO;QAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;IAE9E,MAAM,SAAS,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC;IAC/B,MAAM,QAAQ,GAA+B,EAAE,CAAC;IAEhD,OAAO,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,GAA6B,EAAE,CAAC;QAC1C,MAAM,OAAO,GAAG,IAAI,GAAG,EAAU,CAAC;QAClC,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,GAAG,CAAC,CAAC;QACrB,SAAS,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC;IAC9B,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -85,8 +85,14 @@ export { isTerminalStatus, isVerifiedCompleteStatus };
|
|
|
85
85
|
* prerequisite is skipped/blocked, not merely pending) is NOT placed in any
|
|
86
86
|
* level — it is dead-ended by `handlePlanning`.
|
|
87
87
|
*
|
|
88
|
-
* Pure and deterministic:
|
|
89
|
-
*
|
|
88
|
+
* Pure and deterministic: level MEMBERSHIP is fixed by the dependency predicate
|
|
89
|
+
* (INV-RS-01) and is independent of node order; the interposed-rebuild boundaries
|
|
90
|
+
* are therefore stable across runs without an in-level numeric sort. In-level
|
|
91
|
+
* admission ORDER is no longer decided here — it is owned by the file-ownership
|
|
92
|
+
* scheduler (`ownershipSubWaves`, INV-SOO-04/08), which applies its own explicit
|
|
93
|
+
* block_id tie-break AFTER the disjointness filter. The numeric
|
|
94
|
+
* `block_id.localeCompare` admission ordering that used to live here was removed
|
|
95
|
+
* atomically with that change (INV-SOO-04).
|
|
90
96
|
*/
|
|
91
97
|
export declare function rollingDependencyLevels(state: RemediationState): RemediationBlock[][];
|
|
92
98
|
/** A single node's dispatch handler for the in-process rolling engine. */
|
|
@@ -109,6 +115,15 @@ export interface DriveRollingDispatchOptions {
|
|
|
109
115
|
estimateTokens?: (block: RemediationBlock) => number;
|
|
110
116
|
/** Quota state dir for `recordWaveOutcome` (defaults to leaving it unset). */
|
|
111
117
|
quotaStateDir?: string;
|
|
118
|
+
/**
|
|
119
|
+
* A block's declared write-scope, for file-ownership-disjoint admission
|
|
120
|
+
* (INV-SOO). Defaults to `block.touched_files` (the block's authoritative
|
|
121
|
+
* declared write set). An empty/unresolved scope is gated conservatively
|
|
122
|
+
* (admitted only solo) by the ownership scheduler.
|
|
123
|
+
*/
|
|
124
|
+
scopeForBlock?: (block: RemediationBlock) => string[];
|
|
125
|
+
/** Repo root for canonical path identity (INV-SOO-09). Defaults to cwd. */
|
|
126
|
+
root?: string;
|
|
112
127
|
}
|
|
113
128
|
export interface DriveRollingDispatchResult {
|
|
114
129
|
/** Per-level dispatch results, in level order. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nextStep.d.ts","sourceRoot":"","sources":["../../../src/remediate/steps/nextStep.ts"],"names":[],"mappings":"AAGA,OAAO,EAAc,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,KAAK,EAGV,gBAAgB,EAGjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAmV,KAAK,sBAAsB,EAA8C,KAAK,iBAAiB,EAAE,KAAK,aAAa,EAAE,KAAK,oBAAoB,EAAE,KAAK,YAAY,EAA8B,KAAK,qBAAqB,EAAE,KAAK,YAAY,EAAqB,KAAK,sBAAsB,EAAE,KAAK,cAAc,EAAwE,KAAK,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAOvwB,OAAO,EASL,KAAK,kBAAkB,EACxB,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"nextStep.d.ts","sourceRoot":"","sources":["../../../src/remediate/steps/nextStep.ts"],"names":[],"mappings":"AAGA,OAAO,EAAc,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,KAAK,EAGV,gBAAgB,EAGjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAmV,KAAK,sBAAsB,EAA8C,KAAK,iBAAiB,EAAE,KAAK,aAAa,EAAE,KAAK,oBAAoB,EAAE,KAAK,YAAY,EAA8B,KAAK,qBAAqB,EAAE,KAAK,YAAY,EAAqB,KAAK,sBAAsB,EAAE,KAAK,cAAc,EAAwE,KAAK,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAOvwB,OAAO,EASL,KAAK,kBAAkB,EACxB,MAAM,eAAe,CAAC;AAMvB,OAAO,KAAK,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,YAAY,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