fix(bill-progress): valorizza presentation_date e initiative_description sul ramo Camera#75
Merged
Merged
Conversation
… Camera (#74) Le due colonne erano hardcoded a stringa vuota, pur essendo il dato presente sull'atto (dc:date, ocd:iniziativa) e già letto da bills list. Due OPTIONAL nella query esistente, nessuna chiamata di rete in più. Proiettarle in SELECT DISTINCT è sicuro: sono proprietà dell'atto, non dello stato, e hanno cardinalità 1 (verificato su leg. 17/18/19). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Questo PR corregge il tool bill-progress (ramo Camera) popolando correttamente le colonne presentation_date e initiative_description, che prima erano hardcoded a stringa vuota pur essendo dati disponibili sulla stessa risorsa atto già interrogata dalla query. Il cambiamento mantiene l’approccio “single query” (nessun roundtrip aggiuntivo) e allinea l’output Camera al comportamento già presente in altri tool.
Changes:
- Estesa la query SPARQL Camera in
cameraIterTimelinecon dueOPTIONALsudc:dateeocd:iniziativa. - Mappati i nuovi binding su
presentation_date(formattata viafmtDate) einitiative_description. - Aggiunta nota in commento sul perché la proiezione di
?pres/?ininon altera la deduplica (SELECT DISTINCT) dato che sono proprietà dell’atto con cardinalità 1 (come indicato nel commento).
|
| Filename | Overview |
|---|---|
| src/tools/bill-progress.ts | Safely extends the Camera timeline query and mapping with optional act-level presentation metadata; missing values retain the existing empty-string convention. |
Reviews (1): Last reviewed commit: "fix(bill-progress): valorizza presentati..." | Re-trigger Greptile
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.
Closes #74.
Sul ramo Camera di
bill-progressle colonnepresentation_dateeinitiative_descriptionerano hardcoded a stringa vuota, pur essendo il dato presente sull'atto — la stessa risorsa che la query già interrogava — e già letto senza problemi dabills list.Modifica
Due
OPTIONALnella query esistente (dc:date,ocd:iniziativa) e mappatura dei due campi, condc:datepassata per ilfmtDategià presente (YYYYMMDD → ISO, come il ramo Senato). Nessuna query aggiuntiva, nessun costo di rete.natureresta vuota:dc:typeè semantica diversa, fuori dallo scopo dell'issue.Sulla dedup
Il commento nel codice avverte che proiettare variabili in più in
SELECT DISTINCTpuò moltiplicare le righe. Verificato prima di editare: zero atti con più di undc:dateo più di unocd:iniziativain legislatura 17, 18 e 19 — cardinalità 1, nessuna moltiplicazione. Il motivo è annotato nel codice.Verifica
ac19_824(PDL costituzionale Morrone, separazione delle carriere): 6 righe prima, 6 righe dopo, e i campi ora popolati.Provati anche un atto di iniziativa governativa (
ac19_1930→Governo) e un caso in legislatura 18 via--number 1354 --branch C(→Parlamentare, presentazione 2018-11-08).npm test -- --run: 177 passati. I 2 falliti sonosenato-votesin 403, cioè #72 — preesistenti e indipendenti da questa modifica.Nota
presentation_datedi solito coincide con la data del primostatoIter, ma non sempre: in legislatura 19 divergono su 23 atti. Dedurla dalla prima riga sarebbe stata un'euristica sbagliata in quei casi.🤖 Generated with Claude Code