Follow-up tracking for the KG risk-layer fix merged in #232 (commit 1c70dcc6, closes #231). The code fix is on main; these items ensure it actually takes effect and that the defect class is guarded going forward.
1. Deploy (required for future sessions to benefit)
2. Remediate already-affected past sessions (0 risk nodes)
These ran before the fix and do not self-heal; re-ingest + rebuild + re-embed:
3. Anti-recurrence (producer↔consumer schema-drift class)
The root cause was the risk-aggregator's output schema drifting from the KG consumer. Guards:
4. Housekeeping
Follow-up tracking for the KG risk-layer fix merged in #232 (commit
1c70dcc6, closes #231). The code fix is onmain; these items ensure it actually takes effect and that the defect class is guarded going forward.1. Deploy (required for future sessions to benefit)
main(incl. fix(kg): restore risk node layer — persist risk-summary.json + parse exposure_by_category (#231) #232) to staging + prod. The fix is not retroactive — until deployed, new sessions still drop the risk layer. The changed live path issrc/utils/hookDBBridge.js(PostToolUse persist gate).risk-summary.jsonis persisted as areport(report_key=risk-summary) and the post-session KG has >0risknodes.2. Remediate already-affected past sessions (0 risk nodes)
These ran before the fix and do not self-heal; re-ingest + rebuild + re-embed:
2026-06-08-17808880142026-05-27-1779903178(has the report but 0 risk nodes — parser-half only)SELECT session_key FROM sessions s WHERE status='completed' AND NOT EXISTS (SELECT 1 FROM kg_nodes WHERE session_id=s.id AND node_type='risk')scripts/restore-unpersisted-session.mjs(or backfill) →scripts/rebuild-kg-local.mjs→ session-scoped embedding reapply. (Reference: the2026-06-16Fox/Roku remediation in KG drops entire risk layer for current-format sessions: risk-summary.json not persisted + Phase 7 parser schema drift #231.)3. Anti-recurrence (producer↔consumer schema-drift class)
The root cause was the risk-aggregator's output schema drifting from the KG consumer. Guards:
test/sdk/kg-phase7-risk-parser.test.jsfails loudly on the next risk-aggregator schema change (legacy + current schema pinned).node --teststyle, butnpm run test:sdkinvokes jest — verify these files actually execute in CI (or port to jest), else the contract anchor is inert in CI.JSON_REPORT_FILENAMES(src/config/hookDBBridgeConfig.js) rather than left.md-only.4. Housekeeping
git worktree remove /Users/ej/Super-Legal-231(+ delete branchfix/231-kg-risk-wt, refwip/231-kg-risk-recovery).