Repository navigation
Order CONTRIBUTING's source-conflict steps the way the guard enforces them - #10588
Conversation
… them The section told one PR to add the register entry, mark the deciding line and refresh the pin. One PR can't: test_source_conflicts.py rejects a marker whose entry isn't in the pinned copy, the register pins only commits on main, and squash-merging means a ruling PR's own commits never reach main. Describe the three steps in order: a candidate in the ruling PR, the register entry pinned to the squash commit after it merges, then the marker, pin refresh and candidate deletion in a follow-up PR. The ratchet bullet now points to the same steps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Ready for hub review Head: What the item asked, and how I resolved it
Claims checked against code
Tests: CI: not run, because the PR is a draft. Judgment calls
Generated by Claude Code |
|
Ready for hub review The PR head is still The reordering is right, and every bullet from the old list survives. Two statements are wrong or incomplete, though, and a reader would act on both. I read rulespec-us FindingsP2. The process leaves out
|
… reason Step 2 pins the merging commit with cites_entry false and moves a proposed row; a new step 4 re-pins to the follow-up with cites_entry true. Step 1 names the fields the guard requires, and code already on main can skip it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Say what the ruling PR adds for step 2 to pin. Add the KNOWN_UNMARKED deletion the guard forces in step 3. Name the path merged PRs use when a conflict-sounding comment describes a real conflict: keep it, record a candidate and add the allowance. Tie the reason to `implementations`, since a `proposed` row doesn't satisfy the guard. Extend the changelog to the fourth step. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Step 2 asks for an implementation only where a file holds a deciding line, and step 3 marks each file the entry lists: a second file with no marker fails the guard at step 4. Say that verify reads the file's text for cites_entry. Step 1 now covers a conflict the backlog or the pinned copy already lists, and an early entry cites only texts already on main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`verify` matches only the global id, so the comment needs the jurisdiction as well as the local id. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
US + core hub merge audit, us#10588 at
|
#10588 made the ruling PR record a candidate, with the register entry and the marker after it merges. The failure message and the KNOWN_UNMARKED comment still said to register and mark in one PR, and the docstring said verify checks that cites_entry is true, where it checks that the claim matches the file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Fix docs helper import and tighten docs and test hygiene The documentation helper imported colours Core never exported, so the CTC, ACP and Lifeline notebooks failed on import. The PIA-ratio guide was linked from the calculator page but missing from the table of contents. Comments in the pinned-system test described interpolation metadata Core no longer writes. The calculator reference test checked only direct children, so a calculator-only leaf under a kept node passed, and a stale NEW_PARAMETER_NODES path went unnoticed because apply skips it silently. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6H3e3QDf7E1R8JgS82 * Give the source-conflict guard's texts CONTRIBUTING's order #10588 made the ruling PR record a candidate, with the register entry and the marker after it merges. The failure message and the KNOWN_UNMARKED comment still said to register and mark in one PR, and the docstring said verify checks that cites_entry is true, where it checks that the claim matches the file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * List the Social Security lever pages in the table of contents The calculator page links them, and nothing in the navigation led to them. The review built this table of contents with CI's toolchain, and it exits 0. Also let the source-conflict guard's message cover a conflict the pinned register already lists, since test_candidates_are_not_yet_registered fails a second candidate for one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
What changes
The "Source conflicts" section of CONTRIBUTING.md said one PR "does three things": add the rulespec-us entry, mark the deciding line, and refresh the pinned copy "once the entry is on rulespec-us
main". One PR can't do all three:policyengine_us/tests/code_health/test_source_conflicts.pyfails a marker whose entry isn't in the pinned copy, or whose entry doesn't list the marker's file underimplementations(test_every_marker_names_a_registered_entry_that_lists_its_file).main, and no commit of an open PR is reachable frommainuntil it merges. A squash merge never makes the PR's own commits reachable.The paragraph and list now give the four steps in order:
candidates.yaml, adds what step 2 pins (YAML test cases and any source capture) and adds no marker. The rulespec-us entry may list the open PR underproposed.cites_entry: false, its pin to the commit onmainthat merged the ruling PR, and its YAML pins. Aproposedrow moves toimplementations.KNOWN_UNMARKEDline.cites_entry: true, and a later PR here refreshes the pin again, sotest_registered_implementations_carry_their_markerguards the marker.The list keeps every bullet's content: sources and kinds, alternatives with ids, years, the implementation fields, YAML pins by commit, path and case name,
unpublished_sources, and the marker format with its example.Other changes:
test_candidate_fieldsrequires (id,program,question, at least twosources,pe_us,state), plusreadingsandyears. It also says the ruling PR adds what step 2 pins to a commit onmain: the YAML test cases and, if the Axiom corpus lacks a source's text, a capture undersource_conflicts/sources/. It says what to do when the backlog or the pinned copy already lists the conflict, and step 2 says how to cite a text the corpus lacks.cites_entryturns true.test_candidates_are_not_yet_registeredfails a candidate whose id is already in the pinned register. The deletion applies only if the candidate was there. Step 3 also gains the deletion of the file'sKNOWN_UNMARKEDline, whichtest_conflict_sounding_comments_do_not_growforces: a file with a valid marker skips the count, so a leftover line fails the guard. Mark nine source conflicts now in the shared register #10441 deleted two such lines.mainthat the PR doesn't change: step 1 is optional, and the implementation pins a currentmaincommit. Mark nine source conflicts now in the shared register #10441's nine entries did that, at7bb70aaband79249f0f. They still needed earlier PRs here: Tie source-conflict markers to the register shared with Axiom #10287 listed them as candidates, Tie source-conflict markers to the register shared with Axiom #10287 and Capture sources for eight source-conflict register entries; pin Hawaii's claimable filer #10399 added source captures for eight of them, and Capture sources for eight source-conflict register entries; pin Hawaii's claimable filer #10399 added the Hawaii test case.KNOWN_UNMARKEDline, as Take the 2020 charitable deduction for non-itemizers above the line #10186, Follow the adopted California Premium Subsidy design at the 150% FPL boundary #10301 and Decide CA Premium Subsidy eligibility on the exact FPL ratio and adopt the Final 2027 design #10305 did. Exclude county agency staff from Minnesota MSA guardian fees #10315 added its line and pointed the candidate Tie source-conflict markers to the register shared with Axiom #10287 had listed at its code. The marker in step 3 then exempts the file.implementations, because aproposedrow doesn't satisfy the guard.The principles and the rest of the guard description are unchanged.
Before
After
Ratchet bullet, before:
After:
Checks
test_source_conflicts.pyrun on its own at an earlier head of this PR: 103 passed. The test doesn't read CONTRIBUTING.md, and CI runs it again at the final head.scripts/update_source_conflicts.pyonly vendors the register at a given commit and writespin.yaml. It doesn't touchcandidates.yaml, so the text says to delete the candidate by hand.tools/README.mdatfe62a527af: theimplementationsrow definescites_entry, "which says whether the file contains the global id";verifychecks that "eachcites_entryclaim matches its file"; theproposedrow says to "move one toimplementationsonce it merges, pinned to the commit on the default branch"; and pins must be "reachable from their repository's default branch (a squash-merged pull request's own commits are not)".impact: none (docs only)
axiom: n/a
🤖 Generated with Claude Code