Skip to content

Drop smoke() scaffold; one shared chat fixture - #19

Merged
Kinflou merged 1 commit into
mainfrom
chore/drop-smoke-and-dedupe-fixtures
Sep 3, 2026
Merged

Kinflou merged 1 commit into
mainfrom
chore/drop-smoke-and-dedupe-fixtures

Conversation

@Kinflou

@Kinflou Kinflou commented Sep 3, 2026

Copy link
Copy Markdown
Member

smoke() — gone

It was a #[wasm_bindgen] pub fn from the very start of the port, doc'd
"the playground's real surface lands here as the port progresses". The
port finished; Sim is the surface; nothing (playground or tutorial) calls
smoke(). Removing it also lets engine::chat — the hand-built chat
ProjectShape it depended on — stop being pub(crate), so the fixture
schema no longer compiles into the shipped wasm
and smoke leaves the
generated .d.ts.

One chat fixture instead of six

engine.rs, facade.rs, framedecode.rs, record.rs, generic.rs,
model.rs, session_codec.rs each hand-rolled a near-identical chat
ProjectShape. They now share src/fixtures.rs (#[cfg(test)]),
imported as use crate::fixtures as chat;:

  • shape() / shape_with(fns, ir_hash) / fn_shape(name, i, oneway)
  • proto() / schema() / session() / engine() / CONN

behavior.rs keeps its own builder — it's a Counter / protocol-P
schema, not chat.

Checks

cargo test 128 pass (was 129, minus the smoke test), --no-default-features
green, cargo fmt clean, smoke absent from the built .d.ts. Net −130
lines.

`smoke()` was a `#[wasm_bindgen]` export from the start of the port ("the
playground's real surface lands here as the port progresses") — the port is
done, `Sim` is the surface, and nothing calls `smoke()`. Removing it also
lets `engine::chat` (the hand-built `chat` schema it needed) stop being
`pub(crate)` and stop shipping in the wasm.

The six test modules that each rebuilt a `chat`-ish `ProjectShape` now share
`src/fixtures.rs` (`#[cfg(test)]`, imported as `use crate::fixtures as
chat;`): `shape()` / `shape_with(fns, hash)` / `fn_shape()` / `proto()` /
`schema()` / `session()` / `engine()`. `behavior.rs` keeps its own —
it's a `Counter`/`P` schema, not chat.

128 lib tests pass (was 129 — minus the smoke test); `--no-default-features`
green; `smoke` no longer in the generated `.d.ts`.
@Kinflou
Kinflou merged commit 29011b2 into main Sep 3, 2026
1 check passed
@Kinflou
Kinflou deleted the chore/drop-smoke-and-dedupe-fixtures branch September 3, 2026 20:20
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