Implement Maine PTFC unknown-utilities 15% rule (Schedule PTFC line 5c) - #9267
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9267 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 3 +2
Lines 36 33 -3
Branches 2 0 -2
=========================================
- Hits 36 33 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
PavelMakarchuk
left a comment
There was a problem hiding this comment.
The implementation mechanics check out — all 34 tests in the ME PTFC suite pass on the branch, the new parameter loads with correct metadata, utilities_included_in_rent defaults to false so microsim defaults are unaffected, no partner contract tests are touched, and the worksheet math in the new test (127.5 = (1000 − 150) × 0.15) is internally consistent with the quoted form text.
Requesting changes for two findings on the rewritten formula, detailed inline:
utility_expenseis the wrong "amount known" discriminator — it's the household's general SNAP-style utility expense total, not the utility portion of rent, so the new 15% fallback only fires when the household reports zero utility expenses of any kind, and separately-paid utilities get subtracted from rent.- No clamp when utilities exceed rent — countable rent can go negative and offsets
real_estate_taxesdownstream; line 5d on the form can never be negative.
Caveat: maine.gov was unreachable from the review environment, so the line-5c rule was verified against the PR's quoted form text and worksheet example rather than the form PDF itself.
Generated by Claude Code
Fixes applied from @PavelMakarchuk's reviewBoth findings addressed and pushed (ME PTFC suite 36/36). Thanks for the catch — both were masked by the old tests. F1 — wrong known/unknown discriminator (fixed)You're right that
Your concrete case now resolves to the form's F2 — clamp when utilities exceed rent (fixed)
TestsAppended two demonstrating cases that fail if either fix is reverted:
The existing known-amount case 🤖 Generated with Claude Code |
PR Review (follow-up)Re-reviewed head 🔴 Critical (Must Fix)None. 🟡 Should Address
🟢 Suggestions
Validation Summary
Verdict: APPROVE once the changelog type is |
Follow-up review addressed — thanks @PavelMakarchukAll items from your 2026-08-18 follow-up applied (ME PTFC suite 38/38). Should
Suggestions
CI/codecov should stay green. Let me know if you'd prefer the long-form variable rename after all. Fixed with Claude Code assistance. |
PavelMakarchuk
left a comment
There was a problem hiding this comment.
PR Review (complete:review-pr — re-review after 8/18 commits)
Both findings from my 8/16 review are genuinely fixed, verified against the form text extracted mechanically (2022 Schedule PTFC/STFC p. 2; 2014 instructions p. 4; 36 M.R.S. §5219-KK(1)(E)):
- Discriminator ✓ — the new dedicated
me_ptfc_utilities_included_in_rentinput replacesutility_expense(the SPM-unit separately-paid utilities aggregate, which the form's line 5c does not mean). Countable-rent Case 4 is a regression guard that inverts if the old discriminator returns. - Negative clamp ✓ —
max_(rent - utility_portion, 0), with boundary tests at equal-to-rent and exceeding-rent.
The line 5c implementation reproduces all three form branches exactly — "If line 5b is yes and you know the amount… enter that amount… If yes, and you do not know the amount paid, multiply line 5a by 15% (.15)… If line 5b is no, enter '0'" — and the 0.15 is parameterized separately from the line-5e rent rate with correct page anchors for 2014/2022/2023 (the 2014-01-01 start date checks out against the 2014 form). All six countable-rent cases plus the end-to-end credit case (765) recompute correctly by hand; the full ME credits suite (125 tests) passes on the branch. Microsim-safe: utilities_included_in_rent is imputed nowhere, so defaults are unaffected. CI green.
🟡 Should address (non-blocking, but №1 is worth settling before merge since it's a public API name)
- Variable name breaks the folder convention — every sibling spells out
me_property_tax_fairness_credit_*;me_ptfc_has no precedent in the repo, and renaming a user-facing input after release is a breaking API change. Suggestme_property_tax_fairness_credit_utilities_included_in_rent_amount(the_amountsuffix also disambiguates from the booleanutilities_included_in_rent). - Parameter description — leads with a subordinate clause and uses "gross rent" in the opposite sense from the statute's term of art (§5219-KK(1)(E) defines "gross rent" as rent exclusive of utility charges, i.e. line 5d, not 5a). Suggest e.g. "Maine excludes this share of the rent paid as utilities included in rent when the amount is not known under the property tax fairness credit."
🟢 Suggestions
- Add the mirror-image test:
utilities_included_in_rent: falsewith a nonzero amount → no exclusion (guards theincluded *gate, form's "If line 5b is no" branch). - Label/description say "heat or utilities"; the form covers "heat, utilities, furniture, or similar items" — broaden the wording.
- Test-name labels "(F1…)"/"(F2…)" are session-internal identifiers; the comment bodies are excellent, just reword the labels.
- The clamp comment ("Line 5d (5a − 5c) can never be negative") slightly overstates the form — it's a defensive guard against user input where 5c exceeds 5a.
- Drive-by while the folder is open: sibling
rate/rent.yamlhaslabel: …income rate— copy-paste error for the rent rate.
Validation summary
| Check | Result |
|---|---|
| Regulatory accuracy | 0 issues (all three 5c branches match the form verbatim) |
| Reference quality | Anchors verified for all three form years; 2014 start corroborated |
| Code patterns | Clean (vectorized, parameterized, correct entities); naming nit above |
| Test coverage | 6 unit + 1 end-to-end recompute correctly; 125-test suite passes |
| CI | Passing (full suite) |
PR 9267 — ME Property Tax Fairness Credit: Schedule PTFC/STFC line 5c utilities-in-rent ruleProgram ReviewProgram: Maine Property Tax Fairness Credit (36 M.R.S. §5219-KK) — implements Schedule PTFC/STFC line 5c: when rent includes heat/utilities/furniture and the amount is known, subtract it; when unknown, subtract a 15% estimate of rent; when not included, subtract nothing. New 0.15 parameter, new dollar-amount input variable, rewritten countable-rent formula (drops an erroneous SPMUnit-level Source Documents
Verification-phase supplements: 2013 Schedule PTFC (NBER mirror, ext-1) and 2016/2019/2021/2024/2025 Schedule PTFC/STFC forms (ext-2 continuity sample) — text-extracted, not rendered.
CriticalNone. The three line-5c branches, the 0.15 value, the 5c → 5d → 5e ordering, the 2014-01-01 effective date, and all three reference page anchors match the extracted sources; every formula branch has at least one passing test; CI is passing. ShouldA1 — Wording understates the form's scope and misuses "gross rent" (VERIFIED mismatch, documentation-only; value 0.15 correct)
Confirmed by verifier at 600 DPI against the 2022 form (p. 2) and 2023 form (p. 1), plus the 2014 text layer (p. 2): all three forms say "heat, utilities, furniture, or similar items" (statute §5219-KK(1)(E) is broader still: "utilities, services, furniture, furnishings or personal property appliances"). The repo strings say "heat or utilities" / "utilities" throughout. Classified as documentation, not a value mismatch — the formula reads only the parameter's numeric value, which is correct. Second wording defect at the same loci: the description, variable documentation, and changelog all apply 15% to "gross rent", but §5219-KK(1)(E) defines gross rent as the figure exclusive of utility charges — i.e. the post-line-5c amount, the base of the sibling A2 — Naming:
|
| Category | Count |
|---|---|
| Confirmed correct (repo value = PDF) | 13 (+5 continuity form-years via ext-2) |
| Mismatches verified | 1 (wording-scope only, value correct → A1) |
| Mismatches rejected | 0 |
| Cross-reference checks | 1 (microsim imputation — REJECTED, cleared) |
| External-document checks | 2 (ext-1 TY2013 — cleared with reasoning above; ext-2 continuity — CONFIRMED) |
| Unmodeled program features | 1 (§5219-KK(1)(E) assessor arm's-length rent adjustment; not modelable from microdata) |
| Pre-existing (outside PR scope) | 2 (rent.yaml label misnomer; 2024 reference href → 2023 file → S7) |
Validation Summary
| Validator | Result |
|---|---|
| Regulatory | PASS — 0 critical; 3 should, 6 suggestions (consolidated above) |
| Reference | 4/4 citations corroborated with correct page anchors; effective date corroborated twice; form-only 15% citation confirmed correct |
| Code | PASS — 0 critical; naming/wording advisories consolidated (A1, A2); 10 pattern checks clean; ruff clean |
| Tests | All 7 expectations verified; 2 mutation gaps downgraded from critical per policy (every branch has coverage) → A3; further gaps → A4; margin/jargon hygiene → A5 |
| PDF audit | 13 matches, 1 wording-only mismatch across 12 rendered pages + 2 at 600 DPI |
| Verifiers | mismatch-1 CONFIRMED (doc-only); xref-1 REJECTED; ext-1 cleared (predecessor program, not an error); ext-2 continuity CONFIRMED |
| CI Passing | YES (all checks pass) |
Branch Status
The branch is 347 commits behind base (3 ahead). Rebase recommended before merge. Staleness did not affect any finding: all findings were verified against the PR snapshot at head SHA b008eae.
Review Severity: COMMENT
Zero critical findings. The value, mechanics, effective date, references, and formula are all verified correct against three cited form years, five additional sampled years, and the statute; the six SHOULD items are documentation wording, naming, and test-coverage improvements on a substantively correct fix.
Next Steps
Run the fix-pr workflow against this report: apply A1's wording broadening and gross-rent correction, A2's renames, A3's two mutation-guard tests, then the remaining A-items (coverage cases, margins, jargon scrub, clamp-comment reword) and any S-items worth taking; rebase on base and re-run CI.
Maine's property tax fairness credit computes rent constituting property taxes as 15% of rent, after excluding any heat/utilities included in the rent. Schedule PTFC/STFC line 5c provides that when the rent includes utilities but the amount is not known, 15% of gross rent is treated as the utility portion. me_property_tax_fairness_credit_countable_rent previously left that fallback unimplemented, so a filer whose rent includes utilities but who did not itemize a utility amount received no utility exclusion. Add the 15% fallback and a parameter for the fraction. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ator and clamp - F1: the known/unknown split for the utility portion of rent was keyed on the household's general utility_expense (SNAP-style total), making the line-5c 15% fallback unreachable whenever any utility expense was reported and subtracting separately-paid utilities from rent. Add a dedicated me_ptfc_utilities_included_in_rent amount and drive the split off the utilities_included_in_rent boolean + that amount: not included -> no subtraction; included & known -> subtract it; included & unknown -> subtract the 15%-of-rent estimate. - F2: clamp net rent with max_(rent - utility_portion, 0) so countable rent can never go negative and offset real_estate_taxes downstream (Schedule PTFC line 5d >= 0). - Tests: add a separately-paid-utilities case (1,530, inverts if F1 reverted) and a utilities-exceed-rent clamp case (0). ME PTFC suite 36/36. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…(ME PTFC) - Changelog: rename me-ptfc-utilities-in-rent.fixed.md -> .added.md (the PR adds a new parameter and input variable, so 'added' per repo convention). - Documentation: me_ptfc_utilities_included_in_rent now documents that 0 means the amount is unknown (triggers the 15%-of-gross-rent line-5c estimate), disambiguating a known $0. - References: utilities_included_in_rent.yaml adds the 2014 Schedule PTFC line-5c form (supports the 2014-01-01 start) alongside the 2022/2023 forms. No value/date change. - Tests: integration case (rent with unknown utilities -> line-5c estimate -> positive credit) and a known-amount-equals-rent boundary (-> 0 countable rent). ME PTFC suite 38/38. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…, add coverage (ME PTFC) - A2: rename me_ptfc_utilities_included_in_rent -> me_property_tax_fairness_credit_utilities_in_rent_amount and rate/utilities_included_in_rent.yaml -> rate/utilities_share_of_rent.yaml (spelled-out sibling convention; the amount no longer reads as the adjacent utilities_included_in_rent boolean). - A1: broaden 'heat or utilities' -> 'heat, utilities, furniture, or similar items'; replace 'gross rent' with 'rent paid (Schedule PTFC/STFC line 5a)' (gross rent is the utilities-exclusive base per 5219-KK(1)(E)). - A6: reword the line-5d clamp comment to the modelling rationale (guards inconsistent input), not unprinted form text. - A3/A4: mutation-guard tests (gate mirror; known-branch utility_expense guard) + coverage (multi-person, renter+owner, zero rent, >0 boundary, negative amount, default path, e2e known-amount credit). - A5: absolute_error_margin on all cases; rename review-jargon case names to domain terms. - S2/S3/S5/S7: statute-not-cited-for-15% note; move sentinel doc into the formula comment; comment/style polish; fix pre-existing rate/rent.yaml label + 2024 reference href. No parameter value changed (0.15 intact). ME PTFC suite 50/50. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
b008eae to
e5a551c
Compare
Follow-up review addressed — thanks @PavelMakarchukApplied all six SHOULD items and the actionable suggestions from your 2026-08-23 review (ME PTFC suite 50/50, rebased on main). No parameter value changed (0.15 intact). Should
Suggestions
Not applied — S6 (make it a generic household-level input): that conflicts with A2's state-specific rename you (and three validators) asked for, and you flagged it as "design preference, not a defect," so I kept the state-specific variable. Happy to revisit if you'd prefer the shared-input direction instead. Also annotated Cases 5/6 (amount ≥ rent → 0) as invalid-input clamp guards rather than Maine-published results, per your circularity note. Fixed with Claude Code assistance. |
PavelMakarchuk
left a comment
There was a problem hiding this comment.
Program Review
PR #9267 — Implement Maine PTFC unknown-utilities 15% rule (Schedule PTFC line 5c)
Re-review triggered by the post-approval commit e5a551c1 (2026-08-24), which landed after the
2026-08-22 approval and touched all 9 files.
Source Documents
- PDF: 2014 Schedule PTFC, 2021/2022/2023 Schedule PTFC/STFC, plus 2024 and 2025 Schedule
PTFC collected during this review; 36 M.R.S. §5219-KK (statute HTML) - Year: 2014+ (parameter starts 2014-01-01); tests use 2014, 2022, 2024
- Scope: PR changes only
- Reviewed head SHA: e5a551c
- Mode: full
Verdict on the post-approval rename — SOUND
e5a551c1 deleted the ME-specific discriminator you had verified
(me_ptfc_utilities_included_in_rent + utilities_included_in_rent.yaml) and replaced it with the
pre-existing generic utilities_included_in_rent boolean plus a new ME-specific dollar-amount input.
Checked and sound on every dimension that mattered:
- Entity is exact, not approximate. Despite living in
variables/household/expense/housing/,
utilities_included_in_rentis a TaxUnit boolean — the same entity as the ME credit chain — so
tax_unit("utilities_included_in_rent", period)needs no aggregation and introduces no ambiguity. - No cross-program interference. Repo-wide grep: its only other consumers are the Michigan home
heating credit (mi_standard_home_heating_credit.py:32,
mi_alternate_home_heating_credit_eligible.py:16), both MI-gated. SNAP utility allowances and
LIHEAP do not read it — they useutility_expense,has_heating_cooling_expense, and
heat_expense_included_in_rent. The ME formula no longer touchesutility_expense, which SNAP
keeps using untouched. - No stale references to the deleted variable or parameter remain anywhere in the tree.
- The negative-net-rent clamp survives at head:
net_rent = max_(rent - utility_portion, 0),
boundary-tested by Cases 5, 6, and 10. - Reuse over duplication is the right call — this is the pattern the standards ask for.
Critical (Must Fix)
None.
Should Address
- [A1]
me_property_tax_fairness_credit_countable_rent.py:19— the overlapping sibling flag
heat_expense_included_in_rentis not linked, so a heat-only household silently misses line 5b.
variables/household/expense/housing/heat_expense_included_in_rent.py(SPMUnit bool, used by MA/IL
LIHEAP) covers a subset of the line-5b concept ("heat, utilities, furniture, or similar items"). A
household modeled asheat_expense_included_in_rent: true/utilities_included_in_rent: false—
a perfectly natural LIHEAP setup where the landlord provides heat only — answers line 5b "Yes" on
the real form, but the formula seesincluded = Falseand counts full rent, overstating the
credit. This is the one genuine gap the rename introduces: the deleted ME-specific variable had
the same blind spot only when left unset, but its ME-specific name invited a direct answer to the
ME question. At minimum document the relationship; OR-ing the two flags is a fuller fix but needs
care with the SPMUnit→TaxUnit mapping, so it's a design call rather than a prescription. - [A2]
me_property_tax_fairness_credit_utilities_in_rent_amount.py— the 0-as-unknown
sentinel is undocumented on the input variable itself. The semantics live only in a comment in
me_property_tax_fairness_credit_countable_rent.py:20-24. An app/API consumer introspecting this
input will read 0 as "$0 of utilities in rent" and instead get a 15% deduction. Put the sentinel
in the variable's own label or documentation.
On substance the sentinel is form-faithful: a filer who genuinely pays $0 toward heat/utilities
has rent that "does not include an amount paid" for those items, i.e. line 5b = No, representable
by leaving the flag false — so the known-$0 vs unknown conflation has no materially wrong
reachable state, and defaulting to the estimate when the flag is true with no amount is exactly
the form's instruction. - [A3] No end-to-end case composes the new rule with a nonzero income phase-out or a binding
cap. All three new full-pipeline cases (credit file Cases 4–6) use zero income, so the 4%
phase-out never composes with the new countable-rent value; the existing
me_property_tax_fairness_credit_base_cap.yamlcases that do exercise phase-out and cap inject
me_property_tax_fairness_credit_countable_rent_property_taxdirectly, bypassing the changed
formula. Either scenario closes it:
cap binds — single, age 40, rent 60_000,utilities_included_in_rent: true, amount 0 →
countable = 0.15 × (60_000 − 9_000) = 7_650 → min(2_200, 7_650) → capped at 1_000;
phase-out binds — same household, rent 12_000 (countable 1_530) plus employment income,
assertingme_sales_and_property_tax_fairness_credit_incomealongside the credit. - [A4]
changelog.d/me-ptfc-utilities-in-rent.added.md— filename does not match the branch.
Convention is<branch-name>.<type>.md; branch isfix/me-ptfc-utilities-in-rent-v2, so the
sanitized name isfix-me-ptfc-utilities-in-rent-v2.added.md. Towncrier only needs uniqueness so
it builds fine, but the name/branch link is broken. The.addedtype is correct despite the
fix/prefix — the PR introduces a new rule, parameter, and input variable. - [A5] The PR body is stale versus head. It still names the deleted parameter
utilities_included_in_rent(0.15) rather thanutilities_share_of_rent, and describes the
pre-rename discriminator design. Worth refreshing before merge so the record matchese5a551c1.
Suggestions
- [S1]
me_property_tax_fairness_credit_countable_rent.py:16— the comment calls
utilities_included_in_renta "generic household boolean". It is a TaxUnit variable (it just
lives in thehousehold/folder). The plumbing is right; only the wording is wrong. - [S2] The generic flag's label ("Whether utilities are included in rent payments") is narrower
than line 5b, which asks about "heat, utilities, furniture, or similar items". Broadening it would
also read correctly for MI's usage. - [S3] Now actionable — a real 2024/2025 form reference exists. The verification pass located
and read both editions (see PDF Audit Summary). If you want form-year coverage extended:
https://www.maine.gov/revenue/sites/maine.gov.revenue/files/inline-files/24_Form%201040ME_Sch%20PTFC_ff.pdf#page=1
and…/25_1040me_sch_ptfc_fillable.pdf#page=1— both carry lines 5c and 5e on file page 1. - [S4] Pre-existing, same bug class this PR just fixed one file over.
parameters/.../property_tax/rate/income.yaml:17-18still carries the mislabeled duplicate that
the PR correctly removed fromrent.yaml: an entry titled "2024 Form 1040ME … Line 10" whose href
is byte-identical to the retained 2023 entry (23_1040me_sched_pstfc_ff.pdf#page=2). Outside this
PR's diff, but it is a one-line fix in a sibling file, and S3's real 2024 URL would replace it
properly. - [S5]
utilities_share_of_rent.yaml:4-8— the comment opens "§5219-KK is intentionally NOT
cited for this 15%", yet §5219-KK(1)(E) is the first entry in the reference list. The intent
(cited for the utilities-exclusion concept, not the 15% value) is clear from the rest, but the
first sentence reads as a contradiction. Suggest: "§5219-KK(1)(E) is cited only for the
utilities-exclusion concept, not for the 15% value: …". - [S6]
rent.yaml:7— pre-existing statute title has a truncation artifact: "§5219-KK. Property
tax fairness credit for tax (1) (E)". The 2021/2022 titles also carry trailing spaces and omit
the "Line 5(e)" specificity the 2023 entry has. One-word cleanup while the file is open. - [S7]
utilities_share_of_rent.yaml:4-8— the sourcing-rationale comment sits betweenvalues:
andmetadata:; conventional placement is above the block it explains. Cosmetic. - [S8] Rate-coincidence blind spot (already acknowledged in the test file header):
rate.rent
andrate.utilities_share_of_rentare both 0.15 in every year, so swapping the two parameter
references in the formula would pass the entire suite. The header correctly bans known-amount
cases where amount = 0.15 × rent. Nothing more is testable at baseline; add a discriminating case
if the rates ever diverge. - [S9] Senior (age ≥ 65, 1_500–2_000 cap) and veteran interactions are covered only via direct
countable_rent_property_taxinputs. Low risk since the new rule is upstream and orthogonal, but
one senior end-to-end case would seal the composition. - [S10] Credit-file Case 4's name lacks the trailing period its siblings use.
PDF Audit Summary
12 matches, 0 mismatches. No page offset in any edition (physical page N == #page=N), confirmed
visually at 300 DPI for the three cited anchors.
- Line 5c unknown-utilities 15% rule — verbatim in all six editions: 2014
#page=2, 2021
#page=2, 2022#page=2, 2023#page=1, and (collected during this review) 2024#page=1and
2025#page=1: "If yes, and you do not know the amount paid, multiply line 5a by 15% (.15)…
If line 5b is no, enter '0' on line 5c." Instruction pages (p. 4 of every edition) restate it:
"If your landlord cannot provide the amount…, multiply the amount on line 5a by 15%." - Line 5e rent rate 15% — "Multiply line 5d by 15% (.15)" in all six editions, matching
rate/rent.yaml. - Statute — §5219-KK(1)(E): "'Rent constituting property taxes' means 15% of the gross rent
actually paid", and gross rent is "exclusive of charges for any utilities, services, furniture,
furnishings or personal property appliances furnished by the landlord". - The parameter comment's central claim is verified:
grep -c "15%"on the statute text = 1
— the sub-§1(E) rent rate only. The statute contains no unknown-amount estimate; that 15% is
form-instructions-only. So deliberately not citing §5219-KK for the value is correct, and citing
it for the utilities-exclusion concept pinpoints the right paragraph (the gross-rent definition
lives inside (1)(E) itself; there is no separate paragraph). - 2014-01-01 start date corroborated — statute header "For tax years beginning on or after
January 1, 2014" (PL 2013, c. 551), and the 2014 edition already carries both 15% rules. - Dropped 2024 reference lost nothing — the removed
rent.yamlentry was titled "2024 Form
1040ME…" but its href was byte-identical to the retained 2023 entry, i.e. a mislabeled duplicate.
Removing it improves accuracy. (The same duplicate survives inincome.yaml— see S4.)
Verification item closed. The one open flag from the verification queue was that the constant
0.15 was evidenced only for 2014/2021/2022/2023, while test Case 16 asserts 2024 against the
parameter rather than a 2024 form. Both the 2024 and 2025 Schedule PTFC editions were downloaded and
read during consolidation: both carry the identical line-5c 15% rule and line-5e 15% rate. Case
16's 2024 assertion is now backed by an actual 2024 form, and continuity extends through 2025.
Hand-recomputed test expectations, all agreeing: Case 1 (5b no) 1000 × 0.15 = 150; Case 2 (known 50)
950 × 0.15 = 142.5; Case 3 (unknown) 5c = 150, 850 × 0.15 = 127.5; Case 9 (joint, 6000+4000) 5c =
1500, 8500 × 0.15 = 1275; Case 12 (known 1) 999 × 0.15 = 149.85; credit Cases 4/5/6 → 765 / 710 / 750.
Validation Summary
| Check | Result |
|---|---|
| Regulatory Accuracy | Pass — matches §5219-KK and the 2014–2025 form instructions; post-approval rename verified sound; 0 critical |
| Reference Quality | Pass — 0 critical, 0 should-address; every href fetched and every #page= anchor verified against the actual file page |
| Code Patterns | Pass — parameterized 15%, clean where()/max_ vectorization, correct entity handling, reuses rather than duplicates the flag; 0 critical |
| Formatting | Pass with nit — changelog fragment present and correctly typed, filename/branch mismatch (A4) |
| Test Coverage | Strong — 16 unit cases covering the full flag × amount branch matrix, sentinel, clamp, aggregation, defaults, and 2014/2024 temporal pins, all with discriminating values; one end-to-end composition gap (A3) |
| PDF Value Audit | Pass — 12 matches, 0 mismatches, across six form editions |
| Microsim Safety | Pass — flag defaults false and amount defaults 0, so population runs take the unchanged full-rent path; zero change to population-level PTFC, pinned by Case 14 |
| CI Status | Pass — all 33 checks (run 32732780945) |
Review Severity: APPROVE
No critical findings. The post-approval rename that triggered this re-review is a genuine
improvement — it reuses an existing correctly-entitied variable instead of adding a state-specific
duplicate — and the negative-rent clamp you'd previously verified survives intact. The unit test
suite is unusually thorough.
A1 (the unlinked heat_expense_included_in_rent sibling) is the one item with real modeling
consequence and is worth a follow-up; A5 (stale PR body) is worth fixing before merge so the record
matches the code.
Applies all Should-Address and Suggestion items from PavelMakarchuk's 2026-08-25 re-review of the ME PTFC line-5c fix. No parameter values or formula logic changed. - A1/S1: document the sibling heat_expense_included_in_rent flag (not OR'd in; deferred as a cross-entity design call) and correct the utilities_included_in_rent comment to describe it as a TaxUnit variable. - A2: put the 0-as-"amount unknown" sentinel on the input variable's own label and documentation, not only in the formula comment. - A3/S9: add end-to-end cases composing the unknown-amount estimate with a binding non-senior cap (1000), a binding income phase-out (730), and the senior cap band (2000). - A4: rename changelog fragment to match the branch. - S2: broaden the shared utilities_included_in_rent label to the form's "heat, utilities, furniture, or similar items". - S3/S4: replace the mislabeled 2024 income-rate reference (duplicate 2023 href) with the real 2024 Schedule PTFC URL, and add verified 2024/2025 line-5c references to utilities_share_of_rent. - S5/S7: reword and reposition the utilities_share_of_rent sourcing comment so it no longer contradicts the cited statute. - S6: fix the truncated statute title in rate/rent.yaml. - S10: add the missing trailing period to credit Case 4's name. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YCwrSsGY7vPCpKYGfV1xRr
Applies the Should-Address and Suggestion items from PavelMakarchuk's 2026-08-25 re-review of the ME PTFC line-5c fix. No parameter values or formula logic changed. - A1/S1: document the sibling heat_expense_included_in_rent flag (not OR'd in; deferred as a cross-entity design call) and correct the utilities_included_in_rent comment to describe it as a TaxUnit variable. - A2: put the 0-as-"amount unknown" sentinel on the input variable's own label and documentation, not only in the formula comment. - A3/S9: add end-to-end cases composing the unknown-amount estimate with a binding non-senior cap (1000), a binding income phase-out (730), and the senior cap band (2000). - S2: broaden the shared utilities_included_in_rent label to the form's "heat, utilities, furniture, or similar items". - S3/S4: replace the mislabeled 2024 income-rate reference (duplicate 2023 href) with the real 2024 Schedule PTFC URL, and add verified 2024/2025 line-5c references to utilities_share_of_rent. - S5/S7: reword and reposition the utilities_share_of_rent sourcing comment so it no longer contradicts the cited statute. - S6: fix the truncated statute title in rate/rent.yaml. - S10: add the missing trailing period to credit Case 4's name. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YCwrSsGY7vPCpKYGfV1xRr
Follow-up review addressed — thanks @PavelMakarchukApplied all Should-Address and Suggestion items from your 2026-08-25 re-review. No parameter value changed (the 0.15 rates are intact) and no formula logic changed — everything is documentation, references, labels, comments, and added tests. Should Address
Suggestions
I couldn't run the suite locally (the pinned venv is on a broken 3.14-alpha numpy), so I hand-verified all three new end-to-end expectations against the actual benefit-base, cap, and 4% income-rate parameters and am relying on CI for confirmation. Fixed with Claude Code assistance. |
Surfaced by PolicyEngine/policyengine-taxsim#1126 (ME renter with rent that includes utilities).
Problem
Maine's property tax fairness credit treats 15% of rent as "rent constituting property taxes," after first excluding any heat/utilities/furniture included in the rent. Per 2022 Schedule PTFC/STFC line 5c: if the rent includes heat, utilities, furniture, or similar items and the amount is known, subtract it; if it includes them and the amount is not known, subtract 15% of rent paid (line 5a) instead; if it does not, subtract 0.
The old
me_property_tax_fairness_credit_countable_rentformula only handled the known-amount case (via an SPMUnit-levelutility_expensesubtraction) and its comment noted the unknown-amount branch was "not implemented." So a filer whose rent includes utilities but who did not itemize a utility amount received no utility exclusion at all, overstating the countable rent (and the credit). The old code also subtracted the household's separately paid SPMUnit-level utility bills from rent, which has no basis on the form.Fix
utilities_included_in_rentboolean (a TaxUnit variable, already consumed by Michigan's home heating credit) as the line-5b gate, instead of adding a state-specific flag.me_property_tax_fairness_credit_utilities_in_rent_amount(TaxUnit, USD, default 0). A value of 0 means the amount is unknown and triggers the 15% estimate; a positive value is the known amount to subtract.gov.states.me.tax.income.credits.fairness.property_tax.rate.utilities_share_of_rent(0.15) for the unknown-amount utility fraction — kept separate from the coincidentally-equal line-5erate.rent, and deliberately not citing §5219-KK for the 15% (the statute carries no unknown-amount estimate; that rule is form-instructions-only).max_(rent - utility_portion, 0)) so inconsistent input where the utility amount exceeds rent cannot drive countable rent negative and offsetreal_estate_taxesdownstream.Example
Rent $17,139 with utilities included, amount unknown: utility portion = 15% × 17,139 = 2,571; countable rent = 15% × (17,139 − 2,571) = 2,185, matching the Maine worksheet (previously PE used the full 15% × 17,139 = 2,571). The known-amount and utilities-not-included cases are unchanged.