@inerrata-corporation/errata 2.0.16-dev.3355 → 2.0.16
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 +10 -26
- package/errata.mjs +508 -521
- package/package.json +1 -1
- package/pass-worker.mjs +11 -12
package/package.json
CHANGED
package/pass-worker.mjs
CHANGED
|
@@ -15122,7 +15122,7 @@ var init_edge_rules = __esm({
|
|
|
15122
15122
|
// anchor anything at anything, e.g. at a public `Package`, quietly re-creating
|
|
15123
15123
|
// the code↔collective bridge the membrane exists to prevent.
|
|
15124
15124
|
ANCHORED_AT: {
|
|
15125
|
-
from: ["Problem", "
|
|
15125
|
+
from: ["Problem", "Solution", "RootCause", "Claim"],
|
|
15126
15126
|
to: ["Symbol"]
|
|
15127
15127
|
},
|
|
15128
15128
|
// ── Security spine (v1 taxonomy.ts SECURITY_FORWARD_ONLY commentary) ──
|
|
@@ -15167,7 +15167,7 @@ var init_edge_rules = __esm({
|
|
|
15167
15167
|
// `Component` joined the target set with OM-agent-anchors: an agent-named
|
|
15168
15168
|
// component ("React Router") is the same knowledge→named-unit anchor shape as
|
|
15169
15169
|
// a Tool — the knowledge is ABOUT it, not dependent on it.
|
|
15170
|
-
CONCERNS: { from: ["Problem", "
|
|
15170
|
+
CONCERNS: { from: ["Problem", "Solution", "RootCause", "Claim", "Pattern"], to: ["Tool", "Component"] },
|
|
15171
15171
|
OPERATES_ON: { from: ["Algorithm"], to: ["DataStructure"] },
|
|
15172
15172
|
INVOLVES: { from: ["Problem", "Solution"], to: ["DataStructure"] },
|
|
15173
15173
|
// ── Taxonomy (Track 4 Stream C: MITRE CWE `ChildOf` → `Weakness —IS_A→ Weakness`) ──
|
|
@@ -24827,8 +24827,7 @@ CREATE INDEX IF NOT EXISTS nodes_live ON nodes(label, valid_to);
|
|
|
24827
24827
|
-- its table row. Partial, so it maintains a few thousand rows instead of adding
|
|
24828
24828
|
-- a write to every node write. Its label list is FINGERPRINT_INDEXED_LABELS.
|
|
24829
24829
|
DROP INDEX IF EXISTS nodes_live_fingerprint;
|
|
24830
|
-
|
|
24831
|
-
CREATE INDEX IF NOT EXISTS nodes_instance_fingerprint_v2 ON nodes(label, last_updated_at, last_reinforced_at_seq, created_at_seq) WHERE valid_to IS NULL AND label IN ('Problem','Vulnerability','Solution','RootCause');
|
|
24830
|
+
CREATE INDEX IF NOT EXISTS nodes_instance_fingerprint ON nodes(label, last_updated_at, last_reinforced_at_seq, created_at_seq) WHERE valid_to IS NULL AND label IN ('Problem','Solution','RootCause');
|
|
24832
24831
|
CREATE INDEX IF NOT EXISTS nodes_logical ON nodes(logical_id, version);
|
|
24833
24832
|
CREATE INDEX IF NOT EXISTS edges_live ON edges(valid_to);
|
|
24834
24833
|
-- Expression index on the per-node relPath (stored in attrs_json) so the
|
|
@@ -24899,7 +24898,7 @@ function rowToEdge(r) {
|
|
|
24899
24898
|
attrs: JSON.parse(r.attrs_json)
|
|
24900
24899
|
};
|
|
24901
24900
|
}
|
|
24902
|
-
var FINGERPRINT_INDEXED_LABELS = ["Problem", "
|
|
24901
|
+
var FINGERPRINT_INDEXED_LABELS = ["Problem", "Solution", "RootCause"];
|
|
24903
24902
|
var SqliteGraphStore = class {
|
|
24904
24903
|
db;
|
|
24905
24904
|
// Typed edge lookups build their SQL from the number of types asked for, and
|
|
@@ -25577,8 +25576,8 @@ var SqliteGraphStore = class {
|
|
|
25577
25576
|
const r2 = this.db.prepare(
|
|
25578
25577
|
`SELECT COUNT(*) AS n, MAX(last_updated_at) AS t,
|
|
25579
25578
|
MAX(COALESCE(last_reinforced_at_seq, created_at_seq, 0)) AS s
|
|
25580
|
-
FROM nodes INDEXED BY
|
|
25581
|
-
WHERE valid_to IS NULL AND label IN ('Problem','
|
|
25579
|
+
FROM nodes INDEXED BY nodes_instance_fingerprint
|
|
25580
|
+
WHERE valid_to IS NULL AND label IN ('Problem','Solution','RootCause')`
|
|
25582
25581
|
).get();
|
|
25583
25582
|
return `${r2.n}:${r2.t ?? 0}:${r2.s ?? 0}`;
|
|
25584
25583
|
}
|
|
@@ -26182,7 +26181,7 @@ function mergeContextEdge(store2, from, to, type, ts) {
|
|
|
26182
26181
|
function deriveContextFromAnchors(store2, problemId, ts, pkgIndex) {
|
|
26183
26182
|
const report = { languages: [], packages: [] };
|
|
26184
26183
|
const p = store2.getNode(problemId);
|
|
26185
|
-
if (!p || p.label !== "Problem"
|
|
26184
|
+
if (!p || p.label !== "Problem") return report;
|
|
26186
26185
|
const files = store2.outEdges(problemId, ["ANCHORED_AT"]).map((e) => store2.getNode(e.to)).filter((n) => !!n && n.label === "File");
|
|
26187
26186
|
if (files.length === 0) return report;
|
|
26188
26187
|
const idx = pkgIndex ?? buildPackageIndex(store2);
|
|
@@ -26387,7 +26386,7 @@ function priorsForFile(store2, relPath) {
|
|
|
26387
26386
|
for (const e of store2.inEdges(file2.id, ["ANCHORED_AT"])) {
|
|
26388
26387
|
const n = store2.getNode(e.from);
|
|
26389
26388
|
if (!n) continue;
|
|
26390
|
-
if (n.label === "Problem"
|
|
26389
|
+
if (n.label === "Problem") {
|
|
26391
26390
|
if (seenProblem.has(n.id)) continue;
|
|
26392
26391
|
seenProblem.add(n.id);
|
|
26393
26392
|
if (!n.attrs["resolvedAt"]) {
|
|
@@ -27655,7 +27654,7 @@ var AGENTS_POINTER_BODY = [
|
|
|
27655
27654
|
init_src2();
|
|
27656
27655
|
init_src();
|
|
27657
27656
|
function buildSnapshot(opts) {
|
|
27658
|
-
const problems =
|
|
27657
|
+
const problems = opts.store.findNodesByLabel("Problem").filter((p) => p.attrs["mergedInto"] === void 0 && historyReadPolicy(p, { mode: "passive", atCommit: opts.atCommit }).allow);
|
|
27659
27658
|
const stillOpen = problems.filter((p) => p.attrs["resolvedAt"] == null);
|
|
27660
27659
|
const allProblems = stillOpen.filter((p) => !isConstraintProblem(p));
|
|
27661
27660
|
allProblems.sort((a, b) => b.lastUpdatedAt - a.lastUpdatedAt);
|
|
@@ -27810,11 +27809,11 @@ function sliceForFile(store2, relPath, atCommit) {
|
|
|
27810
27809
|
const priors = fp ? {
|
|
27811
27810
|
openProblems: fp.openProblems.slice(0, 3).map((p) => ({
|
|
27812
27811
|
id: p.id,
|
|
27813
|
-
description: p.
|
|
27812
|
+
description: p.description,
|
|
27814
27813
|
...typeof p.attrs["fixCandidateFile"] === "string" ? { fixCandidateFile: p.attrs["fixCandidateFile"] } : {}
|
|
27815
27814
|
})),
|
|
27816
27815
|
constraints: fp.constraints.slice(0, 2).map((c) => ({ id: c.id, description: c.description })),
|
|
27817
|
-
resolvedProblems: fp.resolvedProblems.slice(0, 3).map((p) => ({ id: p.id, description: p.
|
|
27816
|
+
resolvedProblems: fp.resolvedProblems.slice(0, 3).map((p) => ({ id: p.id, description: p.description })),
|
|
27818
27817
|
related: fp.related.slice(0, 4).map((n) => ({ id: n.id, label: n.label, description: n.description })),
|
|
27819
27818
|
solutionsByProblem: Object.fromEntries(
|
|
27820
27819
|
[...fp.openProblems.slice(0, 3), ...fp.resolvedProblems.slice(0, 3)].map((p) => [
|