Uh oh!
There was an error while loading. Please reload this page.
db/graph-code: graph integrity + node_mastery_events (epic slice PR5) - #272
Conversation
…ents Rewire services/graph_service.py onto the integrity guarantees from migration 0023_graph_integrity.sql: - graph_nodes / graph_edges writes now use UNIQUE-backed upserts (on_conflict on the new (user_id, course_id, concept_name) and (user_id, source_node_id, target_node_id, relationship_type) constraints), replacing the non-atomic select-then-insert dedup. - Mastery changes append a row to the new node_mastery_events table instead of rewriting the dropped graph_nodes.mastery_events JSONB blob, fixing the non-atomic read-modify-write (#247). get_graph batch-reads that table to compute learning_velocity and the trimmed per-node event history (API contract preserved). - Delete db/dedup_nodes.py — its (user_id, concept_name) dedup is superseded by the UNIQUE constraint (#181). Academics-owned graph_service.py logic (enrollment reshape, course CRUD, offering resolution, update_course_context call sites) and the abstract-course graph key are left untouched. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Deploying with |
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs | frontend-staging | 10f4081 | Commit Preview URL Branch Preview URL | Jun 24 2026, 08:41 AM |
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Uh oh!
There was an error while loading. Please reload this page.
Knowledge-graph integrity slice (migration 0023). UNIQUE-backed node/edge upserts;
graph_nodes.mastery_events(JSONB) was dropped → migrated to append-onlynode_mastery_events; deleteddb/dedup_nodes.py. Closes#181/#195/#247. Green; ruff clean.Plan:
docs/superpowers/plans/2026-06-24-db-graph-code.md.Merge BEFORE db/study-code — study routes quiz mastery writes through the
apply_graph_updaterewritten here.