@inerrata-corporation/errata 2.0.2-dev.540 → 2.0.2-dev.545

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 CHANGED
@@ -19287,16 +19287,24 @@ function closeDesignProblem(store, problemId, fixNote, t) {
19287
19287
  const p = store.getNode(problemId);
19288
19288
  if (!p || p.label !== "Problem") return false;
19289
19289
  if (p.attrs["resolvedAs"]) return false;
19290
- if (fixNote?.trim() && store.outEdges(problemId, ["SOLVED_BY"]).length === 0) {
19291
- const solId = `dfix_${digest({ problemId, fix: fixNote })}`.slice(0, 56);
19292
- store.mergeNode(
19293
- buildNode(store, solId, "Solution", fixNote.trim(), t, { source: "convo", provisional: false })
19294
- );
19295
- mergeEdge(store, problemId, solId, "SOLVED_BY", t);
19290
+ if (fixNote?.trim()) {
19291
+ const sols = store.outEdges(problemId, ["SOLVED_BY"]).map((e) => store.getNode(e.to)).filter((n) => n !== null);
19292
+ if (sols.every((s) => isAutoMinted(s))) {
19293
+ const solId = `dfix_${digest({ problemId, fix: fixNote })}`.slice(0, 56);
19294
+ store.mergeNode(
19295
+ buildNode(store, solId, "Solution", fixNote.trim(), t, { source: "convo", provisional: false })
19296
+ );
19297
+ mergeEdge(store, problemId, solId, "SOLVED_BY", t);
19298
+ }
19296
19299
  }
19297
19300
  if (p.attrs["resolvedAt"]) return false;
19298
19301
  store.updateNode(problemId, {
19299
- attrs: { ...p.attrs, provisional: false, resolvedAt: t },
19302
+ // `resolutionWitnessed` records WHO closed it an agent's explicit fix tag
19303
+ // — so the reopen sweep can tell this close from the heuristic auto-closes
19304
+ // it polices. The solution SET is the wrong proxy: a bare `(fix:[handle])`
19305
+ // mints no Solution, and a legacy placeholder beside it reads as
19306
+ // all-heuristic either way.
19307
+ attrs: { ...p.attrs, provisional: false, resolvedAt: t, resolutionWitnessed: true },
19300
19308
  lastUpdatedAt: t
19301
19309
  });
19302
19310
  return true;
@@ -19307,6 +19315,10 @@ function reopenAutoClosedProblems(store, t) {
19307
19315
  if (p.attrs["resolvedAt"] == null) continue;
19308
19316
  if (p.attrs["resolvedAs"] != null) continue;
19309
19317
  if (p.attrs["mergedInto"] !== void 0) continue;
19318
+ if (p.attrs["resolutionWitnessed"] === true) {
19319
+ report.agentDescribed++;
19320
+ continue;
19321
+ }
19310
19322
  const sols = store.outEdges(p.id, ["SOLVED_BY"]).map((e) => store.getNode(e.to)).filter((n) => n !== null);
19311
19323
  if (sols.length === 0) continue;
19312
19324
  if (!sols.every((s) => String(s.description ?? "").startsWith(AUTO_MINT_PREFIX))) {
@@ -54316,7 +54328,7 @@ function startLoopLagMonitor(thresholdMs = 1e3) {
54316
54328
  }
54317
54329
 
54318
54330
  // src/engine.ts
54319
- var DAEMON_VERSION = true ? "2.0.2-dev.540" : "2.0.0-alpha.0";
54331
+ var DAEMON_VERSION = true ? "2.0.2-dev.545" : "2.0.0-alpha.0";
54320
54332
  var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
54321
54333
  var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
54322
54334
  var GIT_OP_MUTE_MS = 4e3;
@@ -55172,7 +55184,16 @@ function createWorkspaceEngine(opts) {
55172
55184
  }
55173
55185
  continue;
55174
55186
  }
55175
- if (resolveDesignProblemById(store, pid, fx.fixNote, t)) {
55187
+ const closed = resolveDesignProblemById(store, pid, fx.fixNote, t);
55188
+ if (!closed) {
55189
+ const n = store.getNode(pid);
55190
+ if (!n || n.label !== "Problem" || n.attrs["resolvedAs"] != null) {
55191
+ console.warn(
55192
+ `[errata] fix tag went nowhere: ${!n ? `id ${pid.slice(0, 32)} unknown` : n.label !== "Problem" ? `${pid.slice(0, 32)} is a ${n.label}, not a Problem` : "the problem was retracted \u2014 a retraction is not fixable"} \u2014 the fix was NOT recorded`
55193
+ );
55194
+ }
55195
+ }
55196
+ if (closed) {
55176
55197
  resolved++;
55177
55198
  const fxAnchor = editedTurnFile ?? turnFile ?? wf;
55178
55199
  if (fxAnchor) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inerrata-corporation/errata",
3
- "version": "2.0.2-dev.540",
3
+ "version": "2.0.2-dev.545",
4
4
  "description": "errata - local-first observation engine for AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {
package/pass-worker.mjs CHANGED
@@ -25627,6 +25627,10 @@ function reopenAutoClosedProblems(store2, t) {
25627
25627
  if (p.attrs["resolvedAt"] == null) continue;
25628
25628
  if (p.attrs["resolvedAs"] != null) continue;
25629
25629
  if (p.attrs["mergedInto"] !== void 0) continue;
25630
+ if (p.attrs["resolutionWitnessed"] === true) {
25631
+ report.agentDescribed++;
25632
+ continue;
25633
+ }
25630
25634
  const sols = store2.outEdges(p.id, ["SOLVED_BY"]).map((e) => store2.getNode(e.to)).filter((n) => n !== null);
25631
25635
  if (sols.length === 0) continue;
25632
25636
  if (!sols.every((s) => String(s.description ?? "").startsWith(AUTO_MINT_PREFIX))) {