@tpsdev-ai/flair 0.34.0 → 0.36.0

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/docs/upgrade.md CHANGED
@@ -78,18 +78,23 @@ actually running:
78
78
  instead of retrying in a loop — see [Downgrade](#downgrade) for the
79
79
  restore procedure.
80
80
 
81
- ### Pre-upgrade snapshot (opt-in)
81
+ ### Pre-upgrade snapshot (opt-in for same-engine, unconditional on engine change)
82
82
 
83
83
  flair#637 added a **physical**, byte-exact snapshot of `~/.flair/data` — the whole
84
84
  directory (RocksDB files, keys, config, `admin-pass`), not just the logical records a
85
- `flair backup` JSON export covers. As of 2026-07-08 this is **opt-in**: pass
86
- `--snapshot` to `flair upgrade` to take one before the package swap. It's off by
87
- default — matching how Harper's own upgrade CLI behaves (it recommends a backup before
88
- proceeding, but never auto-tars your data directory for you) — because the
89
- tested-downgrade guarantee below already covers the failure mode a snapshot exists
90
- for, and the old opt-out default meant every upgrade paid the cost (the data dir can
91
- be 800MB+; keep-last-3 retention meant up to ~2.5GB of snapshots sitting around)
92
- whether or not you wanted it.
85
+ `flair backup` JSON export covers. As of 2026-07-08 this is **opt-in** for same-engine
86
+ upgrades: pass `--snapshot` to `flair upgrade` to take one before the package swap.
87
+ It's off by default — matching how Harper's own upgrade CLI behaves (it recommends a
88
+ backup before proceeding, but never auto-tars your data directory for you) — because
89
+ the downgrade-boot test (see below) covers same-engine downgrades, and the old opt-out
90
+ default meant every upgrade paid the cost (the data dir can be 800MB+; keep-last-3
91
+ retention meant up to ~2.5GB of snapshots sitting around) whether or not you wanted it.
92
+
93
+ **When the engine (Harper) version changes** (flair#1047), the snapshot is
94
+ **unconditional** — the tested-downgrade guarantee does not hold across engine version
95
+ boundaries, and the backwards-boot refusal + snapshot recovery path is the invariant
96
+ that applies. Opting out requires `--no-engine-snapshot` and prints what is being
97
+ given up.
93
98
 
94
99
  ```bash
95
100
  flair upgrade --snapshot
@@ -489,6 +494,20 @@ current build, writes a memory and a presence row, stops it *without* wiping the
489
494
  directory, then boots the last **npm-published** `@tpsdev-ai/flair` against that exact
490
495
  same directory and confirms it comes up healthy and can read both rows back.
491
496
 
497
+ **The guarantee is now restated (flair#1050):** there is never a silent bad outcome.
498
+ Either the old binary boots and serves the corpus correctly, **or** it refuses to start
499
+ with a message naming what wrote the store, what is running, and how to recover — and a
500
+ pre-upgrade snapshot exists to recover *from*. The first branch (clean boot) holds for
501
+ same-engine upgrades; the second (refusal + snapshot) applies when the engine version
502
+ changes, which is the case where downgrade was never ours to guarantee.
503
+
504
+ **First known engine-version break:** Harper 5.1 → 5.2 (2026-08). 5.2.0 creates the
505
+ `hdb_secret` store on first boot against an existing data directory, and the older binary
506
+ will not start against it. Harper's 5.2.0 release notes document no rollback procedure.
507
+ The backwards-boot refusal (flair#1049) catches this: the old binary refuses to start,
508
+ naming both versions and the data directory, with recovery instructions. A pre-upgrade
509
+ snapshot exists at the named path. Restoring it returns the store to a working state.
510
+
492
511
  **As observed when this suite was added (2026-07-08):** the npm-published baseline
493
512
  (0.21.0) boots cleanly against data written by a HEAD build roughly 14 commits ahead of
494
513
  it (several security-hardening and CLI-behavior changes, no Flair schema migration, and
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tpsdev-ai/flair",
3
- "version": "0.34.0",
3
+ "version": "0.36.0",
4
4
  "packageManager": "bun@1.3.10",
5
5
  "description": "Identity, memory, and soul for AI agents. Cryptographic identity (Ed25519), semantic memory with local embeddings, and persistent personality — all in a single process.",
6
6
  "type": "module",