Skip to content

Finish South Carolina TANF boundary and source follow-ups - #10829

Merged
MaxGhenis merged 13 commits into
mainfrom
sc-tanf-followups-10581
Nov 14, 2026
Merged

MaxGhenis merged 13 commits into
mainfrom
sc-tanf-followups-10581

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Finish four South Carolina TANF follow-ups from #10581: test the gross income boundary, record the school-level conflict, record the open question on current losses, and refresh the manual and regulation citations. This PR changes no formula and no parameter value.

For January 2026, the need standard for three people equals floor(($15,650 + 2 × $5,500) ÷ 12 × 0.5) = $1,110, and the gross limit equals $1,110 × 1.85 = $2,053.50. Under S.C. Code Regs. 114-1150(A), gross income "must not exceed 185 percent of the need standard", so a group with income equal to the limit passes.

The model follows 114-1130(E): an eighteen-year-old qualifies as a dependent child only as a full-time student in secondary school or equivalent-level training. DSS also admits primary-school students in Volume 67 §4.10 of its manual, and this PR records the difference as us-sc:tanf-dependent-child-school-level. Volume 65 §4.10, effective October 1, 2024, has the same text, so the candidate starts in fiscal 2025.

Current losses

This PR records an open question as us-sc:tanf-current-self-employment-loss-offset, with state: open and pe_us.follows: unknown. When a benefit group member has a current net loss, does the loss reduce the other income the group counts, or does it count as zero?

In 114-1150(B)(3), DSS defines self-employment income as "the total profit from a business enterprise" and determines that profit "using Internal Revenue Service methods". In its manual, DSS defines income as "money received" (§7.1) and gives the arithmetic in §8.9 and §8.16. DSS names no current loss in any of them.

The model applies each reading on a different path, and this PR changes none of them:

  • In a month of the 50% disregard (January to April in the model), sc_tanf_countable_earned_income_person halves a self-employment or farm loss, and sc_tanf_countable_income adds the negative result to the group's other income.
  • In a month of the $100 disregard (May to December), the same formula takes max(earned income − $100, 0), so the same loss counts as zero.
  • In every month, the gross income test adds the whole signed loss.
  • positive_sources.yaml counts capital gains, rental, farm rent, partnership and S corporation, estate and miscellaneous income only when positive, and sc_tanf_gross_unearned_income stops interest and dividends at zero.

For example, adult A receives $1,000 a month of alimony and adult B loses $1,200 a month in self-employment, with one child and a need standard of $1,110.

Month Gross income Countable income Payment Case in integration.yaml
January 2026 $1,000 − $1,200 = −$200 $1,000 − $600 = $400 floor(($1,110 − $400) × 0.4046) = $287 38
May 2026 $1,000 − $1,200 = −$200 $1,000 + max(−$1,200 − $100, 0) = $1,000 floor(($1,110 − $1,000) × 0.4046) = $44 39

If B's loss came from a partnership, the model would count $1,000 and pay $44 in both months. Cases 35, 36 and 38 of integration.yaml pin the January results, and Case 39 pins the May result. Cases 12, 13 and 15 to 18 of sc_tanf_gross_unearned_income.yaml pin the unearned floors. The candidate's note lists each path, so an answer can cover them all.

References

Four variables and eight parameters move their manual citations from Volume 65 to Volume 67, and unearned/sources.yaml drops a superseded Volume 65 entry. I compared the cited provisions with Volume 65 and corrected misplaced page anchors. DSS updated the annual poverty table between those volumes; the cited rates remain unchanged.

Four parameters also cite the regulation: 114-1150(C)(1) for the 50% disregard and its four months, 114-1150(C)(2) for the $100 disregard, and 114-1150(A) for the gross income limit. The loss candidate links the 2025 Schedule C instructions by year; page 14 gives line 31.

Invariants

YAML cases check the first two, and a static comparison checks the third:

  • Gross eligibility includes $2,053.50 for a three-person group in January 2026. Income one cent lower passes, and income one cent higher fails.
  • General K-12 attendance never changes the dependent-child age test, and secondary attendance or equivalent-level training extends it through eighteen. Cases 10 and 11 of sc_tanf_dependent_child.yaml run the same six members with K-12 attendance on and off.
  • For every household, these edits preserve calculations from main at 9a63ae6605. All 14 changed parameter and variable files match main apart from their references.

