Plan: TANF work participation rate — weekly averages, the recorded young-child standard and family type (#2316, #2315, #2975)
- Context
- Scope
- Design
- Units (weights by complexity) — U1 → U2 → U3 → U4 on one branch; #3047 → #3048 → U5
- U1 (w5) — canopy-tanf: the averaging data and weekly figures (#2316)
- U2 (w3) — canopy-tanf: the work-standard classification batch (#2315)
- U3 (w5) — canopy-reporting: weekly snapshot, bands and core floors (#2316)
- U4 (w5) — canopy-reporting: the recorded young-child standard; seeded bases (#2315)
- U5 (w5) — canopy-reporting: family type from the recorded facts (#2975; after #3047, #3048)
- Risks
- Verification
- Documentation Updates
- Review log
Status: Done (2026-10-29) — !1838
Epic: none — follow-up to #2193 (TANF 261.34 limits) and #2314 (work-standard basis UI)
Issues: #2316 (parent) · #2315 (parent) · #2975 (parent, blocked by #3048 ← #3047) · U1–U4 → #2316, #2315 · U5 → #2975 · follow-ups #3049, #3050, #3051, #3052
Branches: fix/tanf-wpr-weekly-standards (U1–U4, one commit per unit, one battery run); fix/acf199-family-type (U5, after #3047 and #3048)
This is a Design + Scope plan: GitLab owns tracking, the parent issues carry the implementer brief, and the plan freezes when U1 starts.
Erratum (2026-10-27): U1 also edits rulesets/federal/indexing.toml, because policy audit --source federal refuses a federal file with no family.
Erratum (2026-10-27): U2 flattens WorkStandardEntry.outcome onto the entry (#[serde(flatten)]), so the wire reads {"person_id", "outcome": "decided", "class": …}; a roundtrip test pins it.
Erratum (2026-10-27): U3 refuses any determination with no effective_date (the universe query filters on it for every status), not only an approved one; it also touches rulesets/test-min/citations.toml (the policy audit needs a citation per new key), tests/reporting_test.rs, the contracts roundtrip test, and xtask/quality-budgets.lock (B2 falls from 106 to 105 because splitting calculate_wpr brings it under 100 lines).
Erratum (2026-10-27): U4 removes young_child_months_max and its citation from rulesets/test-min (that pack carries exactly the keys the reporting loader reads); the store’s refusal type is RefusalReason and the wire enum is RunErrorReason; U4 also touches services/canopy-reporting/src/api/mod.rs (schema registration), the two integration tests that call the four-argument report_run_finalize, and tools/canopy-seed/tests/integration.rs.
Erratum (2026-10-29): U5 reconciles the family-composition read exactly over the present approved determinations, so an ACF-199 run over a month whose determinations predate #3048 fails contract_violation, logging the determination's id: fail-closed; remedy: re-determine (pre-1.0, no production data).
Erratum (2026-10-29): U5 also extends tools/canopy-seed (model, SQL, datagen, integration test) to write each seeded approved TANF determination's unit: one member row per household member, and natural-parent edges from the head and spouse to each child, as the live composer would. Without them the exact reconciliation above fails every seeded ACF-199 run. compliance/determination-status-fields.toml exempts the seed's member status (ADR-002, by design).
Erratum (2026-10-29): U5 cites [tanf.wpr].two_parent_parent_kinds in all four packs, not only Georgia's, because the policy audit requires a citation per key. compliance/neutrality-gate.toml allowlists the #3047 and #3048 parent-kind CHECKs, which the new pack vocabulary (natural, adoptive) now flags.
Erratum (2026-10-29): the canopy-reporting client refuses a parent kind outside natural, adoptive and step as a contract error (fail-closed, beyond D8). Every member of W in a single-parent family is now classified, so a recipient member with no recorded basis fails the run policy_input_missing.
Context
calculate_wpr (services/canopy-reporting/src/reporting/tanf.rs:52-118) has three faults:
-
It compares the ACF-199 snapshot hours with the weekly standards. Those hours are each adult’s monthly totals: canopy-tanf prorates a weekly rate by days/7 (
row_figures,services/canopy-tanf/src/api/work_requirement_handlers.rs:953-975), and reporting sums the result across the adults (services/canopy-reporting/src/worker/tanf.rs:984-1021). -
It binds the all-family core floor of 20 to two-parent families (
reporting/tanf.rs:116). The packs already carry[tanf.wpr].two_parent_core_hours = 30andtwo_parent_childcare_core_hours = 50. -
It decides
young_childfrom the #1771 roster heuristic, and a child with no date of birth on file silently falls back to 30 hours (worker/tanf.rs:906-941).
The extract also types families by counting roster members whose relationship is not "child" (adult_ids_of and snapshot_row, worker/tanf.rs:775-781, :885-891).
Some of the facts these fixes need are recorded today:
-
canopy-tanf keeps each work-eligible person’s dated work-standard basis (
tanf_work_standard_bases). It decides the 45 CFR 261.34(c) week from that basis (services/canopy-tanf/src/participation/week_standard.rs), and #3020 serves the timelines in bulk. -
The determination universe is the set of determinations whose coverage window
[effective_date, expiration_date]overlaps the month (services/canopy-tanf/src/store/mod.rs:690-712). Both dates are on theGET /v1/determinationswire (crates/canopy-contracts-tanf/src/models.rs:35-38), but reporting does not decode them (services/canopy-reporting/src/clients/mod.rs:1185-1190).
Three facts are recorded by no service:
-
parenthood, meaning who is the natural, adoptive or step-parent of which child (#3047);
-
TANF assistance-unit membership:
services/canopy-tanf/src/au_composition.rsis never called, and a determination keeps no members (#3048); -
the 45 CFR 261.2(n) work-eligibility decision, which
POST /v1/work-requirements/evaluatemakes and does not save (#2974).
This work is governed by ADR-001 Amendment 1 §B4 (bulk reads use :batchGet, at most 500 ids per call), ADR-034 §3 (a policy input is never assumed) and ADR-011 (a figure comes from data, never from a literal).
Policy answers. AGENTS.md sets no SME gate before 1.0, so each answer below is best effort, with its source. The regulation text was checked against eCFR on 2026-10-27 (the 2026-10-06 edition).
-
Weekly average (#2316; maintainer ruling Q1, 2026-10-27, recorded on #2316). 45 CFR 261.31(a)(1): a family counts if the individual "participates in work activities during the month for at least a minimum average of 30 hours per week". 261.32(a)(1) and (e)(1) set combined averages of 35 and 55. Neither section, nor 261.22 or 261.24, names a divisor or offers a State election, so no pack key. The average week is the month’s hours divided by the month’s days over seven (D1). The 4.33 in the 2008 final rule restates a commenter’s example (73 FR 6819) and was rejected.
-
Two-parent core floors (#2316). 30 core hours (261.32(a)(2)), or 50 with federally funded child care (261.32(e)(2)). Bound from the existing
[tanf.wpr]keys (D4). -
Partial month (#2316). A partial month counts if the minimum is met "in each full week that the family receives assistance in that month" (261.22(d)(1), 261.24(d)(1)). A family assisted for any part of a month stays in the denominator (73 FR 6802). Here a partial month is in the denominators and never in a numerator; the full rule is #3049 (D3). This part of #2316’s criterion is recorded on the issue as deferred.
-
Caretaker relative (#2315). 42 USC 607(c)(2)(B) reaches "the only parent or caretaker relative in the family of a child who has not attained 6 years of age". 45 CFR 261.35 was its restatement and has been removed. A sole caretaker relative is therefore recorded as
single_custodial_parent = true, and the basis contract says so (U2). This is documentation only and changes no source. -
All-family numerator with several work-eligible members (maintainer ruling Q2, 2026-10-27, recorded on #2316). A family that is not two-parent counts when one individual alone meets 261.31 or the young-child band (42 USC 607(b)(1)(B)(i), "include an adult … who is engaged in work"; 261.31(a), "he or she"). A two-parent family counts in the overall rate when it meets the 261.32 combined standard. Applies in U5; U3 keeps today’s arm for
two_parentrows. -
Two-parent family (#2975). 261.24(c): "at a minimum, all families with two natural or adoptive parents (of the same minor child) who are work-eligible individuals and living in the home, unless both are minors and neither is a head-of-household". "At a minimum" is a State election, so it becomes the pack key
[tanf.wpr].two_parent_parent_kinds, set to["natural", "adoptive"]in every pack: the federal minimum, since no Georgia election was found (U5). -
Who is work-eligible (#2975). 261.2(n) covers a recipient adult or minor head of household, or a non-recipient parent living with a recipient child. It excludes a minor parent who is not the head of household, a non-citizen ineligible on immigration status, and, case by case at State option, SSI and SSDI recipients. A caretaker relative who receives assistance is work-eligible; one who does not is not (73 FR 6796-6797).
#2974 stays out. It is T2 and blocked by #811. It changes which families leave a denominator (the infant disregard and the 261.24(a)(2) disabled-parent exclusion) by saving the ruleset’s evaluation. That shares no code path with these numerator and typing fixes. It does feed #3048’s case-by-case exclusions, and #3048 states what it reports until #2974 lands.
Scope
In scope:
-
U1: the federal averaging data, and the summary reports average weekly countable hours.
-
U2: a canopy-tanf
:batchGetthat classifies each person’s work standard for a month. -
U3: weekly snapshot columns, the four bands compared week to week, the two-parent core floors, and the partial-month flag.
-
U4:
young_childfrom U2 (the roster heuristic is deleted), a failed run records the refusal and the person, and the seed writes bases. -
U5 (after #3047 and #3048): family type from work eligibility and parenthood, with per-adult hour rows.
Out of scope:
-
The full 261.22(d)(1) and 261.24(d)(1) partial-month test, and the 261.22(d)(2) retroactive-period election: #3049. The test needs per-week countable hours, which canopy-tanf’s limit engine does not produce.
-
The
activities/summary:batchGet422work_standard_unrecorded, which names a month and no person, and so still finalizescontract_violation: #3050. -
The 261.32(e)(1) disability condition on the child-care tier, which today keys on a CAPS authorization alone: #3051.
-
Two determinations of one household in one month each producing a family row: #3052.
-
The ACF-199 transmission format: whole-number per-activity weekly hours (73 FR 6819).
-
#2974 (disregards and exclusions); #2210 (moving
[tanf.wpr]federal constants;young_child_months_maxstays for canopy-tanf); thework_requirement_single_parent_hoursmiscitation.
Design
D1 — the averaging data (U1).
-
New file
rulesets/federal/tanf-work-participation.json:_comment,_source("45 CFR 261.31(a)(1), 261.32(a)(1), (e)(1); 261.34(d)"),_effective_date"2008-10-01", andaverage_week: { days_per_week: 7 }. -
rulesets/federal/citations.tomlgainstanf-work-participationandtanf-work-participation.average_week.days_per_week. Eachsource_refquotes 261.31(a)(1) and 261.34(d) ("a week means seven consecutive days"). -
participation/federal.rsgainsFederalParticipation::load(rulesets_dir), the strictdeny_unknown_fieldsparse thatFederalActivityLimits::loaduses, with the sameFederalLimitsErrorvariants.days_per_weekmust lie in 1-7.TanfParameterTableholds the result beside the activity limits, and a bad file refuses boot, naming the file.
D2 — weekly figures (U1).
-
row_figurestakes the month lengthdays_in_monthanddays_per_week, and returnsRowFigures { logged, excess, weekly }:logged = rate × days ÷ days_per_week(replacingDecimal::from(7));weekly = rate × days ÷ days_in_month, multiplied first, so a row held all month averages exactly to its rate. -
The weekly countable figure is 0 for
RowExcess::All. Otherwise it ismax(0, weekly − excess × days_per_week ÷ days_in_month). -
aggregate_summarysums the weekly countable figures and adds the partial-week credit ascredit × days_per_week ÷ days_in_month. It fillsaverage_weekly_total_hoursandaverage_weekly_core_hours. -
WorkActivitiesSummary(crates/canopy-contracts-tanf/src/work_requirements.rs:194) gains both fields as exactDecimal(schemaString), documented as the 261.31 and 261.32 inputs.total_hoursandcore_hoursstay monthly, because the worker tab shows them, and their docs stop calling them WPR inputs. -
canopy-tanf owns the conversion. It holds the rates and the days, and reporting cannot do it exactly from a monthly total: 20 × (30/7) × 7/30 is 19.999… in
Decimal.
D3 — the snapshot (U3).
-
Migration
services/canopy-reporting/migrations/<ts>_acf199_weekly_hours.sql: dropstotal_work_hoursandcore_activity_hours; addsaverage_weekly_total_hours NUMERIC(6,2),average_weekly_core_hours NUMERIC(6,2)andassisted_whole_month BOOLEAN, each with aCOMMENTciting 261.31, 261.32, 261.22(d) and 261.24(d). -
Rows extracted before the migration hold NULL in all three (unsourced, the #1333 precedent), and a rerun of the month refills them.
-
The reporting DTO (
clients/mod.rs:1200) decodes the two weekly fields.fold_adultssums the adults' exact figures, then storesround_dp_with_strategy(2, RoundingStrategy::ToZero). Truncation never lifts a figure over a standard. -
TanfDeterminationSummarydecodeseffective_dateandexpiration_date.TanfCaseAuxgainsassisted_whole_month, set at drain:effective_date ⇐ first dayand (expiration_dateabsent or>= last day). An approved determination with noeffective_datecannot be in the universe (the universe query filters on it), so the drain finalizes the runcontract_violation; a U3 test pins that. -
TanfAcf199Snapshot(crates/canopy-contracts-reporting/src/tanf.rs:53-56),Acf199RowDraft, the store insert and read, and the CSV header (reporting/tanf.rs:273) take the new names, and all three carryassisted_whole_monthas a column of the snapshot, a field of the DTO and a column of the CSV.
D4 — the numerators (U3).
-
TanfWprParamsgainstwo_parent_core_hours_min(fromtwo_parent_core_hours) andtwo_parent_childcare_core_hours_min(fromtwo_parent_childcare_core_hours). Both are inputs tocontent_hash.rulesets/test-min/jurisdiction.tomlgains both keys at the federal values. -
All-family:
assisted_whole_month AND average_weekly_total_hours >= CASE young_child … AND average_weekly_core_hours >= CASE young_child …. The arm fortwo_parentrows is unchanged until U5 (Q2). -
Two-parent:
assisted_whole_month AND total >= CASE WHEN childcare_funded THEN $3 ELSE $4 END AND core >= CASE WHEN childcare_funded THEN $5 ELSE $6 END. -
The denominators are unchanged. The doc comment states the bands as average weekly hours.
D5 — the work-standard classification (U2).
-
Path:
paths::BATCH_WORK_STANDARDS = "/v1/work-requirements/work-standard:batchGet". -
Contract types, beside
WorkStandardBasis:BatchGetWorkStandardsRequest { person_ids: Vec<PersonId>, month: String };WorkStandardEntry { person_id, outcome: WorkStandardOutcome };WorkStandardOutcome,#[serde(tag = "outcome", rename_all = "snake_case")]:Decided { class: WorkStandardClass },WorkStandardUnrecorded,WorkStandardChildUnknown { child_id: PersonId };WorkStandardClass:SingleCustodialParentChildUnderSix,Other. -
The outcome is per entry, not a whole-batch 422, so one refusal cannot hide the others and every entry names its person. This deviates from #2315, which asked for coded 422s; the codes are the same.
-
week_standard.rssplitsfold_week_standardintoclassify_week_standard(basis, dates_of_birth, month_end, cutoff_months) → Result<WorkStandardClass, WeekStandardRefusal>andWeekStandardRules::week_hours(class). The summary calls both, so the two surfaces share one decision. -
Handler
batch_work_standards, in order: admitsuper::SYSTEM, so no delegated route; more than 500 ids is an uncoded 422, and a malformed month is the 400 fromsummary_month_bounds; ids are deduplicated in first-occurrence order; onestore::list_work_standard_bases_for_personscall, thenbasis_onat the month’s last day; onefetch_dates_of_birthpass over the children of in-force single-custodial-parent bases (a failure is the whole request’s 502persons_unavailable); classify each person. -
A pure
entries_in_request_orderbuilds the answer.ApiDocregisters the path, and the path-count pin inservices/canopy-tanf/src/api/mod.rsrises by one. -
The
WorkStandardBasisandRecordWorkStandardBasisRequestdocs state the caretaker-relative answer.
D6 — young_child and the refusal record (U4).
-
ServiceClients::batch_get_work_standards(&[Uuid], &str)checks the exact id set (check_exact_ids). -
enrichsends the one adult of eachsingle_parenthousehold throughwork_standards_leg: sub-batches of 500 underbuffer_unordered(run_upstream_concurrency). -
The legs run under
tokio::join!and are then judged in a fixed order: a classification refusal first, then the first leg error in declaration order. The recorded outcome is therefore deterministic. -
enrichreturnsResult<AcfEnrichment, EnrichFailure>, with variantsUpstream(ReportingClientError)andRefused { reason: RefusalReason, person_id: PersonId }. -
snapshot_row:young_child = family_type == "single_parent" && class == SingleCustodialParentChildUnderSix. -
Deleted, with no shim:
single_parent_children,child_ids_of,children_dob_leg,youngest_child_is_under_cutoff,YoungChildRule,children_dob,TanfWprParams.young_child_months_maxand itscontent_hashinput. -
A
Refusedfailure finalizes the run withpass::finalize_refused: the run’s error code is the newRunErrorCode::PolicyInputMissing(policy_input_missing); two newreport_runscolumns record the refusal,error_reason(work_standard_unrecordedorwork_standard_child_unknown) anderror_person_id, in the same migration as below; a CHECK makeserror_code = 'policy_input_missing'hold exactly when both columns are set, and the SQL finalize function gains both parameters;ReportRunStatus(crates/canopy-contracts-reporting/src/runs.rs:209) carries both. -
That migration also re-comments
tanf_acf199_snapshots.young_child, citing 42 USC 607(c)(2)(B) and the recorded basis. The applied migration is not edited.
D7 — the seed (U4). For every approved TANF household, phase16_tanf writes one tanf_work_standard_bases row per adult, with effective_date on the first of the month 24 months before the reference date and recorded_by "seed": a household with one adult and at least one child gets single_custodial_parent = true, with every non-adult member as a custodial child; every other adult gets false, with no children. The rows are added in tools/canopy-seed/src/{model,sql}.rs.
D8 — family type (U5, after #3047 and #3048).
-
#3047 (canopy-persons) and #3048 (canopy-tanf) are designed in their own issues and plans, not here. U5 depends on #3048 answering, per determination and month, each unit member’s
work_eligible(261.2(n)),minor,head_of_householdandparent_of: [{ child_id, kind }]; the issue texts record that need. Until #2974 saves the evaluation, #3048 reports a member a case-by-case SSI or SSDI exclusion would remove as work-eligible: the federal default, fail-closed. -
U5 types each family from W, its set of work-eligible members: W empty →
child_only; two members of W each a parent of a kind listed in[tanf.wpr].two_parent_parent_kindsof the same minor child, unless both are minors and neither is head of household →two_parent; otherwisesingle_parent, which covers a lone pregnant adult and a parent with a recipient grandparent. -
The loader refuses a kind list that lacks
naturaloradoptive, or holds an unknown kind or a duplicate. -
The per-adult legs request W, not the roster’s adults. A new table,
tanf_acf199_snapshot_adults (snapshot_id, person_id, average_weekly_total_hours, average_weekly_core_hours, young_child_standard), replaces the familyyoung_childcolumn.TanfAcf199Snapshotlosesyoung_childand gainsadults: Vec<TanfAcf199SnapshotAdult>; the CSV keeps one row per family, with theyoung_childcolumn replaced bywork_eligible_countand the family’s summed weekly figures, and a second export of the per-adult rows is #3052’s territory only if the transmission format needs it. -
The snapshot gains
work_eligible_count. The all-family numerator follows Q2 (single-parent:EXISTSan adult meeting its own band; two-parent: the 261.32 combined test).
Units (weights by complexity) — U1 → U2 → U3 → U4 on one branch; #3047 → #3048 → U5
Weights: 1 trivial · 2 small · 3 medium · 5 large · 8 very large. One unit = one independently shippable commit, at the maintainer’s direction to batch related issues into one battery run. U1–U4 land as four green commits on fix/tanf-wpr-weekly-standards, one MR.
U1 (w5) — canopy-tanf: the averaging data and weekly figures (#2316)
Files: rulesets/federal/tanf-work-participation.json (new), rulesets/federal/citations.toml, rulesets/federal/README.adoc, services/canopy-tanf/src/participation/federal.rs, services/canopy-tanf/src/params.rs, services/canopy-tanf/src/api/work_requirement_handlers.rs, crates/canopy-contracts-tanf/src/work_requirements.rs, crates/canopy-contracts-tanf/tests/roundtrip.rs, crates/canopy-test-lib/src/clients/tanf.rs, services/canopy-tanf/tests/work_activities_test.rs, services/canopy-web/src/api/case_detail/tanf_tabs/tests.rs (stub bodies), docs/modules/ROOT/openapi/tanf.json, docs/modules/ROOT/pages/api/canopy-tanf.adoc, docs/modules/ROOT/pages/federal-requirements.adoc (the 261.31/261.32 row), CHANGELOG.adoc.
Tests:
-
proptests (property) overrow_figuresandaggregate_summary: a row held all month at any rate in 0.01–168 averages exactly to that rate in 28-, 29-, 30- and 31-day months; the average never exceeds the sum of the rates; it is monotone in the days covered; it equalslogged × days_per_week ÷ days_in_monthwithin 1e-20. -
Units: 20 h/wk core for all of June averages 20 (monthly ≈ 85.71); 30 h/wk in February 2026, June and July averages 30; 30 h/wk over 15 of 30 days averages 15;
RowExcess::Allaverages 0; a credit converts at 7/D. -
Loader: a missing file, an unknown key, and
days_per_week = 0or8each refuse, naming the key. -
work_activities_test.rs: 34 and 35 h/wk logged all June answer 34 and 35, in both the single read and the batch.
U2 (w3) — canopy-tanf: the work-standard classification batch (#2315)
Files: crates/canopy-contracts-tanf/src/{paths,work_requirements}.rs, crates/canopy-contracts-tanf/tests/roundtrip.rs, services/canopy-tanf/src/participation/{week_standard,summary}.rs, services/canopy-tanf/src/api/{work_requirement_handlers,mod}.rs, services/canopy-tanf/tests/batch_status_test.rs, crates/canopy-test-lib/src/clients/tanf.rs, docs/modules/ROOT/openapi/tanf.json, docs/modules/ROOT/pages/api/canopy-tanf.adoc, docs/modules/ROOT/pages/authorization-inventory.adoc (route row), CHANGELOG.adoc.
Tests:
-
The existing
week_standardtests are restated overclassify_week_standardplusweek_hours, with the same assertions. -
An infra test over
EphemeralSchema::new_for_tanfwith themock_personsrouter, guarded oninfrastructure_available()and never#[ignore]: A, a single custodial parent of a three-year-old:Decided(SingleCustodialParentChildUnderSix); B,falsewith a young child on the roster:Other; C, whose only child turns six on the month’s last day:Other; D, with no basis:WorkStandardUnrecorded; E, whose only child is unknown:WorkStandardChildUnknown { child_id }; the answer is in request order with the duplicates collapsed. -
501 ids is a 422, canopy-web’s delegation is a 403, and a persons 503 is a 502
persons_unavailable. -
A
proptestoverentries_in_request_order: one entry per unique id, in first-occurrence order. -
The roundtrip
proptest(contract) covers the new types.
U3 (w5) — canopy-reporting: weekly snapshot, bands and core floors (#2316)
Files: the D3 migration, services/canopy-reporting/src/{params,store,domain}.rs, services/canopy-reporting/src/clients/mod.rs, services/canopy-reporting/src/worker/tanf.rs, worker/tanf/{tests,infra_tests}.rs, services/canopy-reporting/src/reporting/tanf.rs, crates/canopy-contracts-reporting/src/tanf.rs, rulesets/test-min/jurisdiction.toml, docs/modules/ROOT/openapi/reporting.json, docs/modules/ROOT/pages/{data-models,api}/canopy-reporting.adoc, docs/modules/ROOT/pages/services.adoc, CHANGELOG.adoc.
Tests:
-
A drain unit test (regression): an approved determination with no
effective_datefinalizes the runcontract_violationand stages no rows. -
calculate_wprinfra tests (regression), with whole-month rows: single parent with no young child, in 28-, 30- and 31-day months: 20 misses, 30/20 meets; two-parent, all core: 34 misses and 35 meets; with child care, 54 misses and 55 meets; the core floor: 29 core misses and 30 meets; with child care, 49 misses and 50 meets; a partial-month row that meets every standard stays in the denominators and out of both numerators. -
The three existing tests (
:414-440,:550-606,:660-686) state weekly averages and keep every expectation. Their core hours rise to meet the new floor: 40/20 becomes 40/40. -
A
propteston the stored figure: it is at most the exact sum, within 0.01 of it, and equal to it when the sum has two decimals. 20 h/wk over a 30-day month stores 20.00. -
A worker infra test whose hours mock serves monthly totals and weekly figures that differ (145.71 against 34.00): the snapshot stores the weekly field.
-
Unit tests on
assisted_whole_monthat each boundary: an effective date on the first, an expiration on the last, an expiration on the day before the last, an open end. -
every_shipped_ruleset_loads_the_tanf_wpr_blockasserts both new fields.
U4 (w5) — canopy-reporting: the recorded young-child standard; seeded bases (#2315)
Files: the D6 migration, services/canopy-reporting/src/worker/{tanf,pass,ladder}.rs, services/canopy-reporting/src/store/runs.rs, services/canopy-reporting/src/clients/mod.rs, services/canopy-reporting/src/params.rs, worker/tanf/{tests,infra_tests}.rs, services/canopy-reporting/src/reporting/tanf.rs (doc comments), crates/canopy-contracts-reporting/src/{runs,tanf}.rs, tools/canopy-seed/src/{datagen,model,sql}.rs, docs/modules/ROOT/openapi/reporting.json, docs/modules/ROOT/pages/{data-models,api}/canopy-reporting.adoc (:31, :267), docs/modules/ROOT/pages/federal-requirements.adoc (the 607(c)(2)(B) row), CHANGELOG.adoc, this plan (Status) — the plan is not archived here, because U5 remains.
Tests: worker infra tests over the mock upstream, with a work-standard route added: the basis class SingleCustodialParentChildUnderSix gives the 20/20 band; a roster young child with class Other gives 30/20; each refusal finalizes policy_input_missing, with that reason and person, and stages no rows; when the hours leg 422s and the classification refuses in the same chunk, the classification wins; 501 single-parent adults cost exactly two calls; the persons route is never called. A seeded devstack ACF-199 run publishes.
U5 (w5) — canopy-reporting: family type from the recorded facts (#2975; after #3047, #3048)
Files: a migration (the D8 table, work_eligible_count, the drop of young_child), services/canopy-reporting/src/{clients/mod,params,store}.rs, services/canopy-reporting/src/worker/tanf.rs, services/canopy-reporting/src/reporting/tanf.rs, rulesets/*/jurisdiction.toml and rulesets/georgia/citations.toml (two_parent_parent_kinds), crates/canopy-contracts-reporting/src/tanf.rs, the reporting docs, docs/modules/ROOT/pages/federal-requirements.adoc (a 261.24(c) row), CHANGELOG.adoc, this plan and nav.adoc (the close).
Tests: fold units, each asserting the family type: a parent with a grandparent is single_parent; two natural parents of one child are two_parent; a stepparent pair is single_parent under Georgia, and two_parent under a pack listing step; two minor parents, neither the head of household, are single_parent; a lone pregnant work-eligible adult is not child_only; a family whose only adult is outside the unit and not a parent is child_only; an ineligible non-citizen parent is excluded. Numerator infra tests pin Q2 for each arm. The loader refuses ["natural"] alone.
Risks
-
A partial-month family never counts in a numerator. fail-closed: the rate is understated, and the first month of every new case is partial. Mitigation: the
assisted_whole_monthcolumn and #3049. -
A single-parent adult with no basis fails the whole ACF-199 run. fail-closed. Mitigation: the run names the reason and the person, the #2314 tab records bases, and the seed writes them.
-
The summary 422 for a job-search month without a basis still records a bare
contract_violation. silent as to the person, though the server log keeps the detail: #3050. -
Truncation to 0.01 hours drops a 29.996 figure below 30. fail-closed, bounded by 0.01. Mitigation: whole-month rates are exact, and U3’s property test pins the stored figure against the exact sum.
-
The assistance span starts at
effective_date, which may be retroactive. That treats the State as having elected 261.22(d)(2). silent; it changes only which families are flagged partial: #3049. -
Until U5, any two roster adults form a two-parent family. fail-open for the two-parent denominator. Mitigation: the data-model page states the roster rule until U5.
-
Generations extracted before U3 carry NULL hours. A WPR over one has a zero numerator: fail-closed. Mitigation: rerun the month.
-
An ACF-199 run in flight across the deploy cannot decode its
TanfCaseAux. fail-closed (contract_violation). Pre-1.0 there is no shim, andcargo xtask dev restartwipes the run.
Verification
-
cargo xtask test: the unit and integration lanes pass (see Testing). -
cargo xtask dev restart(U3 and U4 change the schema),cargo xtask api-docs --update, thencargo xtask e2e. -
On the devstack: generate ACF-199 for a seeded month, then compute the WPR. The run publishes, and the snapshot rows show weekly figures.
-
cargo xtask quality-budgets,delegated-routes(no change expected) andplan-lintare clean. -
cargo xtask validate, withCANOPY_CARGO_FEATURES=canopy-api/test-clock,canopy-api/test-fault. -
Close: the U1–U4 MR carries
Closes #2316andCloses #2315; Status staysIn progress(U5 remains, behind #3047 and #3048, which GitLab tracks). U5 carriesCloses #2975, sets StatusDone (YYYY-MM-DD) — !N, archives this plan and passesplan-lint --done.
Documentation Updates
-
api/canopy-tanf.adoc: the summary’s weekly fields (U1); the classification batch, its outcomes and its access (U2). -
api/canopy-reporting.adoc: the snapshot fields and the WPR basis paragraph (U3, U4, U5); the run status’serror_reasonanderror_person_id(U4). -
data-models/canopy-reporting.adoc: the columns, the migrations and how the family type is derived (U3, U4, U5). -
services.adoc: the canopy-reporting row’s TANF inputs (U3, U4).authorization-inventory.adoc: the canopy-tanf route (U2). -
federal-requirements.adoc, andrulesets/federal/README.adoc(U1). -
CHANGELOG.adoc== Unreleased: U1=== Changed, U2=== Added, U3–U5=== Fixed. A cut is due (#3016); making it is not this plan’s task.
Review log
| round | vendor | resolved model | verdict |
|---|---|---|---|
1 |
Anthropic |
claude-fable-5-1 |
FLAGS (2): a Status value outside the vocabulary at the U1–U4 close, D8 designing #3047 and #3048’s deliverables, and cited files not supplied; the no- |
2 |
gemini-4-argon |
FLAGS (2): the same Status value; a risk with no mitigation; test categories unlabelled; where |