Repository navigation
Show UK programmes from policyengine-uk's registry, and UK terms on the Rules hub - #57
Conversation
…acker The UK coverage tracker showed a fixed paragraph. It now reads the programs.yaml snapshot that the build already writes to programs-uk.json: status counts, search, a verified-year filter, and the programmes grouped into UK government, devolved and local authority programmes, then by the body that runs them. A card opens in place to show the registry's notes, verified years and variable. It links the parameters only where the parameter tree built from the same commit has that folder or file. - Move the status dot, stat card and year helpers that both trackers use into coverageParts.tsx, unchanged. - Keep parameter_prefix and the registry's own notes on each program. - Return no programmes, rather than the bundled US registry, when the UK snapshot and the API both fail. - Let the proxy rewrite param-tree-*.json under /us and /uk, as it does programs-*.json, so standalone previews find the tree. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Rules hub said "federal, state, and local" programs and variables "at the person, family, tax unit, and household level" on both sites. On the UK site it now names UK government, devolved and local programmes and the person, benefit unit and household entities, in British spelling. The US copy is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@juaristi22 round 1, at Verdict: works and reads well; no must items. Three should items, two of them about where the data comes from rather than the UI. The programme list matches the registry. Findings
UK terms are right throughout: "programmes", "benefit unit" ( What I ran
Not checked: the claim that 7 of 51 variables are missing from the flowchart service, the US pages at both widths (the description says they are unchanged), and #51. 🤖 Generated with Claude Code |
…ulator The UK provenance line now ends: "The registry is read from the latest model code, so a programme marked complete here may not be in the live calculator yet." It shows only when the snapshot's version differs from the one the production API served, or that version is unknown. The US line is unchanged. The tracker also maps DESNZ to the UK government. That is the agency proposed for the Energy Price Guarantee in policyengine-uk's registry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… a refresh fetch-metadata.js already deleted programs-*.json before refreshing it, but kept param-tree-*.json. If the tree fetch then failed, UK parameter links were checked against a tree from an earlier build while pointing at the new commit. Both files are now deleted first, so whatever is on disk after a run comes from one commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@vahid-ahmadi thanks. Round 1 is in
On the items you didn't check:
|
|
@juaristi22 round 2, at Verdict: all three round 1 items are dealt with. No new must or should items. Fine to take out of draft from my side; merging is Vahid's call. Round 1 items
Thanks for checking the flowchart list and the US pages too. New findingsNone. What I ranFresh clone at 🤖 Generated with Claude Code |
Summary
The UK Rules pages showed a static paragraph for coverage and US terms on the hub. This PR changes two things.
/uk/model/rules/coverage). It now shows policyengine-uk's own programme registry (policyengine_uk/programs.yaml), which the build already snapshots topublic/programs-uk.json.main. When that is ahead of the production API, the provenance line says a programme marked complete may not be in the live calculator yet./uk/model/rules). The cards said "federal, state, and local" programs and variables "at the person, family, tax unit, and household level". The UK site now says "UK government, devolved and local tax-and-benefit programmes" and "the person, benefit unit and household level", in British spelling. The US copy is unchanged.This PR is separate from #56 (UK data pages): no files overlap and a trial merge is clean. Max's draft #51 has an earlier UK tracker. This PR borrows its shared-parts split (
coverageParts.tsxand theRulesOverview.tsxchange are identical to #51's) and leaves out its Enhanced FRS data parts.Details
RulesOverview.tsxtocoverageParts.tsxunchanged.fetchProgramsWithSource('uk')no longer falls back to the bundled US registry when the snapshot and the API both fail. The UK page then links programs.yaml instead.CoverageProvenancetakes an optional note for a snapshot that is ahead of the production API. Only the UK tracker passes one.param-tree-*.jsonunder/usand/uk, as it doesprograms-*.json, so standalone previews (/uk/model/...) load the tree. On policyengine.org,/uk/model/param-tree-uk.jsonalready reaches this app.fetch-metadata.jsdeletes a staleparam-tree-*.jsonalong with the staleprograms-*.jsonbefore a refresh. Whatever is on disk after a run then comes from one commit.GITHUB_TOKEN(orGH_TOKEN).lifetime_isa_bonusandpension_age_winter_heating_payment./rulesnow renders per request, because it reads the country, like/rules/coverage.Checks
fa00059:bun run test(184 passed),bun run lintandtsc.bun run buildpassed at the first push, and Vercel builds every push. This repo has no test workflow, so the tests run locally./us/rules,/us/rules/coverage,/us/rules/parametersand/us/rules/variableshad the same text and element geometry as master at 375 and 1440 px, with the same registry snapshot on both. Later commits don't change the US render path. The US provenance line takes no note, and tests pin its exact text.🤖 Generated with Claude Code