Methodology choices

  • Follow the regulation's school-level restriction. Keep existing equivalent-training, household-head and marital-status treatment. Reuse the existing school inputs.
  • Keep main's treatment of current losses on every path. DSS names no current loss in the regulation or the manual, and the candidate holds the question open.
  • Keep the calendar-month proxy for the earned income disregards: 50% in January to April and $100 from May.
  • For January 2026, the model uses the guidelines in effect on October 1, 2025. Refreshing references to Volume 67, effective August 1, 2026, changes no historical amounts.
  • Date the school-level candidate from fiscal 2025, where Volume 65 has the same text, and the current-loss candidate from fiscal 2026. The Axiom corpus already lists Chapter 114, Volume 67 and the 2025 Schedule C instructions, so this PR adds no source capture. The corpus release that rulespec-us pins, us-rulespec-2026-10-29-ecfr-section-text, doesn't list those three scopes yet.

Validation

Pull request run 43637899334 at d3d63e1c13 passed all 36 jobs on GitHub's merge with main 61c743cb61.

A static comparison at d3d63e1c13 finds all 14 changed parameter and variable files equal to main apart from their references. Pinned Ruff 0.15.5 formatting and lint passed.

At the same head, the model returns the table's figures for the example household. It returns the same figures when B's loss comes from farming. When the loss comes from a partnership, rent, farm rent, capital gains or an estate, it counts $1,000 and pays $44 in January and in May.

I made three mutations at the same head, and the case that targets each one failed:

  • With a K-12 attendance condition added to the dependent-child age test, Case 11 of sc_tanf_dependent_child.yaml failed and the other ten cases passed.
  • With the zero floor removed from the $100 months, Case 39 of integration.yaml failed, along with Cases 21, 22, 23, 32, 33 and 34.
  • With that floor removed for a loss alone, Case 39 failed and the other 38 cases passed.

Mutation runs at 231a11e0f7, whose formulas this head keeps, failed the new cases they targeted: an exclusive gross limit, a primary-school extension, and a zero floor on current losses in January.

PR #10639 touches a separate SC resource-eligibility test.

Microsimulation impact

This PR changes no formula, parameter value or dataset, so it leaves nothing to measure.

impact: none: the PR changes reference metadata, comments, tests, two source-conflict candidates and a changelog fragment

axiom: TheAxiomFoundation/rulespec-us#1728 queued

🤖 Generated with Claude Code

MaxGhenis and others added 5 commits November 12, 2026 00:49
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis
MaxGhenis marked this pull request as ready for review November 13, 2026 18:10
@codecov

codecov Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (aae7f98) to head (d3d63e1).
⚠️ Report is 274 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main    #10829   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         5    +4     
  Lines           37        73   +36     
=========================================
+ Hits            37        73   +36     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@DTrim99

DTrim99 commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator

PR Review: Finish South Carolina TANF boundary and source follow-ups

Summary

The PR closes the four follow-ups that the #10581 merge audit listed under "Next":

  1. Equality case at the gross limit. It adds a size-3 case at the $2,053.50 limit for January 2026. Done and correct.
  2. School-level candidate. It records the difference between 114-1130(E) and manual §4.10 on the secondary-school age test as a candidate. Done. The texts match, and the "ruled" state rests on the regulation as binding law.
  3. Current-loss offsets. It records whether a self-employment loss in a 50%-disregard month offsets other income, and adds Case 38. The audit left this open, and the PR now marks it ruled with no ruling. See Should address 1 and 2.
  4. Manual references. It moves the Volume 65 references to Volume 67. Done. Every new anchor opens the cited text, and no Volume 65 link is left anywhere in policyengine_us.

The diff changes no formula or parameter value. The .py edits are reference strings and # PDF pages comments only, and the parameter edits are reference metadata only.

Two items need changes, both on the current-loss record:

  • It is recorded as ruled, following the statute, although no statute is involved, the entry itself says neither source settles the question, and no ruling is linked.
  • The model takes the opposite reading for the same kind of loss in two other places, and the entry doesn't say so.

I did not run Python or any tests. The claims below rest on four things:

  • reading the code at the head;
  • hand traces;
  • the cited primary sources, opened page by page: S.C. Code Regs. Chapter 114, DSS TANF Policy Manual Volumes 67 and 65, and the 2025 Schedule C instructions;
  • CI run 43480013676 at this head.

Critical (must fix)

None.

Should address

