Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,19 @@ jobs:
- run: node scripts/conformance-current.mjs
- run: node scripts/conformance-production.mjs

runtime-conformance:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version-file: go.mod
cache: false
- uses: actions/setup-node@v7
with:
node-version: 24
- run: node scripts/conformance-runtime.mjs

packages:
runs-on: ubuntu-latest
steps:
Expand Down
8 changes: 8 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,11 @@ from Nightseam's native Wire surfaces at revision
1c63f1c4d7e4b5987d4bd32e294177645c92ed8f. Their package NOTICE files identify
the source files and extraction changes. The Haskell presentation is derived
from the common Bitwire specification.

The test-only bitruntime composition drivers
conformance/runtime/go/composition/main.go and
conformance/runtime/ts/composition.ts are adapted from nightseam's
conformance/bitwire/go/main.go and conformance/ts/src/bitwire.ts at v0.6.0,
revision 5cc9723a24646c40ed1861f892b2b23eb6d785d7, licensed under the Apache
License, Version 2.0: Copyright 2026 Bitspark and the Nightseam contributors.
Each nightseam facility is replaced by the bitruntime facility its port records.
58 changes: 57 additions & 1 deletion conformance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,63 @@ not establish the new structural contract. See
[decision 0012](https://github.com/Bitspark/bitwire/blob/main/docs/decisions/0012-explicit-data-and-wire-trees.md).

**Status: current released 0.2 composition and scoped lifecycle evidence, a
test-only reference, and a preserved historical 0.1.0 runtime baseline.**
test-only reference, bitruntime Go candidate and TypeScript release evidence
against the same cases, and a preserved historical 0.1.0 runtime baseline.**

## bitruntime runtime conformance

Run `node scripts/conformance-runtime.mjs`; `--language=go` or `--language=ts`
selects one half, and `--keep-scratch` retains the build and install tree. It
runs bitwire's existing independent cases against bitruntime's Go module and
TypeScript package, as the current baseline runs them against nightseam v0.6.0.
Both halves require bitwire v0.3.0 and the bitruntime artifacts pinned in
[bitruntime.json](runtime/bitruntime.json), never a local checkout or path. Each
driver receives its inputs with every expectation withheld, and one report gives
the case files' SHA-256s and every family's result in each language.

- **Go.** The test-only module [`runtime/go`](runtime/go/go.mod) requires the
public bitruntime module at a pinned pre-release revision. The runner refuses
any other module graph, revision or sum, and runs every driver with
`GOWORK=off` under the race detector (required in CI).
- **TypeScript.** The private, test-only package
[`runtime/ts`](runtime/ts/package.json) depends on bitruntime's v0.2.0
release asset, `@bitspark/bitwire` 0.3.0 and `ws` 8.21.3, and its
`.npmrc` takes the `@bitspark` scope from the public npm registry. The
runner downloads the release asset and checks its SHA-256 and integrity and
that tag v0.2.0 names the pinned revision. It refuses a lockfile entry that is
not a public, integrity-pinned artifact or that names another bitruntime or
bitwire, installs with `npm ci` in scratch, type-checks the drivers with
TypeScript and runs them with Node 24's type stripping.

| Family | Driver and oracle | Carriers | Go at the pin | TypeScript at the pin |
| --- | --- | --- | --- | --- |
| Lifecycle | [Cases](current/lifecycle.json) through `Invocation` | none, public state | 5/5 | 5/5 |
| Composition | The six [reference](reference/expected.json) groups; drivers ported from nightseam's upstream ones | local pair, WebSocket client and server sending | 6/6 on each | 6/6 on each |
| Declared, reference | The 39 [declared](declared/cases.json) cases through the test-only interpreter over bitruntime's carriers | the same three | 39/39 on each | 39/39 on each |
| Declared, production | The same cases through bitruntime's child-only addressed mount, with its selection and forwarding | the same three | 20 conform; 19 match bitruntime's own [gap ledger](runtime/production-gaps.json) | the same |
| Trees | The [0.3 observations](trees/expected.json) through bitruntime's tree construction, selection, sending and addressed bridge | none, structural | 14/14 | 14/14 |

The Go drivers use `core.Invocation`, `core.NewPair`, the WebSocket engine,
`dispatch`, `core.At`, `core.Mount`, `core.Forward`, `core.Compose`,
`core.Select`, `core.Send` and `core.AsAddressed`. The TypeScript drivers
use the same facilities from `@bitspark/bitruntime`: `Invocation`, `pair`,
`at`, `mount`, `forward`, `compose`, `select`, `send` and
`asAddressed` from `/core`, `createDispatcher` from `/dispatch`, and
`Peer` from `/engine` over `webSocketConnection` from `/transports`.

As in the nightseam baseline, the two echoed `same-id` placeholders are
instantiated as `c:1`: bitruntime's `bitwire/1` is nightseam v0.6.0's profile
and refuses `same-id` as a request identifier on both carriers. Nothing else in
any oracle changes. bitruntime keeps its own gap ledger so a gap it closes is
removed there, never from nightseam's. Its observations equal nightseam's in
both languages: each mount is a renamed port, and bitruntime deliberately omits
the unreleased declared-composition API that decision 0012 supersedes. No case
reaches bitruntime's documented forwarding and disconnection changes, because
every refusal in these fixtures happens before a carrier or forwarder.

Lifecycle, composition and declared results remain evidence about the 0.2
addressed contract (`AddressedWire` in 0.3); trees is the 0.3 structural
contract.

## Current released runtime baseline

Expand Down
25 changes: 25 additions & 0 deletions conformance/runtime/bitruntime.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"repository": "https://github.com/Bitspark/bitruntime",
"module": "github.com/Bitspark/bitruntime",
"version": "v0.2.0",
"revision": "e28bb1adefbc8a5cb1b03f172b4e7212584bd7a2",
"sum": "h1:6sSEqVB9sRzxZPLcVcca9RtfRNYy+8+E5dvVmDpyFbQ=",
"status": "release",
"profile": "bitwire/1",
"bitwireVersion": "v0.3.0",
"bitwireRevision": "f825f3f4a79135646b775e25dcd770656546b4a1",
"bitwireSum": "h1:RXgSS3XR1rHBMXu8dDvP3RHF16E8Uyt2aTfATRXzbhA=",
"npm": {
"package": "@bitspark/bitruntime",
"version": "0.2.0",
"tag": "v0.2.0",
"revision": "e28bb1adefbc8a5cb1b03f172b4e7212584bd7a2",
"tarball": "https://github.com/Bitspark/bitruntime/releases/download/v0.2.0/bitspark-bitruntime-0.2.0.tgz",
"sha256": "d19d377ad60037083b3158a7200f734e8bb37b17e7d1f7f7c2cd15e0ff2fb9d1",
"integrity": "sha512-1S62Lft9WdC9eX9lrEWYWgLMkeiEhZh1QTU/Ybd9NjleDAxYizi/n9D98w/sBGorKI2lkUmMBvTO1xFYul7lYQ==",
"status": "release",
"bitwireVersion": "0.3.0",
"bitwireTarball": "https://registry.npmjs.org/@bitspark/bitwire/-/bitwire-0.3.0.tgz",
"bitwireIntegrity": "sha512-6tqme+2nfJAp2xwmYIrO7hSSh+6TrJ7gPIb8SZX4dQAoZZHs/iqPPsZFv8vJsMUBejzgBxwNtOoC3PjI0KMPRw=="
}
}
Loading
Loading