@inerrata-corporation/errata 2.0.2-dev.295 → 2.0.2-dev.302
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/consolidate-worker.mjs +15 -2
- package/errata.mjs +42 -8
- package/package.json +1 -1
- package/pass-worker.mjs +15 -2
package/consolidate-worker.mjs
CHANGED
|
@@ -15214,7 +15214,12 @@ var init_edge_rules = __esm({
|
|
|
15214
15214
|
// ── Taxonomy (Track 4 Stream C: MITRE CWE `ChildOf` → `Weakness —IS_A→ Weakness`) ──
|
|
15215
15215
|
IS_A: { from: ["Weakness"], to: ["Weakness"] },
|
|
15216
15216
|
// ── Conceptual (v1 taxonomy.ts: instance → motif/pattern reference) ──
|
|
15217
|
-
|
|
15217
|
+
// `AntiPattern` joined the target set 2026-08-02: it is one of the three motif
|
|
15218
|
+
// kinds (generalizer motifs.ts `layerOf`: pattern | technique | antipattern) and
|
|
15219
|
+
// the SUPPRESSED-close path mints `Problem ─INSTANCE_OF→ AntiPattern` as the
|
|
15220
|
+
// negative-knowledge binding ("silenced, not solved") — the original three-label
|
|
15221
|
+
// rule predates AntiPattern joining the motif layer and silently ate that edge.
|
|
15222
|
+
INSTANCE_OF: { to: ["Pattern", "AntiPattern", "Weakness", "Technique"] },
|
|
15218
15223
|
IMPLEMENTS: { from: ["Solution", "Language", "Component"], to: ["Pattern", "Technique"] },
|
|
15219
15224
|
MATCHES: { to: ["Pattern"] },
|
|
15220
15225
|
// ── Artifact evidence (v1 taxonomy.ts artifact rows) ──
|
|
@@ -15772,7 +15777,15 @@ var LOCAL_RULE_OVERRIDES = {
|
|
|
15772
15777
|
to: [...CODE_NODE_LABELS, "Symbol"]
|
|
15773
15778
|
},
|
|
15774
15779
|
REVEALED_BY: null,
|
|
15775
|
-
PRODUCED: null
|
|
15780
|
+
PRODUCED: null,
|
|
15781
|
+
// FIXED_BY locally ALSO carries the fix-provenance sense: `resolveProblem`
|
|
15782
|
+
// attributes a closed Problem to the fixing `Episode` (PLAN_PLASTICITY §2.1)
|
|
15783
|
+
// alongside the cloud's Problem→Solution knowledge claim. Same shape as
|
|
15784
|
+
// PRODUCED/REVEALED_BY above — an Episode is code-layer and never drains, so
|
|
15785
|
+
// the cloud door's `to: [Solution]` rule is untouched. The `from` constraint
|
|
15786
|
+
// stays: the reversed (Solution)-FIXED_BY->(...) splash bug is the reason
|
|
15787
|
+
// this rule exists at all.
|
|
15788
|
+
FIXED_BY: { from: EDGE_RULES["FIXED_BY"]?.from, to: ["Solution", "Episode"] }
|
|
15776
15789
|
};
|
|
15777
15790
|
function localEdgeViolation(fromLabel, type, toLabel) {
|
|
15778
15791
|
if (type in LOCAL_RULE_OVERRIDES) {
|
package/errata.mjs
CHANGED
|
@@ -15389,7 +15389,12 @@ var init_edge_rules = __esm({
|
|
|
15389
15389
|
// ── Taxonomy (Track 4 Stream C: MITRE CWE `ChildOf` → `Weakness —IS_A→ Weakness`) ──
|
|
15390
15390
|
IS_A: { from: ["Weakness"], to: ["Weakness"] },
|
|
15391
15391
|
// ── Conceptual (v1 taxonomy.ts: instance → motif/pattern reference) ──
|
|
15392
|
-
|
|
15392
|
+
// `AntiPattern` joined the target set 2026-08-02: it is one of the three motif
|
|
15393
|
+
// kinds (generalizer motifs.ts `layerOf`: pattern | technique | antipattern) and
|
|
15394
|
+
// the SUPPRESSED-close path mints `Problem ─INSTANCE_OF→ AntiPattern` as the
|
|
15395
|
+
// negative-knowledge binding ("silenced, not solved") — the original three-label
|
|
15396
|
+
// rule predates AntiPattern joining the motif layer and silently ate that edge.
|
|
15397
|
+
INSTANCE_OF: { to: ["Pattern", "AntiPattern", "Weakness", "Technique"] },
|
|
15393
15398
|
IMPLEMENTS: { from: ["Solution", "Language", "Component"], to: ["Pattern", "Technique"] },
|
|
15394
15399
|
MATCHES: { to: ["Pattern"] },
|
|
15395
15400
|
// ── Artifact evidence (v1 taxonomy.ts artifact rows) ──
|
|
@@ -16497,7 +16502,15 @@ var init_store = __esm({
|
|
|
16497
16502
|
to: [...CODE_NODE_LABELS, "Symbol"]
|
|
16498
16503
|
},
|
|
16499
16504
|
REVEALED_BY: null,
|
|
16500
|
-
PRODUCED: null
|
|
16505
|
+
PRODUCED: null,
|
|
16506
|
+
// FIXED_BY locally ALSO carries the fix-provenance sense: `resolveProblem`
|
|
16507
|
+
// attributes a closed Problem to the fixing `Episode` (PLAN_PLASTICITY §2.1)
|
|
16508
|
+
// alongside the cloud's Problem→Solution knowledge claim. Same shape as
|
|
16509
|
+
// PRODUCED/REVEALED_BY above — an Episode is code-layer and never drains, so
|
|
16510
|
+
// the cloud door's `to: [Solution]` rule is untouched. The `from` constraint
|
|
16511
|
+
// stays: the reversed (Solution)-FIXED_BY->(...) splash bug is the reason
|
|
16512
|
+
// this rule exists at all.
|
|
16513
|
+
FIXED_BY: { from: EDGE_RULES["FIXED_BY"]?.from, to: ["Solution", "Episode"] }
|
|
16501
16514
|
};
|
|
16502
16515
|
SCHEMA_VERSION = 6;
|
|
16503
16516
|
SCHEMA_SQL = `
|
|
@@ -26812,7 +26825,7 @@ function bindCanonicalNeighbors(store, opts) {
|
|
|
26812
26825
|
let bound = 0;
|
|
26813
26826
|
for (const p of problems) {
|
|
26814
26827
|
const existing = new Set(
|
|
26815
|
-
store.outEdges(p.id, ["MATCHES", "INSTANCE_OF"]).map((e) => e.to)
|
|
26828
|
+
store.outEdges(p.id, ["MATCHES", "INSTANCE_OF", "RELATES_TO"]).map((e) => e.to)
|
|
26816
26829
|
);
|
|
26817
26830
|
if (existing.size >= k) continue;
|
|
26818
26831
|
const ranked = candidates.filter(
|
|
@@ -52622,6 +52635,14 @@ function enqueueWitnesses(queue, fresh, now) {
|
|
|
52622
52635
|
function pendingFor(queue, channel) {
|
|
52623
52636
|
return queue.filter((w) => w.channel === channel);
|
|
52624
52637
|
}
|
|
52638
|
+
function partitionReplayable(queue, channel, isShipped) {
|
|
52639
|
+
const replay2 = [];
|
|
52640
|
+
const waiting = [];
|
|
52641
|
+
for (const w of pendingFor(queue, channel)) {
|
|
52642
|
+
(isShipped(w.nodeId) ? replay2 : waiting).push(w);
|
|
52643
|
+
}
|
|
52644
|
+
return { replay: replay2, waiting };
|
|
52645
|
+
}
|
|
52625
52646
|
function retireWitnesses(queue, channel, settledKeys) {
|
|
52626
52647
|
return queue.filter((w) => !(w.channel === channel && settledKeys.has(w.witnessKey)));
|
|
52627
52648
|
}
|
|
@@ -52881,7 +52902,7 @@ function startLoopLagMonitor(thresholdMs = 1e3) {
|
|
|
52881
52902
|
}
|
|
52882
52903
|
|
|
52883
52904
|
// src/engine.ts
|
|
52884
|
-
var DAEMON_VERSION = true ? "2.0.2-dev.
|
|
52905
|
+
var DAEMON_VERSION = true ? "2.0.2-dev.302" : "2.0.0-alpha.0";
|
|
52885
52906
|
var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
|
|
52886
52907
|
var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
|
|
52887
52908
|
var GIT_OP_MUTE_MS = 4e3;
|
|
@@ -53824,8 +53845,20 @@ function createWorkspaceEngine(opts) {
|
|
|
53824
53845
|
const citingSession = sessionOriginKey(sessionId);
|
|
53825
53846
|
const mintedHere = (nodeId) => store.getNode(nodeId)?.attrs["sources"]?.[0] === sessionId;
|
|
53826
53847
|
const sendWitnesses = async (channel, fresh, send) => {
|
|
53827
|
-
const queued =
|
|
53828
|
-
|
|
53848
|
+
const { replay: queued, waiting } = partitionReplayable(
|
|
53849
|
+
witnessQueue,
|
|
53850
|
+
channel,
|
|
53851
|
+
(nodeId) => {
|
|
53852
|
+
const n = store.getNode(nodeId);
|
|
53853
|
+
return !n || n.attrs["contributedAtSeq"] != null;
|
|
53854
|
+
}
|
|
53855
|
+
);
|
|
53856
|
+
if (fresh.length === 0 && queued.length === 0) {
|
|
53857
|
+
if (waiting.length > 0) {
|
|
53858
|
+
console.log(`[errata] ${channel}: ${waiting.length} parked awaiting node drain`);
|
|
53859
|
+
}
|
|
53860
|
+
return;
|
|
53861
|
+
}
|
|
53829
53862
|
const groups = /* @__PURE__ */ new Map();
|
|
53830
53863
|
for (const q of queued) {
|
|
53831
53864
|
const g = groups.get(q.sessionKey) ?? [];
|
|
@@ -53870,7 +53903,7 @@ function createWorkspaceEngine(opts) {
|
|
|
53870
53903
|
witnessQueue = enqueueWitnesses(witnessQueue, stillUnmatched, Date.now());
|
|
53871
53904
|
saveWitnessQueue(witnessQueuePath(paths.configDir), witnessQueue);
|
|
53872
53905
|
console.log(
|
|
53873
|
-
`[errata] ${channel}: ${formatDisposition({ recorded, unmatched, duplicate, selfGated })}` + (queued.length > 0 ? ` (incl. ${queued.length} replayed)` : "")
|
|
53906
|
+
`[errata] ${channel}: ${formatDisposition({ recorded, unmatched, duplicate, selfGated })}` + (queued.length > 0 ? ` (incl. ${queued.length} replayed)` : "") + (waiting.length > 0 ? ` (${waiting.length} awaiting drain)` : "")
|
|
53874
53907
|
);
|
|
53875
53908
|
appendWitnessLedger(paths.configDir, {
|
|
53876
53909
|
ts: Date.now(),
|
|
@@ -53879,7 +53912,8 @@ function createWorkspaceEngine(opts) {
|
|
|
53879
53912
|
unmatched,
|
|
53880
53913
|
duplicate,
|
|
53881
53914
|
selfGated,
|
|
53882
|
-
parked: pendingFor(witnessQueue, channel).length
|
|
53915
|
+
parked: pendingFor(witnessQueue, channel).length,
|
|
53916
|
+
awaitingDrain: waiting.length
|
|
53883
53917
|
});
|
|
53884
53918
|
};
|
|
53885
53919
|
if (typeof cloud.reportContradictions === "function") {
|
package/package.json
CHANGED
package/pass-worker.mjs
CHANGED
|
@@ -15069,7 +15069,12 @@ var init_edge_rules = __esm({
|
|
|
15069
15069
|
// ── Taxonomy (Track 4 Stream C: MITRE CWE `ChildOf` → `Weakness —IS_A→ Weakness`) ──
|
|
15070
15070
|
IS_A: { from: ["Weakness"], to: ["Weakness"] },
|
|
15071
15071
|
// ── Conceptual (v1 taxonomy.ts: instance → motif/pattern reference) ──
|
|
15072
|
-
|
|
15072
|
+
// `AntiPattern` joined the target set 2026-08-02: it is one of the three motif
|
|
15073
|
+
// kinds (generalizer motifs.ts `layerOf`: pattern | technique | antipattern) and
|
|
15074
|
+
// the SUPPRESSED-close path mints `Problem ─INSTANCE_OF→ AntiPattern` as the
|
|
15075
|
+
// negative-knowledge binding ("silenced, not solved") — the original three-label
|
|
15076
|
+
// rule predates AntiPattern joining the motif layer and silently ate that edge.
|
|
15077
|
+
INSTANCE_OF: { to: ["Pattern", "AntiPattern", "Weakness", "Technique"] },
|
|
15073
15078
|
IMPLEMENTS: { from: ["Solution", "Language", "Component"], to: ["Pattern", "Technique"] },
|
|
15074
15079
|
MATCHES: { to: ["Pattern"] },
|
|
15075
15080
|
// ── Artifact evidence (v1 taxonomy.ts artifact rows) ──
|
|
@@ -24079,7 +24084,15 @@ var LOCAL_RULE_OVERRIDES = {
|
|
|
24079
24084
|
to: [...CODE_NODE_LABELS, "Symbol"]
|
|
24080
24085
|
},
|
|
24081
24086
|
REVEALED_BY: null,
|
|
24082
|
-
PRODUCED: null
|
|
24087
|
+
PRODUCED: null,
|
|
24088
|
+
// FIXED_BY locally ALSO carries the fix-provenance sense: `resolveProblem`
|
|
24089
|
+
// attributes a closed Problem to the fixing `Episode` (PLAN_PLASTICITY §2.1)
|
|
24090
|
+
// alongside the cloud's Problem→Solution knowledge claim. Same shape as
|
|
24091
|
+
// PRODUCED/REVEALED_BY above — an Episode is code-layer and never drains, so
|
|
24092
|
+
// the cloud door's `to: [Solution]` rule is untouched. The `from` constraint
|
|
24093
|
+
// stays: the reversed (Solution)-FIXED_BY->(...) splash bug is the reason
|
|
24094
|
+
// this rule exists at all.
|
|
24095
|
+
FIXED_BY: { from: EDGE_RULES["FIXED_BY"]?.from, to: ["Solution", "Episode"] }
|
|
24083
24096
|
};
|
|
24084
24097
|
function localEdgeViolation(fromLabel, type, toLabel) {
|
|
24085
24098
|
if (type in LOCAL_RULE_OVERRIDES) {
|