Skip to content
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
1697c3b
docs: add forensic architectural audit report
flyingrobots Mar 4, 2026
12205b0
feat(roadmap): add M16 Capstone milestone — audit remediation
flyingrobots Mar 4, 2026
7dfbc0e
fix(errors): guard Error.captureStackTrace for cross-runtime portability
flyingrobots Mar 4, 2026
c713d63
chore(hooks): rename git-hooks → hooks, add pre-commit lint gate
flyingrobots Mar 4, 2026
5240536
fix(lint): fix curly brace and unused imports from 16.8/16.9
flyingrobots Mar 4, 2026
8163d46
fix(crypto): normalize adapter behavioral contracts across runtimes
flyingrobots Mar 4, 2026
ea4eeae
feat(restore): add maxRestoreBufferSize guard for buffered restore
flyingrobots Mar 4, 2026
23ce968
feat(cli): add passphrase file input and interactive TTY prompt
flyingrobots Mar 4, 2026
cf91548
feat(chunking): enforce 100 MiB upper bound on chunk size
flyingrobots Mar 4, 2026
314f36f
feat(crypto): add encryption buffer guard to WebCryptoAdapter
flyingrobots Mar 4, 2026
263c608
feat(store): warn when CDC chunking is combined with encryption
flyingrobots Mar 4, 2026
23474de
feat(store): track orphaned blobs on stream failure
flyingrobots Mar 4, 2026
605036f
perf(chunking): replace Buffer.concat loop with pre-allocated buffer
flyingrobots Mar 4, 2026
47828e5
refactor(api): rename lifecycle methods with deprecated aliases
flyingrobots Mar 4, 2026
67f9bcd
feat(security): add KDF brute-force awareness metrics and CLI delay
flyingrobots Mar 4, 2026
aae160a
feat(security): add encryption counter and move SECURITY.md to root
flyingrobots Mar 4, 2026
fd3eab4
docs(roadmap): add V7 (OTLP observability adapter) and V8 (auto-rotat…
flyingrobots Mar 4, 2026
4d908a0
test(vault): wire observability port into VaultService tests
flyingrobots Mar 4, 2026
804cfd5
docs(changelog): fix test count (46, not 78)
flyingrobots Mar 4, 2026
8cb6c34
docs(changelog): drop exact test count from observability entry
flyingrobots Mar 4, 2026
a1dc2c9
fix(cli): defer passphrase prompt until vault encryption is confirmed
flyingrobots Mar 4, 2026
a3db8ad
fix: validate constructor params for buffer/chunk size bounds
flyingrobots Mar 4, 2026
e93053e
fix(restore): enforce size limit after decompression
flyingrobots Mar 4, 2026
e257aee
test: harden error-path assertions to fail on missing throws
flyingrobots Mar 4, 2026
621f361
docs: fix JSDoc return types, add maxRestoreBufferSize param, fix hea…
flyingrobots Mar 4, 2026
c910cda
docs(changelog): add PR feedback fixes to unreleased section
flyingrobots Mar 4, 2026
2593cdd
fix: resolve 19 pre-PR review findings
flyingrobots Mar 8, 2026
50b9c11
feat(cli): expose store/restore configuration flags and .casrc config…
flyingrobots Mar 8, 2026
ab03183
docs(roadmap): update backlog — mark C1–C10 mitigated, V6 done, add V…
flyingrobots Mar 8, 2026
ecb94b2
fix(types): add observability param to VaultService constructor type
flyingrobots Mar 8, 2026
1e8de6f
fix(cli): use nullish coalescing for strategy and codec config merging
flyingrobots Mar 8, 2026
f430233
fix(cli): reject empty passphrases from all input sources
flyingrobots Mar 8, 2026
e8045e0
feat(cli): add passphrase-file support to vault rotate command
flyingrobots Mar 8, 2026
33a1fc6
fix(cli): validate KDF algorithm and .casrc config types
flyingrobots Mar 8, 2026
a5b9140
docs: update deprecated method names and add missing error codes
flyingrobots Mar 8, 2026
ca961dc
fix: resolve self-review findings from PR #17 pre-flight
flyingrobots Mar 8, 2026
a004086
fix: address CodeRabbit review round 2 findings
flyingrobots Mar 8, 2026
ab30104
refactor(cli): inject delay dependency into runAction
flyingrobots Mar 8, 2026
ed74679
fix: address CodeRabbit review round 3 findings
flyingrobots Mar 8, 2026
4928dde
refactor(cli): use Commander.js choices() for enum validation
flyingrobots Mar 8, 2026
4c13b33
fix: address CodeRabbit review round 4 nitpicks
flyingrobots Mar 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added
- **CODE-EVAL.md** — Forensic architectural audit (zero-knowledge code extraction, critical assessment, roadmap reconciliation, prescriptive blueprint).
- **M16 Capstone** — New milestone in ROADMAP.md addressing all 9 audit flaws and 10 concerns (C1–C10). 13 task cards, ~698 LoC, ~21h estimated.
- **Concerns C8–C10** — Three new architectural concerns identified by the audit: crypto adapter LSP violation (C8), FixedChunker quadratic allocation (C9), encrypt-then-chunk dedup loss (C10).
- **CasError codes** — `RESTORE_TOO_LARGE` and `ENCRYPTION_BUFFER_EXCEEDED` registered in canonical error code table.

### Fixed
- **16.8 — CasError portability guard** — `Error.captureStackTrace` now guarded with a runtime check. CasError constructs correctly on runtimes where `captureStackTrace` is unavailable (e.g. Firefox, older Deno).
- **16.9 — Pre-commit hook + hooks directory** — `scripts/git-hooks/` renamed to `scripts/hooks/` per CLAUDE.md convention. New `pre-commit` hook runs lint gate. `install-hooks.sh` updated accordingly.
- **16.1 — Crypto adapter behavioral normalization** — `NodeCryptoAdapter.encryptBuffer` now returns a Promise (was sync), matching Bun/Web. `decryptBuffer` validates key on all adapters. `NodeCryptoAdapter.createEncryptionStream` guards `finalize()` with `STREAM_NOT_CONSUMED`. New conformance test suite asserts identical contracts across all adapters.
- **16.2 — Memory restore guard** — `CasService` accepts `maxRestoreBufferSize` (default 512 MiB). `_restoreBuffered` throws `RESTORE_TOO_LARGE` with `{ size, limit }` meta when encrypted/compressed restore would exceed the limit. Unencrypted streaming restore is unaffected.
- **16.11 — Passphrase input security** — New `--vault-passphrase-file <path>` CLI option reads passphrase from file (use `-` for stdin). Interactive TTY prompt added as fallback when no other passphrase source is available. `resolvePassphrase` is now async with priority: file → flag → env → TTY → undefined.
- **16.6 — Chunk size upper bound** — CasService, FixedChunker, and CdcChunker now reject chunk sizes exceeding 100 MiB. CasService logs a warning when chunk size exceeds 10 MiB.
- **16.3 — Web Crypto encryption buffer guard** — `WebCryptoAdapter` accepts `maxEncryptionBufferSize` (default 512 MiB). Throws `ENCRYPTION_BUFFER_EXCEEDED` when streaming encryption exceeds the limit, since Web Crypto AES-GCM is a one-shot API. NodeCryptoAdapter uses true streaming and is unaffected.
- **16.5 — Encrypt-then-chunk dedup warning** — `CasService.store()` now logs a warning when encryption is combined with CDC chunking, since ciphertext is pseudorandom and content-defined boundaries provide no dedup benefit.
- **16.10 — Orphaned blob tracking** — `STREAM_ERROR` now includes `meta.orphanedBlobs` — an array of OIDs for blobs successfully written before the stream failure. Error metric includes `orphanedBlobs` count for observability.
- **16.4 — FixedChunker pre-allocated buffer** — Replaced `Buffer.concat()` loop with a pre-allocated `Buffer.allocUnsafe(chunkSize)` working buffer, eliminating O(n²) copies for many small input buffers. Matches the allocation strategy used by `CdcChunker`.
- **16.7 — Lifecycle method naming** — Added `inspectAsset()` (replaces `deleteAsset()`) and `collectReferencedChunks()` (replaces `findOrphanedChunks()`) as canonical names on both `CasService` and the facade. Old names are preserved as deprecated aliases that emit observability warnings. Type definitions updated with `@deprecated` JSDoc.
- **16.12 — KDF brute-force awareness** — `CasService` now emits `decryption_failed` metric with slug context when decryption fails with `INTEGRITY_ERROR` during encrypted restore. CLI adds a 1-second delay after `INTEGRITY_ERROR` to slow brute-force attempts. Library API imposes no delay — callers manage their own rate-limiting policy.
- **16.13 — GCM nonce collision docs + encryption counter** — `SECURITY.md` moved to project root with new sections: GCM nonce bound (2^32 NIST limit), key rotation frequency, KDF parameter guidance, and passphrase entropy recommendations. Vault metadata now tracks `encryptionCount`, incremented per encrypted `addToVault()`. Observability warning emitted when count exceeds 2^31. `VaultService` accepts optional `observability` port.

## [5.2.4] — Prism polish (2026-03-03)

### Fixed
Expand Down
Loading