Skip to content

Add specs/memory/tmem: Trinity Memory contracts as sealed .t27 specs - #3562

Merged
gHashTag merged 1 commit into
gHashTag:masterfrom
dmitrii-f-t27:spec/memory-tmem-contracts
Sep 12, 2026
Merged

gHashTag merged 1 commit into
gHashTag:masterfrom
dmitrii-f-t27:spec/memory-tmem-contracts

Conversation

@dmitrii-f-t27

Copy link
Copy Markdown
Collaborator

Closes #3561

What

specs/memory/tmem/ adds six sealed .t27 specs from dmitrii-f-t27/trinity-memory (v0.3.0, epic #3 there), with their conformance vectors and seals:

Spec Module Contract
types.t27 TrinityMemoryTypes lanes, codec ids and geometry, code limits, TMEM v1 container, CRC32, TMS_ERR_*, Evidence
bridge.t27 TrinityMemoryBridgeSpec JSON-RPC 2.0 over loopback HTTP: methods, error codes, HTTP rejections, limits, handles, identity, anchor word
tensorpack.t27 TrinityMemoryTensorPackSpec TTPK v1: 32-byte header, sorted-key metadata, limits, float presentation
stream_compute.t27 TrinityMemoryStreamComputeSpec read -> decode -> dot: two-stage ready/valid pipeline, accumulator bounds, frame errors, storage sequencer timing, view packing
conformance.t27 TrinityMemoryConformanceLabSpec fixture schema trinity.conformance.v1, plan counts, corruption positions, lab report sections
edge_demo.t27 TrinityMemoryEdgeDemoSpec 3x12 template classifier, argmax with ambiguous ties, seeds, report trinity.edge-report.v1
  • The files are byte-identical to the memory repository's specs/memory/*.t27 except for the path line in each header. specs/memory/tmem/OWNERS.md records the conventions and the two pinned-compiler pitfalls the files avoid (a non-constant invariant is emitted as a comment; an assert whose expression begins with ( is folded into a call).
  • Seals .trinity/seals/tmem_TrinityMemory*.json were produced by t27c seal --save at bff21b85 (master at the time of writing) from the specs/memory/tmem/ paths. t27c ci --repo-root . reports the six files with no issue; t27c validate-conformance --repo-root . accepts conformance/tmem_*.json.
  • tools/published_figures.py: the pinned test blocks population follows the corpus, 12542 -> 12593 (the 51 test blocks of these specs), with the movement written next to the pin.
  • docs/now/2026-09-11-trinity-memory-contracts-as-t27-specs.md added.

Verified locally on this branch (bff21b8 + this commit)

published_figures.py --check, check_assertionless_spec_tests.py, check_duplicate_declarations.py, check_json_parses.py, check_now_entry_shape.py (with PR env), check_fix_carries_source.py, check_conflict_markers.py, check_devhome_paths.py, check_withdrawn_live.py, check_seal_coverage.py (1324 seals, 1230 hold, 94 known-broken unchanged), check_seal_currency.py, check_specs_parse.py, check_verilog_widths.py --require, check_specs_generate.py, check_damage_negatives.py --require, tri mods orphan --gate, check_documented_commands_exist.py, tri harness scratch --gate: all exit 0.

Every constant, layout and cycle-level rule in the specs is checked against the implementation in the memory repository (differential C harnesses, Icarus trace testbenches, TCP/WASM replays, tools/generate-spec-vectors.py --check, all under tools/check-specs.sh); none of that is copied here.

Not claimed

The memory protocol and TTPK are experimental contracts of the memory repository, not an approved ABI of trinity-node or trinity-sdk (the Bridge spec pins the revisions it was checked against). No FPGA number. No existing spec, seal, conformance file or generated file is touched.

🤖 Generated with Claude Code

Six sealed specs (types, Bridge, TensorPack, Stream Compute, Conformance Lab,
Edge Demo) with conformance vectors, copied from dmitrii-f-t27/trinity-memory
v0.3.0; published test-block pin follows the corpus (12542 + 51 = 12593).

Closes gHashTag#3561

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@dmitrii-f-t27

Copy link
Copy Markdown
Collaborator Author

CI note: every check that reads this change is green (spec-guards, seal coverage, corpus ratchet, schema validation, now-sync, conflict markers, secret scan, withdrawn-live, verilog widths, orphan modules, documented commands, harness scratch, phi-loop, pr-dashboard).

The two red checks fail on master as well, independently of this PR, and do not read the files it adds:

  • gate-topology ("UNCLASSIFIED ROSE 27 -> 28", a workflow named in neither list of scripts/ci/check_pr_branch_filters.py): the last three master runs of 2026-09-10 (04:27, 03:09, 00:49 UTC) fail the same way.
  • untrusted-input (scripts/ci/test_admitted_gate_reads_every_named_file.py, "the step body was found in the workflow"): the last three master runs of 2026-09-10 fail the same way.

Both are noted as pre-existing in docs/now/2026-09-10-the-site-viewport-contract-as-a-t27-spec.md as well. Not addressed here to keep this PR to the spec tree.

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.

[spec] specs/memory/tmem: Trinity Memory contracts (types, Bridge, TensorPack, Stream Compute, Conformance Lab, Edge Demo)

2 participants