Selection contract
CA-A1 architecture record. Updated: 2026-10-05. Three distinct layers. Architected for an external engine first — no new selection algorithm is designed.
Layer 1 — Governance specification (human/institutional authority)
The SelectionSpecification (CA-OBJ-008) is the authorised artefact. It records:
- eligible population rule reference
- strata + quotas + weighting
- permitted/prohibited fields (incl. attitudinal, special-category)
- reserve and replacement rules
- algorithm policy (allowed engines/versions)
- publication and audit policy
- the authority artefact that authorised it + timestamp
The spec is locked before any run. A run may only execute against a spec in authorised/locked state. Post-authorisation change → new version, old version preserved.
Layer 2 — Selection execution (deterministic engine)
Engine receives:
- authorised spec (versioned ref + digest)
- input pool (anonymised respondent IDs + permitted attribute columns only)
- seed/entropy artefact
- algorithm identifier + version
Engine returns:
- selected IDs
- reserve order
- optimisation/fairness metrics where available
- run metadata (algorithm, version, duration, iterations)
- reproducibility artefacts (input digest, output digest, log)
- errors
Contract ID: CA-CONTRACT-SEL-001 (see SELECTION-ENGINE-ADAPTER.md).
Layer 3 — Audit ceremony
The AuditBundle (CA-OBJ-010) records:
- witness participants (who attended/attested)
- seed/entropy generation procedure + artefact
- input-pool digest
- spec digest (authorised version)
- algorithm identifier + version
- output digest (selected + reserves)
- timestamp; software/version of every component used
- verification instructions (how an independent party re-runs and confirms)
Modelled on the corpus’s strongest evidenced practice — Decidim’s public die-roll + witness attestation (SRC-0083) — lifted into a first-class artefact rather than a blog post.
Rules that bind all three layers
- Spec authority is institutional; execution authority is administrative; audit authority is independent-of-operator. Three different actors may hold them — the record must capture all three (CA-REQ-080/081).
- The engine never sees identity fields it doesn’t need — permitted-fields list is enforced at the pool-export boundary (privacy by construction).
- Re-running a published selection is a verification event, never a write — CA-REQ-015.
- Reserves come from the same witnessed run or a declared follow-up run under the same spec — replacement manipulation requires forging the bundle.