@inerrata-corporation/errata 2.0.0-dev.60 → 2.0.0-dev.62
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 +26 -14
- package/package.json +1 -1
package/errata.mjs
CHANGED
|
@@ -21518,7 +21518,7 @@ function loadConfig() {
|
|
|
21518
21518
|
if (!existsSync4(p)) {
|
|
21519
21519
|
ensureDir(globalDir());
|
|
21520
21520
|
const cfg = defaultConfig();
|
|
21521
|
-
saveConfig(cfg);
|
|
21521
|
+
saveConfig({ ...cfg, cloudUrl: DEFAULT_CLOUD_URL });
|
|
21522
21522
|
return cfg;
|
|
21523
21523
|
}
|
|
21524
21524
|
const raw2 = readFileSync3(p, "utf8").replace(/^\uFEFF/, "");
|
|
@@ -24052,17 +24052,18 @@ function buildFileRecallInstruction(referent = "\u2026") {
|
|
|
24052
24052
|
}
|
|
24053
24053
|
function triageBullet(ref) {
|
|
24054
24054
|
return [
|
|
24055
|
-
" \u2022 you diagnosed a bug \u2014
|
|
24056
|
-
"
|
|
24057
|
-
" \xB7 the
|
|
24058
|
-
"
|
|
24059
|
-
"
|
|
24060
|
-
|
|
24061
|
-
"
|
|
24062
|
-
"
|
|
24063
|
-
"
|
|
24064
|
-
"
|
|
24065
|
-
"
|
|
24055
|
+
" \u2022 you diagnosed a bug \u2014 write the CAUSAL CHAIN in one flag with `<-` (caused-by).",
|
|
24056
|
+
" Don't split it into a second tag you'll skip under load; fold it the way you'd say it:",
|
|
24057
|
+
" \xB7 [!the symptom <- the mechanism] \u2014 leftmost is what breaks observably (what a test",
|
|
24058
|
+
" or user reports); the step right is what caused it. e.g. [!the runner deadlocks after",
|
|
24059
|
+
" a task rejects <- await fn() has no try/finally, so a rejection never decrements running].",
|
|
24060
|
+
" \xB7 chain it as deep as you actually diagnosed: [!symptom <- cause <- root cause] \u2014 every",
|
|
24061
|
+
" ` <- ` is a link we record, and the RIGHTMOST is the reusable root cause (the node other",
|
|
24062
|
+
" agents find). Stop at the deepest mechanism you're sure of; don't guess a link.",
|
|
24063
|
+
" When symptom and cause turn up FAR APART \u2014 the cause lands turns later, several problems",
|
|
24064
|
+
" in play \u2014 name the thread instead: [!#slug the symptom] once, then (cause:#slug the",
|
|
24065
|
+
" mechanism) binds to it however far away (same slug, your choice of word). Explaining a",
|
|
24066
|
+
` problem we SHOWED you? bind by its handle/id: (cause:[${ref}] \u2026) / (cause:#dprob_\u2026 \u2026).`
|
|
24066
24067
|
].join("\n");
|
|
24067
24068
|
}
|
|
24068
24069
|
function linkBullet(ref) {
|
|
@@ -41030,6 +41031,7 @@ var HANDLE_RE = /\[([a-z0-9][\w-]{0,40})\]|((?:pat|sol|drc|dcause|dfix|dprob|pro
|
|
|
41030
41031
|
var FIX_PREFIX = /^\s*fix:(?:#([a-z][\w-]{0,63}))?\s*/i;
|
|
41031
41032
|
var CONSTRAINT_RE = /\(\s*constraint:\s*([^()\n]{8,}?)\s*\)/gi;
|
|
41032
41033
|
var CAUSE_PREFIX = /^\s*cause:(?:#([a-z][\w-]{0,63}))?\s*/i;
|
|
41034
|
+
var CAUSE_ARROW = /\s+(?:<-|←)\s+/;
|
|
41033
41035
|
var ATTEMPT_RE = /\(\s*(tried|failed):(?:#([a-z][\w-]{0,63}))?\s*((?:[^()\n]|\([^()\n]*\)){8,}?)\s*\)/gi;
|
|
41034
41036
|
var AIDS_PREFIX = /^\s*aids:(?:#([a-z][\w-]{0,63}))?\s*/i;
|
|
41035
41037
|
var INSTANCE_PREFIX = /^\s*instance:\s*/i;
|
|
@@ -41148,7 +41150,9 @@ function parseInlineTags(text) {
|
|
|
41148
41150
|
const flagThread = f[2];
|
|
41149
41151
|
const raw3 = f[3].trim();
|
|
41150
41152
|
if (raw3.length >= 8) {
|
|
41151
|
-
const
|
|
41153
|
+
const segs = raw3.split(CAUSE_ARROW).map((s) => s.trim()).filter((s) => s.length > 0);
|
|
41154
|
+
const symptomRaw = segs.length > 1 ? segs[0] : raw3;
|
|
41155
|
+
const statement = symptomRaw.length > FLAG_MAX ? `${symptomRaw.slice(0, FLAG_MAX - 1).trimEnd()}\u2026` : symptomRaw;
|
|
41152
41156
|
const asFix = f[1] === "!" && /^(?:fixed|resolved)\s*[:,-]\s*/i.exec(statement);
|
|
41153
41157
|
if (asFix) {
|
|
41154
41158
|
const note = statement.slice(asFix[0].length).trim();
|
|
@@ -41165,6 +41169,14 @@ function parseInlineTags(text) {
|
|
|
41165
41169
|
...flagThread ? { threadId: flagThread } : {},
|
|
41166
41170
|
sentence: sfield
|
|
41167
41171
|
});
|
|
41172
|
+
if (f[1] === "!" && segs.length > 1) {
|
|
41173
|
+
for (const seg of segs.slice(1)) {
|
|
41174
|
+
const causeText = seg.replace(/\s+/g, " ").trim();
|
|
41175
|
+
if (causeText.length >= CAUSE_TEXT_MIN) {
|
|
41176
|
+
out2.push({ kind: "triage", causeText, sentence: sfield, ...flagThread ? { threadId: flagThread } : {} });
|
|
41177
|
+
}
|
|
41178
|
+
}
|
|
41179
|
+
}
|
|
41168
41180
|
}
|
|
41169
41181
|
}
|
|
41170
41182
|
ATTEMPT_RE.lastIndex = 0;
|
|
@@ -42862,7 +42874,7 @@ function startLoopLagMonitor(thresholdMs = 1e3) {
|
|
|
42862
42874
|
}
|
|
42863
42875
|
|
|
42864
42876
|
// src/engine.ts
|
|
42865
|
-
var DAEMON_VERSION = true ? "2.0.0-dev.
|
|
42877
|
+
var DAEMON_VERSION = true ? "2.0.0-dev.62" : "2.0.0-alpha.0";
|
|
42866
42878
|
var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
|
|
42867
42879
|
var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
|
|
42868
42880
|
var GIT_OP_MUTE_MS = 4e3;
|