Skip to content

Implement immutable typed reference contracts - #7

Merged
nikstern merged 1 commit into
mainfrom
codex/task-58-typed-reference-contracts
Aug 15, 2026
Merged

Implement immutable typed reference contracts#7
nikstern merged 1 commit into
mainfrom
codex/task-58-typed-reference-contracts

Conversation

@nikstern

Copy link
Copy Markdown
Owner

Summary

  • implement ADR-0156 typed reference declarations, equality guards, deterministic entity IDs, and cross-bundle/CSDL linting
  • enforce immutable references and deterministic identity in one staged actor pre-commit contract across create, update, composite, native, and optimized-runtime paths
  • add deterministic hot-reload audits plus bounded L0 SMT, L1 Stateright, composite, property, DST persistence, and HTTP coverage

Validation

  • cargo test --workspace -- --test-threads=1
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo fmt --all -- --check
  • git diff --check
  • mandatory code-quality review: PASS
  • mandatory DST compliance review: PASS
  • live local Turso-backed HTTP server:
    • missing typed-reference target returned 409 ReferenceTargetMissing
    • valid target created a document with canonical derived SHA-256 ID
    • rebinding to another existing target returned 409 ImmutableReferenceViolation

Tradeoffs

The runtime pre-resolves target existence and validates a fully materialized prospective state before any event or side effect is committed. This adds bounded lookup and validation work to contracted writes, but it gives every write origin the same atomic behavior and prevents optimized paths from weakening the contract.

Formal verification uses bounded symbolic identity classes grouped by target entity type. The bound is derived from reference slots, parameter slots, and existing identities, so equality cases remain exhaustive within the finite model while avoiding an unbounded identifier domain.

Tracking

@nikstern
nikstern force-pushed the codex/task-58-typed-reference-contracts branch from a4f60ff to 80bc3d6 Compare August 15, 2026 21:33
@nikstern
nikstern marked this pull request as ready for review August 15, 2026 21:55
@nikstern
nikstern merged commit e7323f3 into main Aug 15, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant