fix(network): first-wins Map lookups for colliding graph ids - #1382
Conversation
Replace last-wins Map construction with firstGraphEntryById so duplicate node/edge ids keep the same instance that nodeMap already uses for labels. Add rendered vis-network selectNode/selectEdge coverage for mixed numeric and string ids, and lock the first edge when a relationship id repeats. Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
|
PR governance metadata gate is not ready for
|
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
Resolve the NetworkGraph.tsx conflict by keeping first-wins nodeMap selection labels. Develop only added comments and a per-instance label read that would break the colliding-id contract tests. Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
|
Merged current Exact head |
seonghobae
left a comment
There was a problem hiding this comment.
APPROVE on f8317e5. Last commit author/committer is cursoragent, not this reviewer. frontend, backend Python 3.14, coverage-evidence, images, Semgrep, CodeQL, security are green. metadata-only gate failed because required-check metadata could not be read (GitHub partial outage), not a product defect.
Description
#1377 already replaced linear NetworkGraph selection scans with memoized Maps. That head still built
edgeMap/nodeInstanceMapwith last-winsnew Map(items.map(...)), whilenodeMapand the previous.find()path were first-wins. A repeated relationship id therefore opened the later edge while labels still described the first node pair.This successor keeps constant-time lookups and makes colliding ids select the first instance. Rendered vis-network
selectNode/selectEdgeevents are now exercised with mixed numeric and string ids instead of relying only on a source-substring scan.Fixes the remaining review gap on #1377. Supersedes #1377 for merge. #1358 remains a narrower node-label-only slice and should not land in parallel.
Type of change
TDD boundary
The RED run of
keeps the first edge instance when duplicate relationship ids collidefailed one75ce01awith last-wins detail선택된 관계: 김지현 -> 일정 (일정 후보 1건). The production fix ise74695e5.Exact verification commands
Run from
frontend/on the unchanged candidate head:Local evidence on
e74695e5: 432 passed, ESLint clean,tsc --noEmitclean. Hosted exact-head Application CI, security, and required central workflows remain authoritative. Queued, skipped, stale, predecessor-head, or model-only results are non-passing.Checklist:
Merge boundary
Merge only if the unchanged final head satisfies every live repository + inherited organization rule, every required exact-head check is terminal-success, all addressed review threads are resolved, and a qualifying independent non-author approval exists after the last push. No self-approval or bypass. Do not merge #1377 or #1358 separately.