fix(security): harden hooks, quarantine corrupt JSON, test locks, fix promotion dedupe

- Wrap hooks with try/catch to prevent OpenCode disruption
- Add warnMemoryHook() for safe error logging
- Quarantine corrupt JSON files before fallback
- Add cross-process lock safety tests
- Fix pending promotion same-batch dedupe
- Update docs/architecture.md with lock semantics
- 242 tests passing
This commit is contained in:
Ralph Chang
2026-04-30 11:52:01 +08:00
parent 1c6e143f4b
commit 830d97c6c6
6 changed files with 317 additions and 132 deletions
+1 -1
View File
@@ -96,7 +96,7 @@ Retention monitoring:
### Validation
- `npm run typecheck`
- `npm test` — 237 tests passing
- `npm test` — 242 tests passing
- `bun scripts/memory-diag.ts health`
---