Plan: Investigation Response Deadlines — Derived, Ruleset-Governed, Audited Override (#895)

Archive record

Merge requests: !1591 (MR-A, Closes #1743) + !1592 (MR-B, Closes #1744) + !1593 (MR-C, Closes #1745) + !1594 (MR-D, Closes #1746) + !1595 (MR-E, Closes #1747) + !1596 (MR-F, Closes #1748) + !1597 (MR-G, Closes #895 / #1749)

2026-09-09 — the referral’s response priority and the investigation’s response deadline are DERIVED through three tier-1 rulesets per jurisdiction (the per-child roll-up at conversion, the window spec at open on the jurisdiction clock, the override arm — GA and TX CLOSED), with a read-time timeliness band and an audited override; direct referral creation and the caller-typed deadline are retired pre-1.0, and staff phone intake enters attributed reports with the actual receipt. ADR-072 amendment carries the as-built.

Status

Done (2026-09-09) — !1597

Anchors

#895 (its 2026-09-03 ruling is the G-A ruling), #1693 (keeps response_time_expired + the criteria), #1657, #1672 / epic &88 (the evaluation surface), ADR-053, ADR-062, ADR-063, ADR-068, ADR-070, ADR-072, epic &62, ⁂ readings on #1073.

Context

CreateInvestigationRequest.response_due_at is a REQUIRED caller-supplied instant (crates/craig-cases-contracts/src/investigations.rs:69-71), hashed into the ADR-062 intent (services/craig-cases/src/api/intents/intake.rs:191-222), stored verbatim (services/craig-cases/src/store/investigations.rs:11-34) and typed by hand in craig-web (services/craig-web/src/routes/intake/referrals.rs:578). Nothing computes or enforces the PAMMS 3.32 response window. The referral carries a second, caller-typed priority vocabulary (craig_reference::Priority = immediate|24_hour|72_hour) whose 72_hour contradicts 3.32’s five-weekday tier (#1657).

Ruling (2026-09-03, maintainer, on #895). (1) The deadline is DERIVED from the screening priority token through a per-jurisdiction ruleset — a window spec per priority (anchor = receipt; unit hours | weekdays | calendar days; receipt-day-is-day-one; skip-weekends; skip-holidays; end-of-day); Georgia encodes PAMMS 3.32 verbatim; the caller-supplied response_due_at is REMOVED pre-1.0. (2) OVERRIDE is a first-class ruleset-governed, audited action (permitted, role floor, reason, bounds are arms); Georgia’s arm ships CLOSED until DFCS confirms (⁂ #1073); absent arm = refuse. (3) Holiday calendars are StateBundle reference data. "If it’s a reasonable feature, it needs to be a configurable rule and not hardcoded." Plan-approval answers (2026-09-08): derive + persist + a read-time timeliness band, no scheduler; override ships now with GA/TX arms closed; decision-less referrals get "the architecturally correct answer — no shortcuts, no fig leafs, no backwards compat pre-1.0, jurisdiction configurable".

Design review. The plan-mode design took an external 21-finding review (2026-09-08, the maintainer’s tooling) — all folded into this page’s rev 2 before it was written.

The adopted answer. ONE priority vocabulary — the jurisdiction ruleset’s response_priority token, emitted per child by {j}-intake-screening and persisted per subject in screening_decision_evaluations.jurisdiction_outputs (services/craig-cases/src/store/models.rs:199-232). A referral is born ONLY by converting a screened report: direct referral creation (API route, web form, CLI, test builders, k6 workloads) and craig_reference::Priority are retired. Where the automated criteria return no priority for a human screen-in (advisory admissibility before #1693), the SCREENING DECISION carries a supervisor-attested response priority and the jurisdiction’s roll-up arm decides whether it counts — PAMMS 3.32’s CISS review is that act. Staff (phone) intake gets an attributed replacement: a craig-web report-entry form posting POST /v1/cases/reports with the actual receipt time, then the existing screening UI.

Ownership. #895 delivers the per-child→intake roll-up (in rules), the derived deadline, the override and the timeliness band; #1693 keeps response_time_expired (pre-conversion expiry), the policy-complete criteria and the binding-admissibility flip. The sequencing note’s intake-assessments/current read and "U4 investigation gate" do not exist on main; the evaluation rows are the surface.

Scope

In scope: nine rulesets + citations; calendar arithmetic + the holiday seam; two cases migrations (one destructive, floor-bumped); the attested priority at the decision act; the conversion roll-up; retirement of direct referral creation and Priority; attributed staff report entry; the derived deadline + provenance + timeliness band; the override endpoint / event / authz rows / CLI; every consumer cut over with its contract; docs and rollout.

Out of scope (follow-ups filed at U0): an overdue-notice sweep (#1753; no scheduler — maintainer); a web override form while every arm is closed (#1751); deriving screened_in / screen_out_reason from the decision and dropping the columns (#1752); re-deriving a referral’s token when its decision is superseded after conversion (#1750); #1690 Texas county time zones; SDK exposure of staff report entry (no issue yet); a rules check lint for cross-ruleset enum agreement (#1754).

Design

A. Rulesets — three files per jurisdiction, one decision table each (tier 1)

A single file with operation-gated tables cannot satisfy one required output schema (an unmatched table emits nothing; ga_intake_output_schema_rejects_a_missing_required_key pins that zen validates outputs), so each concern is its own ruleset. Every file: closed Draft-7 input schema (required: []), output schema required = every output key, hitPolicy: first, every row carries the full input-id set, raw literals (#1720). Rust never carries a jurisdiction token.

  1. {j}-response-priority — the roll-up, consulted at conversion. Inputs present.<TOKEN> booleans (Rust sets present.{tok}: true for each DISTINCT response_priority token on the effective decision’s evaluation rows — nested paths as georgia-placement-eligibility.json:143), subject_count (the decision’s child-subject rows), disposition_kind, decision_actor_role, attested_priority (absent when the decision carries none). Outputs response_priority, response_priority_basis. GA rows: present.IMMEDIATE → IMMEDIATE; present.PRIORITY_24HR → PRIORITY_24HR; present.STANDARD → STANDARD; disposition_kind == 'screened_in' ∧ decision_actor_role ∈ {cicc_supervisor, county_director, regional_fps} ∧ attested_priority ∈ {IMMEDIATE, PRIORITY_24HR, STANDARD} → the attested token (basis: supervisory response-time assignment, Policy 3.32 CISS review; derivation ⁂ #1073); catch-all → NONE. TX: P1, P2, attested by swi_supervisor | county_director | regional, NONE. Testonia: T_FAST, T_SLOW, attested by testonia_supervisor, NONE. First-hit order IS the most-urgent-wins policy (derivation ⁂ #1073: the manual assigns one response time per intake; CRAIG evaluates per child).

  2. {j}-response-window — consulted at investigation open. Input response_priority. Outputs window_count, window_unit (HOURS | WEEKDAYS | CALENDAR_DAYS | NONE), receipt_day_is_day_one, skip_weekends, skip_holidays, end_of_day, window_basis. GA (PAMMS 3.32 §Requirements "Calculate the duration" bullets — policy-cache page 03-32, pinned sha 3b15b8e4…): IMMEDIATE → 24 HOURS; PRIORITY_24HR → 24 HOURS; STANDARD → 5 WEEKDAYS, day-one true, skip_weekends true, skip_holidays FALSE, end_of_day true; catch-all → NONE / 0. TX (SWI 4310 / 4320, manual, the source_ref`s already in `rulesets/texas/citations.toml:112-156): P1 → 24 HOURS, P2 → 72 HOURS, NONE. Testonia: T_FAST → 10 HOURS; T_SLOW → 10 WEEKDAYS with skip_holidays: true (the only holiday-skipping arm; exercises the seam); NONE.

  3. {j}-response-deadline-override. Inputs actor_role, investigation_status, first_contact_recorded, is_extension, requested_extension_hours, reason_provided. Outputs override_permitted, override_reason_required, override_extend_only, override_max_extension_hours, override_basis. GA and TX: ONE catch-all row permitted = false (CLOSED; the basis names 3.32’s CISS review of the RECOMMENDATION as the only text located; ⁂ #1073; opening is a ruleset promotion). Testonia: testonia_supervisor ∧ is_extension ∧ reason_provided → permitted, reason required, extend-only, max 240 h; catch-all refuse.

Vocabularies: {j}-intake-screening (GA v1.4 / TX v1.3) gains an enum on its response_priority OUTPUT schema; ScreeningSurfaceClient exposes that set and the actor_roles tokens (screening_surface_client.rs:407-428), so the decision act validates an attested token (422) and the override derives actor_role server-side (unmapped incl. admin → 403); a rules-side test pins the enums agree for GA and TX (testonia has no intake-screening surface or bundle — its tokens are free fixture values; the seed never loads it). Citations per ADR-070 (value = _description): GA pamms rows on the 03-32 page pinned via policy sync-cache --pin; TX manual; catch-alls [plumbing].

B. Pure arithmetic + holiday seam (tier 3 / tier 2)

NEW crates/craig-common/src/deadline.rs: WindowUnit; WindowSpec { count: u32 (1..=366), unit, receipt_day_is_day_one, skip_weekends, skip_holidays, end_of_day }; HolidayCalendar { dates, covered_from, covered_through }; DeadlineError { ZeroCount, CountTooLarge, HoursWithDayFlags, DayOneRequiresEndOfDay, HolidayCalendarUncovered, DateOutOfRange }; derive_deadline(received_at, &spec, clock: BusinessClock, &holidays); BusinessClock::tz() accessor (crates/craig-common/src/clock.rs). HOURS: received_at + count h (checked). Day units: d0 = clock.date_of(received_at); a date COUNTS iff not (skip_weekends ∧ Sat/Sun) and not (skip_holidays ∧ in calendar); day 1 = the first counted date ≥ d0 (day-one) or > d0; walk to day count = target; visited-date cap 2·count + 366. skip_holidays requires covered_from ≤ d0 ∧ covered_through ≥ target (an empty calendar is uncovered — fail-closed). Instant: end_of_day → local midnight of target + 1 minus 1 µs; else the receipt’s local wall time on target (receipt_day_is_day_one ∧ !end_of_day is refused — it would end at the receipt). Local→UTC is total: Single → it; Ambiguous → earliest; None (gap) → the first valid instant after the gap (+1 min steps, ≤ 180). Proptests: HOURS exact + monotone; end-of-day windows strictly later, monotone, local 23:59:59.999999 on target; wall-time windows keep the receipt’s local time; skip flags ⇒ target ∉ weekend / holidays; independent recount == count; deterministic; no panic in range; DST days 2026-03-08 / 2026-11-01 pinned by example.

StateBundle seam: NEW crates/craig-state-bundle/src/holiday.rs (HolidaySpec { date: &'static str, name }, HolidayCalendarSpec { entries, covered_from, covered_through }), defaulted fn holiday_calendar() (empty; GA default — no GA arm skips holidays; tx-stub default). NEW services/craig-cases/src/holidays.rs on the fmap.rs shape: boot parse (UnparseableDate, NotAscending, CoverageExcludesEntry) → HolidayReference as an Extension beside FmapReference (services/craig-cases/src/lib.rs:695,730-736).

C. Schema — two migrations, one per cutover MR

  • MR-D services/craig-cases/migrations/20260910120000_referral_response_priority.sql (DESTRUCTIVE; SET LOCAL statement_timeout = '60s'): referrals DROP priority + chk_referrals_priority; ADD response_priority TEXT NOT NULL (backfilled 'UNDERIVED' through a dropped DEFAULT — never NONE), response_priority_basis, response_priority_rule_set_name, response_priority_rule_set_revision, response_priority_evaluation_id (all-or-none CHECK); screening_decisions ADD attested_response_priority TEXT; RAISE NOTICE with the count of referrals lacking an authorizing_decision_id (they can never derive — a pre-1.0 data consequence stated in the CHANGELOG); UPDATE schema_compat_floor SET min_required_version = 20260910120000 (ADR-063 D3; precedent 20260817120000_drop_case_milestones.sql:31). screened_in / screen_out_reason STAY (conversion-written; NCANDS and the screening consult read them).

  • MR-E 20260911120000_investigation_response_window.sql (additive): investigations ADD response_priority, response_due_basis, response_rule_set_name, response_rule_set_revision, response_evaluation_id (all-or-none; the NULL set = legacy caller-typed rows), response_due_original, response_due_overridden_at / _by / _reason / _evaluation_id (all-or-none on at/by/original/evaluation; reason nullable — the arm decides); CREATE VIEW v_investigations AS SELECT i.*, CASE WHEN first_contact_at IS NULL AND now() < response_due_at THEN 'on_track' WHEN first_contact_at IS NULL THEN 'overdue' WHEN first_contact_at ⇐ response_due_at THEN 'met' ELSE 'met_late' END AS response_timeliness FROM investigations i (header: a later investigations ALTER recreates the view — the v_effective_disposition precedent). No floor bump.

  • Read identity: the investigations SearchEntity::table() AND the craig-cases-fields investigations registry table both become v_investigations (the planner requires them equal, crates/craig-search/src/plan.rs:514-525; services/craig-cases/src/effective.rs:205 updated); RESPONSE_TIMELINESS is a registered plaintext Text FieldSpec with Equality capability, so ?timeliness= is an ordinary planner predicate (the four-token set is validated to a typed 400 first). Writes target investigations and RE-SELECT from v_investigations in the same executor (create, update, override) — RETURNING * cannot produce the band. MR-E pins that `craig_cases::boot_verify’s registry-driven scan and `verify-seed’s marker reconstruction tolerate the view.

D. craig-cases

  • NEW services/craig-cases/src/api/investigations/response.rs: consult_intake_priority, consult_window, consult_override; context types investigation-response-{priority,window,override}; typed verdicts (WindowVerdict { spec: Option<WindowSpec> } — None ⇔ unit NONE); fail-closed need() parses with cross-field rules (NONE ⇒ count 0 and flags false; HOURS ⇒ no day flags; closed unit set; an evaluation row without a response_priority token ⇒ named 500); map_consult_error copied VERBATIM from services/craig-placement/src/eligibility.rs:493-527 (never rules_upstream::map_evaluate_error); evaluated as the acting worker with S2S_HOP_BUDGET; const _: () = assert!(2·S2S_HOP_BUDGET + MARGIN_MS < STANDARD_REQUEST_CEILING) (bounds the consults; the claim tx is bounded by HTTP_TX_STATEMENT_TIMEOUT).

  • Decision act (api/reports/decisions.rs): RecordDecisionRequest gains attested_response_priority: Option<OutputToken> validated against the surface’s token set MINUS NONE (422), persisted on the decision row and joined to the decision’s intent projection (a replay with a different attestation → 409). The web select is offered to every role that may record a decision; the roll-up arm decides whose attestation counts.

  • Conversion (api/reports/conversion.rs): ConvertReportRequest loses priority (deny_unknown_fields); pre-tx: effective decision → evaluations → consult_intake_priority; in the tx: lock the report row (the decisions.rs:218 serialization lock), re-read the effective decision, mismatch ⇒ 409 SCREENING_DECISION_SUPERSEDED; insert the referral with token + provenance; case.referral_created payload key priority → response_priority. Replay never re-consults (precheck first).

  • Retire direct create: create_referral / claim_create_referral (api/referrals.rs:45-171), ReferralIntentV1 (intents/intake.rs:31-33,99-145), CreateReferralRequest, the route, the openapi entry; craig_reference::Priority + validate_priority deleted.

  • Staff report entry: CreateReportRequest gains received_at: Option<DateTime<Utc>> (attested actual receipt, ≤ now else 422; omitted ⇒ submission time as today) persisted with received_at_attested; reports.created_by = the acting worker’s sub when a human posts (NULL on the partner / service path); case.report_submitted gains created_by (additive; the security actor chain reads it first). The BFF and CLI post partner_context: Anonymous, a per-render minted received_request_id (the ERR M4 client_request_id pattern) and received_ip_hash: None; received_at joins the create-report intent projection (a replay with a different receipt is the LIFETIME 409).

  • Investigation create (api/investigations/crud.rs): DTO {client_request_id, referral_id, assigned_worker, assignment_area} (deny_unknown_fields); InvestigationIntentV2 (V1 deleted; a V1 replay is a correct 409); validate → authz → referral (404) → precheck (replay returns the stored row, no consult) → UNDERIVED with an authorizing decision ⇒ consult_intake_priority BEFORE the claim tx (the conversion’s pre-tx shape); inside the claim tx the token + provenance are written with UPDATE referrals … WHERE id = $1 AND response_priority = 'UNDERIVED' — zero rows ⇒ re-read: equal token ⇒ proceed with the stored provenance, different ⇒ 409 concurrent-modification; UNDERIVED without a decision ⇒ 409 RESPONSE_PRIORITY_UNDERIVABLE → consult_window (None ⇒ 409 RESPONSE_WINDOW_UNDEFINED naming the basis) → derive_deadline(referral.received_at, spec, BusinessClock::for_jurisdiction(j), holidays) (HolidayCalendarUncovered ⇒ named 500) → the claim tx persists deadline + provenance → re-select from the view.

  • Override POST /v1/cases/investigations/{id}/response-deadline (NEW api/investigations/override.rs): body {client_request_id, response_due_at, reason: Option<String>} (deny_unknown_fields); intent OverrideResponseDeadlineIntentV1; authz Action::Update + attrs.operation = "override_response_deadline" with operation-scoped rows in {j}-authz-investigation.json for supervisor | county_director | regional_director | state_office | admin, the existing supervisor wildcard-action row and the caseworker assigned-update row NARROWED to resource.attrs.operation ABSENT (the authz-subsidy_agreement precedent) so the operation reaches ONLY the new rows — a caseworker on an assigned investigation is 403 at authz before any consult (pinned); authz = "may call the operation", the arm is the floor; precheck; actor_role from the surface; facts {actor_role, investigation_status, first_contact_recorded, is_extension, requested_extension_hours, reason_provided} where base = COALESCE(response_due_original, response_due_at), is_extension = requested > base, requested_extension_hours = ceil((requested − base) / 1 h) (negative when shortening; 240 h 1 min against max 240 is refused); refusals !permitted → 403 RESPONSE_DEADLINE_OVERRIDE_REFUSED (basis verbatim), reason_required ∧ blank → 422, extend_only ∧ !is_extension or hours > max → 409 RESPONSE_DEADLINE_OVERRIDE_BOUNDS; apply in the claim tx under FOR NO KEY UPDATE, RE-DERIVING every consulted fact (equality else 409 concurrent-modification), writing response_due_original = COALESCE(original, current) + the override set, and staging case.investigation_response_deadline_overridden (investigation_id, referral_id, user_id, actor_role, original_due_at, previous_due_at, new_due_at, reason, rule_set_revision, evaluation_id; craig-security parse_event_type arm + an investigation_id resource family; ADR-003 row). No web form while every arm is closed.

  • Problem types (crates/craig-common/src/error.rs): RESPONSE_PRIORITY_UNDERIVABLE, RESPONSE_WINDOW_UNDEFINED, SCREENING_DECISION_SUPERSEDED, RESPONSE_DEADLINE_OVERRIDE_REFUSED, RESPONSE_DEADLINE_OVERRIDE_BOUNDS.

E. Consumers — each cut over in the SAME MR as its contract

  • MR-C (staff report entry, additive — lands BEFORE the referral cutover so phone intake never loses its path): CreateReportRequest.received_at + reports.created_by / received_at_attested + the event field; web GET/POST /intake/reports/new (caseworker+; actual receipt date-time; posts partner_context: Anonymous, a per-render received_request_id, received_ip_hash: None) → the report detail; CLI intake submit-report --received-at; test-lib given_report gains one default child (age ≥ 6) and the attested-receipt option; api-docs regen; CHANGELOG Added.

  • MR-D (referral cutover): web — the New-referral form / route / template deleted; ReferralView and the case timeline’s ReferralRow (services/craig-web/src/routes/cases/chain.rs:84) priority → response_priority (+ basis, rendered neutrally); both conversion forms (routes/intake/reports.rs:995) stop sending priority; the decision form gains the optional supervisory response-priority select fed by the surface tokens. CLI — referral create removed; intake convert-report stops sending priority (services/craig-cli/src/cmd/intake.rs:225); intake record-decision --attested-priority. test-lib / e2e — create_referral + ReferralBuilder removed; given_screened_in_referral attests the four criteria facts (+ present_danger_indicators: true for Immediate) and asserts the converted token; tests/e2e/lib/given/ likewise; intake + screenshots specs updated. k6 — tests/k6/services/cases.js:24 and the smoke / load / stress / soak scenarios move to report → decision → convert (the pre-push perf smoke proves it). Seed — Referral.priority → response_priority tokens WITH synthetic provenance (georgia-response-priority, revision 0, a minted evaluation id — a shape production can produce; marked fixture in a comment).

  • MR-E (investigations): web — the referral detail’s response_due_at input → read-only "Response priority / basis"; InvestigationView gains response_priority, response_due_basis, response_timeliness (badge: overdue / met_late badge—​overdue, met badge—​done, on_track badge—​open) and the override rows; worklist Timeliness column + ?timeliness= filter; i18n keys. CLI — investigation create loses --response-due-at. test-lib / e2e — given_investigation drops response_due_at; pages/referral-detail.page.ts:58. Seed — make_investigation takes the referral’s receipt + token and computes response_due_at through craig_common::deadline::derive_deadline with the GA spec for that token; first-contact dates coherent.

  • MR-F: CLI investigation override-deadline <id> --due-at <RFC3339> [--reason].

Steps

Each MR is independently green (contract + every consumer + regenerated artifacts together); each closes its own child issue and Relates to #895. Per MR: branch, per-commit contextless J1–J8 lens (two lenses for MR-A), reseed + pre-push battery, MR with the J-record note, merge on green; MR-A is tier-1 content → maintainer spot-verify, not self-merged.

U0 — plan page, epic, issues (weight 1)

This page (Active nav), the epic + child issues, the #1693 ownership note, the ⁂ list on #1073, the ADR-072 §Applications ruling line, the follow-up issues.

MR-A — rulesets + citations (weight 5)

Nine ruleset files, the intake-screening output enums (GA v1.4 / TX v1.3), citations + exceptions, rules tests (ga_response_*, tx_response_*, testonia open and holiday arms, GA/TX enum agreement), rulesets.adoc (domain "Investigation response"; key-differences rows "Response window", "Deadline override", "Attested priority floor"). Gates: rules check, policy audit (+ sync-cache --pin), scenarios audit, ruleset_discovery.

MR-B — arithmetic + holiday seam (weight 5)

craig_common::deadline + proptests; StateBundle::holiday_calendar(); cases holidays.rs boot. No wire change.

MR-C — staff report entry (weight 5; additive)

CreateReportRequest.received_at (attested; ≤ now else 422; intent projection), reports.created_by
received_at_attested, the event field; web form + CLI intake submit-report; tests: attested receipt persisted; future receipt → 422; created_by on the row and the event; replay with a different receipt → 409.

MR-D — referral cutover (weight 8)

Migration 1 + floor bump; the decision act’s attested priority (+ intent projection); conversion roll-up
report-lock revalidation; direct-create retirement; Priority deletion; every consumer in §E (MR-D bullet); api-docs + coverage-matrix regen; CHANGELOG Changed + Removed. Tests convert_response_priority.rs (wiremock roll-up of two tokens → the most urgent; an attested supervisory priority counts, a caseworker’s does not; superseded decision → 409; rules down → 503; replay does not re-consult; a priority field → 422; attested NONE → 422).

MR-E — investigation cutover (weight 8)

Migration 2 + v_investigations + registry / entity identity; response.rs window consult; UNDERIVED lazy derivation; InvestigationIntentV2; the timeliness filter; every consumer in §E (MR-E bullet); regen; CHANGELOG. Tests investigations_response.rs: STANDARD Monday-receipt → Friday 23:59:59.999999 Eastern; NONE → 409; UNDERIVED with and without a decision; two openers racing on an UNDERIVED referral; body response_due_at → 422; replay no re-consult; rules down → 503; holiday arm without a calendar → 500; drifted output → 500; ?timeliness=bogus → 400; boot_verify / verify-seed with the view.

MR-F — override (weight 5)

Endpoint + authz operation rows and the narrowed wildcard rows (GA / TX) + event + security arm + CLI. Tests investigations_override.rs: closed GA and TX arms → 403 with the basis; a caseworker → 403 at authz; wiremock open arm applies and audits the original; reason / extend-only / max bounds (240 h 1 min refused); replay; closure and first-contact races → 409.

MR-G — docs close-out (weight 2; Closes #895)

Deployment-guide rollout subsection, data-model-cases.adoc, state-machines.adoc, implementation-guide.adoc, ADR-003 / ADR-072 as-built notes, .claude/CLAUDE.md status, this page’s Status → Done.

Rollout / rollback (the deployment-guide subsection, rehearsed on the devstack in MR-D / MR-E)

  1. Promote all nine rulesets (and the intake-screening enum bumps) on craig-rules BEFORE the cases image; never demote first — an image consulting an absent ruleset refuses every conversion and investigation open by design.

  2. MR-D is a STOP-THE-WORLD cases cutover: the floor is checked only at boot (crates/craig-db/src/schema_state.rs:433), so scale cases to zero → take the operator’s database backup / PITR mark under write quiescence → run the ADR-063 gate → start the new image; craig-web and the CLI roll in the same window (the referral wire changed both ways). MR-C, MR-E and MR-F are additive and roll normally (ruleset first).

  3. Production rollback = redeploy N−1 images AND restore the cases database from the pre-gate backup (rows written after it are lost; the release note says so). cargo xtask migrate rollback is the devstack / CI snapshot restore only (a prior migrate snapshot, --force for a newer schema, every snapshotted database by default).

Verification

  • Per MR: fmt, clippy -D warnings, rules check, policy audit (+ sync-cache --pin), scenarios audit, validate-migration-constraints, validate-authz-coverage, every lints subcommand, api-docs, coverage-matrix-mapping, axis-coverage, quality-budgets, check-docs; plan-lint --done at MR-G.

  • Devstack: the keyed screening harness + wiremock pairs (roll-up / window / override); live GA and TX for the closed arms; the full craig-cases battery --run-ignored all; Playwright intake specs; k6 smoke through the pre-push perf stage; cargo xtask mutants --smoke on craig-common.

  • Rehearsal: staff-enter a report (attested Monday 15:00 ET receipt, two children STANDARD + IMMEDIATE) → convert → referral IMMEDIATE; a STANDARD referral → investigation due Friday 23:59:59.999999 ET; a screened-in decision with no evaluated priority + a supervisor-attested STANDARD derives, a caseworker’s attestation → 409; worklist ?timeliness=overdue; CLI override → 403 with the closed basis; /readyz unchanged.

Review log

Round Vendor Resolved model Verdict

1

Anthropic — one fresh contextless subagent, the four plan-lifecycle questions, over this page

Claude Fable 5.1

no-ship → 5 blockers folded (lazy roll-up consult order + CAS-miss outcome; override extension arithmetic; narrowed wildcard authz rows; staff-entry DTO fields + intent projections; this log’s round order) and the advisories taken (MR split so staff entry lands before the cutover; NONE not attestable; ?timeliness= typed 400; testonia clause; seed provenance; policy-cache citation form)

2

the maintainer (human) — the 21-finding gate review of the pre-page draft, run through another vendor’s model (vendor / model not reported)

—

no-ship → the 21 findings folded into rev 2 (the page as committed); approved 2026-09-08 in plan mode — no round 3

Errata

  • Erratum (2026-09-09): §B’s counting predicate is applied exactly as written (the flags decide what counts), and a WEEKDAYS row that says skip_weekends: false is refused up front as contract drift (DeadlineError::WeekdaysRequireSkipWeekends) rather than silently skipping weekends anyway; the holiday coverage check runs BEFORE the walk (covers(d0, d0)) and again against the reached target; a day-unit window visits at most 2·count + 366 dates.

  • Erratum (2026-09-09): the two reports columns (created_by, received_at_attested) ride MR-C’s own additive services/craig-cases/migrations/20260909120000_report_receipt_attribution.sql (no floor bump), not MR-D’s 20260910120000_referral_response_priority.sql — §C’s MR-D column list corrected to as-built so the MR-D implementer does not add them twice.

  • Erratum (2026-09-08): MR-A’s Georgia override row also quotes PAMMS 3.2 (03-02, County Director item: "This authority does not extend to changing the assigned response time", extended to Regional Safety / Lead FPS by its NOTE) — the intake-acceptance override authority explicitly stops short of the response time, which strengthens the CLOSED reading; the basis is no longer "3.32’s CISS review as the only text located". The Texas override row cites CPS 2291.5 (a completion extension, not a response one) and CPS 2143 (CPI may re-assess the intake priority — a token change the roll-up owns, not a deadline extension); §A’s "3.32’s CISS review" sentence is Georgia-only.

  • Erratum (2026-09-08): the roll-up ruleset’s table node id is priority-rollup (the intake-screening file already owns a node named response-priority); the window and override node ids are response-window and override-arm. File names are as §A states.

  • Erratum (2026-09-09): §D’s map_consult_error in api/investigations/response.rs carries the placement class table (timeout / transport → 503, relayed 403 → rules-consult-denied, absent ruleset → 500, 5xx / 429 → 503, other 4xx / undecodable → 500) in its OWN structure, not a byte-verbatim copy — a structural clone counts against the B8 duplicate-block budget (quality-gates.adoc).

  • Erratum (2026-09-09): §C’s "`verify-seed’s marker reconstruction tolerates the view" is pinned by construction, not by a dedicated MR-E test: registry_fingerprint (tools/craig-seed/src/bundle.rs) and xtask verify-seed’s reconstruction (`xtask/src/cmd/verify_seed.rs) intern ONLY the persons / referrals / reports slices, so the investigations table → v_investigations rename never enters the seed identity; the boot_verify view-tolerance test (keyed + keyless, catalog relkind = 'v') is the executed leg.

  • Erratum (2026-09-09): §D’s "the authz-subsidy_agreement precedent" covers the i_operation INPUT only — the #1095 fixture never narrowed an existing row; MR-F’s i_operation: "== null" ABSENT narrowing is the first in any shipped ruleset (recorded in rulesets.adoc). Also as-built: the Georgia and Texas state_office operation rows are admitted at authz but unreachable today — neither intake-screening surface maps a state_office policy role, so the handler refuses 403 screening-actor-unmapped before the consult (the row `_description`s say so).

  • Erratum (2026-09-09): §Rollout’s "MR-E and MR-F are additive and roll normally" is true of the SCHEMA only — POST /v1/cases/investigations is deny_unknown_fields, so an N−1 craig-web open-investigation form or an N−1 CLI --response-due-at answers a typed 422 until it rolls (the read direction is safe either way: craig-web’s response_timeliness fields are serde-defaulted); the deployment guide orders web + CLI right after the cases image. And §D’s flat override role set is Georgia-only as built: the Texas supervisor operation row is CASE-SCOPED (i_supervises == true, the file’s doctrine — fail-closed today, investigations carry no supervisor sub) and the realm-flat regional_supervisor carries the operation instead.

Edit this page · latest