--- id: RAIL-FAB-WP-0013 type: workplan title: "Path Scoped Duplicate Identity" domain: railiance repo: railiance-fabric status: active owner: codex topic_slug: railiance planning_priority: high planning_order: 13 created: "2026-05-20" updated: "2026-05-20" state_hub_workstream_id: "bf80900b-606c-442c-aa15-d6272d73a8d6" --- # RAIL-FAB-WP-0013 - Path Scoped Duplicate Identity ## Goal Refine discovery reconciliation so path-scoped nodes, starting with `Lockfile` candidates, are not marked as duplicate entities solely because they share the same display label. This unblocks broad local-repo rollout by making rescan review output point to real identity concerns instead of expected repeated files such as `uv.lock` and `package-lock.json` across different checkouts. ## Background `RAIL-FAB-WP-0012` ingested a controlled three-repo baseline into the local Fabric registry. The only review-required repo was `repo-scoping`; all seven conflicted candidates were `Lockfile` nodes with labels `uv.lock` or `package-lock.json` under distinct `var/checkouts/...` paths. The current duplicate detector compares node kind plus normalized label/alias. That is useful for semantic declaration nodes, but too broad for file-backed path-scoped evidence. ## Design Principles - Keep semantic duplicate detection intact for declaration-like nodes. - For path-scoped node kinds, require matching source path identity before treating same-label nodes as possible duplicates. - Preserve conservative behavior when source path evidence is missing. - Add a regression test that mirrors the `repo-scoping` false-positive shape. - Rerun the controlled baseline before recommending broad rollout. ## Tasks ### T01 - Add Path-Scoped Reconciliation Coverage ```task id: RAIL-FAB-WP-0013-T01 status: done priority: high state_hub_task_id: "8d9cb1c2-77f7-45da-b942-a8d68454477a" ``` Add tests proving that same-label `Lockfile` nodes at different source paths do not raise `possible_duplicate_node`, while same-label semantic nodes still do. ### T02 - Implement Path-Aware Duplicate Detection ```task id: RAIL-FAB-WP-0013-T02 status: done priority: high state_hub_task_id: "7d4d439d-4f7f-4bdd-bc5f-b02524a10684" ``` Update reconciliation duplicate detection so path-scoped node kinds compare source anchors before emitting duplicate conflicts. ### T03 - Verify Controlled Rescan ```task id: RAIL-FAB-WP-0013-T03 status: in_progress priority: high state_hub_task_id: "0d6cad1d-16f8-4ac7-b8d3-b62a2f8e4549" ``` Rerun the three-repo controlled rescan against the local registry and confirm that `repo-scoping` no longer reports the seven lockfile duplicate conflicts. ### T04 - Rollout Recommendation ```task id: RAIL-FAB-WP-0013-T04 status: todo priority: medium state_hub_task_id: "4be31147-b060-4b47-9589-8d3d8024879d" ``` Record whether broad all-local-repo baseline ingestion is ready after the identity refinement, or whether another targeted blocker remains. ## Close Criteria - Unit tests cover path-scoped duplicate identity. - Reconciliation keeps semantic duplicate warnings intact. - Controlled rescan no longer flags distinct lockfiles as duplicates. - State Hub and this workplan capture the updated rollout recommendation.