@inerrata-corporation/errata 2.0.2-dev.509 → 2.0.2-dev.513
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 +18 -0
- package/errata.mjs +20 -1
- package/package.json +1 -1
- package/pass-worker.mjs +19 -0
package/consolidate-worker.mjs
CHANGED
|
@@ -16562,6 +16562,24 @@ var SqliteGraphStore = class {
|
|
|
16562
16562
|
const rows = this.db.prepare("SELECT from_id, to_id, type FROM edges WHERE valid_to IS NULL").all();
|
|
16563
16563
|
return rows.map((r) => ({ from: r.from_id, to: r.to_id, type: r.type }));
|
|
16564
16564
|
}
|
|
16565
|
+
reviveReobserved(relPaths, workspaceId, since) {
|
|
16566
|
+
let revived = 0;
|
|
16567
|
+
const CHUNK = 400;
|
|
16568
|
+
for (let i = 0; i < relPaths.length; i += CHUNK) {
|
|
16569
|
+
const slice = relPaths.slice(i, i + CHUNK);
|
|
16570
|
+
if (slice.length === 0) continue;
|
|
16571
|
+
const r = this.db.prepare(
|
|
16572
|
+
`UPDATE nodes SET valid_to = NULL
|
|
16573
|
+
WHERE valid_to IS NOT NULL
|
|
16574
|
+
AND last_updated_at >= ?
|
|
16575
|
+
AND json_extract(attrs_json, '$.workspaceId') = ?
|
|
16576
|
+
AND json_extract(attrs_json, '$.relPath') IN (${slice.map(() => "?").join(",")})`
|
|
16577
|
+
).run(since, workspaceId, ...slice);
|
|
16578
|
+
revived += Number(r.changes);
|
|
16579
|
+
}
|
|
16580
|
+
if (revived > 0) this.mutations++;
|
|
16581
|
+
return revived;
|
|
16582
|
+
}
|
|
16565
16583
|
liveNodeIds(ids) {
|
|
16566
16584
|
const live = /* @__PURE__ */ new Set();
|
|
16567
16585
|
const CHUNK = 900;
|
package/errata.mjs
CHANGED
|
@@ -17237,6 +17237,24 @@ CREATE INDEX IF NOT EXISTS nodes_relpath ON nodes(json_extract(attrs_json, '$.re
|
|
|
17237
17237
|
const rows = this.db.prepare("SELECT from_id, to_id, type FROM edges WHERE valid_to IS NULL").all();
|
|
17238
17238
|
return rows.map((r) => ({ from: r.from_id, to: r.to_id, type: r.type }));
|
|
17239
17239
|
}
|
|
17240
|
+
reviveReobserved(relPaths, workspaceId2, since) {
|
|
17241
|
+
let revived = 0;
|
|
17242
|
+
const CHUNK = 400;
|
|
17243
|
+
for (let i2 = 0; i2 < relPaths.length; i2 += CHUNK) {
|
|
17244
|
+
const slice = relPaths.slice(i2, i2 + CHUNK);
|
|
17245
|
+
if (slice.length === 0) continue;
|
|
17246
|
+
const r = this.db.prepare(
|
|
17247
|
+
`UPDATE nodes SET valid_to = NULL
|
|
17248
|
+
WHERE valid_to IS NOT NULL
|
|
17249
|
+
AND last_updated_at >= ?
|
|
17250
|
+
AND json_extract(attrs_json, '$.workspaceId') = ?
|
|
17251
|
+
AND json_extract(attrs_json, '$.relPath') IN (${slice.map(() => "?").join(",")})`
|
|
17252
|
+
).run(since, workspaceId2, ...slice);
|
|
17253
|
+
revived += Number(r.changes);
|
|
17254
|
+
}
|
|
17255
|
+
if (revived > 0) this.mutations++;
|
|
17256
|
+
return revived;
|
|
17257
|
+
}
|
|
17240
17258
|
liveNodeIds(ids) {
|
|
17241
17259
|
const live = /* @__PURE__ */ new Set();
|
|
17242
17260
|
const CHUNK = 900;
|
|
@@ -29649,6 +29667,7 @@ async function incrementalReindex(store, rootPath, workspaceId2, changedAbsPaths
|
|
|
29649
29667
|
changedRelPaths
|
|
29650
29668
|
});
|
|
29651
29669
|
store.transaction(() => {
|
|
29670
|
+
store.reviveReobserved([...changedRelPaths], workspaceId2, t);
|
|
29652
29671
|
const versionedAndFile = /* @__PURE__ */ new Set([...VERSIONED_LABELS, "File"]);
|
|
29653
29672
|
const ownedLive = [];
|
|
29654
29673
|
for (const n of store.nodesByRelPath([...changedRelPaths])) {
|
|
@@ -53841,7 +53860,7 @@ function startLoopLagMonitor(thresholdMs = 1e3) {
|
|
|
53841
53860
|
}
|
|
53842
53861
|
|
|
53843
53862
|
// src/engine.ts
|
|
53844
|
-
var DAEMON_VERSION = true ? "2.0.2-dev.
|
|
53863
|
+
var DAEMON_VERSION = true ? "2.0.2-dev.513" : "2.0.0-alpha.0";
|
|
53845
53864
|
var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
|
|
53846
53865
|
var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
|
|
53847
53866
|
var GIT_OP_MUTE_MS = 4e3;
|
package/package.json
CHANGED
package/pass-worker.mjs
CHANGED
|
@@ -16031,6 +16031,7 @@ async function incrementalReindex(store2, rootPath, workspaceId, changedAbsPaths
|
|
|
16031
16031
|
changedRelPaths
|
|
16032
16032
|
});
|
|
16033
16033
|
store2.transaction(() => {
|
|
16034
|
+
store2.reviveReobserved([...changedRelPaths], workspaceId, t);
|
|
16034
16035
|
const versionedAndFile = /* @__PURE__ */ new Set([...VERSIONED_LABELS, "File"]);
|
|
16035
16036
|
const ownedLive = [];
|
|
16036
16037
|
for (const n of store2.nodesByRelPath([...changedRelPaths])) {
|
|
@@ -24889,6 +24890,24 @@ var SqliteGraphStore = class {
|
|
|
24889
24890
|
const rows = this.db.prepare("SELECT from_id, to_id, type FROM edges WHERE valid_to IS NULL").all();
|
|
24890
24891
|
return rows.map((r) => ({ from: r.from_id, to: r.to_id, type: r.type }));
|
|
24891
24892
|
}
|
|
24893
|
+
reviveReobserved(relPaths, workspaceId, since) {
|
|
24894
|
+
let revived = 0;
|
|
24895
|
+
const CHUNK = 400;
|
|
24896
|
+
for (let i2 = 0; i2 < relPaths.length; i2 += CHUNK) {
|
|
24897
|
+
const slice = relPaths.slice(i2, i2 + CHUNK);
|
|
24898
|
+
if (slice.length === 0) continue;
|
|
24899
|
+
const r = this.db.prepare(
|
|
24900
|
+
`UPDATE nodes SET valid_to = NULL
|
|
24901
|
+
WHERE valid_to IS NOT NULL
|
|
24902
|
+
AND last_updated_at >= ?
|
|
24903
|
+
AND json_extract(attrs_json, '$.workspaceId') = ?
|
|
24904
|
+
AND json_extract(attrs_json, '$.relPath') IN (${slice.map(() => "?").join(",")})`
|
|
24905
|
+
).run(since, workspaceId, ...slice);
|
|
24906
|
+
revived += Number(r.changes);
|
|
24907
|
+
}
|
|
24908
|
+
if (revived > 0) this.mutations++;
|
|
24909
|
+
return revived;
|
|
24910
|
+
}
|
|
24892
24911
|
liveNodeIds(ids) {
|
|
24893
24912
|
const live = /* @__PURE__ */ new Set();
|
|
24894
24913
|
const CHUNK = 900;
|