Skip to content

Add typed canonical identity payloads, derived-alias lifecycle and projection validation#412

Open
mikemol wants to merge 1 commit intomainfrom
codex/implement-identity-projection-corrections
Open

Add typed canonical identity payloads, derived-alias lifecycle and projection validation#412
mikemol wants to merge 1 commit intomainfrom
codex/implement-identity-projection-corrections

Conversation

@mikemol
Copy link
Copy Markdown
Owner

@mikemol mikemol commented Mar 11, 2026

Motivation

  • Enforce a single, well-validated canonical identity representation at the boundary to avoid dual-shape ambiguity in core flows.
  • Attach explicit lifecycle metadata to derived identity adapters so temporary alias adapters are auditable and can be deprecated safely.
  • Harden projection contracts and validation so derived projections cannot silently violate expected adapter/projection invariants.

Description

  • Introduces CanonicalAspfPathPayload, DerivedIdentityAdapterLifecycle, DerivedIdentityProjection, DerivedAliasPayload, ProjectionContract, ProjectionSlot, and ProjectionBinding dataclasses and helpers in src/gabion/analysis/evidence_keys.py to reify canonical identity payloads and derived-alias lifecycle.
  • Reworks FingerprintIdentityLayers to use typed payloads, adds validate(), _projection_for_slot(), derived_aliases() and strict contract validation via PROJECTION_CONTRACTS.
  • Updates fingerprint_identity_layers() to construct typed layers, add adapter lifecycle metadata and run validation before emission, and changes type_fingerprints.fingerprint_identity_payload() to emit derived aliases via the new helper.
  • Adds normalization/validation for suite_site_endpoints and other canonical identity invariants and adds the meta_reify_structural_homology_plan.md documentation and expanded docs/aspf_taint_isomorphism_no_change.yaml justification text; updates out/test_evidence.json and updates/extends unit tests in tests/test_aspf_cofibration_laws.py, tests/test_fingerprint_soundness.py, and tests/test_type_fingerprints_sidecar.py to assert lifecycle fields and validation behavior.

Testing

  • Ran targeted pytest for the modified tests including tests/test_aspf_cofibration_laws.py, tests/test_fingerprint_soundness.py, and tests/test_type_fingerprints_sidecar.py.
  • Confirmed the updated identity-layer emission and projection-contract guards by asserting adapter lifecycle fields and that invalid canonical payload shapes raise the expected NeverThrown invariants.
  • Regenerated evidence artifacts (out/test_evidence.json) to include new test function sites and mappings; the updated tests passed in the local test run.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant