@adhd/backlog 0.1.6 โ 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 +25 -0
- package/client.d.ts +25 -1
- package/env.d.ts +33 -0
- package/index.js +101 -98
- package/index.mjs +4759 -4462
- package/model.d.ts +68 -0
- package/package.json +3 -3
- package/store/lifecycle.d.ts +13 -0
- package/store/repo-migration.d.ts +51 -0
- package/store/serve-lock.d.ts +42 -0
- package/store/signal-cleanup.d.ts +38 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,28 @@
|
|
|
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
|
+
|
|
14
|
+
## 0.1.7 (2026-08-14)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### ๐ฉน Fixes
|
|
18
|
+
|
|
19
|
+
- **backlog:** persist citations, atomic repo migration, signal cleanup
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### โค๏ธ Thank You
|
|
23
|
+
|
|
24
|
+
- pseudosky
|
|
25
|
+
|
|
1
26
|
## 0.1.6 (2026-08-12)
|
|
2
27
|
|
|
3
28
|
|
package/client.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GraphBacklogStore } from './store/graph-backlog-store.js';
|
|
2
2
|
import { BacklogConfig } from './env.js';
|
|
3
|
-
import { ArchiveOpts, ArchiveResult, AuditTrailResult, BacklogFilter, BacklogItem, BacklogStats, BacklogStatus, ClaimOpts, ClaimResult, Citation, CreateItemInput, CreateItemResult, DependencyGraph, ImportMarkdownInput, ImportResult, MigrationPhase, MigrationStatusResult, Priority, ReleaseResult, SetMigrationPhaseResult, StatsScope, TopoOrderResult, TransitionOpts, UpdateItemInput } from './model.js';
|
|
3
|
+
import { ArchiveOpts, ArchiveResult, AuditTrailResult, BacklogFilter, BacklogItem, BacklogStats, BacklogStatus, ClaimOpts, ClaimResult, Citation, CreateItemInput, CreateItemResult, DependencyGraph, ImportMarkdownInput, ImportResult, MigrationPhase, MigrationStatusResult, Priority, ReleaseResult, RepoMigrationResult, SetMigrationPhaseResult, StatsScope, TopoOrderResult, TransitionOpts, UpdateItemInput } from './model.js';
|
|
4
4
|
import { Environment } from '@adhd/environment';
|
|
5
5
|
|
|
6
6
|
/** The one type apigen special-cases via the `ctx-name-only` invariant. */
|
|
@@ -92,6 +92,30 @@ export declare function mergeItems(ctx: BacklogCtx, repo: string, keepHumanId: s
|
|
|
92
92
|
export declare function setPriority(ctx: BacklogCtx, repo: string, humanId: string, priority: Priority): Promise<BacklogItem>;
|
|
93
93
|
/** MEMBER_OF edge to a plan node (auto-created if the plan slug hasn't been seen before). */
|
|
94
94
|
export declare function attachToPlan(ctx: BacklogCtx, repo: string, humanId: string, planSlug: string): Promise<void>;
|
|
95
|
+
/**
|
|
96
|
+
* BUG-BACKLOG-REPO-SPLIT-001 / DEBT-BACKLOG-REPO-MOVE-001 โ the dedicated
|
|
97
|
+
* primitive to move every live item out of `fromRepo` into `toRepo` (a
|
|
98
|
+
* repo-key correction, e.g. a legacy `"adhd"` string onto the canonical
|
|
99
|
+
* `"PseudoSky/adhd"`). `dryRun` defaults to `true`: a caller must pass
|
|
100
|
+
* `dryRun:false` explicitly to write anything โ the default call is always
|
|
101
|
+
* safe to make speculatively and returns the full plan (including which
|
|
102
|
+
* items would be renamed, and to what) with zero mutation.
|
|
103
|
+
*
|
|
104
|
+
* Collisions (a humanId already live in `toRepo`) are never silently
|
|
105
|
+
* dropped, overwritten, or left ambiguous โ each is deterministically
|
|
106
|
+
* renamed to the next free number in its own family within `toRepo`
|
|
107
|
+
* (`store/repo-migration.ts`'s `planRepoMigration`), and an audit note
|
|
108
|
+
* recording the original `(fromRepo, humanId)` is attached to the moved
|
|
109
|
+
* item so the rename is traceable. Cross-item links (DEPENDS_ON,
|
|
110
|
+
* RELATES_TO, PART_OF, SUPERSEDES, SAME_AS, MEMBER_OF, ASSIGNED_TO) are
|
|
111
|
+
* preserved automatically โ a move never changes a node's id, only its
|
|
112
|
+
* `namespace`/`repo`/`humanId`/`name`/`content`.
|
|
113
|
+
*
|
|
114
|
+
* Every planned item gets exactly one reported outcome
|
|
115
|
+
* (`results[i].ok`/`error`) when `dryRun:false` โ a per-item failure never
|
|
116
|
+
* aborts the rest of the batch and never goes unreported.
|
|
117
|
+
*/
|
|
118
|
+
export declare function migrateRepo(ctx: BacklogCtx, fromRepo: string, toRepo: string, by: string, dryRun?: boolean): Promise<RepoMigrationResult>;
|
|
95
119
|
export declare function importFromMarkdown(ctx: BacklogCtx, input: ImportMarkdownInput): Promise<ImportResult>;
|
|
96
120
|
/**
|
|
97
121
|
* Excludes archived items (SPEC.md ยง5.4 archiveResolved) โ see markdown.ts's
|
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;
|