@adhd/backlog 0.1.7 → 0.1.8

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/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ ## 0.1.8 (2026-08-19)
2
+
3
+
4
+ ### 🩹 Fixes
5
+
6
+ - **backlog:** singleton writer lock for `serve` — two concurrent servers against one store corrupted the db (BUG-020). O_EXCL PID-file lock keyed on the canonical realpath'd db path, held from before the store opens until after it is fully closed, so a second `serve` during shutdown drain is refused rather than admitted. Dead holders reclaimed; refusal names the holder pid and lock path.
7
+ - **backlog:** consume `@adhd/sox-store-adapter` 0.7.0. The dependency was pinned `^0.5.8`, and a caret on a 0.x pins the MINOR — so it could never resolve past 0.6.0 and none of the WAL/durability work reached this store. Brings the adaptive idle-flush debounce (BL-590), baseline-relative WAL cap (BL-587), and verified busy-error classification in the wal-cap backstop (BUG-019).
8
+
9
+
10
+ ### ❤️ Thank You
11
+
12
+ - pseudosky
13
+
1
14
  ## 0.1.7 (2026-08-14)
2
15
 
3
16
 
package/env.d.ts CHANGED
@@ -61,3 +61,36 @@ export declare function resolveBacklogDbPath(env: Environment<BacklogConfig>): s
61
61
  * `claimItem` itself.
62
62
  */
63
63
  export declare function suggestClaimantIdentity(agentName: string, instanceId: string): string;
64
+ /**
65
+ * BUG-CACHE-CWD-001: the effective apigen extract-stage IR-cache file path.
66
+ * Prior to this fix, `server.ts`'s `irCacheFile()` defaulted to
67
+ * `join(process.cwd(), 'tmp', 'apigen', 'ir-cache', 'backlog-client.ir.json')`
68
+ * — a NEW cache (and a NEW `tmp/apigen/ir-cache/` directory) was created in
69
+ * every distinct directory `backlog` was ever invoked from: every repo, every
70
+ * git worktree, and — because `startBacklogServer`'s `opts.cwd` test-override
71
+ * plumbing was sometimes used unintentionally as a live cwd — even
72
+ * `~/.adhd/backlog/production/data/tmp/apigen/ir-cache/`, nested one level
73
+ * inside the live store's own data directory. None of these scattered copies
74
+ * ever saw a cache HIT from any other copy, so every distinct invocation
75
+ * directory paid a full re-extraction — a correctness-neutral but pure
76
+ * performance and disk-hygiene regression (FEAT-002's entire point, undone).
77
+ *
78
+ * Resolution order (highest precedence first), matching `resolveBacklogDbPath`'s
79
+ * own precedence-comment convention:
80
+ *
81
+ * 1. `APIGEN_IR_CACHE_FILE` (explicit escape hatch — tests point this at a
82
+ * throwaway file; see `ir-cache.integration.spec.ts`) — wins outright.
83
+ * 2. The `cache` dir's resolved path (`kind: 'cache'` → shared, scope
84
+ * forced to `'global'` — see the `dirs.cache` doc comment above) +
85
+ * `apigen/ir-cache/backlog-client.ir.json`. Absolute, `process.cwd()`-
86
+ * independent, and identical across every scope/repo/worktree on this
87
+ * machine — exactly the fast-path guarantee FEAT-002 designed for.
88
+ *
89
+ * `adhdRoot`/`instanceId` are accepted purely for test isolation (mirrors
90
+ * `buildBacklogEnv`'s own test-isolation fields) — production callers never
91
+ * pass them.
92
+ */
93
+ export declare function resolveIrCacheFile(options?: {
94
+ adhdRoot?: string;
95
+ instanceId?: string;
96
+ }): string;