feat(edges): semantic edge resolution (Phase 3, slice 3)#24
Open
gurdenbatra wants to merge 11 commits into
Open
feat(edges): semantic edge resolution (Phase 3, slice 3)#24gurdenbatra wants to merge 11 commits into
gurdenbatra wants to merge 11 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Third Phase 3 slice. When the LLM suggests a connection whose
target_titledoesn't exactly match an existing node, the connection was silently dropped — leaving the graph under-connected. Now those misses are resolved semantically against the vetted graph (reusing slice 1's embeddings +match_nodes).How it works
resolveConnectionsstill does the case-insensitiveilikematch and creates those edges immediately. It now returns{ created, unresolved }instead of dropping the misses.capture/processcall sites scheduleresolveSemanticallyviaafter()(post-response, non-fatal, service-role client). For each unplaced suggestion it embeds thetarget_title, finds the nearest vetted node viamatch_nodes, and tiers the top hit:weight = similarity)openedge_suggestionsrow for reviewSuggestedConnectionItem) showssource —[edge_type]→ target, rationale, and% match, with Add connection / Dismiss.PATCH /api/edge-suggestions/[id]—accept(idempotent; only acts on anopenrow, returns 409 otherwise) creates the real edge then marksaccepted;dismissmarksdismissed.Decisions captured (yours)
(target_title, matched id, similarity, tier)so they can be tuned from real data.Rollout (you, after merge)
Run
supabase/v1.3-edge-suggestions.sqlin the SQL editor. No new key — rides on the Voyage embeddings from slice 1 (VOYAGE_API_KEYalready set; depends onmatch_nodes+ backfilled embeddings).Test plan
semanticEdges(auto/review/drop tiers, self-filter, existing-edge skip, no-op without key, non-fatal on rpc error)resolveConnectionsreturns{ created, unresolved }edge-suggestionsroute (accept inserts + marks accepted; dismiss; invalid action 400; idempotent 409)SuggestedConnectionItemrender + actions;ReviewPagestill greentsc→ 0 ·eslint .→ 0 ·vitest run→ 608 passSpec:
docs/superpowers/specs/2026-06-22-semantic-edge-resolution-design.md· Plan:docs/superpowers/plans/2026-06-22-semantic-edge-resolution.mdNote: optimistic accept/dismiss in the inbox swallows fetch errors (consistent with the slice-2 duplicate handlers) — a small follow-up could surface failures since accept is a write.