DocumentPayload is an opaque object type over the same runtime Uint8Array, keyed by a string property, and types CultCacheEnvelope.payload, CultNetRawDocumentRecord.payload and CultMeshRealtimeFrame.payload. decodeDocumentPayload(definition, payload) and encodeDocumentPayload(definition, value) are the only reader and writer; documentPayloadFromBytes and documentPayloadBytes are the two named escapes at the edges where bytes enter and leave. resolveDocumentFormatter leaves the package index. The cache, cultnet replication, the mesh read paths, the provider command (now a CultCache document), and the browser's decodeCultNetPayload (definition required, cultcache-ts/document entry) all go through the owner. Compile-fail fixtures per payload-carrying package pin the type with expect-error lines. check-typescript-tests-wired.mjs fails when a test file is run by no script; cultcache-ts now runs dist-test/test/*.test.js, and the portability workflow runs the check and the cache suite. Builds in every package (tsc, src and tests); the suites run once, at the end of the pass. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
149 lines
5.7 KiB
YAML
149 lines
5.7 KiB
YAML
name: CultMesh portability and performance
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- "codex/**"
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
getting-started:
|
|
name: ${{ matrix.os }} one-command multiplayer onboarding
|
|
runs-on: ${{ matrix.os }}
|
|
timeout-minutes: 30
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [windows-latest, ubuntu-latest]
|
|
|
|
steps:
|
|
- name: Check out CultLib
|
|
uses: actions/checkout@v4
|
|
with:
|
|
path: CultLib
|
|
|
|
- name: Check out the matching Eve contract
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: GameCult/Eve
|
|
# Eve main is the contract this sample is written against; the codex
|
|
# branch this used to pin was never merged and stopped on 2026-08-25.
|
|
ref: ${{ vars.EVE_INTEGRATION_REF || 'main' }}
|
|
path: Eve
|
|
|
|
- name: Set up .NET
|
|
uses: actions/setup-dotnet@v4
|
|
with:
|
|
dotnet-version: 10.0.x
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 24
|
|
|
|
- name: Run the documented one-command checkpoint
|
|
shell: pwsh
|
|
run: ./CultLib/scripts/verify-eve-getting-started.ps1 -EveRoot ./Eve
|
|
|
|
reactive-and-resource-lifetime:
|
|
name: ${{ matrix.os }} reactive semantics and leases
|
|
runs-on: ${{ matrix.os }}
|
|
timeout-minutes: 30
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [windows-latest, ubuntu-latest]
|
|
|
|
steps:
|
|
- name: Check out CultLib
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up .NET
|
|
uses: actions/setup-dotnet@v4
|
|
with:
|
|
dotnet-version: 10.0.x
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 24
|
|
cache: npm
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: Install TypeScript workspace dependencies
|
|
run: npm install --no-package-lock
|
|
|
|
- name: Install Python CultLib packages
|
|
run: python -m pip install -e packages/cultcache-py -e packages/cultnet-py -e packages/cultmesh-py
|
|
|
|
- name: Verify explicit reactive scheduling across runtimes
|
|
shell: pwsh
|
|
run: ./scripts/verify-reactive-document-scaling.ps1
|
|
|
|
- name: Measure representative reactive workload
|
|
shell: pwsh
|
|
run: ./scripts/measure-reactive-document-performance.ps1 -Quick -SkipRuntimeBuild
|
|
|
|
- name: Churn 100,000 distinct document leases
|
|
run: >-
|
|
dotnet test tests/GameCult.Mesh.Tests/GameCult.Mesh.Tests.csproj
|
|
--filter FullyQualifiedName~Document_OneHundredThousandDistinctLeaseCyclesLeaveNoResourcesOrCallbacks
|
|
--logger "console;verbosity=minimal"
|
|
|
|
# The TypeScript side of the CultMesh authority rules. This job is the
|
|
# only one that runs on both Windows and Linux for main, codex/** and
|
|
# pull requests: cultnet-interop.yml is windows-latest and main-only, so
|
|
# until these steps existed the shared verifier's tests never ran on
|
|
# Linux at all, and the browser client's never ran in CI on any OS.
|
|
# packages/cultnet-ts verifies both vector files; cultmesh-browser proves
|
|
# the browser client reads the shared rules rather than its own.
|
|
# No workflow ran cultcache-ts's tests, and its test script listed two files by hand while a third sat compiled
|
|
# and unrun. The wiring check fails when any TypeScript test file is run by no script, and the cache's own suite
|
|
# runs here beside the packages built on it.
|
|
- name: Check that every TypeScript test file is run by its package
|
|
run: node scripts/check-typescript-tests-wired.mjs
|
|
|
|
- name: Verify the CultCache document owner with the TypeScript cache
|
|
run: npm run test --workspace packages/cultcache-ts
|
|
|
|
- name: Verify the CultMesh authority rules with the TypeScript verifier
|
|
run: npm run test --workspace packages/cultnet-ts
|
|
|
|
- name: Verify the browser client against the shared TypeScript verifier
|
|
run: npm run test --workspace packages/cultmesh-browser
|
|
|
|
# The realtime frame codec. Its byte parity rests on two vector files,
|
|
# contracts/cultmesh/realtime-frame-vectors.json written by the C#
|
|
# reference and decoded by this step, and realtime-frame-vectors.ts-written.json
|
|
# written by this codec and decoded by the C# step below. Neither half ran
|
|
# in CI on any OS until these two steps existed, so a codec that agreed
|
|
# only with itself would have gone green.
|
|
- name: Verify the realtime frame codec with the TypeScript codec
|
|
run: npm run test --workspace packages/cultmesh-ts
|
|
|
|
# Both directions of the CultMesh authority vectors: the C#-written
|
|
# file (contracts/cultmesh/authority-route-vectors.json) and the
|
|
# TypeScript-signed file (authority-route-vectors.ts-signed.json) are
|
|
# verified by the C# reference here; the TypeScript side verifies both
|
|
# in the step above. CULTMESH_WRITE_VECTORS is never set in CI: the
|
|
# committed files are the contract.
|
|
- name: Verify the CultMesh authority vectors with the C# reference
|
|
run: >-
|
|
dotnet test tests/GameCult.Mesh.Tests/GameCult.Mesh.Tests.csproj
|
|
--filter FullyQualifiedName~AuthorityProof
|
|
--logger "console;verbosity=minimal"
|
|
|
|
# The other half of the frame parity: the C# reference decodes and
|
|
# re-encodes the vector file the TypeScript codec wrote. A fixture
|
|
# authored on one side alone would only agree with itself.
|
|
- name: Verify the realtime frame vectors with the C# reference
|
|
run: >-
|
|
dotnet test tests/GameCult.Mesh.Tests/GameCult.Mesh.Tests.csproj
|
|
--filter FullyQualifiedName~RealtimeWireProtocol
|
|
--logger "console;verbosity=minimal"
|