[EPAC-2293]: Record bill diff backend architecture verification#820
Merged
riddim-developer-bot[bot] merged 1 commit intoJun 14, 2026
Conversation
Post-implementation architecture verification of the Bill diff backend completion Project (ingestion, serving, deployment wiring). Adds the checked-in scorecard: 7.5/10, Healthy. Dependency direction, composition boundaries, and verbatim civic-content provenance all hold; findings are tracked as follow-ups EPAC-2303 (relocate ComputeBillVersionDiff policy) and EPAC-2304 (lock the bills SQLite artifact schema seam).
riddim-developer-bot Bot
added a commit
that referenced
this pull request
Jun 15, 2026
#827) ## Summary Project-level **backend route verification** for the bill diff endpoint `GET /api/v1/bills/{id}/diff` ([EPAC-2292](https://linear.app/riddimsoftware/issue/EPAC-2292)). This is a verification gate, not an implementation change: it proves the shipped repo state and the staging runtime agree across all four sources of truth (OpenAPI, deployment manifest, Lambda handler, live deployment) before [EPAC-2018](https://linear.app/riddimsoftware/issue/EPAC-2018) can close. This PR records the evidence as `docs/backend/epac-2292-backend-route-verification.md`, following the same convention as the earlier verification gates ([EPAC-2291](https://linear.app/riddimsoftware/issue/EPAC-2291) → `docs/backend/epac-2291-backend-route-verification.md`, [EPAC-2289](https://linear.app/riddimsoftware/issue/EPAC-2289), [EPAC-2293](https://linear.app/riddimsoftware/issue/EPAC-2293)). No backend, app, or contract code is changed. ## Verdict: PASS No gaps found; no follow-up implementation issues required. ## Verification evidence (captured 2026-06-15) Route reconstructed from four independent sources, none trusted alone: | Source | Result | |---|---| | `backend/openapi/openapi.json` (`getBillVersionDiff`, `200 → BillVersionDiff`) | Declared | | `backend/manifest/deployment-services.json` (`bills`, staging + production) | Declared | | `backend/bills/main.go` (`LoadBillVersionDiff` usecase) | Serves route | | Live staging runtime | Reachable, service-owned responses | Handler tests: ``` cd backend && go test ./bills/... ok epac/bills 4.479s ok epac/bills/internal/adapter/sqlite ok epac/bills/internal/usecase ``` `TestHandleRequestGetsBillVersionDiff` invokes the route with valid `from`/`to` and asserts the body decodes to the documented `BillVersionDiff` schema. Repo smoke check (`scripts/ci/backend_staging_smoke.py --environment staging --mode full`): ``` PASS bills:diff-route: HTTP 400 PASS bills:diff-unknown: HTTP 404 PASS bills:diff-full: HTTP 200 PASS bills:diff-one-version: HTTP 204 ``` Live staging (`https://staging-api.epac.riddimsoftware.com`): | Case | Result | |---|---| | C-11 multi-version diff | **200**, `clauses.length == 82` | | missing `from`/`to` | **400** service-owned (not API Gateway `Not Found`) | | C-10 one-version | **204** empty | | unknown bill | **404** service-owned | ## Why a PR for a verification issue The issue scopes out patching backend code; it does not produce app/service changes. Per repo convention these gates land their evidence as a `docs/backend/` record (see EPAC-2291 #819, EPAC-2293 #820). The pass/fail verdict and staging evidence are also posted as the required Linear comment on EPAC-2292. ## Testing - `go test ./bills/...` — PASS - `backend_staging_smoke.py --environment staging --mode full` — all PASS - Direct `curl` against staging for all documented cases — PASS Docs-only change; no `Release-Note:` (no user-visible behavior change). Co-authored-by: riddim-developer-bot <developer-bot@riddimsoftware.com>
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.
What & why
Post-implementation architecture verification of the Bill diff backend completion Project (EPAC-2293). This is an
arch-teamProject Verification gate — not a PR review and not an implementation change. It scores the merged Project state onorigin/mainand records the result as a checked-in scorecard, mirrored to a Linear comment on EPAC-2293.Docs-only: adds
docs/architecture/bill-diff-backend-completion-verification-epac2293.md. No application/backend code is touched (the issue's "no implementation PR / no code patching" constraint is preserved).Verdict
7.5 / 10.0 — Healthy (high pass). No Cardinal Sin, no Hidden Dependency.
What holds:
domainimports no use case/adapter/SDK; use cases depend on ports;main.gois the composition root).LoadBillVersionDiffowns the 204-vs-404 policy, the handler is thin, the repository owns SQLite.change_typeonly, honestnilHansard anchors; no generated/summarized parliamentary text.Deductions (−2.5): Behavioral Leakage −1.0 + Catalog Drift −1.0 (clause-diff policy lives in the LEGISinfo source adapter, not the cataloged indexer use case) → EPAC-2303; Enforcement Gap −0.5 (bills SQLite artifact schema is an unverified cross-adapter contract; sparse served version metadata) → EPAC-2304.
Reconstructed inputs
Originally-named siblings EPAC-2283/2284 were re-scoped (still in Backlog). Actual merged work scored: EPAC-2286 (#810), EPAC-2298 (#814), EPAC-2287 (#811), EPAC-2299 (#815), EPAC-2288 (#812), EPAC-2285 (#817), EPAC-2289 (#818), via
git fetch origin main+ merged commits.Follow-ups filed (non-blocking,
arch, est. 4)ComputeBillVersionDiffuse case in the bills-indexer application layer.Verification evidence
git diff origin/main..HEAD --stat: 1 file, +117). No Go/Swift/CI code changed, so no build or simulator run applies;pr-buildcovers the change.Release-Note: none (docs-only architecture verification record).