1. us-sc:tanf-current-self-employment-loss-offset is marked state: ruled and follows: statute with no ruling behind it (source_conflicts/candidates.yaml:10276 and :10283)

  • No statute and no conflict. The entry says "No statute is supplied", that "Neither source expressly addresses current-loss offsets or directs that floor", and that it "records competing interpretations, rather than an express disagreement between those sources." The sources bear that out:
    • 114-1150(B)(3) (Chapter 114, PDF page 217) defines self-employment earned income as "the total profit from a business enterprise ... The profit shall be as determined using Internal Revenue Service methods". It says nothing about a loss.
    • §8.9 (Vol. 67, page 128) says "total profit ... calculated by subtracting the cost of doing business from gross income receipts".
    • §8.16 C and E (page 134) give the arithmetic, and §7.1 (page 102) says "Income is money received". None of them addresses a current loss.
  • The audit left it open. The Exclude SC TANF dependent children's earnings, deduct child support paid, and round to whole dollars #10581 merge audit said: "Whether a self-employment loss in a month of the 50% disregard should offset other income stays open under §§7.1 and 8.16 C."
  • The project's rules don't settle it. Statute-first doesn't apply here: there is no statute, and no regulation contradicts the manual. CONTRIBUTING.md#source-conflicts says that where the text and the canons don't settle a reading, the model follows the administering agency's reading. The PR body's canon argument (the specific business calculation over §7.1's general definition) is a reasonable position, but it is the author's. The file header defines ruled as "PolicyEngine has picked". In this file, a ruled entry that doesn't rest on a statute links its decision: either a ruling: {by, date, record} block or a note such as "Ruled 2026-10-29 ... the ruling record is Pay California CAPI from the SSI/SSP standard per person, with spouse-to-spouse deeming #10379 (comment)". This entry has neither.
  • follows: statute doesn't fit. The entry says the regulation is silent. The header's gap-fill means the code follows a form where the statute is silent, and the code follows no form here either.

Fix: Set state: open and pe_us.follows: unknown until the project lead rules. Alternatively, add a ruling: block that links the decision record, and say in note who decided and when. Case 38 can stay as the test that pins the current behavior.

2. The recorded reading isn't what the model does for the same kind of loss elsewhere, and the entry doesn't say so (sc_tanf_countable_earned_income_person.py:25; parameters/gov/states/sc/tanf/income/unearned/positive_sources.yaml:4-6; new comment at integration.yaml:1092)

  • May to December. ongoing_countable = max_(gross_earned_income - p.amount, 0) sets the same self-employment loss to zero once the $100 disregard applies. Case 38's household in May 2026, traced by hand:
    • B: max(−1,200 − 100, 0) = 0, so countable income is 1,000.
    • The payment is floor((1,110 − 1,000) × 0.4046 = 44.51) = $44, against $287 in January.
    • The entry's reasoning, a signed result through the 114-1150(B)(3) calculation and the §8.16 E sum, applies in every month. The note says only "The continuing $100 disregard remains unchanged."
  • Unearned net losses. positive_sources.yaml sets rental losses (rent "after the cost of doing business"), partnership and S corporation, farm rent, capital and estate losses to zero. Its comment applies exactly the reading the new entry rejects: "Income is money received (Section 7.1), so a net loss counts as zero rather than offsetting other income; Section 8.16 allows no deduction for one."
    • sc_tanf_gross_unearned_income.yaml Case 17 pins "one member's partnership loss does not offset another member's pension" ("A net loss is not money received (Section 7.1, page 102)"). That is the opposite of new Case 38.
    • Yet 114-1150(B)(4) classes income from a business the member actively manages as earned income.
  • Two readings side by side. The new integration comments say "We apply those calculations to current losses without adding a zero floor". A parameter comment in the same program reads §8.16 the other way.

Fix: State both paths in the candidate's note:

  • the model sets self-employment losses to zero in $100-disregard months;
  • it sets the positive_sources losses to zero under §7.1.

The ruling in item 1 should then say whether it covers those paths. If it does, open a follow-up issue to change them. If it doesn't, widen the question so the record covers every current loss the model handles.

Suggestions

  1. The new property file mostly repeats YAML coverage (tests/core/test_sc_tanf_followup_properties.py). CLAUDE.md, "Test design and CI cost", says: "Do not add a Python test when the existing YAML framework can exercise the same behavior" and "Do not duplicate a policy formula in Python merely to test it against itself."
    • Test 3 asserts countable == unearned - loss / 2, which restates the formula.
    • Tests 1 and 2 repeat the 2,053.49 / 2,053.50 / 2,053.51 cases and Case 10. A Case 10 twin with is_in_k12_school: false would cover the K-12 toggle in YAML.
    • The CI cost is small. In run 43480013676 (Rest, Python shard 5, group core-3), the three calls took 0.92 s, 1.26 s and 3.36 s.
    • If you keep the file, consider folding it into tests/test_sc_tanf_child_earnings_support_invariants.py, and naming it for the behavior rather than "followup".
  2. Cite the regulation on the refreshed parameters.
    • disregard/percentage/rate.yaml, percentage/months.yaml and disregard/amount.yaml take their values from 114-1150(C)(1) and (2) (Chapter 114, PDF page 217): "Fifty percent of the monthly gross countable earned income ... for the first four months" and "One hundred dollars per month".
    • gross_income_limit.yaml cites only manual §8.15. That note says "multiply the Need Standard by 1.85 and drop the cents", which the model rejects under the ruled us-sc:tanf-gross-income-limit-cents. Adding 114-1150(A) (page 217) would cite the source the model follows.
  3. Use the versioned IRS link in the loss candidate: https://www.irs.gov/pub/irs-prior/i1040sc--2025.pdf#page=14. It is byte-identical to today's file, and page 14 shows Line 31. The unversioned irs-pdf/i1040sc.pdf will serve the 2026 instructions once they are released.
  4. School-level years. Volume 65 (effective October 1, 2024, PDF page 74) has the same §4.10 text, so the difference goes back at least to fiscal 2025. years.from: 2025, or a note saying so, would date it fully. This is optional, since the neighboring SC entries start in 2026.
  5. Optional follow-up. 114-1150(C)(1) says the 50% disregard "can be received only once in twenty-four months". Manual §8.12.1 (Vol. 67, page 131) says "four months in a lifetime", and the model uses a calendar proxy (January to April each year). No candidate records this. The months.yaml reference this PR refreshes now points at the manual text, so a candidate or an issue would track it.

Verified correct

  • Scope. The variable diffs change only reference lines and add # PDF pages comments. The parameter diffs change only reference metadata, and unearned/sources.yaml drops the superseded Volume 65 entry. git grep volume-65 finds nothing in policyengine_us at the head.

  • Every changed reference opens the cited text (Vol. 67, file pages):

    Page Section Cited by Text shown
    75 §4.10 sc_tanf_dependent_child "full-time student in a primary or secondary school, he/she may receive benefits until age 19"
    91 §6.4 resources/limit.yaml "$2,500 per BG"
    102 §7.1 sc_tanf_gross_income income definitions
    131 §8.12.1 rate.yaml and months.yaml "50%" and "four months" (months.yaml also uses page 132)
    131 §8.12 sc_tanf_countable_earned_income_person (pages 131-132) earned income disregards
    132 §8.12.4 amount.yaml "$100 Disregard"
    133 §8.15 gross_income_limit.yaml, need_standard/rate.yaml, payment/rate.yaml, sc_tanf_income_eligible (pages 133-134) "185% of Need", "50% of poverty", "40.46%"
    134 §8.16 H sc_tanf_countable_income_eligible "equal to or greater than the total need standard, send a denial notice"
    134 §8.16 I minimum_payment.yaml "No TANF cash benefits are made for less than $10"
  • The old anchors were misplaced. In Volume 65, §8.15 is on page 132 and §8.12 on page 130, so the old #page=131 links pointed at the wrong section. Volume 67 shifts each section by one page, and the new anchors follow.

  • CLAUDE.md reference rules.

    • Titles with a single cited page carry no page.
    • months.yaml uses a quoted #page 131-132 title with the href on page 131.
    • Variable tuples use # PDF pages comments.
    • No href contains a page list.
  • School-level candidate.

    • 114-1130(E) (Chapter 114, page 204) reads "under eighteen years of age or under nineteen years of age and a full-time student in a secondary school (or in the equivalent level of vocational or technical training)". §4.10 extends this to primary-school students.
    • The code uses is_in_secondary_school, labelled "or in an equivalent level of training".
    • follows: statute and state: ruled rest on the regulation as binding law over an agency manual, under CONTRIBUTING's statute-first and "Regulations are law" rules. That is the same basis as the three merged Exclude SC TANF dependent children's earnings, deduct child support paid, and round to whole dollars #10581 entries (-child-support-deduction-payer, -gross-income-limit-cents, -need-standard-above-eight), so no separate ruling record is needed.
    • The example and note are accurate, including the carve-out for the unmarried condition.
  • Candidate structure.

    • Both entries pass the guard's field rules: id format, program, question, years (integer from, federal-fiscal), at least two sources with valid kinds and https URLs, readings, a valid pe_us.follows, tracked code paths, PR URLs and a valid state.
    • They sit in id order.
    • Neither id is in the pinned register, at the head or in the tree merged with main.
  • Source-conflict ratchet. No scanned file gains a conflict-sounding comment. The only new comments under variables/ are # PDF pages ... lines, and the loss prose sits in test YAML, outside the scanned folders.

  • Hand checks (each traced through the head code):

    1. Gross limit, size 3, January 2026. The need standard is floor(26,650 / 12 × 0.5) = floor(1,110.42) = 1,110. The limit is 1,110 × 1.85 = 2,053.50.
      • 2,053.50 ≤ 2,053.50, so the case passes. 114-1150(A) says "must not exceed".
      • One dollar either side: $2,052.50 passes and $2,054.50 fails. The existing cases at $2,053.49 (pass) and $2,053.51 (fail) bracket it.
      • 2,053.5 is exact in float32, and 1,110 × 1.85 rounds to it.
    2. Need standard. 1,110 matches the §8.15 row for three ($26,650, $2,220, $1,110).
    3. Case 10, dependent-child status.
      • Primary 17: 17 < 18, true. Primary 18: 18 < 18, false.
      • Secondary 17 and 18: under 19, true. Secondary 19: 19 < 19, false.
      • The parent heads the household, so false.
      • Result: [false, true, false, true, true, false].
    4. Case 10, gross earned income. 6,000 / 12 = 500, counted only for the two members who aren't dependent children: [0, 0, 500, 0, 0, 500].
    5. Case 38 inputs. 12,000 / 12 = 1,000 of unearned income for A; −14,400 / 12 = −1,200 of earned income for B; a child support deduction of 0.
    6. Case 38 countable income. 1,000 + 0.5 × (−1,200) = 400. The floor at the members' negative incomes is −600, so countable income is 400.
    7. Case 38 payment.
      • Gross income of −200 passes the gross test, and 400 < 1,110.
      • (1,110 − 400) × 0.4046 = 287.27, under the cap of 1,110 × 0.4046 = 449.11, so the payment is 287.
      • Under the zero-floor reading: (1,110 − 1,000) × 0.4046 = 44.51, so 44. This matches the candidate's example.
    8. Case 38, one dollar either side of B's monthly loss.
      • A loss of 1,199 gives countable income of 400.50: 709.5 × 0.4046 = 287.06, so 287.
      • A loss of 1,201 gives 399.50: 710.5 × 0.4046 = 287.47, so 287.
    9. Property-test edges.
      • A loss of 2,000 with no unearned income gives countable income of −1,000. 2,110 × 0.4046 = 853.7 is capped at 449.
      • Unearned income of 2,000 with no loss gives countable income of 2,000. The gross test passes (2,000 ≤ 2,053.50), but 2,000 ≥ 1,110, so the group is ineligible and the payment is 0.
  • Each new case would catch a mutation.

    • Writing < for <= in the gross test now fails the equality case. The ±1¢ cases couldn't tell the two apart.
    • Reading is_in_k12_school instead of is_in_secondary_school fails the primary 18-year-old in Case 10.
    • Setting countable earned income to zero when negative fails Cases 35, 36 and 38.
  • Housekeeping.

    • Changelog: changelog.d/sc-tanf-followups-10581.changed.md, a valid type.
    • Tests sit in variable-named YAML files.
    • The PR adds no state-gated int or enum key, so the NH Add New Hampshire state supplementation for 2026 #10156 pattern doesn't apply.
    • The PR touches no partner test files.

Axiom line assessment

The line reads: "axiom: TheAxiomFoundation/rulespec-us#1728 should extend its companion tests with the equality and school-level cases and the documented current-loss reading." That is not one of the four forms (encoded-correct, encoded, queued, n/a).

TheAxiomFoundation/rulespec-us#1728 is OPEN and labelled pe-parity. It was last updated 2026-11-10 08:29 UTC, by the #10581 refresh, so it doesn't yet carry this PR's equality, school-level or current-loss cases.

The PR changes no formula or parameter value, so n/a is valid, and I don't count the line as a finding. Either of these would fix it:

  • axiom: n/a: tests, references and source-conflict records only; no formula or parameter change
  • post the NYC taxable income #1728 refresh and write axiom: TheAxiomFoundation/rulespec-us#1728 queued

CI status

All 38 checks pass at a83f156e78. Run 43480013676 (pull_request) started 2026-11-13 18:10 UTC and tested the head merged into main 47c4e872.

  • The three "skipping" rows come from an older run, 43171069216. They are skips, not failures.
  • The new property file ran in Rest (Python shard 5), group core-3: 3 passed.
  • PR validation (guard tests, lint, changelog) passed, and all four Baseline states shards passed.

Branch status

The branch is 5 commits ahead of main and 76 behind. git merge-tree --write-tree PolicyEngine/main a83f156e78 merges cleanly.

  • Since the merge base 935b24ff, main has changed one file this PR touches: source_conflicts/candidates.yaml, with new entries elsewhere.
    • The merged file has 453 unique ids, with each new SC id once.
    • The pinned register is unchanged, so the guard passes on the merged tree (checked by reasoning about the merged tree, not by running it).
    • Main hasn't changed any SC TANF file or test_source_conflicts.py.
  • Since CI's merge base 47c4e872, main has added four candidates, none overlapping this PR's ids.
  • Siblings. Round summed resources to whole cents before exact-limit asset tests #10639 touches an SC TANF resource test, not the files this PR changes.

Verdict: REQUEST_CHANGES

@DTrim99 DTrim99 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Requesting changes: 0 critical, 2 should address, 5 suggestions (details in the report above). No formula or parameter value changes. The $2,053.50 equality case, the school-level candidate and the Volume 67 refresh all check out, and every new anchor shows the cited text. The two items are both on us-sc:tanf-current-self-employment-loss-offset:

  1. It is state: ruled with follows: statute, but no statute is involved, the entry says neither source settles the question, and no ruling record is linked. Either state: open or a linked ruling would fix it.
  2. The model takes the opposite reading in two other places, and the entry should say so: the $100-disregard months set the loss to zero, and positive_sources.yaml zeroes partnership and rental losses.

MaxGhenis and others added 8 commits November 13, 2026 21:25
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The candidate now covers every current loss the model handles in South
Carolina TANF: self-employment and farm losses in the 50% and $100
disregard months and in the gross income test, and the unearned net
amounts the model counts only when positive. It sets `state: open` and
`pe_us.follows: unknown`, links the 2025 Schedule C instructions by
year, and gives one household's January and May 2026 results.

Integration Case 39 pins the May result. The test comments and the
changelog fragment describe the model's current behavior.

The school-level candidate now starts in fiscal 2025: Volume 65 of the
DSS manual, effective October 1, 2024, has the same section 4.10 text
as Volume 67.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ters

The Department of Social Services sets the 50% disregard and its four
months in 114-1150(C)(1), the $100 disregard in (C)(2) and the gross
income limit in (A). The four parameters now cite the regulation ahead
of the manual.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Dependent-child Case 11 repeats Case 10 with K-12 attendance switched
off and expects the same results. Remove the Python property file: its
tests repeated YAML cases or restated the countable-income formula.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The note carries the Volume 65 link that dates the difference from
fiscal 2025, and the candidate's sources stay the regulation and the
current manual.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
In May 2026 the example household counts $1,000 and receives $44,
against $400 and $287 in January.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@MaxGhenis MaxGhenis reopened this Nov 14, 2026
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

David, here's where each item of your review stands at d3d63e1c13:

  • Should address 1: in 745432368d, I set us-sc:tanf-current-self-employment-loss-offset to pe_us.follows: unknown and state: open (candidates.yaml:10975, :10986). Its readings set out both (:10961-10969), and its note says both interpret silent texts. The comments on Cases 35 and 38 say each case pins the model's current behavior and name the open candidate, and the comment on Case 36 points to Case 35 (integration.yaml:1089-1093, :1129-1130, :1191-1195). A follow-up comment on Encode South Carolina TANF unearned income and benefit group (Policy Manual Vol. 67 §§3.6, 7.1, 7.7, 8.15) TheAxiomFoundation/rulespec-us#1728 says PolicyEngine hasn't settled the question and holds the loss rows until it does.
  • Should address 2: in 745432368d, I widened the question to every current loss the model handles: self-employment and farm losses, and rent, partnership and S corporation, capital, and trust or estate losses (:10948-10950). The note names each path and asks that an answer cover each one (:10987-11002). In a 50% month the model halves a self-employment or farm loss and keeps it negative, in a $100 month it sets the loss to zero, and the gross test adds it signed. positive_sources.yaml and the interest and dividend floor count unearned losses as zero. pe_us.code now lists the gross income, gross unearned income and positive_sources.yaml files (:10976-10981), and the new Case 39 pins May (integration.yaml:1208-1252). In 48b31f8e6e, the note adds May: the example household counts $1,000 and receives $44, against $400 and $287 in January.
  • Suggestion 1: in 745432368d, I deleted tests/core/test_sc_tanf_followup_properties.py. In fdc0c2bfeb, I added Case 11 to sc_tanf_dependent_child.yaml (:269-319). It gives Case 10's ages and secondary-school inputs with is_in_k12_school: false for each dependent, and expects the same results. With a K-12 condition added to the age test, Case 11 failed and the other ten cases passed.
  • Suggestion 2: in 2dc1b8e2e0, rate.yaml and months.yaml cite 114-1150(C)(1) at page 217, amount.yaml cites (C)(2) at page 218, where (C)(2) begins, and gross_income_limit.yaml cites 114-1150(A) at page 217.
  • Suggestion 3: in 745432368d, the loss candidate links irs-prior/i1040sc--2025.pdf#page=14 (:10960).
  • Suggestion 4: in 745432368d, the school-level candidate starts in fiscal 2025 (:11006). In 9242a4caf1, its note links Volume 65, page 74, for the same section 4.10 text (:11032-11036).
  • Suggestion 5: The model gives South Carolina TANF's 50% earnings disregard every January to April, more often than DSS allows #10934 tracks it. It sets "only once in twenty-four months" in 114-1150(C)(1) and "four months in a lifetime" in section 8.12.1 against the model's January-to-April proxy. This PR keeps the proxy.
  • Axiom line: the description's axiom: line now reads axiom: TheAxiomFoundation/rulespec-us#1728 queued, and comments on that issue at a83f156e78 and d3d63e1c13 carry this PR's cases.

Three merges of main, 7d8ee5f6d8, b3643bf585 and d3d63e1c13, keep every entry from both sides of source_conflicts/candidates.yaml, and the PR still changes no formula or parameter value. Run 43616422750 passed all 36 jobs at d3d63e1c13. An independent AI review of the changes since a83f156e78 asked for text fixes only: the #1728 follow-up and three corrections to the description. I posted the follow-up and made the three corrections.

🤖 Generated with Claude Code

@MaxGhenis
MaxGhenis dismissed DTrim99’s stale review November 14, 2026 21:44

Commits since this review answer both items and suggestions 1 to 4, and a follow-up issue tracks suggestion 5. My reply above maps each item to its commit, file and line, or to the issue.

@MaxGhenis
MaxGhenis merged commit 0478ad2 into main Nov 14, 2026
77 of 81 checks passed
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

US + core hub merge audit, us#10829 at d3d63e1c13e3db8cb52f750ccf1b9bd96205e3a3 (squash): Finish South Carolina TANF boundary and source follow-ups.

  • Reviews:
    • Two independent reviews ran outside GitHub, one before and one after a fix round, and DTrim99 reviewed on GitHub.
    • The first independent review approved a83f156e78 with no P1 or P2. It downloaded S.C. Code Regs. Chapter 114, TANF Policy Manual Volumes 65 and 67 and the 2025 Schedule C instructions from the government sites, and every new page anchor landed on its cited section. Five households gave the same results at the head and at the merge base 935b24ff4f. The 70 YAML cases in the three changed files, 3 new properties and 103 register guard tests passed, and six runs against three mutants failed. It listed eight minor findings, most of them on the loss candidate's note.
    • DTrim99 requested changes at a83f156e78 (review 5898979897), with two items to address and five suggestions. Both items concern us-sc:tanf-current-self-employment-loss-offset. It carried state: ruled and follows: statute, though no statute applies, its note said neither source settles the question and it linked no ruling. And the model reads a current loss the other way in the $100-disregard months and in positive_sources.yaml. The suggestions asked to replace the Python property file with YAML and cite 114-1150 on four parameters. They also asked to link the 2025 Schedule C instructions by year, date the school-level candidate from fiscal 2025 and track how often the 50% disregard applies.
    • The fix round merged main three times and added five commits, ending at d3d63e1c13. It set the loss candidate to state: open and follows: unknown, widened its question to every current loss the program handles, named each path in its note and added Case 39 for May. It deleted the property file, added Case 11, cited 114-1150(A), (C)(1) and (C)(2), linked the 2025 instructions by year and dated the school-level candidate from fiscal 2025. Run 43616422750 passed all 36 jobs at the head, and each of three mutants failed the case it targets.
    • The second independent review read every change since a83f156e78. All 14 changed parameter and variable files match main apart from their references, and the three merges keep every entry from both sides of source_conflicts/candidates.yaml. It refetched the sources, checked each new citation and read CI's logs: 39, 11 and 22 cases passed in the three changed YAML files, and the register guard passed 103 tests.
    • It asked for text fixes only. The rulespec-us#1728 comment at a83f156e78 said PolicyEngine "keeps" the loss reading, which the open candidate contradicts, and the description's axiom: line cited that comment. Before merge I posted a follow-up there that holds the loss rows for an answer, filed The model gives South Carolina TANF's 50% earnings disregard every January to April, more often than DSS allows #10934 for the disregard's frequency and made its three description corrections.
  • Methodology choices for maintainers:
    • The PR keeps main's treatment of current losses and records the question as open. Neither 114-1150(B)(3) nor sections 7.1, 8.9 and 8.16 of Volume 67 names a current loss. The model halves a self-employment or farm loss and keeps it negative from January to April, sets it to zero from May, adds it signed in the gross income test and counts net unearned losses as zero.
    • If a loss reduces the group's other income, the model keeps a negative result in the $100-disregard months. Case 39's household then counts −$200 in May, or −$300 if the $100 also comes off the loss, and receives $449 instead of $44. The unearned floors go, so Cases 15 to 18 of sc_tanf_gross_unearned_income.yaml move, and Cases 12 and 13 move if the reading covers interest. On that reading, a month of the 50% disregard could also count all of a loss: Case 38's household would count −$200 and receive $449.
    • If a loss counts as zero, the model floors each member's earned income at zero in every month and in the gross test. Cases 35, 36 and 38 then expect countable income of $0, $100 and $1,000 and payments of $449, $408 and $44, and Case 39's gross income rises from −$200 to $1,000.
    • The model follows 114-1130(E): an eighteen-year-old must study full time in secondary school or equivalent training, while in section 4.10 of its manual DSS also admits a primary-school student. The school-level candidate carries state: ruled and follows: statute, like the three Exclude SC TANF dependent children's earnings, deduct child support paid, and round to whole dollars #10581 entries that rest on Chapter 114.
    • The model keeps main's calendar proxy and gives the 50% disregard every January to April. Under 114-1150(C)(1), a recipient can receive it "only once in twenty-four months", and in section 8.12.1 of its manual DSS limits it to four months in a lifetime.
  • Gates checked live at merge:
    • gh pr checks exits 0;
    • the latest Pull request run at the head, 43637899334, passed and tested this head merged into main at 61c743cb61;
    • MERGEABLE;
    • not a draft;
    • no reviewer's latest review requests changes;
    • the semantic-overlap guard: since 61c743cb61, main has changed one file this PR touches, source_conflicts/candidates.yaml. There Align Washington property tax exemption age with the collection year #10839 edited the entry us-wa:pte-veteran-pathway-pre-2016 (its question, a new source and its note) and added or removed no id. Main changed no South Carolina TANF file, test_source_conflicts.py or the vendored register. The branch merges into main at 61c743cb61 without conflict, and the merged file holds 458 unique ids, main's 456 and the two South Carolina ids, with each entry equal to the side that changed it;
    • the merge pins the head.
  • Impact: none. The PR changes no formula, parameter value or dataset, so it leaves nothing to measure. It changes reference metadata and comments in nine parameter files and five variable files, and it adds tests, two source-conflict candidates and a changelog fragment.
  • Next:
    • The model gives South Carolina TANF's 50% earnings disregard every January to April, more often than DSS allows #10934 tracks how often the 50% earned income disregard applies. The model gives it every January to April, while DSS allows it once in twenty-four months under 114-1150(C)(1) and for four months in a lifetime under section 8.12.1 of its manual.
    • Comments on main state the zero reading as settled for unearned losses: positive_sources.yaml lines 4-6, sc_tanf_gross_unearned_income.py lines 19-20 and Cases 15 and 17 of its YAML file. Reword them once the loss question has an answer.
    • The loss candidate starts in fiscal 2026, but Volume 65, effective October 1, 2024, has the same section 7.1 sentence and, in section 8.8, the self-employment definition that Volume 67 gives in section 8.9. A follow-up can start it in fiscal 2025 with a note that links Volume 65, as the school-level entry does.
    • Before an entry goes into the rulespec-us register, each text it cites must sit in the corpus release that rulespec-us pins or in a capture on main. That release, us-rulespec-2026-10-29-ecfr-section-text, lists none of the scopes that hold Chapter 114, Volume 67 and the 2025 Schedule C instructions.
    • sc_tanf_gross_income cites only section 7.1. A follow-up can add 114-1150(A), which defines the gross income that the variable feeds into the limit test.
  • Axiom: TheAxiomFoundation/rulespec-us#1728 queued. Comments at a83f156e78 and d3d63e1c13 give rows for the pass at the $2,053.50 gross limit and the school-level test at eighteen, with Case 11 as Case 10 without K-12 attendance. The rows for Cases 35, 36, 38 and 39 wait for the reading of current losses. The issue's blocker stands: the corpus release that rulespec-us pins lists neither the Volume 67 scope nor the Chapter 114 scope.

🤖 Generated with Claude Code

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