Skip to content

fix(bill-progress): --number --branch C restituisce la timeline Camera (#41)#55

Merged
aborruso merged 2 commits into
mainfrom
fix/bill-progress-branch-c-camera
Jul 11, 2026
Merged

fix(bill-progress): --number --branch C restituisce la timeline Camera (#41)#55
aborruso merged 2 commits into
mainfrom
fix/bill-progress-branch-c-camera

Conversation

@aborruso

Copy link
Copy Markdown
Member

Chiude #41.

⚠️ Cambio di comportamento

Il valore --branch C di --number cambia semantica. Prima bill-progress --number 2617 --branch C --legislature 18 restituiva il record di rimando lato Senato (osr:ramo="C"): una riga, phase C.2617, senza date — inutile per chi voleva l'iter Camera. Ora --branch C risolve l'atto Camera ac<leg>_<num> e ne restituisce la timeline completa degli stati (una riga per stato, con date), via cameraIterTimeline — lo stesso path di --uri.

Per il dl Covid 2020 (C.2617, leg.18):

2020-07-30  Assegnato
2020-08-03  In corso di esame in Commissione
2020-08-05  Concluso l'esame … In stato di relazione
2020-08-31  In discussione
2020-09-03  Approvato. Trasmesso al Senato
2020-09-25  Approvato definitivamente dal Senato. Legge

--branch S resta invariato (repertorio Senato, stato corrente).

Perché è sicuro

Il vecchio comportamento di --branch C non era documentato né testato (grep: solo la validazione dell'enum in cli.ts) e restituiva un dato di scarsa utilità. Nessun workflow lo usava.

Asimmetria, spiegata onestamente

--branch C (timeline, molte righe) e --branch S (stato corrente, una riga) hanno forme diverse: non è un'incoerenza del tool ma della fonte — la Camera pubblica lo storico degli stati (ocd:rif_statoIter), il Senato via SPARQL solo lo stato corrente (la timeline dettagliata vive nel feed RSS, esposto come rss_url). Description, help CLI, skill (MCP + CLI) e wiki (iter-statoIter.md) sono allineati su questo framing.

Empty case

Un numero senza atto Camera / senza statoIter → 0 righe con l'emptyHint del tool (non tabella muta). Verificato.

Test

+1 test live (dl Covid 2020: timeline con più stati datati, presenza dello stato finale "Legge"). 138/138 verdi, tsc pulito. Verificato anche che --branch S resta a una riga.

🤖 Generated with Claude Code

#41)

Prima --number 2617 --branch C --legislature 18 tornava il record di
rimando lato Senato (osr:ramo="C": una riga, phase C.2617, senza
date), fuorviante per chi si aspettava l'iter Camera.

Ora --branch C risolve l'atto Camera ac<leg>_<num> e ne restituisce
la timeline completa degli stati (via cameraIterTimeline, stesso path
di --uri): per il dl Covid 2020, 8 stati datati. --branch S invariato
(repertorio Senato, stato corrente).

Cambio di comportamento del valore --branch C (prima quasi inutile,
nessun uso documentato/testato). Description/help/skill/wiki chiariscono
l'asimmetria onestamente: Camera = timeline stati, Senato = stato
corrente (timeline nel feed RSS), riflette la fonte. +1 test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 11, 2026 08:47
@greptile-apps

greptile-apps Bot commented Jul 11, 2026

Copy link
Copy Markdown

Greptile Summary

This PR changes bill-progress so Camera number lookups return the Camera timeline.

  • --number <n> --branch C now resolves ac<legislature>_<n> and uses the Camera timeline path.
  • --branch S remains on the Senato current-state path.
  • CLI, MCP, wiki, and log docs now describe the Camera/Senato output asymmetry.
  • A live test covers the Camera timeline for C.2617 in legislature 18.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
src/tools/bill-progress.ts Adds the Camera number lookup path and updates tool help text for the new branch behavior.
src/tools/tools.test.ts Adds coverage for a Camera bill number returning multiple dated timeline rows.
docs/lod-wiki/camera/iter-statoIter.md Documents that Camera lookups return a full state timeline while Senato lookups return current state.
skills/italian-parliament-cli/references/commands.md Updates CLI reference text and examples for --number --branch C.
skills/italian-parliament-mcp/references/tools.md Updates MCP tool reference text for the revised branch semantics.

Reviews (2): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile

Comment thread src/tools/bill-progress.ts
Comment thread src/tools/bill-progress.ts

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Questo PR modifica il tool/CLI bill-progress per far sì che --number <n> --branch C risolva l’atto Camera ac<leg>_<n> e restituisca la timeline completa degli stati Camera (stesso percorso di --uri), invece del precedente record di rimando lato Senato (una riga senza date). L’obiettivo è allineare semantica e aspettative utente, come richiesto in #41, mantenendo invariato --branch S (stato corrente Senato).

Changes:

  • Aggiornato il routing di bill-progress per supportare --number + --branch C → timeline Camera via cameraIterTimeline.
  • Aggiunto un test live di regressione per il caso C.2617 (leg. 18) e aggiornate skill/docs/wiki/help per esplicitare l’asimmetria Camera vs Senato.
  • Aggiornato LOG.md con nota di cambio comportamento.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/tools/bill-progress.ts Nuovo ramo --number + --branch C che risolve URI Camera e restituisce la timeline completa.
src/tools/tools.test.ts Test live che verifica che --number + --branch C ritorni più stati datati e includa lo stato finale “Legge”.
skills/italian-parliament-mcp/references/tools.md Documentazione skill MCP aggiornata: branch C = timeline Camera, branch S = stato corrente Senato.
skills/italian-parliament-cli/references/commands.md Help/ricette CLI aggiornate con esempio --branch C e nota sull’asimmetria.
docs/lod-wiki/camera/iter-statoIter.md Wiki aggiornata per includere l’accesso alla timeline Camera anche via --number --branch C.
LOG.md Changelog: esplicitato il cambio di comportamento di --branch C e il razionale.

Comment thread src/tools/bill-progress.ts
Copilot AI review requested due to automatic review settings July 11, 2026 13:49
@aborruso
aborruso enabled auto-merge July 11, 2026 13:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Comment thread src/tools/bill-progress.ts
Comment thread src/tools/bill-progress.ts
Comment thread src/tools/bill-progress.ts
@aborruso
aborruso merged commit 175ef61 into main Jul 11, 2026
2 of 4 checks passed
@aborruso
aborruso deleted the fix/bill-progress-branch-c-camera branch July 11, 2026 14:02
aborruso added a commit that referenced this pull request Jul 11, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
aborruso added a commit that referenced this pull request Jul 11, 2026
fix(bill-progress): follow-up ai review comments from #55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants