@inerrata-corporation/errata 2.0.13-dev.2998 → 2.0.13-dev.3043
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 +141 -1
- package/errata.mjs +992 -224
- package/package.json +1 -1
- package/pass-worker.mjs +180 -3
package/consolidate-worker.mjs
CHANGED
|
@@ -15153,6 +15153,79 @@ var init_zod = __esm({
|
|
|
15153
15153
|
}
|
|
15154
15154
|
});
|
|
15155
15155
|
|
|
15156
|
+
// ../../packages/shared/src/history-text.ts
|
|
15157
|
+
var init_history_text = __esm({
|
|
15158
|
+
"../../packages/shared/src/history-text.ts"() {
|
|
15159
|
+
"use strict";
|
|
15160
|
+
}
|
|
15161
|
+
});
|
|
15162
|
+
|
|
15163
|
+
// ../../packages/shared/src/history-evidence.ts
|
|
15164
|
+
var HistoryAnchorSourceSchema, HistorySymbolAnchorSchema, HistoryEvidenceSelectionSchema, HistoryCandidateSchema, HistoryRelationCandidateSchema, HistoryCandidateBatchSchema, HistoryEvidenceRefSchema;
|
|
15165
|
+
var init_history_evidence = __esm({
|
|
15166
|
+
"../../packages/shared/src/history-evidence.ts"() {
|
|
15167
|
+
"use strict";
|
|
15168
|
+
init_zod();
|
|
15169
|
+
init_history_text();
|
|
15170
|
+
HistoryAnchorSourceSchema = external_exports.strictObject({
|
|
15171
|
+
sourceCommitSha: external_exports.string().regex(/^[a-f0-9]{40,64}$/),
|
|
15172
|
+
commitSha: external_exports.string().regex(/^[a-f0-9]{40,64}$/),
|
|
15173
|
+
side: external_exports.enum(["before", "after"]),
|
|
15174
|
+
blockDigest: external_exports.string().regex(/^[a-f0-9]{64}$/),
|
|
15175
|
+
startByte: external_exports.number().int().nonnegative(),
|
|
15176
|
+
endByte: external_exports.number().int().positive(),
|
|
15177
|
+
bodyHash: external_exports.string().regex(/^[a-f0-9]{8,64}$/).optional()
|
|
15178
|
+
}).refine((v) => v.endByte > v.startByte);
|
|
15179
|
+
HistorySymbolAnchorSchema = external_exports.object({
|
|
15180
|
+
symbolId: external_exports.string().regex(/^sym_[a-f0-9]{8,64}$/),
|
|
15181
|
+
kind: external_exports.string().max(40),
|
|
15182
|
+
/** Legacy association, never a source-revision or live validation. */
|
|
15183
|
+
contentHash: external_exports.string().regex(/^[a-f0-9]{8,64}$/).optional(),
|
|
15184
|
+
historical: HistoryAnchorSourceSchema.optional()
|
|
15185
|
+
});
|
|
15186
|
+
HistoryEvidenceSelectionSchema = external_exports.strictObject({
|
|
15187
|
+
blockId: external_exports.string().min(1).max(80),
|
|
15188
|
+
quote: external_exports.string().min(3).max(1600),
|
|
15189
|
+
supports: external_exports.enum(["statement", "condition", "rationale", "relation"]),
|
|
15190
|
+
conditionIndex: external_exports.number().int().min(0).max(7).nullable(),
|
|
15191
|
+
/** Optional exact location disambiguates repeated source lines. */
|
|
15192
|
+
startByte: external_exports.number().int().nonnegative().optional()
|
|
15193
|
+
});
|
|
15194
|
+
HistoryCandidateSchema = external_exports.strictObject({
|
|
15195
|
+
tempId: external_exports.string().regex(/^a[0-9]{1,3}$/),
|
|
15196
|
+
label: external_exports.enum(["Problem", "Solution", "RootCause", "Claim"]),
|
|
15197
|
+
statement: external_exports.string().min(10).max(2e3),
|
|
15198
|
+
claimKind: external_exports.enum(["snapshot", "decision", "constraint"]).nullable(),
|
|
15199
|
+
qualifier: external_exports.enum(["instance", "project"]),
|
|
15200
|
+
conditions: external_exports.array(external_exports.string().min(1).max(300)).max(8),
|
|
15201
|
+
rationale: external_exports.string().min(1).max(1e3).nullable(),
|
|
15202
|
+
evidence: external_exports.array(HistoryEvidenceSelectionSchema).min(1).max(12),
|
|
15203
|
+
anchorTokens: external_exports.array(external_exports.string().regex(/^p[0-9]+$/)).max(8)
|
|
15204
|
+
});
|
|
15205
|
+
HistoryRelationCandidateSchema = external_exports.strictObject({
|
|
15206
|
+
tempId: external_exports.string().regex(/^r[0-9]{1,3}$/),
|
|
15207
|
+
fromTempId: external_exports.string().regex(/^a[0-9]{1,3}$/),
|
|
15208
|
+
toTempId: external_exports.string().regex(/^a[0-9]{1,3}$/),
|
|
15209
|
+
meaning: external_exports.enum(["resolves", "mitigates", "caused-by"]),
|
|
15210
|
+
evidence: external_exports.array(HistoryEvidenceSelectionSchema).min(1).max(8)
|
|
15211
|
+
});
|
|
15212
|
+
HistoryCandidateBatchSchema = external_exports.strictObject({
|
|
15213
|
+
atoms: external_exports.array(HistoryCandidateSchema).max(32),
|
|
15214
|
+
relations: external_exports.array(HistoryRelationCandidateSchema).max(32)
|
|
15215
|
+
});
|
|
15216
|
+
HistoryEvidenceRefSchema = HistoryEvidenceSelectionSchema.extend({
|
|
15217
|
+
blockDigest: external_exports.string().regex(/^[a-f0-9]{64}$/),
|
|
15218
|
+
startByte: external_exports.number().int().nonnegative(),
|
|
15219
|
+
endByte: external_exports.number().int().nonnegative(),
|
|
15220
|
+
sourceKind: external_exports.enum(["narrative", "diff"]),
|
|
15221
|
+
commitSha: external_exports.string().regex(/^[a-f0-9]{40,64}$/).nullable(),
|
|
15222
|
+
pathToken: external_exports.string().regex(/^p[0-9]+$/).nullable(),
|
|
15223
|
+
scrubberVersion: external_exports.string().max(80),
|
|
15224
|
+
side: external_exports.enum(["before", "after", "context", "mixed", "narrative"])
|
|
15225
|
+
});
|
|
15226
|
+
}
|
|
15227
|
+
});
|
|
15228
|
+
|
|
15156
15229
|
// ../../packages/shared/src/edge-rules.ts
|
|
15157
15230
|
function isValidEdge(from, type, to) {
|
|
15158
15231
|
const rule = EDGE_RULES[type];
|
|
@@ -15191,7 +15264,9 @@ var init_edge_rules = __esm({
|
|
|
15191
15264
|
// ── Security spine (v1 taxonomy.ts SECURITY_FORWARD_ONLY commentary) ──
|
|
15192
15265
|
TARGETS: { from: ["Exploit"], to: ["Vulnerability"] },
|
|
15193
15266
|
ENABLES: { from: ["AntiPattern"], to: ["Vulnerability"] },
|
|
15194
|
-
|
|
15267
|
+
// Partial remedies also apply to project Problems/RootCauses. Direction stays
|
|
15268
|
+
// remedy -> ailment; a mitigation must never claim complete SOLVED_BY status.
|
|
15269
|
+
MITIGATES: { from: ["Solution"], to: ["Vulnerability", "Problem", "RootCause"] },
|
|
15195
15270
|
PRESENTS: { from: ["Solution"], to: ["Problem", "Vulnerability"] },
|
|
15196
15271
|
// SOLVED_BY sources: Vulnerability (v1 comment) + Problem/RootCause
|
|
15197
15272
|
// (upstream design-problem.ts + triage.ts mint both).
|
|
@@ -15356,6 +15431,7 @@ var init_wire = __esm({
|
|
|
15356
15431
|
"../../packages/shared/src/wire.ts"() {
|
|
15357
15432
|
"use strict";
|
|
15358
15433
|
init_zod();
|
|
15434
|
+
init_history_evidence();
|
|
15359
15435
|
init_castalia();
|
|
15360
15436
|
init_edge_rules();
|
|
15361
15437
|
init_symbol_intent();
|
|
@@ -15478,6 +15554,12 @@ var init_wire = __esm({
|
|
|
15478
15554
|
attrs: external_exports.object({
|
|
15479
15555
|
confidence: external_exports.number().min(0).max(1).optional(),
|
|
15480
15556
|
extractedBy: external_exports.enum(INGEST_EXTRACTION_SOURCES).optional(),
|
|
15557
|
+
sourceSupport: external_exports.literal("supported").optional(),
|
|
15558
|
+
historicalAnchors: external_exports.array(HistoryAnchorSourceSchema).max(160).optional(),
|
|
15559
|
+
evidence: external_exports.array(HistoryEvidenceRefSchema).max(12).optional(),
|
|
15560
|
+
verificationEvidence: external_exports.array(HistoryEvidenceRefSchema).max(12).optional(),
|
|
15561
|
+
verifierBuild: external_exports.string().max(80).optional(),
|
|
15562
|
+
unitDigest: external_exports.string().regex(/^[a-f0-9]{64}$/).optional(),
|
|
15481
15563
|
/** Triage route per-context counts (T3 induction). Carried as structured data
|
|
15482
15564
|
* here; stored JSON-encoded on the Neo4j rel (`perContextJson`). */
|
|
15483
15565
|
perContext: external_exports.record(external_exports.string(), RouteContextCountWireSchema).optional(),
|
|
@@ -15585,6 +15667,49 @@ var init_manifests = __esm({
|
|
|
15585
15667
|
}
|
|
15586
15668
|
});
|
|
15587
15669
|
|
|
15670
|
+
// ../../packages/shared/src/history-quality.ts
|
|
15671
|
+
var init_history_quality = __esm({
|
|
15672
|
+
"../../packages/shared/src/history-quality.ts"() {
|
|
15673
|
+
"use strict";
|
|
15674
|
+
}
|
|
15675
|
+
});
|
|
15676
|
+
|
|
15677
|
+
// ../../packages/shared/src/history-read.ts
|
|
15678
|
+
var init_history_read = __esm({
|
|
15679
|
+
"../../packages/shared/src/history-read.ts"() {
|
|
15680
|
+
"use strict";
|
|
15681
|
+
}
|
|
15682
|
+
});
|
|
15683
|
+
|
|
15684
|
+
// ../../packages/shared/src/history-temporal.ts
|
|
15685
|
+
var init_history_temporal = __esm({
|
|
15686
|
+
"../../packages/shared/src/history-temporal.ts"() {
|
|
15687
|
+
"use strict";
|
|
15688
|
+
}
|
|
15689
|
+
});
|
|
15690
|
+
|
|
15691
|
+
// ../../packages/shared/src/history-revision.ts
|
|
15692
|
+
var Sha, HistoryRevisionRequestSchema;
|
|
15693
|
+
var init_history_revision = __esm({
|
|
15694
|
+
"../../packages/shared/src/history-revision.ts"() {
|
|
15695
|
+
"use strict";
|
|
15696
|
+
init_zod();
|
|
15697
|
+
init_hash();
|
|
15698
|
+
init_history_evidence();
|
|
15699
|
+
Sha = external_exports.string().regex(/^(?:[a-f0-9]{40}|[a-f0-9]{64})$/);
|
|
15700
|
+
HistoryRevisionRequestSchema = external_exports.strictObject({
|
|
15701
|
+
atCommit: Sha,
|
|
15702
|
+
parents: external_exports.array(external_exports.strictObject({ commit: Sha, parents: external_exports.array(Sha).max(32) })).max(8192),
|
|
15703
|
+
observations: external_exports.array(external_exports.strictObject({
|
|
15704
|
+
occurrenceId: external_exports.string().min(1).max(100),
|
|
15705
|
+
symbols: external_exports.array(external_exports.strictObject({ symbolId: external_exports.string().regex(/^sym_[a-f0-9]{8,64}$/), bodyHash: external_exports.string().regex(/^[a-f0-9]{8,64}$/) })).max(32),
|
|
15706
|
+
/** Scrubbed, tokenized net change from this occurrence's source to atCommit. */
|
|
15707
|
+
diff: external_exports.string().max(16e3).optional()
|
|
15708
|
+
})).max(50)
|
|
15709
|
+
});
|
|
15710
|
+
}
|
|
15711
|
+
});
|
|
15712
|
+
|
|
15588
15713
|
// ../../packages/shared/src/nlp/canonicalize.ts
|
|
15589
15714
|
var init_canonicalize = __esm({
|
|
15590
15715
|
"../../packages/shared/src/nlp/canonicalize.ts"() {
|
|
@@ -15624,6 +15749,11 @@ var init_src = __esm({
|
|
|
15624
15749
|
init_project_symbol();
|
|
15625
15750
|
init_lockfile();
|
|
15626
15751
|
init_manifests();
|
|
15752
|
+
init_history_quality();
|
|
15753
|
+
init_history_read();
|
|
15754
|
+
init_history_temporal();
|
|
15755
|
+
init_history_revision();
|
|
15756
|
+
init_history_evidence();
|
|
15627
15757
|
init_hash();
|
|
15628
15758
|
init_error_signature();
|
|
15629
15759
|
init_canonicalize();
|
|
@@ -15633,6 +15763,7 @@ var init_src = __esm({
|
|
|
15633
15763
|
init_predicate();
|
|
15634
15764
|
init_taxonomy();
|
|
15635
15765
|
init_triage_canon();
|
|
15766
|
+
init_history_text();
|
|
15636
15767
|
}
|
|
15637
15768
|
});
|
|
15638
15769
|
|
|
@@ -17210,6 +17341,15 @@ function percolate(l1, l2, opts) {
|
|
|
17210
17341
|
for (const label of PERCOLATING_LABELS) {
|
|
17211
17342
|
for (const n of l1.findNodesByLabel(label)) {
|
|
17212
17343
|
if (n.label === "Problem" && n.attrs["resolvedAs"] === PROBLEM_RESOLUTION.FALSE_POSITIVE) continue;
|
|
17344
|
+
if (n.attrs["source"] === "cloud") {
|
|
17345
|
+
const raw = l2.getMeta?.(`history-correction:${String(n.attrs["cloudNodeId"] ?? n.id)}`);
|
|
17346
|
+
const correction = raw ? JSON.parse(raw) : null;
|
|
17347
|
+
const support = n.attrs["historyQuality"]?.["sourceSupport"];
|
|
17348
|
+
if (correction?.action === "quarantine" || correction?.sourceSupport === "contradicted" || support === "quarantined" || support === "contradicted") {
|
|
17349
|
+
result.nodesSkipped++;
|
|
17350
|
+
continue;
|
|
17351
|
+
}
|
|
17352
|
+
}
|
|
17213
17353
|
present.add(n.id);
|
|
17214
17354
|
const existing = l2.getNode(n.id);
|
|
17215
17355
|
if (!existing) {
|