@quolu/lattice 0.63.4 → 0.63.6
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quolu/lattice",
|
|
3
|
-
"version": "0.63.
|
|
3
|
+
"version": "0.63.6",
|
|
4
4
|
"description": "Schedulability compiler for multi-agent development: observe real code boundaries, refactor the conflicting seam, recompile the plan for parallel execution",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Quo / クオ at kitepon.dev",
|
|
@@ -3,6 +3,7 @@ import path from 'node:path';
|
|
|
3
3
|
import { digestArtifact } from './artifact-contracts.mjs';
|
|
4
4
|
import { validateCarryOverWitness } from './runtime-contracts.mjs';
|
|
5
5
|
import { projectRuntimeState } from './runtime-projection.mjs';
|
|
6
|
+
import { coveredBy } from './runtime-diff-observer.mjs';
|
|
6
7
|
|
|
7
8
|
// RC3 runtime decision verifier(ADR 0044 Decision 4〜7)。
|
|
8
9
|
// dispatch/hold/continue/invalidate裁定を、保存planとevent prefixだけから
|
|
@@ -102,12 +103,11 @@ export function computeReadyFrontier(options = {}) {
|
|
|
102
103
|
return { dispatchable };
|
|
103
104
|
}
|
|
104
105
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}
|
|
106
|
+
// 宣言 write の被覆判定は runtime-diff-observer の coveredBy(唯一の述語)へ一本化する。
|
|
107
|
+
// 述語が分かれると「警報は出たが checkpoint では競合にならない」種類のずれが生まれる
|
|
108
|
+
// (coveredBy の docstring と同じ理由。実際に 2026-08-22、複製3個のうち1個だけ直して
|
|
109
|
+
// 同じ hold を踏み直した)。
|
|
110
|
+
const declaredWriteCovers = coveredBy;
|
|
111
111
|
|
|
112
112
|
function witnessSet(manifest, kinds) {
|
|
113
113
|
const resources = new Set(manifest?.resources ?? []);
|
|
@@ -279,10 +279,14 @@ export async function captureWorktreeDiff(options = {}) {
|
|
|
279
279
|
* どちらが正しいのか誰にも分からなくなる。
|
|
280
280
|
*/
|
|
281
281
|
export function coveredBy(declaredWrites, observedPath) {
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
)
|
|
282
|
+
// 宣言はファイルにも素のディレクトリ名(`templates` 等)にも成り得る。末尾 `/` の時だけ
|
|
283
|
+
// prefix 扱いにすると、境界内で作った配下ファイルが全部 undeclared_write になる
|
|
284
|
+
// (2026-08-22 実測: accept のたびに hold → worker SIGSTOP で卓が凍った)。
|
|
285
|
+
return declaredWrites.some((declared) => {
|
|
286
|
+
if (declared === observedPath) return true;
|
|
287
|
+
const prefix = declared.endsWith('/') ? declared : `${declared}/`;
|
|
288
|
+
return observedPath.startsWith(prefix);
|
|
289
|
+
});
|
|
286
290
|
}
|
|
287
291
|
|
|
288
292
|
function lineGroupsFor(manifests, todoIds) {
|
|
@@ -371,10 +371,14 @@ function boundaryFor(artifact, taskId) {
|
|
|
371
371
|
return artifact?.task_boundaries?.find((entry) => entry.task_id === taskId) ?? null;
|
|
372
372
|
}
|
|
373
373
|
|
|
374
|
+
// boundary / changed のどちらも素のディレクトリ名で来る(末尾 `/` は保証されない)。
|
|
375
|
+
// 末尾 `/` の時だけ prefix 扱いにすると、ディレクトリ境界の配下変更が「触れていない」へ
|
|
376
|
+
// 誤判定される(declaredWriteCovers と同族。2026-08-22 実測)。
|
|
374
377
|
function pathTouches(boundary, changed) {
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
+
if (boundary === changed) return true;
|
|
379
|
+
const boundaryPrefix = boundary.endsWith('/') ? boundary : `${boundary}/`;
|
|
380
|
+
const changedPrefix = changed.endsWith('/') ? changed : `${changed}/`;
|
|
381
|
+
return changed.startsWith(boundaryPrefix) || boundary.startsWith(changedPrefix);
|
|
378
382
|
}
|
|
379
383
|
|
|
380
384
|
async function boundaryVerdict({ repoRoot, store, member, meta, taskId, intakeBase }) {
|