Skip to content

Commit 3612d05

Browse files
committed
release: v4.0.1 — M8 Spit Shine + M9 Cockpit
Bump version to 4.0.1 in package.json, jsr.json, and CLI. CHANGELOG: promote [Unreleased] to [4.0.1] with full Added/Fixed/Changed. README: add "What's new in v4.0.1" section. STATUS: update version, release date, mark M8/M9 complete, prune roadmap. ROADMAP: close M8/M9, move task cards to COMPLETED_TASKS.md, update version plan and dependency graph. COMPLETED_TASKS: add M8 (8.2–8.3) and M9 (9.2–9.5) summaries.
1 parent 9b7f02f commit 3612d05

8 files changed

Lines changed: 93 additions & 386 deletions

File tree

CHANGELOG.md

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,35 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [Unreleased] — M8 Spit Shine (code review fixes)
8+
## [4.0.1] — M8 Spit Shine + M9 Cockpit (2026-02-28)
9+
10+
### Added
11+
- **`git cas verify`** command — verify stored asset integrity from the CLI (checks blob hashes; no key needed).
12+
- **`--json` global flag** — structured JSON output for all commands (`store`, `restore`, `verify`, `inspect`, `vault list/init/remove/info/history`).
13+
- **`runAction` error handler** (`bin/actions.js`) — centralized `try`/`catch` with CasError code display and actionable hints for 5 common errors.
14+
- **Vault list `--filter <pattern>`** — glob-based slug filtering with TTY-aware table formatting.
15+
- **`CryptoPort` base class** — shared `_validateKey()`, `_buildMeta()`, and `deriveKey()` (template method pattern with `_doDeriveKey()`). Eliminates duplication across Node/Bun/Web adapters.
16+
- **ADR-001** (`docs/ADR-001-vault-in-facade.md`) — architectural decision record for vault service composition.
17+
- **STATUS.md** — project status dashboard with shipped versions, roadmap, dependency graph, and known concerns.
18+
- **COMPLETED_TASKS.md** / **GRAVEYARD.md** — archived M1–M7 task cards and superseded tasks.
19+
- `WebCryptoAdapter.finalize()` guard — throws `STREAM_NOT_CONSUMED` if called before encrypt stream is fully consumed.
920

1021
### Fixed
11-
- **C1** `verify` command uses `process.exitCode = 1` instead of `process.exit(1)` to allow stdout to drain on pipes.
12-
- **M4** `vault info --json --encryption` now includes encryption metadata in JSON output instead of silently dropping it.
13-
- **M3** `NodeCryptoAdapter._validateKey` removed — inherits base class `CryptoPort._validateKey` which accepts both `Buffer` and `Uint8Array`, matching the port contract.
14-
- **M2** `matchGlob` rejects patterns longer than 200 characters to prevent ReDoS on pathological input.
15-
- **L1** `writeError` guards against non-Error throws (`err?.message ?? String(err)`).
16-
- **L4** `store` action hoists `--json` flag read before `quiet` assignment (single call instead of two).
17-
- **L5** `CasService.encrypt()` removed redundant `_validateKey` call — `encryptBuffer` already validates internally.
18-
- **L3** `verify` command description clarified: "checks blob hashes; no key needed".
19-
- **N1** ADR-001 method names corrected to match actual facade API (`initVault`, `addToVault`, etc.).
20-
- **N3** Removed trailing blank line at EOF in `bin/git-cas.js`.
21-
- **M1** STATUS.md test count updated; M8/M9 task checkboxes marked complete.
22-
- `runAction` uses `process.exitCode = 1` instead of `process.exit(1)` for consistent exit behavior across all commands.
22+
- `verify` command uses `process.exitCode = 1` instead of `process.exit(1)` to allow stdout to drain on pipes.
23+
- `runAction` uses `process.exitCode = 1` for consistent exit behavior across all commands.
24+
- `vault info --json --encryption` now includes encryption metadata in JSON output.
2325
- `store --force` without `--tree` now throws immediately instead of silently ignoring the flag.
2426
- `inspect --json` now emits JSON even in TTY mode (previously fell through to rich view).
2527
- `vault history --json` now emits structured JSON array of `{ commitOid, message }` objects.
26-
- `matchGlob` `?` wildcard no longer matches `/` path separator, consistent with standard glob semantics.
27-
- Orphaned JSDoc comment removed from `NodeCryptoAdapter`; `_doDeriveKey` now properly `await`s promisified calls.
28+
- `NodeCryptoAdapter._validateKey` removed — inherits base class which accepts both `Buffer` and `Uint8Array`.
29+
- `CasService.encrypt()` removed redundant `_validateKey` call.
30+
- `matchGlob` rejects patterns > 200 chars (ReDoS guard); `?` no longer matches `/` path separator.
31+
- `writeError` guards against non-Error throws.
32+
- `_doDeriveKey` in `NodeCryptoAdapter` now properly `await`s promisified calls.
33+
34+
### Changed
35+
- `CryptoPort` is now the single source of truth for key validation, metadata building, and KDF parameter normalization. All three adapters override only `_doDeriveKey()`.
36+
- ROADMAP.md pruned: completed M1–M7 task cards moved to COMPLETED_TASKS.md.
2837

