Skip to content

Enforce deep immutability across public TRIA values - #24

Merged
SarashaElion merged 9 commits into
mainfrom
build/v0.1-deep-immutability
Sep 3, 2026
Merged

Enforce deep immutability across public TRIA values#24
SarashaElion merged 9 commits into
mainfrom
build/v0.1-deep-immutability

Conversation

@SarashaElion

Copy link
Copy Markdown
Contributor

Summary

Build 024 hardens TRIA's immutability guarantees so frozen public value objects cannot still be mutated through nested dict/list containers.

Event integrity

  • EventProposal and RelationalEvent deep-freeze payloads at construction
  • committed event payloads become immutable snapshots of caller-owned data
  • later mutation of the source object cannot alter stored event meaning
  • serialization thaws frozen containers back to ordinary JSON-compatible structures
  • canonical event hash semantics remain unchanged

Runtime / provider / governance boundaries

  • invocation request/result metadata is deeply immutable
  • context values and runtime tuple surfaces are normalized at construction
  • provider request payloads and metadata are deeply immutable
  • provider response metadata is deeply immutable
  • governance decision metadata is deeply immutable

Conformance

  • tests prove source-object mutation cannot alter TRIA values after construction
  • tests prove nested writes fail
  • adds deep-immutability documentation and conformance fixture
  • adds deep_immutable_public_values to the conformance manifest

Architectural intent

Immutability is a structural property, not merely @dataclass(frozen=True). A value that can be changed through a nested container is not actually immutable.

This is representation hardening only. It does not change the event schema, projection version, bundle format, or historical event hash semantics.

@SarashaElion
SarashaElion merged commit 7129f2b into main Sep 3, 2026
2 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