Skip to content

feat(thrum): views.rs as protocol source with generated mirrors - #59

Merged
adiled merged 1 commit into
mainfrom
adiled/thrum/views-protocol
Sep 19, 2026
Merged

adiled merged 1 commit into
mainfrom
adiled/thrum/views-protocol

Conversation

@adiled

@adiled adiled commented Sep 19, 2026

Copy link
Copy Markdown
Owner

Rust is the source of truth; JSON is just the wire serialization.

  • thrum-core/src/views.rs: one body struct per chi (34) + DroneLoad, explicit serde renames
  • codegen/src/protocol.rs: syn parser emitting protocol.{ts,py,go}; check_coverage fails the build if a chi lacks a view
  • Golden fixture (15 tones) + round-trip tests in Rust, Go, Python
  • rid() now Crockford-52 HumId form in all three helpers, pinned to hum_identity vectors
  • CI: .github/workflows/wire.yml (rust --check + tests, go build/vet/test, python unittest)
  • TS barrel serves protocol.ts Envelope; protocol.ts added to package files/exports

Checks: codegen --check clean, thrum-core 55 tests, codegen 7, go ok, python 6, TS vectors verified via bun.

Canonical per-chi body structs live in thrum-core/src/views.rs; codegen
parses them with syn and emits protocol.{ts,py,go} so the three clients
cannot drift. thrum-core's build fails if any chi lacks a body view.
Golden fixture (15 tones) locks the wire; go/python parse tests and
Crockford-52 rid() parity (hum_identity vectors) run in CI via wire.yml.
@adiled
adiled merged commit 577f74d into main Sep 19, 2026
6 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