speckl/compiler/__tests__
Scott Scoble 7beaf6f3cc fix(speckl): strip default-value syntax from event field types (cycle 65)
End-to-end compile of FederatedMeetup.speckdl (with the cycle-65
Transition envelope added) surfaced a real bug: the speckdl uses
default-value syntax on event fields:

  initial_mesh_peers: List<InitialMeshPeer> = []

The default is a Speckl semantic — a state-machine init value —
but the .proto wire format has no place for it. Without stripping,
the type expression 'List<InitialMeshPeer> = []' was emitted
verbatim as the field type, producing broken proto3 syntax that
protoc rejected.

Fix: parseEventBlockMultiline now strips '= <expr>' suffix from
the type expression before calling parseTypeExpr. The default value
is dropped (it's a Speckl semantic only; the wire format carries
no default).

Tests: 1 new parser test covers the federated-meetup
'initial_mesh_peers: List<InitialMeshPeer> = []' shape. All 56
tests pass (55 baseline + 1 new). tsc build clean.

End-to-end verified: with this fix and the cycle-65 federated-
meetup speckdl changes, the Speckl-generated .proto now compiles
cleanly with 'protoc' (previously rejected).
2026-06-28 22:36:36 -07:00
..
parser.test.ts fix(speckl): strip default-value syntax from event field types (cycle 65) 2026-06-28 22:36:36 -07:00
tigerbeetle.speck speckl: TypeScript state machine generator + Forgejo issue workflow spec 2026-05-03 12:23:33 -07:00