Skip to content

docs(trios-chat): add T27_PORT_CONVENTIONS.md - #2048

Open
dmitrii-f-t27 wants to merge 1 commit into
mainfrom
docs/t27-port-conventions
Open

dmitrii-f-t27 wants to merge 1 commit into
mainfrom
docs/t27-port-conventions

Conversation

@dmitrii-f-t27

Copy link
Copy Markdown
Collaborator

Closes #1824

Adds docs/chat/T27_PORT_CONVENTIONS.md recording owner decisions D2, D4, D5 and the single convention every trios-chat spec/swap follows:

  • spec location and module line
  • text language
  • the verdict (named struct, Ok first)
  • types, bytes and constructs
  • tests
  • behaviour fidelity
  • checks before a PR
  • swap layout
  • crypto boundary
  • words we do not use
  • toolchain traps

Every .t27 snippet in the doc was verified:

t27c test-report -> 6 pass, 0 FAIL, 0 vacuous
t27c coverage -> Untested: 0
t27c gen-rust + rustc --edition 2021 --crate-type lib -> compile OK

t27c built from Trinity-S-AI-DNA/t27@4df8f0a

No CODEOWNERS changes.

@tri-claw

tri-claw Bot commented Oct 19, 2026

Copy link
Copy Markdown

Summary by t27-bees

This PR adds a comprehensive conventions document (docs/chat/T27_PORT_CONVENTIONS.md) that codifies owner decisions (D2, D4, D5) and the single porting convention for all trios-chat specs and swaps. It covers spec location, t27 language rules, the named-verdict struct pattern, allowed/disallowed constructs, test requirements, behaviour fidelity, pre-PR checks, swap order, crypto boundary, forbidden words, and toolchain traps.

Worth a look

  • Line 68–76 (verdict struct): ExtVerdict carries all payload fields (claimed, actual, leaf, sender, joining, ops, ops_len) for every error variant, but most variants only need a subset (e.g., EpochMismatch only uses claimed/actual). This wastes space and leaves fields effectively uninitialized for irrelevant variants — the generated Rust may contain garbage or require manual zeroing.
  • Line 133 (rustc command): rustc --edition 2021 --crate-type lib --out-dir out out.rs uses out as both the output directory and the input file basename (out.rs). This works but is confusing; a clearer example would separate names (e.g., --out-dir gen gen.rs).
  • Line 107–120 (test examples): Tests call check_external_commit with many arguments, but the function signature is not specified in the conventions. Without a prescribed signature, reviewers cannot verify that test calls match the actual gate function.
  • Line 44 (module second line): States “The second line is a use of any shared module” but the example on line 43 shows only the module line. A concrete use example would prevent ambiguity.
  • Line 76 (verdict struct fields): No guidance on what values the unused payload fields should hold for a given error variant (zero? undefined? omitted?). The generated Rust must initialize all struct fields; the convention should state the rule.

Read: 1 files, +153 -0, the whole diff. Head 6c9f45f. Model: openai-compatible/nvidia/nemotron-3-ultra-550b-a55b. Commands: @t27-bees review | summary | help | pause | resume. Free for every repository.

This branch has not been deployed

No deployments
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.

Port conventions for trios-chat .t27 specs and the swap layout

1 participant