TANF job-search and vocational-training limits: federal data, counted in hours over the 261.34 lookback (#2193)
- Context
- Scope
- Design
- Units — U-A → U-E, one MR
- U-A (w2) —
fix(tanf): refuse non-positive hours and inverted activity spans (#2193) - U-B (w2) —
feat(policy): cite the federal TANF work-activity limits (#2193) - U-C (w3) —
feat(tanf): record a dated work-standard basis (#2193) - U-D (w8) —
fix(tanf): count job search in hours over the 261.34 lookback (#2193) - U-E (w3) —
docs(tanf): document the 261.34 limits and bind their actions (#2193)
- U-A (w2) —
- Verification
- Documentation Updates
- Review log
Status: Done (2026-09-25) — !1514
Issues: #2193
Branches: fix/2193-tanf-job-search-limits (carries this page)
This is a Design + Scope plan: GitLab owns tracking, #2193 carries the brief and the rulings, the plan freezes when U-A starts. One MR — page + nav, U-A…U-E, the Done flip — one battery: U-D’s engine, pack and wire changes are atomic, and U-A…U-C are its prerequisites.
Erratum (2026-09-25): D1’s option authority and D9’s partial-week scenario trigger cite 42 USC 607(c)(2)(A)(ii), not (A)(i) — (A)(ii) is the 3-4-day provision. The statute reads "shall consider" where 45 CFR 261.34(e) reads "may count"; ACF treats the credit as a State option (64 FR 17782-83: "This provision is not a requirement"; TANF-ACF-PI-2008-02), so the D2 election stands. The federal _source reads 607(c)(2)(A).
Erratum (2026-09-25): as built, D6 decides the (e) credit’s eligibility with the bar but consumes the credit after the week’s hours (so a week straddling a month end never counts month m+1’s credit before month m’s hours); a credit is "taken" only when it counted more than zero hours; and month M always needs its own rules (basis and designation), even without JS/JR hours in M, because CapUsage reports M’s standard and a credit may land in M.
Erratum (2026-09-25): D2’s week_starts_on also takes "first_participation_day" (maintainer ruling, PAMMS TANF 1820): a week begins on the first day with JS/JR hours, weeks run back-to-back while each has hours, and the run ends when the seven days after a week hold none; georgia uses it (default Sunday, test-max Monday). D6’s weeks follow the configured anchor. As built, D5’s date-of-birth read is one persons:batchGet pass per request (calls of at most 500 ids) with as_of = the reported month’s end.
Context
#1170 enforced the two federal limits as pack numbers on a federal-fiscal-year clock counted in ISO weeks. Site cites are on #2193.
-
The count itself.
services/canopy-tanf/src/caps.rs:99-140counts ISO weeks with any covered day from 1 October, and resets there (pinned at:350-375). The caps are pack keys (e.g.rulesets/georgia/jurisdiction.toml:659,670), andservices/canopy-tanf/src/params.rs:232-263silently keeps the last of two rows sharing a code. -
How excess is reported. The summary (
services/canopy-tanf/src/api/work_requirement_handlers.rs:636-742,813-852) moves excess into non-core but keeps it intotal_hours, which canopy-reporting’s WPR uses (services/canopy-reporting/src/reporting/tanf.rs:83). The federal rule rejects counting limited hours as non-core (73 FR 6789). -
Activity data. Rows are spans at a constant
hours_per_week, and only the activity code is validated (handlers:155), so the schema admits negative rates and inverted spans.verifiedis never set and no attended days are recorded (&93, #813). -
Custody data. canopy records no custody or parent-child relationships. Its TANF determinations keep the request’s household members, and
services/canopy-tanf/src/au_composition.rs(a parent, a child and a boarder form an AU of two) is unwired. The roster heuristic of #1771 cannot resolve custody.
The regulation, 45 CFR 261.34:
-
(a) "a maximum of six weeks in the preceding 12-month period".
-
(b) 12 weeks if the State’s unemployment rate is at least 50 % above the US rate, or it is a needy State (§ 260.30).
-
(c) "a week equals 20 hours for a work-eligible individual who is a single custodial parent with a child under six years of age and equals 30 hours for all other work-eligible individuals".
-
(d) "does not count for a week that immediately follows four consecutive weeks in which the State reports any hours of such participation … a week means seven consecutive days".
-
(e) "Not more than once for any individual in the preceding 12-month period, a State may count three or four days … as a full week … based on the average daily hours of participation for three or four days and will prorate participation at that level for the remaining one or two days to determine the total hours for a five-day week. Any prorated hours of participation must be included in the calculation of total hours permitted under the limitation".
ACF’s preamble (73 FR 6789) adds that the (d) bar prevents counting for one week; it does not require the activity to stop. 91 FR 48268 (effective 2026-09-29) removes 45 CFR 261.33 and 261.35; 261.34 stays.
Rulings in force:
-
The maintainer, 2026-09-23: CFR values in one federal file; the pack holds only the dated needy designation and a role flag; counting in hours;
CapBasis::WeeksPerFederalFiscalYearand the fiscal-year code deleted with no compat; the vocational cap follows the same design; every jurisdiction without code changes. -
The maintainer, 2026-09-25: (e) is a pack election (ADR-032); the (d) week anchor is a required pack key; the week standard is a recorded, dated basis on the work requirement.
-
ADR-011, ADR-034 §3 (a policy-material input is never assumed), #1147, pre-1.0, and neutrality (#2208).
Scope
In scope:
-
D1: the federal file and the (e) option.
-
D2, D3: the pack schema, citations and loaders.
-
D4: activity-write validation.
-
D5: the recorded work-standard basis.
-
D6: the replay engines.
-
D7: the summary and wire.
-
D8: deletions.
-
D9: compliance and docs.
Out of scope:
-
[tanf.wpr]federal constants (#2210). -
The
work_requirement_single_parent_hoursmiscitation. -
canopy-reporting comparing monthly totals with weekly standards.
-
canopy-reporting’s #1771 roster heuristic moving to the recorded basis.
-
The portal activity-form body mismatch, and a portal UI for the basis.
-
Attended days and verified hours (&93, #813).
-
The 607(c)(2)(D) 30 % cap (#811).
Design
Decisions
Invariants
-
No 261.34 or 607(d)(8) number lives in a pack or in Rust.
-
Countability is decided once, chronologically, with each month’s rules. A later entry never reclassifies an earlier one, and a later month never re-spends excess hours.
-
Excess hours count toward no countable total. Per entry, countable + excess = logged, and countable in any 12-month window ≤ that window’s limit.
-
The (d) bar lasts one week; a barred week never earns a credit.
-
The week standard, the needy designation and every child needed to decide under-six are resolved, or the summary is refused. Invalid activity data cannot be written.
Units — U-A → U-E, one MR
Commit 1 is docs(plans): plan the TANF 261.34 work-activity limits (#2193). The last is docs(plans): close the TANF 261.34 limits plan (#2193).
U-A (w2) — fix(tanf): refuse non-positive hours and inverted activity spans (#2193)
Files: services/canopy-tanf/src/api/work_requirement_handlers.rs, services/canopy-tanf/migrations/<new>_tanf_work_activities_checks.sql, services/canopy-tanf/tests/work_activities_test.rs.
Tests:
-
0, −1 and 169 hours → 422
hours_out_of_range. -
An end before the effective date → 422
activity_span_inverted. -
Direct inserts violating either CHECK fail.
U-B (w2) — feat(policy): cite the federal TANF work-activity limits (#2193)
Files: rulesets/federal/tanf-work-activity-limits.json (new), rulesets/federal/{citations,indexing}.toml, rulesets/federal/README.adoc, compliance/federal-options/tanf.toml.
Tests: cargo xtask policy audit --source federal, cargo xtask scenarios audit and neutrality-lint, all clean.
U-C (w3) — feat(tanf): record a dated work-standard basis (#2193)
Files:
-
services/canopy-tanf/migrations/<new>_tanf_work_standard_bases.sql,services/canopy-tanf/src/store/mod.rs,src/api/{work_requirement_handlers,mod}.rs,src/{main,config}.rs,Cargo.toml,config/canopy-tanf/default.yaml. -
crates/canopy-contracts-tanf/src/{work_requirements,paths}.rs,crates/canopy-contracts-tanf/tests/roundtrip.rs,crates/canopy-test-lib/src/clients/tanf.rs. -
services/canopy-tanf/src/participation/{mod,week_standard}.rs(new).
Tests:
-
POST 201, and the GET timeline.
-
The tie rule (latest
created_at). -
403 for a reader.
-
422 for a single custodial parent without children, and for a bad year.
-
The standard over
canopy_test_lib::mock::spawn_router: child of 3 → 20; not single custodial parent → 30; a sixth birthday → 30; a missing child with a present three-year-old → 20; a missing only child → 422work_standard_child_unknown; no basis → 422; persons 503 → 502; chunks at 500. -
proptest: the in-force selection matches a brute-force scan.
U-D (w8) — fix(tanf): count job search in hours over the 261.34 lookback (#2193)
Gate: the maintainer has confirmed georgia’s D2 values on #2193.
Files:
-
The georgia, default and test-max
jurisdiction.tomlandcitations.toml. -
services/canopy-tanf/src/participation/{federal,pack,job_search,vocational,summary}.rs(new), withcaps.rsdeleted. -
services/canopy-tanf/src/{main,params}.rs,src/api/work_requirement_handlers.rs,tests/work_activities_test.rs. -
crates/canopy-contracts-tanf/src/work_requirements.rs,crates/canopy-contracts-tanf/tests/roundtrip.rs,compliance/adr-011-literal-allowlist.toml.
Tests — loaders:
-
The federal file loads, and each D3 refusal fires.
-
The pack refuses: a removed cap key, a duplicate code, a blank value, two role rows, a role on a non-core row,
[tanf.participation]missing or unexpected, a missing or wrongly cased anchor, a missing credit, empty periods, a bound not on the 1st, an inverted period, an overlap, a gap. -
The three packs load (test-max: 2026-06 not needy, 2026-07 needy).
-
The drift guard refuses a mismatch.
Tests — engines:
-
Budgets: 120/180, and 240/360 when needy.
-
September counts in October.
-
The replay: 180 counted in October 2025 and November 2025 excess leave October 2026 countable up to its limit.
-
The fifth week is barred; weeks six to nine count; week ten is barred.
-
A budget-exhausted week breaks the run.
-
week_starts_onmoves the boundary. -
partial_week_credit_prorates_once_per_twelve_months_only_when_elected: 3 days with 12 h → 8 h; 4 days with 16 h → 4 h; a barred three-day week earns none; a second qualifying week inside 12 months earns none;unavailablewithout attended days; credit is capped at the remaining limit; a week ending in August credited to August after July-only rows. -
A needy change between months applies per month.
-
Vocational: the 12th month counts, the 13th is excess.
-
A 20-year, 200-row history assesses correctly.
-
Employment at the core minimum plus barred job search →
total_hoursexcludes the barred hours.
Tests — properties (proptest):
-
Countable + excess = logged, and excess ≥ 0 (both engines).
-
Countable in every 12-month window ≤ that window’s limit.
-
A later entry never reclassifies an earlier one; entries after m_end change nothing.
-
A covering limit yields zero excess for histories with no run of more than
consecutive_weeks_maxreported weeks. -
The loaders never panic, and accepted packs satisfy D2.
-
The wire tags round-trip, with a pinned JSON.
Tests — integration and infra (expectations read from the test jurisdiction’s pack and the D1 file; a helper records the basis and creates the children in canopy-persons):
-
job_search_hours_past_the_lookback_budget_leave_every_countable_total -
single_custodial_parent_with_a_child_under_six_budgets_twenty_hour_weeks -
september_job_search_still_counts_against_october -
fifth_consecutive_job_search_week_is_barred_and_the_sixth_counts -
job_search_without_a_work_standard_basis_is_refused -
month_outside_the_needy_state_periods_is_refused -
The vocational (
…_non_countable) and batch tests, adapted.
U-E (w3) — docs(tanf): document the 261.34 limits and bind their actions (#2193)
Files: compliance/action-catalogue/tanf.toml, compliance/action-coverage-allowlist.toml, compliance/scenario-inventory/tanf.toml, docs/modules/ROOT/openapi/tanf.json, the pages below, CHANGELOG.adoc.
Tests: cargo xtask policy action-coverage, scenarios audit, the OpenAPI drift stage and neutrality-lint, all clean.
Verification
-
cargo nextest run -p canopy-contracts-tanf -p canopy-tanf -p canopy-reporting. -
cargo xtask dev refresh(georgia), thencargo xtask test --integration --host --no-refresh --skip-static --run-ignored -p canopy-tanf. -
export CANOPY_JURISDICTION=test-max && cargo xtask dev reload, then the canopy-tanf integration run withCANOPY_TEST__JURISDICTION=test-max. July 2026 budgets 12 weeks and reportsunavailable; a georgia stack fails that assertion, which confirms the switch. Repeat withdefault(6 weeks,not_elected), thenunset CANOPY_JURISDICTION && cargo xtask dev reload. -
cargo xtask policy audit,policy audit-literals,policy action-coverage,scenarios audit,neutrality-lintandapi-docs --update, thengit push. The battery is the gate.
Documentation Updates
-
docs/modules/ROOT/pages/federal-requirements.adoc: the 261.34 row restated. -
docs/modules/ROOT/pages/api/canopy-tanf.adoc: the countable totals,cap_usage, the basis endpoints and every new 422 / 502 code. -
docs/modules/ROOT/pages/data-models/canopy-tanf.adoc:tanf_work_standard_basesand the activity CHECKs. -
docs/modules/ROOT/pages/rulesets.adoc: a[#tanf-work-activity-limits]section. -
docs/modules/ROOT/pages/configuration-reference.adoc:CANOPY_TANF__PERSONS_URL. -
CHANGELOG.adoc=== Changed: the hours replay; countable totals excluding excess;CapBasisdeleted andCapUsagereshaped; the cap keys replaced; the basis endpoints; activity validation; the new codes. -
GitLab: file the follow-ups: canopy-reporting’s #1771 heuristic moving to the recorded basis; the portal basis UI; the miscitation; the monthly-vs-weekly comparison; the portal activity body.
Link them from #2193’s closing comment.
Review log
| round | vendor | resolved model | verdict |
|---|---|---|---|
1 (2026-09-25) |
Anthropic |
claude-opus-5-5 |
no-ship — seven blockers fixed in revision 2: the (e) proration; the undated-child fall-back; the needy scope; georgia confirmation; complete registry rows; length; a |
2 (2026-09-25) |
OpenAI |
gpt-6-astra |
no-ship — 15 findings fixed in revision 3:
• excess leaves every countable total (73 FR 6789);
• the (d) bar lasts one week, over reported weeks;
• a chronological replay with per-month rules;
• custody comes from a recorded basis (maintainer ruling) instead of rosters or |