feat(reporting,xtask): P-D2 U1 — the reporting field key, its delivery and the shared lineage verifier
What
Plan D1 (R11, R-D9). craig-reporting becomes the second keyed service with a dedicated COLUMN key, CRAIG_REPORTING_FIELD_ENCRYPTION_KEY, that never derives the record number (P-D5's pseudonym key is separate).
- Store v2 (ADR-064 amendment):
secrets/dev.yamlholdsshared.field_encryption_keyplusshared.reporting_field_encryption_key(xtask/src/secrets_store.rs:12-21is exact today);cargo xtask secretsmints the new entry fresh, non-interactively, never typed. - Delivery: the devstack writes
devstack/reporting-field-key.envbesidefield-key.env(xtask/src/field_key.rs,field_key_reconcile.rs), with its own KCV marker in the wipe guard (xtask/src/devstack_guard.rs:762), gitignored likefield-key.env(.gitignore:27), mounted into craig-reporting only.devstack/ci/write-field-key.shand the integration job's own key step (.gitlab-ci.yml:497) write both files, each 32 independent random bytes. - Mode:
encryption_modemoves fromCasesSettingstoServiceSettings(the flatten rule,crates/craig-common/src/settings.rs:296-306); cases readsCRAIG_CASES__ENCRYPTION_MODEunchanged, reportingCRAIG_REPORTING__ENCRYPTION_MODE; defaultrequired. - Lineage: a
crypto_key_lineagemigration in craig_reporting (the cases DDL). The boot matrix (services/craig-cases/src/boot_verify.rs:169) moves intocraig-searchbehind itssqlxfeature, parameterised by (registry, key env name); craig-cases calls it with unchanged behaviour, reporting calls it at boot, verify-only. The writer is U6's generate commit, not this unit. crates/craig-reporting-fields(thecraig-cases-fieldsshape) with an EMPTYDEFAULT_REGISTRY; U2 registers the R11 columns.
Acceptance criteria
-
a_wrong_key_or_a_keyless_boot_on_keyed_lineage_refuses(fault): the shared matrix over a fixture registry; the remedy namesCRAIG_REPORTING_FIELD_ENCRYPTION_KEY; craig-cases' boot legs and the store's schema tests pass with the second entry. - No secret is printed by any new path;
secrets checkvalidates the v2 schema and recipient parity. - Docs: the ADR-064 amendment;
.env.example,configuration-reference.adoc,deployment-guide.adoc(production: the orchestrator store);shared-crates.adoclists the new crate and the moved leaf. - Gates: fmt, clippy, the budgets at their locks,
validate-authz-coverage,api-docs --check,check-docs,plan-lint; the battery (baregit push) green;// @axis:on every new test; a CHANGELOG== Unreleasedentry.
Context
- Plan page: docs/modules/ROOT/pages/plans/afcars-records-and-generate.adoc (P-D2 of #1965, approved in plan mode 2026-10-01 after round 1 and the maintainer's round 2; its D-sections binding; rulings R-D8 to R-D11 as recommended).
- Ops line (plan § Rollout): set
CRAIG_REPORTING_FIELD_ENCRYPTION_KEYandCRAIG_REPORTING__ENCRYPTION_MODEbefore the roll —requiredrefuses boot without a key. - Order: after U0; U2 follows.
- The MR relates to #2125 (closed), #1965 and #949 and closes only this issue. Epic &99.