-
Notifications
You must be signed in to change notification settings - Fork 1
feat(ontology): preserve temporal imported primary Voice intervals (ADR 0252) #752
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
17b25b3
09838e1
fea73e1
cc3dfc1
dce623a
8b8a9be
461a4d1
118cc38
771a8ed
182f5b8
0a8ce31
b0f6ca4
684df3d
e7816ce
90b3999
52bb01b
e3ecb3b
edc0ab9
991753d
d206fd8
9db158c
9c0a3e1
850494c
021cc75
f0d072a
e4d72e4
48af574
2644fbb
3ad9d74
c6a4c26
34f8d10
55a5b27
bf35587
11b7fff
4aab6e5
bb2eec1
d738bd0
dde0a83
3e18e7c
c731706
3db9c44
ebb4ef1
d5fe482
b2e0c96
3e332fd
201ac4e
7a259a4
c293323
11fc2fa
ad6dc5d
474dfdf
4b48c55
0ff51f8
f778a01
b0eedab
d0f6e7e
123fdb7
9acd920
5c2dfed
8949f80
564f9df
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -866,6 +866,10 @@ def neighborhood_to_payload(neighborhood: OntologyNeighborhood) -> dict[str, Any | |
| "is_primary": assignment.is_primary, | ||
| "truth_status_code": assignment.truth_status_code, | ||
| "recorded_at": assignment.recorded_at.isoformat(), | ||
| "effective_from": assignment.effective_from.isoformat(), | ||
| "effective_to": assignment.effective_to.isoformat() | ||
| if assignment.effective_to | ||
| else None, | ||
| "provenance_reference": assignment.provenance_reference, | ||
| "evidence_post_id": assignment.evidence_post_id, | ||
| } | ||
|
|
@@ -890,6 +894,7 @@ async def _load_voice_assignments( | |
| """ | ||
| select voice.post_id, voice.voice_type_code, lookup.lookup_label, voice.is_primary, | ||
| voice.truth_status_code, voice.recorded_at, | ||
| voice.effective_from, voice.effective_to, | ||
| case when evidence.node_id = any($1::uuid[]) then evidence.node_id end | ||
| as evidence_post_id | ||
| from source_post_voice voice | ||
|
|
@@ -903,10 +908,11 @@ async def _load_voice_assignments( | |
| and evidence.node_type_code = 'node_post' | ||
| where voice.post_id = any($1::uuid[]) | ||
| and (voice.is_primary or evidence.node_id = any($1::uuid[])) | ||
| and (($2::timestamptz is null and voice.effective_to is null) | ||
| or ($2::timestamptz is not null | ||
| and voice.effective_from <= $2 | ||
| and (voice.effective_to is null or $2 < voice.effective_to))) | ||
| and voice.effective_from <= coalesce($2::timestamptz, $3::timestamptz) | ||
| and ( | ||
| voice.effective_to is null | ||
| or coalesce($2::timestamptz, $3::timestamptz) < voice.effective_to | ||
| ) | ||
|
devin-ai-integration[bot] marked this conversation as resolved.
|
||
| and voice.recorded_at <= $3::timestamptz | ||
|
Comment on lines
+911
to
916
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 Info: Cutoff-null neighborhood read now keyed to snapshot instant The rewritten query in _load_voice_assignments replaces the old cutoff-null branch with Was this helpful? React with 👍 or 👎 to provide feedback. |
||
| order by voice.post_id, voice.is_primary desc, | ||
| lookup.display_order, voice.voice_type_code | ||
|
|
@@ -931,6 +937,8 @@ async def _load_voice_assignments( | |
| is_primary=row["is_primary"], | ||
| truth_status_code=row["truth_status_code"], | ||
| recorded_at=row["recorded_at"], | ||
| effective_from=row["effective_from"], | ||
| effective_to=row["effective_to"], | ||
| provenance_reference=( | ||
| "Evidence-backed additional voice" | ||
| if not row["is_primary"] | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changelog has a truncated, wrong-ADR duplicate entry
Inserting the new bullet leaves the existing
ADR 0256line truncated at "every imported", and its continuation is reattached to a duplicate bullet now citingADR 0251. The changelog ends up with two composition-persistence entries carrying conflicting ADR numbers.Prompt for agents
Was this helpful? React with 👍 or 👎 to provide feedback.