@inerrata-corporation/errata 2.0.1-dev.99 → 2.0.2-dev.133
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 +46 -4
- package/errata.mjs +1861 -488
- package/package.json +1 -1
- package/pass-worker.mjs +72 -15
package/consolidate-worker.mjs
CHANGED
|
@@ -133,7 +133,14 @@ var init_castalia = __esm({
|
|
|
133
133
|
"SOLVED_BY",
|
|
134
134
|
"MITIGATES",
|
|
135
135
|
"REPORTED_FAILURE",
|
|
136
|
-
"CONTRADICTS"
|
|
136
|
+
"CONTRADICTS",
|
|
137
|
+
// Motif twin-faces (KN-twin-faces): failure-face motif → remedy-face motif
|
|
138
|
+
// across layers (AntiPattern/Weakness ↔ Technique/Pattern). Same
|
|
139
|
+
// problem→fix direction as FIXED_BY/SOLVED_BY. Minted by the nightly LLM
|
|
140
|
+
// twin-face pass — these are the near-identical cross-layer pairs the
|
|
141
|
+
// polarity gate (finding 5) correctly refuses to FUSE; the link carries
|
|
142
|
+
// what fusion can't.
|
|
143
|
+
"REMEDIED_BY"
|
|
137
144
|
];
|
|
138
145
|
CONCEPTUAL_EDGES = [
|
|
139
146
|
"INSTANCE_OF",
|
|
@@ -223,6 +230,10 @@ var init_castalia = __esm({
|
|
|
223
230
|
CAUSED_BY: 3,
|
|
224
231
|
FIXED_BY: 3,
|
|
225
232
|
SOLVED_BY: 3,
|
|
233
|
+
// Twin-face link (failure motif → remedy motif, KN-twin-faces) — causal-grade
|
|
234
|
+
// but a notch below witnessed FIXED_BY/SOLVED_BY: the pairing is an LLM
|
|
235
|
+
// judgment over descriptions, not an agent-witnessed resolution.
|
|
236
|
+
REMEDIED_BY: 2.5,
|
|
226
237
|
MANIFESTS_AS: 2,
|
|
227
238
|
ESCALATES_TO: 1.5,
|
|
228
239
|
AFFECTS: 1.2,
|
|
@@ -15194,7 +15205,10 @@ var init_edge_rules = __esm({
|
|
|
15194
15205
|
// NOT ruled here — the type pre-exists with broader extractor senses, and a
|
|
15195
15206
|
// new rule on an old type would reject legitimate live flows (reject-never-flip
|
|
15196
15207
|
// cuts both ways: only rule types you introduce or senses that are documented).
|
|
15197
|
-
|
|
15208
|
+
// `Component` joined the target set with OM-agent-anchors: an agent-named
|
|
15209
|
+
// component ("React Router") is the same knowledge→named-unit anchor shape as
|
|
15210
|
+
// a Tool — the knowledge is ABOUT it, not dependent on it.
|
|
15211
|
+
CONCERNS: { from: ["Problem", "Solution", "RootCause", "Claim", "Pattern"], to: ["Tool", "Component"] },
|
|
15198
15212
|
OPERATES_ON: { from: ["Algorithm"], to: ["DataStructure"] },
|
|
15199
15213
|
INVOLVES: { from: ["Problem", "Solution"], to: ["DataStructure"] },
|
|
15200
15214
|
// ── Taxonomy (Track 4 Stream C: MITRE CWE `ChildOf` → `Weakness —IS_A→ Weakness`) ──
|
|
@@ -15301,13 +15315,27 @@ var init_wire = __esm({
|
|
|
15301
15315
|
/** Canonical human-readable description (no raw paths — daemon scrubs; server rechecks). */
|
|
15302
15316
|
description: external_exports.string().min(1).max(4e3),
|
|
15303
15317
|
attrs: external_exports.record(external_exports.string(), external_exports.unknown()).default({}),
|
|
15318
|
+
/** One-way origin key of the SESSION that minted this node (`ws_…`, a
|
|
15319
|
+
* truncated digest — never the raw session id). Stamped onto the created
|
|
15320
|
+
* node as `authoringSession`, which is the independence unit for the
|
|
15321
|
+
* evidence channels: the session that authored a claim may not corroborate
|
|
15322
|
+
* or refute it, while a DIFFERENT session on the same checkout may (alyssa,
|
|
15323
|
+
* 2026-07-31 — the workspace key made every witness on a single-checkout
|
|
15324
|
+
* deployment a self-corroboration). Optional + additive: absent leaves the
|
|
15325
|
+
* gate fail-open for that node, exactly today's behaviour. */
|
|
15326
|
+
originSession: external_exports.string().min(3).max(64).optional(),
|
|
15304
15327
|
extractionSource: external_exports.enum(INGEST_EXTRACTION_SOURCES),
|
|
15305
15328
|
validationSource: external_exports.enum(VALIDATION_SOURCES).optional(),
|
|
15306
15329
|
/** Org-membrane (M2): the daemon's anchor tag — it owns the lockfile, so it
|
|
15307
15330
|
* knows which packages are private. The door does NOT trust a `public` claim
|
|
15308
15331
|
* blindly (it re-confirms on the spine); absent ⇒ unknown ⇒ fail-closed to
|
|
15309
15332
|
* org-private. Accepted-but-ignored until ORG_MEMBRANE_ENABLED flips. */
|
|
15310
|
-
anchorVisibility: external_exports.enum(["public", "private"]).optional()
|
|
15333
|
+
anchorVisibility: external_exports.enum(["public", "private"]).optional(),
|
|
15334
|
+
/** The spine-resolvable anchor id backing a `public` tag (OM-anchor-tag): a
|
|
15335
|
+
* Package purl or `languageCanonicalId`. The door validates THIS on the
|
|
15336
|
+
* public spine (falling back to `canonicalId` when absent — context stubs
|
|
15337
|
+
* are self-anchored). Never trusted without spine confirmation. */
|
|
15338
|
+
anchor: external_exports.string().min(1).max(300).optional()
|
|
15311
15339
|
});
|
|
15312
15340
|
RouteContextCountWireSchema = external_exports.object({
|
|
15313
15341
|
confirmed: external_exports.number().int().min(0),
|
|
@@ -15396,7 +15424,7 @@ var init_canonicalize = __esm({
|
|
|
15396
15424
|
|
|
15397
15425
|
// ../../packages/shared/src/nlp/triage-canon.ts
|
|
15398
15426
|
function canonicalizeToken(t) {
|
|
15399
|
-
const base = t.trim().toLowerCase().replace(/
|
|
15427
|
+
const base = t.trim().toLowerCase().replace(/(?!^)@.*$|\s.*$/, "");
|
|
15400
15428
|
if (!base) return "";
|
|
15401
15429
|
return resolveCanonicalId(base) ?? base;
|
|
15402
15430
|
}
|
|
@@ -16023,6 +16051,13 @@ var SqliteGraphStore = class {
|
|
|
16023
16051
|
findByLabel: this.db.prepare(
|
|
16024
16052
|
"SELECT * FROM nodes WHERE label = ? AND valid_to IS NULL"
|
|
16025
16053
|
),
|
|
16054
|
+
// Scalar count twin of findByLabel — same live-row semantics, no row
|
|
16055
|
+
// hydration. Exists because status surfaces (daemon `/` + `/health`) used
|
|
16056
|
+
// findNodesByLabel(...).length, materializing every row's attrs JSON and
|
|
16057
|
+
// embedding blob per request — seconds of synchronous loop-hold per poll.
|
|
16058
|
+
countByLabel: this.db.prepare(
|
|
16059
|
+
"SELECT COUNT(*) AS n FROM nodes WHERE label = ? AND valid_to IS NULL"
|
|
16060
|
+
),
|
|
16026
16061
|
// ALL versions of a label — incl frozen/closed (valid_to set). Used by the
|
|
16027
16062
|
// clean-reindex purge so a true wipe removes history too, not just live rows.
|
|
16028
16063
|
findByLabelAll: this.db.prepare("SELECT * FROM nodes WHERE label = ?"),
|
|
@@ -16276,6 +16311,13 @@ var SqliteGraphStore = class {
|
|
|
16276
16311
|
const rows = this.stmts.findByLabel.all(label);
|
|
16277
16312
|
return rows.map(rowToNode);
|
|
16278
16313
|
}
|
|
16314
|
+
/** Live-row count for a label — `findNodesByLabel(label).length` without the
|
|
16315
|
+
* per-row hydration (attrs JSON + embedding blob). Status surfaces poll this
|
|
16316
|
+
* per project per request; the materializing form held the daemon's event
|
|
16317
|
+
* loop for seconds at scale. */
|
|
16318
|
+
countNodesByLabel(label) {
|
|
16319
|
+
return Number(this.stmts.countByLabel.get(label).n);
|
|
16320
|
+
}
|
|
16279
16321
|
findAllVersionsByLabel(label) {
|
|
16280
16322
|
const rows = this.stmts.findByLabelAll.all(label);
|
|
16281
16323
|
return rows.map(rowToNode);
|