Plan: the CAPS family asset test (#3393)

Status: Done (2026-11-23) — two units; a worker records a family's asset certification and every CAPS determination applies the federal asset test to it
Closes: #3393 (by U2)
Issues: #3393 (parent) · U1 #3546 · U2 #3547 · follow-ups #3548, #3549

This is a Design + Scope plan: GitLab owns tracking, the unit issues carry the implementer brief, and the plan freezes when U1 starts.

Problem

45 CFR 98.20(a)(2)(ii) makes a child eligible for CCDF child care only when, at the time of eligibility determination or redetermination, the child resides with a family "whose family assets do not exceed $1,000,000 (as certified by such family member)" (eCFR, title 45 current to 2026-11-19). canopy-caps tests income, activity and age and nothing else: caps-eligibility reads no asset input, and no record holds a family’s certification. The rule is federal and the same in every State.

Decisions (maintainer, 2026-11-23)

  1. The rule and its limit live in the federal layer, as a decision named caps-family-assets that canopy-caps evaluates on every run beside the pack’s caps-eligibility (the medicaid-residency precedent). No pack decision changes.

  2. The certification is a canopy-caps record a worker records for a household, append-only, like the parent-activity record. A run with no certification on record denies.

  3. How old a certification may be is the pack’s: [caps].asset_certification_valid_days.

  4. The protective-services waiver of 98.20(a)(3)(ii)(A) is not in this plan. canopy-caps holds no protective-services fact today; the whole path is its own issue. Until it is built the asset test applies to every child, which is the stricter reading.

Design

The record (U1)

Table caps_asset_certifications, one row per certification a worker records:

Column Meaning

id UUID PRIMARY KEY

Server-assigned (CapsAssetCertificationId, UUID v7).

household_id UUID NOT NULL

The family the certification is for.

certified_by_person_id UUID NOT NULL

The family member who certified.

within_limit BOOLEAN NOT NULL

What they certified: true = the family’s assets do not exceed the limit of 45 CFR 98.20(a)(2)(ii); false = they do.

certified_on DATE NOT NULL

The day the family member certified.

recorded_by TEXT NOT NULL

The recording worker’s OIDC subject.

created_at TIMESTAMPTZ NOT NULL

The request’s decision instant; no default.

Index idx_caps_asset_certifications_household (household_id, certified_on DESC, created_at DESC). The record stores no dollar figure: the family certifies to the federal statement, and the regulation asks for nothing else.

Contracts (crates/canopy-contracts-caps/src/asset_certification.rs): CreateAssetCertification { household_id, certified_by_person_id, within_limit, certified_on } with deny_unknown_fields, and CapsAssetCertification (the stored row). Paths CREATE_ASSET_CERTIFICATION and LIST_ASSET_CERTIFICATIONS, both /v1/asset-certifications.

Routes, in services/canopy-caps/src/api/handlers/asset_certification.rs, modelled on parent_activity.rs:

  • POST /v1/asset-certifications: user-only (WRITER), recorded_by is the caller’s subject, 201 Created with the stored row. certified_on is judged by canopy_api::worker_record::check_stated_date called with the field name certified_on (the existing check_effective_date hardcodes effective_date, so it is not reused): 422 caps_date_out_of_range, then 422 caps_certified_on_in_future.

  • GET /v1/asset-certifications?household_id=X: a new delegated row CAPS_GET_ASSET_CERTIFICATIONS with the admission of CAPS_GET_PARENT_ACTIVITIES; newest first, at most 100.

Store (store/asset_certifications.rs): record, list_by_household, and standing_on(db, household_id, on): the row with the latest certified_on ⇐ on, then the later created_at, then the higher id. A correction is a new row; a later recording for the same day wins.

canopy-web: the authorization tab shows the household’s latest certification (who, the day, what was certified) and a form that records one, offering the household’s members as the certifier. The action is POST /actions/caps/asset-certification in actions_caps/asset_certification.rs, a copy of actions_caps/parent_activity.rs with its checks in its order: WritePermission and ProgramScope<Caps> before the form is read; the household id and form values parsed with no I/O; the certifier proven on the posted household’s roster (fact_editor::ensure_household_member, a new FactEditor::CapsAssetCertification); then the write on the worker’s delegation. The coded refusals of canopy-caps become server-owned copy (fact_refusal_copy). Also touched: the caps_tab facts, the mock upstream (mock_upstream/caps_facts.rs), the section’s Plugin.toml, the route-authz classification. The tab shows the certification’s day and does not judge whether it is current: canopy-web reads no [caps] value, and the determination’s denial reason is what says a certification is missing or out of date. canopy-seed writes a certification for every seeded CAPS household, dated on the seed’s day, so that U2 changes no seeded result.

U1 changes no determination.

The federal decision (U2)

caps-family-assets.json, written by the federal agent in canopy-config-federal with its citations.toml row, and copied to fixtures/config/test-federal/.

Reads Meaning

input.certified_within_limit

true, false, or null when the household has no certification on record by the run’s legal day.

input.certification_age_days

Whole days from certified_on to the run’s legal day; null with no certification.

context.thresholds.asset_certification_valid_days

The pack’s [caps].asset_certification_valid_days.

Answers Meaning

asset_limit_dollars

The limit of 98.20(a)(2)(ii), a constant of the decision (1000000). canopy-caps records it in the snapshot and names it in a denial; it compares nothing against it.

certification_current

A certification is on record and its age is at most the valid days.

asset_eligible

certification_current and certified_within_limit.

denial_reason_code

null when eligible; family_assets_not_certified when no certification is current; family_assets_over_limit when a current one says the assets exceed the limit.

The limit stands alone in its own expression (asset_limit_dollars = 1000000). U2 runs cargo xtask rules lint-inputs on the decision; if it flags the figure, the fix is one compliance/adr-011-ruleset-input-allowlist.toml entry whose reason is that the figure is the federal rule’s own, held in the federal layer.

The pack value (U2)

[caps].asset_certification_valid_days: a whole number of at least 1, required; canopy-caps refuses to boot without it (CapsParameterTable::load). Fixtures differ so a test proves the pack is read: default 60, test-max 365. Georgia adds the key and its citation in its own repository; the pin lands in U2 before the code that requires it.

The determination (U2)

services/canopy-caps/src/determine/family_assets.rs carries the typed input, thresholds and output, with the sync tests services/canopy-medicaid/src/residency.rs has.

  • At boot canopy-caps refuses to start when no layer ships caps-family-assets, or when the decision reads a name canopy-caps does not send (canopy_rules_client::contract::check, as canopy-wic does for wic-eligibility).

  • WorkerFactSource gains asset_certification(household_id, on); WorkerFacts::read reads it once per run on the run’s legal day.

  • The run evaluates caps-family-assets once (the test is the household’s), then caps-eligibility for each child as today. The pack’s decision is still evaluated for every child so a denial lists every failing test.

  • A child is approved only when the pack’s eligible and the federal asset_eligible both hold. The family fee counts only such children.

  • A child denied on assets gets one more denial reason after income, activity and age, worded in determine/reasons.rs from the code: not certified ("No current family asset certification is on record (45 CFR 98.20(a)(2)(ii)).") or over the limit (a sentence naming the limit’s dollar figure). A denial code the decision answers that is neither of the two is a 500 (an_unknown_asset_denial_code_is_refused).

  • The envelope’s program_extension gains asset_eligible. The sealed program_input gains the certification read (id, certifier, day, what was certified, age in days) or its absence, the valid days and the limit. The decision’s firings join each child’s derivation graph.

An output that lacks asset_eligible or asset_limit_dollars is a 500 (ApiError::internal, as evaluate_child answers an unreadable caps-eligibility output), and the run stores nothing: the compute phase writes nothing and the handler persists only a completed run (an_unreadable_asset_answer_is_a_500_and_stores_nothing).

What does not change

The determine body (CapsApplicationContext), the fields of compliance/input-requirements/caps.toml, every pack’s caps-eligibility.json, and the authorization writes.

Scope

Unit Work Status

U1

The record: migration, contracts, store, the two routes, the delegated row, the canopy-web tab and form, canopy-seed rows, OpenAPI, docs.

Done (2026-11-23)

U2

The federal decision and its pin, the fixture copy, the pack value with Georgia’s pin, the boot checks, the determination, reasons, snapshot; closes #3393.

Done (2026-11-23)

U2 is stacked on U1. Between the two a worker can record certifications and nothing reads them.

Out of scope, each its own issue:

  • The protective-services path of 98.20(a)(3)(ii), with its case-by-case waiver of the income and asset tests and the foster-care option of (B): #3548.

  • The applicant’s own certification in the applicant portal: #3549.

Config repositories

  • Federal: announce the decision’s contract on canopy/rules; the federal agent writes a held commit; verify it from an archive (signature, files changed, canopy config check, and the fixture evaluations run against it); say merge; pin in U2 as its own commit before the code.

  • Georgia: the same sequence for asset_certification_valid_days and its citation. The value is Georgia’s to choose from its policy.

  • Texas: told of the key and the decision; not pinned.

Tests

Category Tests

Contract (wire)

Roundtrip and unknown-field refusal for CreateAssetCertification / CapsAssetCertification in crates/canopy-contracts-caps/tests/roundtrip.rs; the OpenAPI snapshot.

Decision

Fixture evaluations in crates/canopy-test-lib/fixtures/rulesets/: current and within the limit; none on record; one day past the valid days; exactly the valid days; current and over the limit. Sync tests: the decision reads exactly the input fields and the one threshold canopy-caps sends.

Store (postgres)

the_standing_certification_is_the_latest_on_or_before_the_day, a_later_recording_for_the_same_day_wins, a_certification_dated_after_the_day_is_not_read.

Routes (postgres), in api/facts_route_tests/infra_tests.rs

an_asset_certification_create_answers_201_with_the_bearers_subject, a_service_bearer_cannot_record_a_certification, a_certification_dated_in_the_future_is_refused_naming_certified_on, and the list joins each_list_admits_a_case_reader_through_canopy_web_only and each_list_reads_newest_effective_first_then_latest_recorded.

Determination

a_family_with_no_certification_is_denied_on_assets, a_stale_certification_reads_as_none, a_family_certifying_over_the_limit_is_denied, an_asset_denial_is_listed_beside_the_other_failing_tests, a_child_denied_on_assets_carries_no_fee_or_authorization, the_valid_days_are_the_packs (default and test-max answer differently for one certification), the_snapshot_records_the_certification_and_the_limit, an_unknown_asset_denial_code_is_refused, an_unreadable_asset_answer_is_a_500_and_stores_nothing (postgres: no determination, snapshot or key row after the refusal).

Boot

a_stack_without_the_asset_decision_does_not_boot, a_decision_reading_an_unsent_name_does_not_boot, a_pack_without_the_valid_days_does_not_boot.

Web

The form parser’s cases; the action’s route tests as the parent-activity action has them: refused without WritePermission, refused outside ProgramScope<Caps>, a certifier not on the posted household’s roster is refused before any write, the write goes out on the worker’s delegation; the route-authz classification test lists the new action; the tab renders a recorded and an absent certification.

Regression

The existing parity and stack tests that expect an approval gain a certification; one that removes it and expects the denial is the case that would have caught #3393.

Not run locally (the car’s): caps_test, qc_read_only_test, batch_active_authorizations_test, the e2e CAPS journeys.

Risks

Risk Mode Mitigation

A family already approved has no certification on record when its redetermination runs, and is denied.

fail-closed

This is what 98.20(a) requires at redetermination. The changelog says a certification must be recorded first; the denial reason says exactly that; recording one and re-running approves. U1 ships first so the record exists before the test.

The decision is missing from a deployed stack.

fail-closed

canopy-caps refuses to boot; a_stack_without_the_asset_decision_does_not_boot.

A pack shadows the federal decision with its own.

silent

Only by a declared override (#3372), which cargo xtask rules check prints on every run; no pack in this repository declares one.

The federal limit changes and a certification made against the old figure is still read.

silent

The record ages out after the pack’s valid days, and the snapshot records the limit each run applied.

A worker records the wrong household member or day.

silent

Append-only rows with the recorder’s subject; a correction is a new row; the tab shows the latest row.

Seeded and test households lose their approvals when U2 lands.

fail-closed

canopy-seed and the fixtures write certifications in U1; the car’s stack tests prove it.

The protective-services waiver is absent, so a State that elects it over-denies those families on assets.

fail-closed

#3548; canopy-caps has no protective-services path at all today, so no such family is determined differently than before on income.

Delivery

  • Doc pages: api/canopy-caps.adoc, api/canopy-web.adoc (the action), data-models/canopy-caps.adoc, services.adoc, authorization-inventory.adoc (two routes, the delegated row), rulesets.adoc (the federal decision and the [caps] key), federal-requirements.adoc (98.20(a)(2)(ii)), jurisdiction-onboarding.adoc (the required key), the CAPS scenario inventory and action catalogue.

  • CHANGELOG.adoc == Unreleased: one entry per unit; U2’s says a certification is required before a determination can approve.

  • This plan page with its nav entry, merged before U1.

  • The close: U2’s MR closes #3393; the merge SHAs and the two follow-up issues are noted on it.

Errata

  • Erratum (2026-11-23): canopy-seed dates each certification on the seeded determinations' day, as it dates the other seeded CAPS facts, not on the seed's day.

  • Erratum (2026-11-23): standing_on and its three store tests are built in U2 with the determination that reads it; U1 ships record and list_by_household, and its list test pins the same order.

  • Erratum (2026-11-23): a certification over the limit is worded "The family certified assets over the $1,000,000 limit (45 CFR 98.20(a)(2)(ii)).", the figure being the decision's.

  • Erratum (2026-11-23): the row's and envelope's income, activity and age gates stay the pack's own on an asset denial; the asset verdict is program_extension.asset_eligible.

  • Erratum (2026-11-23): Georgia reported that DECAL exempts children in DFCS custody from the certification; canopy-caps holds no such fact, so they are denied without one until #3548.

Edit this page · default