SimpleVectorDB.load() now sniffs the first 4 bytes: PK\x03\x04 (legacy
np.savez zip) routes to a migration branch — backup-first idempotent
<path>.legacy-npz-bak, np.load(allow_pickle=True), stage-fully-then-
populate, WARNING migration log, count returned. Non-zip files take the
existing msgpack/JSON paths unchanged. Real-archive metadata is JSON
strings — parsed back to dicts (empirical-first, QB-approved deviation).
Both identified vdb load-failure swallows made loud (warning -> error,
+path, fail-soft shape untouched): openclaw_hook.py boot restore and
ng_topology_sync._export(). Boot can no longer silently destroy a
legacy-era sidecar on the load-then-save cycle a Space restart triggers.
10 new tests (tests/test_vdb_legacy_loader_guard.py): legacy round-trip
vs empirically-confirmed shapes, current-format regression, corrupt-file
loud+untouched (incl. real NeuroGraphMemory boot test), idempotency,
metadata edge cases. Suite 81/81. Substrate ingested clean (2 hyperedges).
PRD: d…
PRD 2026-07-06-codemine-ng-topology-sync-checkpoint-fix (punchlist #356).
_export() looked for a genuine-npz vector_db.npz; the current-era sidecar
is JSON (SimpleVectorDB.save() picks format by extension), so the export
silently no-op'd on every boot since BLK-NG-194 (2026-04-20). Now loads
via SimpleVectorDB.load() (intra-module, mirrors the writer's format
branches). Hashing, JSONL format, git logic, fail-silent shape unchanged.
QB Task-1 empirical finding: main.msgpack is pure graph state — content
lives in the vdb sidecar; PRD's "match what is actually found" clause.
7 new tests (tests/test_ng_topology_sync_export.py); suite 49/49.
Built by TQB agent Ratchet under QB orchestration.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Bring Codemine's TQB worker recall to parity with the laptop/VPS CC-NG
pattern-completion build (PRD 2026-07-06-codemine-pattern-completion-recall).
- surface_resolver.py (new): resolve_surface_content() ported verbatim from
the sibling CC-NG build — substrate-first content resolution, her
_forest_content over the vdb shard, degenerate fragments dropped.
- worker_ng.py: filter_recall_results(), surfacing_context(),
gate_repeat_recall() — filter/compose/gate helpers.
- app.py: agent_loop() (per-turn) and execute_tool() (per-tool-call, gated
by a module-level TTL dedup cache) rewired to filter + compose recency and
pattern-completion signals.
- orchestrator.py: _recall() rewired; recency prepended as a synthetic
list[dict] entry so downstream consumers (persona_client, risk_authority)
keep their contract.
- tests/: 34 tests on real NeuroGraphMemory fixtures (no mocks).
Three recall thresholds (0.30/0.40/0.35) left untouched per site. Fail-soft
at every new path. Vendored …