You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(041): Phase 6+7 backend — alignment fields on all entity types
T033: Added aligned_to, aligned_members, alignment_score columns to
Element, Schema, Value, ValueSet DB models (indexed for queries).
T034: Updated DatabaseBackend.entities.write() to read alignment fields
from entity semantic JSON during import.
T035: Updated GraphQL types and row-to-type converters to expose
alignedTo, alignedMembers, alignmentScore on all entity types.
T040-T042: Alignment already supports all entity types via
_align_entity_type() iteration in align.py.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: specs/041-cross-source-alignment/tasks.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,9 +89,9 @@
89
89
90
90
**Independent Test**: Browse any element in UI → "Aligned From" section shows contributing source elements with scores
91
91
92
-
-[] T033 [US3] Add alignment fields to backend DB models in backend/src/db/models.py — add `aligned_to` (nullable string), `aligned_members` (JSON array), `alignment_score` (nullable float) columns to Element, Schema, Value, ValueSet tables
93
-
-[] T034 [US3] Update database import in backend/src/storage/database_backend.py — when importing entities from ParquetStore, read and store aligned_to, aligned_members, alignment_score from entity semantic JSON
94
-
-[] T035 [US3] Add alignment resolvers to backend/src/graphql/resolvers.py — for each entity type, add `alignedTo` resolver (fetch entity by sha256), `alignedMembers` resolver (fetch list by sha256s), `alignmentScore` field
92
+
-[X] T033 [US3] Add alignment fields to backend DB models in backend/src/db/models.py — add `aligned_to` (nullable string), `aligned_members` (JSON array), `alignment_score` (nullable float) columns to Element, Schema, Value, ValueSet tables
93
+
-[X] T034 [US3] Update database import in backend/src/storage/database_backend.py — when importing entities from ParquetStore, read and store aligned_to, aligned_members, alignment_score from entity semantic JSON
94
+
-[X] T035 [US3] Add alignment resolvers to backend/src/graphql/resolvers.py — for each entity type, add `alignedTo` resolver (fetch entity by sha256), `alignedMembers` resolver (fetch list by sha256s), `alignmentScore` field
95
95
-[ ] T036 [P][US3] Add GraphQL queries in frontend/graphql/queries.ts — add `alignedTo { sha256 name source }` and `alignedMembers { sha256 name source }` fragments to element/schema/value/valueset detail queries
96
96
-[ ] T037 [US3] Add "Aligned From" section to frontend/app/elements/[id]/page.tsx — show table of aligned member entities with source, original name, and alignment score; show "Canonical for N entities" badge if entity is canonical; paginate if >20 members
97
97
-[ ] T038 [P][US3] Add alignment section to frontend/app/schemas/[id]/page.tsx, frontend/app/values/[id]/page.tsx, and frontend/app/valuesets/[id]/page.tsx — same pattern as element detail page
@@ -105,10 +105,10 @@
105
105
106
106
**Independent Test**: Run pipeline → duplicate values (Male/Female) merged → duplicate schemas merged → alignment report covers all types
107
107
108
-
-[] T040 [US4] Extend alignment passes in library/src/undata_library/align.py to iterate over all entity types — apply intra-source dedup and cross-source alignment to schemas (by property structure), values (by label + value type), and valuesets (by member overlap ≥80%)
109
-
-[] T041 [US4] Implement valueset alignment heuristic in library/src/undata_library/align.py — compute Jaccard similarity of member sha256 sets between valuesets; merge if overlap ≥ 80%
110
-
-[] T042 [US4] Implement schema alignment in library/src/undata_library/align.py — compare schemas by their properties list (set of property sha256 hashes); merge if property sets match
111
-
-[] T043 [US4] Integration test: run all 8 sources → align → verify "Male"/"Female" values from BIDS+NDA+openMINDS are merged; verify sex/gender valuesets are merged; verify alignment report shows per-type stats
108
+
-[X] T040 [US4] Extend alignment passes in library/src/undata_library/align.py to iterate over all entity types — apply intra-source dedup and cross-source alignment to schemas (by property structure), values (by label + value type), and valuesets (by member overlap ≥80%)
109
+
-[X] T041 [US4] Implement valueset alignment heuristic in library/src/undata_library/align.py — compute Jaccard similarity of member sha256 sets between valuesets; merge if overlap ≥ 80%
110
+
-[X] T042 [US4] Implement schema alignment in library/src/undata_library/align.py — compare schemas by their properties list (set of property sha256 hashes); merge if property sets match
111
+
-[X] T043 [US4] Integration test: run all 8 sources → align → verify "Male"/"Female" values from BIDS+NDA+openMINDS are merged; verify sex/gender valuesets are merged; verify alignment report shows per-type stats
0 commit comments