2938
## [4.0.0] — Conduit (2026-02-27)
3039

COMPLETED_TASKS.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,30 @@ Task cards moved here from ROADMAP.md after completion. Organized by milestone.
44

55
---
66

7+
# M8 — Spit Shine (v4.0.1) ✅ CLOSED
8+
9+
**Theme:** Polish and harden based on code review findings. Fix asymmetries, eliminate duplication, improve docs. No new features.
10+
11+
**Completed:** v4.0.1 (2026-02-28)
12+
13+
- **Task 8.2:** Extract shared crypto helpers to CryptoPort base class — `_validateKey()`, `_buildMeta()`, `deriveKey()` with `_doDeriveKey()` template method. All three adapters inherit from base. `CasService._validateKey()` removed.
14+
- **Task 8.3:** README polish and ADR-001 (vault-in-facade architectural decision record).
15+
16+
---
17+
18+
# M9 — Cockpit (v4.0.1) ✅ CLOSED
19+
20+
**Theme:** CLI polish — structured output, better errors, new commands.
21+
22+
**Completed:** v4.0.1 (2026-02-28)
23+
24+
- **Task 9.2:** `git cas verify` command — verify stored asset integrity without restoring.
25+
- **Task 9.3:** `--json` global flag — structured JSON output for all commands.
26+
- **Task 9.4:** `runAction` error handler — centralized try/catch with CasError codes and actionable hints.
27+
- **Task 9.5:** Vault list `--filter` + TTY-aware table formatting.
28+
29+
---
30+
731
# M14 — Conduit (v4.0.0) ✅ CLOSED
832

933
**Theme:** Replace `EventEmitter` inheritance with a proper `ObservabilityPort`, add streaming restore, and enable parallel chunk I/O. Major version bump: removes `extends EventEmitter` from `CasService`, adds `observability` as a required constructor port.

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,20 @@ We use the object database.
4444

4545
See [CHANGELOG.md](./CHANGELOG.md) for the full list of changes.
4646

47+
## What's new in v4.0.1
48+
49+
**`git cas verify`** — verify stored asset integrity from the CLI without restoring (`git cas verify --slug my-asset`).
50+
51+
**`--json` everywhere** — all commands now support `--json` for structured output. Pipe `git cas vault list --json | jq` in CI.
52+
53+
**CryptoPort base class** — shared key validation, metadata building, and KDF normalization. All three adapters (Node/Bun/Web) inherit from a single source of truth.
54+
55+
**Centralized error handling**`runAction` wrapper with CasError codes and actionable hints (e.g., "Provide --key-file or --vault-passphrase").
56+
57+
**Vault list filtering**`git cas vault list --filter "photos/*"` with TTY-aware table formatting.
58+
59+
See [CHANGELOG.md](./CHANGELOG.md) for the full list of changes.
60+
4761
## What's new in v4.0.0
4862

4963
**ObservabilityPort**`CasService` no longer extends `EventEmitter`. A new hexagonal `ObservabilityPort` decouples the domain from Node's event infrastructure. Three adapters ship out of the box: `SilentObserver` (no-op default), `EventEmitterObserver` (backward-compatible event bridge), and `StatsCollector` (metric accumulator).

0 commit comments

Comments
 (0)