@inerrata-corporation/errata 2.0.2-dev.497 → 2.0.2-dev.500
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 +43 -4
- package/package.json +1 -1
- package/pass-worker.mjs +39 -2
package/errata.mjs
CHANGED
|
@@ -19295,11 +19295,12 @@ function markFixCandidates(store, t) {
|
|
|
19295
19295
|
let symName = "";
|
|
19296
19296
|
let symRelPath;
|
|
19297
19297
|
let edited = false;
|
|
19298
|
+
const since = Math.max(p.createdAt, Number(p.attrs["fixCandidateClearedAt"] ?? 0));
|
|
19298
19299
|
for (const e of store.outEdges(p.id, ["ANCHORED_AT"])) {
|
|
19299
19300
|
if (e.attrs?.["mention"] === true) continue;
|
|
19300
19301
|
if (e.attrs?.["anchorProvenance"] === "legacy") continue;
|
|
19301
19302
|
const sym = store.getNode(e.to);
|
|
19302
|
-
if (sym && sym.lastUpdatedAt >
|
|
19303
|
+
if (sym && sym.lastUpdatedAt > since) {
|
|
19303
19304
|
edited = true;
|
|
19304
19305
|
symName = sym.description;
|
|
19305
19306
|
symRelPath = sym.attrs["relPath"] ?? void 0;
|
|
@@ -19320,7 +19321,12 @@ function markFixCandidates(store, t) {
|
|
|
19320
19321
|
// asking about. Deliberately NOT `resolvedAt` — this is a question.
|
|
19321
19322
|
fixCandidateAt: t,
|
|
19322
19323
|
fixCandidateSymbol: symName,
|
|
19323
|
-
...symRelPath ? { fixCandidateFile: symRelPath } : {}
|
|
19324
|
+
...symRelPath ? { fixCandidateFile: symRelPath } : {},
|
|
19325
|
+
// Snapshot the render-ledger counter so "shown since THIS ask" is
|
|
19326
|
+
// measurable. `shownCount` is the node's LIFETIME count across every
|
|
19327
|
+
// band, so comparing it raw would retire a fresh ask on a
|
|
19328
|
+
// frequently-surfaced problem before anyone had seen the question once.
|
|
19329
|
+
fixCandidateShownBase: Number(p.attrs["shownCount"] ?? 0)
|
|
19324
19330
|
},
|
|
19325
19331
|
lastUpdatedAt: t
|
|
19326
19332
|
});
|
|
@@ -19328,6 +19334,34 @@ function markFixCandidates(store, t) {
|
|
|
19328
19334
|
}
|
|
19329
19335
|
return resolved;
|
|
19330
19336
|
}
|
|
19337
|
+
function clearSettledFixCandidates(store, t) {
|
|
19338
|
+
const report = { answered: 0, ignored: 0, standing: 0 };
|
|
19339
|
+
for (const p of store.findNodesByLabel("Problem")) {
|
|
19340
|
+
if (p.attrs["fixCandidateAt"] === void 0) continue;
|
|
19341
|
+
const answered = p.attrs["resolvedAt"] != null || store.outEdges(p.id, ["SOLVED_BY"]).some((e) => {
|
|
19342
|
+
const s = store.getNode(e.to);
|
|
19343
|
+
return s !== null && !String(s.description ?? "").startsWith(AUTO_MINT_PREFIX);
|
|
19344
|
+
});
|
|
19345
|
+
const base = Number(
|
|
19346
|
+
p.attrs["fixCandidateShownBase"] ?? p.attrs["shownCount"] ?? 0
|
|
19347
|
+
);
|
|
19348
|
+
const shownSinceAsk = Number(p.attrs["shownCount"] ?? 0) - base;
|
|
19349
|
+
const ignored = shownSinceAsk >= FIX_CANDIDATE_ASK_LIMIT;
|
|
19350
|
+
if (!answered && !ignored) {
|
|
19351
|
+
report.standing++;
|
|
19352
|
+
continue;
|
|
19353
|
+
}
|
|
19354
|
+
const attrs = { ...p.attrs };
|
|
19355
|
+
delete attrs["fixCandidateAt"];
|
|
19356
|
+
delete attrs["fixCandidateSymbol"];
|
|
19357
|
+
delete attrs["fixCandidateFile"];
|
|
19358
|
+
attrs["fixCandidateClearedAt"] = t;
|
|
19359
|
+
store.updateNode(p.id, { attrs, lastUpdatedAt: t });
|
|
19360
|
+
if (answered) report.answered++;
|
|
19361
|
+
else report.ignored++;
|
|
19362
|
+
}
|
|
19363
|
+
return report;
|
|
19364
|
+
}
|
|
19331
19365
|
function recordRenderLedger(store, ledger, seq, ts) {
|
|
19332
19366
|
const bump = (ids, field) => {
|
|
19333
19367
|
let n = 0;
|
|
@@ -19353,7 +19387,7 @@ function recordRenderLedger(store, ledger, seq, ts) {
|
|
|
19353
19387
|
});
|
|
19354
19388
|
return { shown, evicted };
|
|
19355
19389
|
}
|
|
19356
|
-
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;
|
|
19390
|
+
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;
|
|
19357
19391
|
var init_design_problem = __esm({
|
|
19358
19392
|
"../../packages/local-graph/src/design-problem.ts"() {
|
|
19359
19393
|
"use strict";
|
|
@@ -19400,6 +19434,7 @@ var init_design_problem = __esm({
|
|
|
19400
19434
|
]);
|
|
19401
19435
|
MAX_ANCHOR_FILES = 5;
|
|
19402
19436
|
AUTO_MINT_PREFIX = "addressed by an edit to ";
|
|
19437
|
+
FIX_CANDIDATE_ASK_LIMIT = 5;
|
|
19403
19438
|
}
|
|
19404
19439
|
});
|
|
19405
19440
|
|
|
@@ -21723,6 +21758,7 @@ __export(src_exports2, {
|
|
|
21723
21758
|
CITABLE_PRIOR_LABELS: () => CITABLE_PRIOR_LABELS,
|
|
21724
21759
|
CODE_REACH_EDGES: () => CODE_REACH_EDGES,
|
|
21725
21760
|
CREDIT_FAMILY: () => CREDIT_FAMILY,
|
|
21761
|
+
FIX_CANDIDATE_ASK_LIMIT: () => FIX_CANDIDATE_ASK_LIMIT,
|
|
21726
21762
|
JOINT_COMMUNITY_EDGES: () => JOINT_COMMUNITY_EDGES,
|
|
21727
21763
|
JOINT_COMMUNITY_LABELS: () => JOINT_COMMUNITY_LABELS,
|
|
21728
21764
|
MAX_ANCHOR_FILES: () => MAX_ANCHOR_FILES,
|
|
@@ -21752,6 +21788,7 @@ __export(src_exports2, {
|
|
|
21752
21788
|
claimId: () => claimId,
|
|
21753
21789
|
clearAnsweredRevisits: () => clearAnsweredRevisits,
|
|
21754
21790
|
clearRevisit: () => clearRevisit,
|
|
21791
|
+
clearSettledFixCandidates: () => clearSettledFixCandidates,
|
|
21755
21792
|
communityInductionRequests: () => communityInductionRequests,
|
|
21756
21793
|
communitySeeds: () => communitySeeds,
|
|
21757
21794
|
compareSemver: () => compareSemver,
|
|
@@ -28475,6 +28512,7 @@ function runNightlyPipeline(store) {
|
|
|
28475
28512
|
const motifs = promoteMotifs(store, started2);
|
|
28476
28513
|
reopenAutoClosedProblems(store, started2);
|
|
28477
28514
|
const revisits = clearAnsweredRevisits(store, started2);
|
|
28515
|
+
const fixCandidates = clearSettledFixCandidates(store, started2);
|
|
28478
28516
|
const designResolved = markFixCandidates(store, started2);
|
|
28479
28517
|
const cry = crystallize(store, { ts: started2 });
|
|
28480
28518
|
return {
|
|
@@ -28491,6 +28529,7 @@ function runNightlyPipeline(store) {
|
|
|
28491
28529
|
skillsRefreshed: 0,
|
|
28492
28530
|
designResolved,
|
|
28493
28531
|
revisitsCleared: revisits.cleared,
|
|
28532
|
+
fixCandidatesSettled: fixCandidates.answered + fixCandidates.ignored,
|
|
28494
28533
|
claimsEvaluated: cry.evaluated,
|
|
28495
28534
|
claimsDerived: cry.derived.length,
|
|
28496
28535
|
durationMs: Date.now() - started2
|
|
@@ -53746,7 +53785,7 @@ function startLoopLagMonitor(thresholdMs = 1e3) {
|
|
|
53746
53785
|
}
|
|
53747
53786
|
|
|
53748
53787
|
// src/engine.ts
|
|
53749
|
-
var DAEMON_VERSION = true ? "2.0.2-dev.
|
|
53788
|
+
var DAEMON_VERSION = true ? "2.0.2-dev.500" : "2.0.0-alpha.0";
|
|
53750
53789
|
var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
|
|
53751
53790
|
var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
|
|
53752
53791
|
var GIT_OP_MUTE_MS = 4e3;
|
package/package.json
CHANGED
package/pass-worker.mjs
CHANGED
|
@@ -25579,11 +25579,12 @@ function markFixCandidates(store2, t) {
|
|
|
25579
25579
|
let symName = "";
|
|
25580
25580
|
let symRelPath;
|
|
25581
25581
|
let edited = false;
|
|
25582
|
+
const since = Math.max(p.createdAt, Number(p.attrs["fixCandidateClearedAt"] ?? 0));
|
|
25582
25583
|
for (const e of store2.outEdges(p.id, ["ANCHORED_AT"])) {
|
|
25583
25584
|
if (e.attrs?.["mention"] === true) continue;
|
|
25584
25585
|
if (e.attrs?.["anchorProvenance"] === "legacy") continue;
|
|
25585
25586
|
const sym = store2.getNode(e.to);
|
|
25586
|
-
if (sym && sym.lastUpdatedAt >
|
|
25587
|
+
if (sym && sym.lastUpdatedAt > since) {
|
|
25587
25588
|
edited = true;
|
|
25588
25589
|
symName = sym.description;
|
|
25589
25590
|
symRelPath = sym.attrs["relPath"] ?? void 0;
|
|
@@ -25604,7 +25605,12 @@ function markFixCandidates(store2, t) {
|
|
|
25604
25605
|
// asking about. Deliberately NOT `resolvedAt` — this is a question.
|
|
25605
25606
|
fixCandidateAt: t,
|
|
25606
25607
|
fixCandidateSymbol: symName,
|
|
25607
|
-
...symRelPath ? { fixCandidateFile: symRelPath } : {}
|
|
25608
|
+
...symRelPath ? { fixCandidateFile: symRelPath } : {},
|
|
25609
|
+
// Snapshot the render-ledger counter so "shown since THIS ask" is
|
|
25610
|
+
// measurable. `shownCount` is the node's LIFETIME count across every
|
|
25611
|
+
// band, so comparing it raw would retire a fresh ask on a
|
|
25612
|
+
// frequently-surfaced problem before anyone had seen the question once.
|
|
25613
|
+
fixCandidateShownBase: Number(p.attrs["shownCount"] ?? 0)
|
|
25608
25614
|
},
|
|
25609
25615
|
lastUpdatedAt: t
|
|
25610
25616
|
});
|
|
@@ -25612,6 +25618,35 @@ function markFixCandidates(store2, t) {
|
|
|
25612
25618
|
}
|
|
25613
25619
|
return resolved;
|
|
25614
25620
|
}
|
|
25621
|
+
var FIX_CANDIDATE_ASK_LIMIT = 5;
|
|
25622
|
+
function clearSettledFixCandidates(store2, t) {
|
|
25623
|
+
const report = { answered: 0, ignored: 0, standing: 0 };
|
|
25624
|
+
for (const p of store2.findNodesByLabel("Problem")) {
|
|
25625
|
+
if (p.attrs["fixCandidateAt"] === void 0) continue;
|
|
25626
|
+
const answered = p.attrs["resolvedAt"] != null || store2.outEdges(p.id, ["SOLVED_BY"]).some((e) => {
|
|
25627
|
+
const s = store2.getNode(e.to);
|
|
25628
|
+
return s !== null && !String(s.description ?? "").startsWith(AUTO_MINT_PREFIX);
|
|
25629
|
+
});
|
|
25630
|
+
const base = Number(
|
|
25631
|
+
p.attrs["fixCandidateShownBase"] ?? p.attrs["shownCount"] ?? 0
|
|
25632
|
+
);
|
|
25633
|
+
const shownSinceAsk = Number(p.attrs["shownCount"] ?? 0) - base;
|
|
25634
|
+
const ignored = shownSinceAsk >= FIX_CANDIDATE_ASK_LIMIT;
|
|
25635
|
+
if (!answered && !ignored) {
|
|
25636
|
+
report.standing++;
|
|
25637
|
+
continue;
|
|
25638
|
+
}
|
|
25639
|
+
const attrs = { ...p.attrs };
|
|
25640
|
+
delete attrs["fixCandidateAt"];
|
|
25641
|
+
delete attrs["fixCandidateSymbol"];
|
|
25642
|
+
delete attrs["fixCandidateFile"];
|
|
25643
|
+
attrs["fixCandidateClearedAt"] = t;
|
|
25644
|
+
store2.updateNode(p.id, { attrs, lastUpdatedAt: t });
|
|
25645
|
+
if (answered) report.answered++;
|
|
25646
|
+
else report.ignored++;
|
|
25647
|
+
}
|
|
25648
|
+
return report;
|
|
25649
|
+
}
|
|
25615
25650
|
|
|
25616
25651
|
// ../../packages/local-graph/src/intent.ts
|
|
25617
25652
|
init_src();
|
|
@@ -26347,6 +26382,7 @@ function runNightlyPipeline(store2) {
|
|
|
26347
26382
|
const motifs = promoteMotifs(store2, started);
|
|
26348
26383
|
reopenAutoClosedProblems(store2, started);
|
|
26349
26384
|
const revisits = clearAnsweredRevisits(store2, started);
|
|
26385
|
+
const fixCandidates = clearSettledFixCandidates(store2, started);
|
|
26350
26386
|
const designResolved = markFixCandidates(store2, started);
|
|
26351
26387
|
const cry = crystallize(store2, { ts: started });
|
|
26352
26388
|
return {
|
|
@@ -26363,6 +26399,7 @@ function runNightlyPipeline(store2) {
|
|
|
26363
26399
|
skillsRefreshed: 0,
|
|
26364
26400
|
designResolved,
|
|
26365
26401
|
revisitsCleared: revisits.cleared,
|
|
26402
|
+
fixCandidatesSettled: fixCandidates.answered + fixCandidates.ignored,
|
|
26366
26403
|
claimsEvaluated: cry.evaluated,
|
|
26367
26404
|
claimsDerived: cry.derived.length,
|
|
26368
26405
|
durationMs: Date.now() - started
|