Repository navigation
Conversation
MaxGhenis
force-pushed
the
uk-data-issue-routing
branch
from
November 8, 2026 20:30
597ab30 to
b4f7854
Compare
…file none for Canada
gh looks up every --label name among the target repo's labels before it
creates an issue, and stops without creating one when a name is missing
(cli/cli pkg/cmd/pr/shared/params.go, api/queries_repo.go). report-logger
passed --label "calibration,auto-filed", and on 2026-11-08 neither
PolicyEngine/microcosm nor PolicyEngine/policyengine-uk-data had either
label, so every auto-filed data issue failed. The block now lists the
repo's labels and passes only the ones it has. It compares names in lower
case, because gh ignores case when it matches them.
The block sent ca data issues to policyengine-ca-data and the prose to
policyengine-canada-data, and neither repo exists. PolicyEngine has no
Canada microdata: policyengine.py's bundle holds data for us and uk only,
and policyengine-canada's one dataset is a three-person template. So
report-logger files no data issue for ca, and the archive keeps the
report. The prose now names policyengine-canada for structural ca issues,
since policyengine-{country} gave policyengine-ca, which doesn't exist
either.
test_country_routing's differential tests now run the whole issue-filing
block, under bash and zsh, with a stand-in gh that records its calls, and
compare the issue's repo and labels with the Python reference. The strict
xfail for ca goes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ne's Canada data route
reform-pipeline still sent other countries' data issues to
policyengine-{country}-data, which gives policyengine-canada-data for ca, a
repo that doesn't exist. It now says report-logger files none for ca.
report-logger's block already files the issue without labels when
`gh label list` fails; report-logger.md now says so, and a property test
fails the stand-in's label lookup for any country, dataset and label set
and checks that the block still files the reference's issue.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
force-pushed
the
report-logger-labels-ca
branch
from
November 8, 2026 20:38
3175ce7 to
c3a5ffc
Compare
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.
report-logger files each US and UK data issue in
PolicyEngine/microcosmorPolicyEngine/policyengine-uk-data, and its issue-filing bash passed--label "calibration,auto-filed"togh issue create. On 2026-11-08 neither repo had either label. gh looks up each label name before it creates an issue and stops when the repo lacks one, so every auto-filed data issue failed. The bash also sentcadata issues topolicyengine-ca-data, the prose sent them topolicyengine-canada-data, and neither repo exists.report-logger now passes only the labels the target repo has, and it files no data issue for Canada:
PolicyEngine/microcosmPolicyEngine/policyengine-uk-dataLabels
The block asks gh for the repo's labels and passes
--labelfor each ofcalibrationandauto-filedthat it finds. It compares names in lower case, because gh matches them regardless of case. If gh can't list the labels, the block files the issue without them. Creating the two labels in microcosm and policyengine-uk-data would also unblock filing, but it would change two other teams' repos. If either repo adds one, report-logger applies it from then on. Dropping--labelaltogether would unblock filing too, but it would also losecalibrationwhere a repo has it.policyengine-usandpolicyengine-ukboth do, and an analyst can send an issue to either with--log-to issue:<repo>.Canada
PolicyEngine has no Canada microdata. policyengine.py's 6.16.0 bundle lists
ukandusas its only countries, policyengine-canada's one dataset holds three people, and microsim-runner supports only household calculations for Canada. No repo builds the data a Canada issue would concern, so report-logger files none and the archive keeps the report. An analyst can still file one with--log-to issue:<repo>. report-logger now namesPolicyEngine/policyengine-canadafor structural Canada issues, because fillingpolicyengine-{country}withcagivespolicyengine-ca, which doesn't exist either.What changes
report-logger.md, the issue-filing bash leavesDATA_REPOempty forca, as for any country butusanduk, and then calls gh not at all. Forusandukit runsgh label list --repo "$DATA_REPO" --limit 1000 --json name --jq '.[].name | ascii_downcase'and passes--labelfor each wanted name in the output. The routing prose, the shortlist and verdict-default tables and the frontmatter description say the same, and tell the agent to list a Canada data issue underskippedin its output.test_country_routing.pyrun the whole block with a stand-inghthat records each call, and check the issue's repo and labels against the Python reference. They run under bash and, when the machine has it, zsh, since Claude Code on a Mac can run the agent's shell commands in zsh. One property test makes the stand-in failgh label listand checks that the block still files the issue.issue_labelsrestates the label rule, and the strict xfail forcagoes.log_todescription,reform-pipeline.md,docs/structured-output-and-chaining.mdandtests/pipeline/README.mdrepeat the new routes.Evidence
--labelnames inLabelsToIDs, which compares them withstrings.EqualFoldand returns'<name>' not foundfor a missing one, andAddMetadataToIssueParamswraps that error ascould not add labelparams.go:106-109,queries_repo.go:809-823gh issue createreturns on that error before it callsapi.IssueCreatecreate.go:456-478--labelas a pflag string slice and splits each value at commascreate.go:186, pflag v1.0.10string_slice.go:22-29gh label listfetches 30 labels unless--limitsays otherwise, andpolicyengine-ushas 113label/list.go:74;gh label list --repo PolicyEngine/policyengine-us --limit 1000, 2026-11-08calibrationand notauto-filedGET /repos/PolicyEngine/<repo>/labels, 2026-11-08calibrationandauto-filed,strings.EqualFoldmatches nothing beyond its ASCII upper and lower case, so a lower-case comparison of ASCII names agrees with ghkandsmatch more, U+212A and U+017F)PolicyEngine/policyengine-ca-data,policyengine-canada-dataandpolicyengine-careturn 404, andpolicyengine-canadaexistsukandusas its only countriesmanifest.json:9-16CountryTemplateDataset, holds three people in two householdscountry_template_dataset.pymicrosim-runner.md:310Invariants
test_country_routing.pychecks these for any dataset string and any set of repo labels that Hypothesis generates:Noneor onePolicyEngine/<repo>name;INVESTIGATEandstructuralverdicts open an issue, andINVESTIGATEopens one only forusanduk;INVESTIGATErouting ignore the dataset;INVESTIGATErouting lands in microcosm or policyengine-uk-data, and reads only the last path segment left after it drops any@revision;ca;gh label listfails, the block still files the issue, without labels.Each of these edits to the block makes the differential tests fail:
--label "calibration,auto-filed";caroute;ascii_downcase, or grep's-x;"${LABEL_ARGS[*]}";--limit 1000, thefrs_*pattern or the@revisionstrip;gh label listfails.Adding grep's
-i, which changes nothing once jq lowers the names, passes.Tests
uv run pytest --ignore=tests/test_skill_examples.pypasses 319 tests, where it passed 256 and xfailed thecacase before.scripts/build_claude_wrapper.pycopiesreport-logger.mdinto the wrapper byte for byte.Order
#110 rewrites the same bash block, so this branch starts from #110's head (
b4f7854) and the PR targets #110's branch for now.Before merge
dashboard/src/data/manifest.json, which carries report-logger's description.🤖 Generated with Claude Code