Skip to content

comline@2: datagram@3/comline@2 defaults, generated with facts (runtime#15) - #112

Merged
Kinflou merged 1 commit into
masterfrom
comline2/flip-defaults
Nov 8, 2026
Merged

Kinflou merged 1 commit into
masterfrom
comline2/flip-defaults

Conversation

@Kinflou

@Kinflou Kinflou commented Nov 7, 2026

Copy link
Copy Markdown
Member

Part of ComlineProject/runtime#15, the last step: the playground follows core's flipped defaults (datagram@3/comline@2, core#208) and generates with facts (generation#122).

Merge order: language-server#98, then simulator#30, then this PR. It pins both of their branch tips, so after they merge it needs a re-pin to their merge commits.

Pins

  • core 1dc294a and generation 83162ea, as the cli.
  • comline-rust addca26 and comline-typescript 40cab74, the two generators' main tips.
  • comline-language-server 0764367, language-server#98's tip.
  • comline-simulator 564851a, simulator#30's tip.

The defaults

The playground interprets each file itself rather than through core's compiler, so nothing froze the package's framing and handshake into protocols that write none. An absent value now reads as the implicit datagram@2/comline@1. interpret_project now applies them for the whole package, using the language server's apply_package_wire, which mirrors core's apply_package_framing/apply_package_handshake and package_default_handshake. So the IR, the description and the generated code all show datagram@3 and comline@2, as comline build would. framing_of reads an absent framing as IMPLICIT_FRAMING.

Facts

  • Source: a package that needs facts (facts::needed) gets a first version's from comline_core::compat::facts_of_context(context, "0.1.0"). That entry point already exists in core and takes no path, so no core PR was needed. Each parsed file's schema context holds its frozen units, as a build's would, and the congregation is now frozen (config_frozen) so the facts see its id.
  • Numbers: protocols and functions are numbered in declaration order, from 0. The playground has no history, so these are a first build's and provisional. The connection inspector says so, and so does the README.
  • Package id: fixed, 706c617967726f756e64000000000000, which is "playground" in ASCII hex, zero-padded to 32 digits. It lives in the congregation as id. A fixed id keeps generated code the same from one visit to the next and needs no storage. A per-session id would change every Hello on each reload.

Simulator

describe_project adds:

  • per protocol, number: the number its frames carry, from facts::addressing;
  • per function, call: its wire number under datagram@3, else its position;
  • connection: the package connection's framing and handshake, comline@2's four parameters, and the encoded Hello from facts::hello, the same bytes the generators embed.

simulator#30 frames datagram@3 by number and runs comline@2 through the runtime's Comline2. The UI shows:

  • the handshake and its parameters, on the instance and connection inspectors;
  • datagram@3 in the framing picker and the compare panel (10 combos);
  • each comline@2 message decoded in the frame log.

Tests

  • cargo test in wasm/: 15 pass. New tests cover a default package running datagram@3/comline@2; Rust and TypeScript generation with first-version facts (id, version, numbers); a jsonrpc package needing no facts; and the description's numbers and Hello.
  • The app tests pass locally: 42 pass, and the 18 WASI-generator tests skip without their env vars. Updated for the defaults: three comline@2 handshake frames instead of two, datagram@3 in the request detail and the auto → label, 10 compare combos, and the handshake row with its provisional note.

…me#15)

Re-pins core (1dc294a), generation (83162ea), comline-rust (addca26),
comline-typescript (40cab74), the language server at language-server#98's
tip and the simulator at simulator#30's tip.

- The package's framing and handshake, core's defaults here, are frozen
  into every protocol that writes none, as comline build does
  (language-server's apply_package_wire), so the IR, the description and
  the generated code show datagram@3 and comline@2.
- Generating a package that needs facts gives it a first version's,
  from comline_core::compat::facts_of_context over the in-memory context.
  The congregation carries a fixed id ("playground" in hex), which
  comline@2 needs.
- describe_project adds each protocol's number and each call's wire
  number, and the package connection with comline@2's parameters and the
  Hello the generators embed, for the simulator.
- The connection inspector shows the handshake and its parameters, and
  labels the numbers provisional; the frame log shows comline@2 messages.
@Kinflou
Kinflou merged commit 1927f8d into master Nov 8, 2026
2 checks passed
@Kinflou
Kinflou deleted the comline2/flip-defaults branch November 8, 2026 00:04
@Kinflou Kinflou moved this from Todo to Done in Comline Development Roadmap Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant