@inerrata-corporation/errata 2.0.2-dev.592 → 2.0.2-dev.597
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/errata.mjs +34 -3
- package/package.json +1 -1
package/errata.mjs
CHANGED
|
@@ -19150,11 +19150,15 @@ function reinforceSameAnchorProblem(store, relPath, workspaceId2, statement, sou
|
|
|
19150
19150
|
if (!sources.includes(source)) {
|
|
19151
19151
|
const corroborations2 = (existing.attrs["corroborations"] ?? 0) + 1;
|
|
19152
19152
|
const promoted = corroborations2 >= DESIGN_PROMOTE_AT;
|
|
19153
|
+
const exposure = priorExposure(store, existing.id, store.currentIngestSeq());
|
|
19154
|
+
const expField = `reinforce${exposure[0].toUpperCase()}${exposure.slice(1)}Count`;
|
|
19153
19155
|
store.updateNode(existing.id, {
|
|
19154
19156
|
attrs: {
|
|
19155
19157
|
...existing.attrs,
|
|
19156
19158
|
sources: [...sources, source],
|
|
19157
19159
|
corroborations: corroborations2,
|
|
19160
|
+
[expField]: (existing.attrs[expField] ?? 0) + 1,
|
|
19161
|
+
lastReinforceExposure: exposure,
|
|
19158
19162
|
...promoted ? { provisional: false } : {}
|
|
19159
19163
|
},
|
|
19160
19164
|
cumulativeHits: (existing.cumulativeHits ?? 0) + 1,
|
|
@@ -19471,6 +19475,8 @@ function recordRenderLedger(store, ledger, seq, ts) {
|
|
|
19471
19475
|
if (field === "shownCount") {
|
|
19472
19476
|
attrs["lastShownAtSeq"] = seq;
|
|
19473
19477
|
if (attrs["firstShownAtSeq"] === void 0) attrs["firstShownAtSeq"] = seq;
|
|
19478
|
+
} else {
|
|
19479
|
+
attrs["lastEvictedAtSeq"] = seq;
|
|
19474
19480
|
}
|
|
19475
19481
|
store.updateNode(id, { attrs, lastUpdatedAt: node2.lastUpdatedAt });
|
|
19476
19482
|
n++;
|
|
@@ -19485,6 +19491,16 @@ function recordRenderLedger(store, ledger, seq, ts) {
|
|
|
19485
19491
|
});
|
|
19486
19492
|
return { shown, evicted };
|
|
19487
19493
|
}
|
|
19494
|
+
function priorExposure(store, nodeId, atSeq) {
|
|
19495
|
+
const n = store.getNode(nodeId);
|
|
19496
|
+
if (!n || !n.attrs) return "unshown";
|
|
19497
|
+
const shownSeq = n.attrs["lastShownAtSeq"];
|
|
19498
|
+
if (shownSeq !== void 0 && shownSeq <= atSeq) return "shown";
|
|
19499
|
+
const evictedSeq = n.attrs["lastEvictedAtSeq"];
|
|
19500
|
+
if (evictedSeq !== void 0 && evictedSeq <= atSeq) return "evicted";
|
|
19501
|
+
if ((n.attrs["evictedCount"] ?? 0) > 0) return "evicted";
|
|
19502
|
+
return "unshown";
|
|
19503
|
+
}
|
|
19488
19504
|
var DESIGN_PROMOTE_AT, STATEMENT_ALIAS_CAP, PATTERN_DEDUP_COSINE, PATTERN_ALIAS_CAP, DEDUP_STOPWORDS, SAME_ANCHOR_DEDUP_JACCARD, CITABLE_PRIOR_LABELS, MAX_ANCHOR_FILES, AUTO_MINT_PREFIX, FIX_CANDIDATE_ASK_LIMIT;
|
|
19489
19505
|
var init_design_problem = __esm({
|
|
19490
19506
|
"../../packages/local-graph/src/design-problem.ts"() {
|
|
@@ -22170,6 +22186,7 @@ __export(src_exports2, {
|
|
|
22170
22186
|
pendingAbstractions: () => pendingAbstractions,
|
|
22171
22187
|
pendingDiscriminators: () => pendingDiscriminators,
|
|
22172
22188
|
percolate: () => percolate,
|
|
22189
|
+
priorExposure: () => priorExposure,
|
|
22173
22190
|
priorsForFile: () => priorsForFile,
|
|
22174
22191
|
promoteRouteWithDiscriminator: () => promoteRouteWithDiscriminator,
|
|
22175
22192
|
propagateFactChange: () => propagateFactChange,
|
|
@@ -52067,7 +52084,7 @@ function harvestInlineTags(store, text, opts) {
|
|
|
52067
52084
|
const source = opts.sourceId ? store.getNode(opts.sourceId) : null;
|
|
52068
52085
|
const mintPriors = opts.mintPriors ?? true;
|
|
52069
52086
|
const touched = opts.sessionTouchedIds ?? /* @__PURE__ */ new Set();
|
|
52070
|
-
const plan = { priorEdges: 0, corroboratedEdges: 0, problems: [], fixes: [], triages: [], causalLinks: [], attempts: [], unresolvedFixes: [], transfers: [], solutionLinks: [], instances: [], patterns: [], domains: [], packages: [], components: [], refutes: [], corroborations: [] };
|
|
52087
|
+
const plan = { priorEdges: 0, corroboratedEdges: 0, exposureShown: 0, exposureEvicted: 0, exposureUnshown: 0, problems: [], fixes: [], triages: [], causalLinks: [], attempts: [], unresolvedFixes: [], transfers: [], solutionLinks: [], instances: [], patterns: [], domains: [], packages: [], components: [], refutes: [], corroborations: [] };
|
|
52071
52088
|
const tags = parseInlineTags(text);
|
|
52072
52089
|
const symptomSeqs = tags.filter((t) => (t.kind === "problem" || t.kind === "todo") && t.statement).map((t) => ({ seq: t.seq ?? -1, statement: t.statement, threadId: t.threadId })).sort((a, b) => a.seq - b.seq);
|
|
52073
52090
|
const bindSymptom = (seq, threadId) => {
|
|
@@ -52257,7 +52274,11 @@ function harvestInlineTags(store, text, opts) {
|
|
|
52257
52274
|
if (targetId && citedLabel && CORROBORATABLE_LABELS.has(citedLabel)) {
|
|
52258
52275
|
const witnessKey = `corrob:${targetId}:lean:${digest({ h: tag.handle })}`.slice(0, 72);
|
|
52259
52276
|
if (!plan.corroborations.some((c) => c.witnessKey === witnessKey)) {
|
|
52260
|
-
|
|
52277
|
+
const exposure = typeof store.currentIngestSeq === "function" ? priorExposure(store, targetId, store.currentIngestSeq()) : "unshown";
|
|
52278
|
+
if (exposure === "shown") plan.exposureShown++;
|
|
52279
|
+
else if (exposure === "evicted") plan.exposureEvicted++;
|
|
52280
|
+
else plan.exposureUnshown++;
|
|
52281
|
+
plan.corroborations.push({ nodeId: targetId, witnessKey, exposure });
|
|
52261
52282
|
}
|
|
52262
52283
|
}
|
|
52263
52284
|
if (mintPriors && source && target) {
|
|
@@ -54441,7 +54462,7 @@ function startLoopLagMonitor(thresholdMs = 1e3) {
|
|
|
54441
54462
|
}
|
|
54442
54463
|
|
|
54443
54464
|
// src/engine.ts
|
|
54444
|
-
var DAEMON_VERSION = true ? "2.0.2-dev.
|
|
54465
|
+
var DAEMON_VERSION = true ? "2.0.2-dev.597" : "2.0.0-alpha.0";
|
|
54445
54466
|
var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
|
|
54446
54467
|
var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
|
|
54447
54468
|
var GIT_OP_MUTE_MS = 4e3;
|
|
@@ -55161,6 +55182,9 @@ function createWorkspaceEngine(opts) {
|
|
|
55161
55182
|
let abstracted = 0;
|
|
55162
55183
|
let triaged = 0;
|
|
55163
55184
|
let priorEdges = 0;
|
|
55185
|
+
let exposureShown = 0;
|
|
55186
|
+
let exposureEvicted = 0;
|
|
55187
|
+
let exposureUnshown = 0;
|
|
55164
55188
|
let corroboratedEdges = 0;
|
|
55165
55189
|
let touchedFileTurns = 0;
|
|
55166
55190
|
let touchedToolTurns = 0;
|
|
@@ -55284,6 +55308,9 @@ function createWorkspaceEngine(opts) {
|
|
|
55284
55308
|
});
|
|
55285
55309
|
priorEdges += plan.priorEdges;
|
|
55286
55310
|
corroboratedEdges += plan.corroboratedEdges;
|
|
55311
|
+
exposureShown += plan.exposureShown;
|
|
55312
|
+
exposureEvicted += plan.exposureEvicted;
|
|
55313
|
+
exposureUnshown += plan.exposureUnshown;
|
|
55287
55314
|
if (touchedFileId) touchedFileTurns++;
|
|
55288
55315
|
if ((toolRuns.get(sessionId)?.size ?? 0) > 0) touchedToolTurns++;
|
|
55289
55316
|
const wf = workingFiles.get(sessionId);
|
|
@@ -55696,6 +55723,10 @@ function createWorkspaceEngine(opts) {
|
|
|
55696
55723
|
triaged,
|
|
55697
55724
|
priorEdges,
|
|
55698
55725
|
corroboratedEdges,
|
|
55726
|
+
// WM-labels calibration cells (see prior-tags exposure split).
|
|
55727
|
+
exposureShown,
|
|
55728
|
+
exposureEvicted,
|
|
55729
|
+
exposureUnshown,
|
|
55699
55730
|
touchedFileTurns,
|
|
55700
55731
|
touchedToolTurns,
|
|
55701
55732
|
// Seam diagnostic: sessions holding tool-run records at harvest time.
|