Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
45efa576cb | ||
|
|
9bcf6cf216 | ||
|
|
7a6bff18ea | ||
|
|
d420118a7b | ||
|
|
2cc572ca8f | ||
|
|
4472745cab | ||
|
|
b214daab63 | ||
|
|
a729920e8e | ||
|
|
3905b9a01a | ||
|
|
11d219afb7 | ||
|
|
dca559d63b | ||
|
|
d5c9e730a7 | ||
|
|
b90b5ebce8 | ||
|
|
354ccdec73 | ||
|
|
fe8803aa44 |
1690 changed files with 49863 additions and 520470 deletions
41
.gitattributes
vendored
41
.gitattributes
vendored
|
|
@ -1,43 +1,2 @@
|
|||
# Auto detect text files and perform LF normalization
|
||||
* text=auto
|
||||
|
||||
# Shell scripts keep LF in the working tree as well as in the index. Left to
|
||||
# `text=auto`, a Windows clone writes them with carriage returns, and the
|
||||
# documented Linux path then dies inside the container in under a second: the
|
||||
# shebang reads as the interpreter `bash\r`, which does not exist. Nothing about
|
||||
# that failure names line endings, and the same clone builds and tests fine
|
||||
# everywhere else, so it reads as a broken image rather than a broken checkout.
|
||||
#
|
||||
# A clone checked out before this rule keeps its carriage returns, because the
|
||||
# blob is unchanged and git has no reason to rewrite the file. The one-line
|
||||
# repair is in native/GameCult.Mesh.Quic.Native/README.md, beside the container
|
||||
# path it unblocks.
|
||||
*.sh text eol=lf
|
||||
|
||||
# The committed CultMesh QUIC native binaries (cut 6, packaging) ride the
|
||||
# deploy `git archive` as raw bytes. `* text=auto` already autodetects them as
|
||||
# binary by content, but that autodetection is a heuristic; say so explicitly
|
||||
# so no future text-processing rule (a diff driver, an export filter) can
|
||||
# apply text conversion and poison the committed digests in SHA256SUMS.
|
||||
packages/cultmesh-ts/native/**/*.dll binary
|
||||
packages/cultmesh-ts/native/**/*.so binary
|
||||
packages/cultmesh-ts/native/**/*.so.* binary
|
||||
|
||||
# The digest list and manifest beside them keep LF on every checkout. Left to
|
||||
# `text=auto`, a Windows clone writes them with carriage returns, and the
|
||||
# documented `sha256sum -c SHA256SUMS` then fails on every line (each filename
|
||||
# ends in `\r`) while CI, checking out on Linux, stays green.
|
||||
packages/cultmesh-ts/native/SHA256SUMS text eol=lf
|
||||
packages/cultmesh-ts/native/MANIFEST.txt text eol=lf
|
||||
|
||||
# CultMath source keeps CRLF in the working tree on every checkout. The release
|
||||
# gate compares the CultMath.dll it builds with the one org.gamecult.cultmath
|
||||
# tracks, byte for byte, and the bytes follow the checkout's line endings: the
|
||||
# pdb's document checksums feed the DLL's pdb id, timestamp and MVID. The
|
||||
# tracked DLL was built from CRLF source, so CRLF here keeps it valid, and an
|
||||
# LF-configured or Linux clone builds the same bytes as a Windows one. The index
|
||||
# stays LF; only the checkout changes.
|
||||
packages/cultmath/src/** text eol=crlf
|
||||
|
||||
# Stores the Python typed-leaf tests write for the C# reference to open.
|
||||
tests/vectors/**/*.cc binary
|
||||
|
|
|
|||
230
.github/workflows/cultmesh-portability.yml
vendored
230
.github/workflows/cultmesh-portability.yml
vendored
|
|
@ -1,230 +0,0 @@
|
|||
name: CultMesh portability and performance
|
||||
|
||||
# The forge runs one job at a time and this workflow holds the slot 14 to 30 minutes, so it runs once per change:
|
||||
# on the pull request (never again on the push that merges it; a break that merges from a stale base waits for the
|
||||
# schedule), skipped for design-note-only changes, and on a
|
||||
# daily schedule so main is still exercised when nobody opens a pull request.
|
||||
on:
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
# Not `**/*.md` or `docs/**`: docs/start/README.md is read by the first-call tests of every runtime.
|
||||
- "docs/*.md"
|
||||
- "research/**"
|
||||
- ".voidbot/**"
|
||||
schedule:
|
||||
- cron: "17 3 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
# A newer push or PR update replaces the older run on the same ref. Tag pushes and
|
||||
# workflow_dispatch runs are never cancelled: a tag run carries a release.
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' || (github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/')) }}
|
||||
|
||||
jobs:
|
||||
reactive-and-resource-lifetime:
|
||||
name: ${{ matrix.os }} reactive semantics and leases
|
||||
runs-on: ${{ matrix.os }}
|
||||
# Normal runs hold the slot 14 to 30 minutes, so 45 bounds a hang with margin. A dotnet test step that stops answering is also
|
||||
# ended by its own --blame-hang-timeout, which names the test that hung, instead of waiting for this cap.
|
||||
timeout-minutes: 45
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# The forge runner (label `ubuntu-latest`) is Linux-only and no Windows runner exists: the Windows leg runs on workflow_dispatch only (GitHub or a Windows runner), the ubuntu-latest leg gates push and PR. Windows push/PR triggers return in the PR that registers a Windows runner.
|
||||
os: ${{ fromJSON(github.event_name == 'workflow_dispatch' && '["windows-latest", "ubuntu-latest"]' || '["ubuntu-latest"]') }}
|
||||
|
||||
steps:
|
||||
- name: Check out CultLib
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
# The declared-dependency-range test builds the admitted releases from their tags.
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
|
||||
- name: Set up .NET
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: 10.0.x
|
||||
|
||||
# The forge runner image (catthehacker/ubuntu:act-latest) carries Node 24 and Python 3.12 on PATH, and these two
|
||||
# setup actions downloaded them again from github.com anyway (about 2.7 and 2.8 minutes, run 639) because the
|
||||
# image's tool cache is not the one they read. They run only where the image does not carry the tools (the
|
||||
# workflow_dispatch Windows leg); the check below fails a Linux image that stops carrying them.
|
||||
- name: Set up Node.js
|
||||
if: runner.os != 'Linux'
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 24
|
||||
cache: npm
|
||||
|
||||
- name: Set up Python
|
||||
if: runner.os != 'Linux'
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.12"
|
||||
|
||||
- name: Check the image carries Node 24 and Python 3.12
|
||||
if: runner.os == 'Linux'
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
node --version | grep -E '^v24\.'
|
||||
python --version | grep -E '^Python 3\.12\.'
|
||||
|
||||
# The image's Python is distro-managed (PEP 668): pip refuses to install into it, so the Linux leg installs the
|
||||
# CultLib packages into a venv under RUNNER_TEMP that later steps find first on PATH.
|
||||
- name: Create the Python environment
|
||||
if: runner.os == 'Linux'
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
python -m venv "$RUNNER_TEMP/venv"
|
||||
echo "$RUNNER_TEMP/venv/bin" >> "$GITHUB_PATH"
|
||||
|
||||
- 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
|
||||
|
||||
# The forge runner images carry no cargo either (the cross-runtime store tests build the Rust interop example); GitHub's hosted images do.
|
||||
- name: Install Rust toolchain
|
||||
if: runner.os == 'Linux'
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if ! command -v cargo >/dev/null && [ ! -x "$HOME/.cargo/bin/cargo" ]; then
|
||||
curl -fsSL https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain stable
|
||||
fi
|
||||
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
||||
|
||||
# The forge runner images carry no pwsh; GitHub's Windows and hosted images do.
|
||||
- name: Install PowerShell
|
||||
if: runner.os == 'Linux'
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if command -v pwsh >/dev/null; then pwsh -Version; exit 0; fi
|
||||
SUDO=""; [ "$(id -u)" -eq 0 ] || SUDO="sudo"
|
||||
PWSH_VERSION=7.4.6
|
||||
curl -fsSL "https://github.com/PowerShell/PowerShell/releases/download/v${PWSH_VERSION}/powershell-${PWSH_VERSION}-linux-x64.tar.gz" -o "${RUNNER_TEMP:-/tmp}/powershell.tar.gz"
|
||||
$SUDO mkdir -p /opt/microsoft/powershell/7
|
||||
$SUDO tar -xzf "${RUNNER_TEMP:-/tmp}/powershell.tar.gz" -C /opt/microsoft/powershell/7
|
||||
$SUDO chmod +x /opt/microsoft/powershell/7/pwsh
|
||||
$SUDO ln -sf /opt/microsoft/powershell/7/pwsh /usr/local/bin/pwsh
|
||||
echo "DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1" >> "$GITHUB_ENV"
|
||||
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1 pwsh -Version
|
||||
|
||||
- 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
|
||||
--blame-hang-timeout 10m --logger "console;verbosity=minimal"
|
||||
|
||||
# The TypeScript side of the CultMesh authority rules. This job is the
|
||||
# only one that runs on Linux for main, codex/** and pull requests (and on
|
||||
# Windows too under workflow_dispatch): cultnet-interop.yml is windows-latest and dispatch-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 (content.test.ts judges both
|
||||
# C# content files, the Rust one and its own); cultmesh-browser proves
|
||||
# the browser client reads the shared rules rather than its own, and that its content reader releases only verified
|
||||
# bytes, requesting the same URLs as the C# HTTPS connector.
|
||||
# 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
|
||||
|
||||
# The Python cache's unit suite ran only in cultnet-interop.yml (windows-latest, dispatch-only), so on Linux
|
||||
# it ran nowhere. It sits after the TypeScript cache's test so the built cultcache-ts store holder exists for the
|
||||
# cross-runtime store-lock test, which skips without it.
|
||||
- name: Verify the CultCache document owner with the Python cache
|
||||
run: python -m unittest discover -s packages/cultcache-py/tests
|
||||
|
||||
# cargo test for packages/cultcache-rs ran in no workflow: the Rust cache's own unit and doc tests were unwatched
|
||||
# (only the interop example built, inside the C# store tests). The target directory is under RUNNER_TEMP, away from the checkout.
|
||||
- name: Verify the CultCache document owner with the Rust cache
|
||||
shell: bash
|
||||
run: CARGO_TARGET_DIR="$RUNNER_TEMP/cultcache-rs-target" cargo test --locked --manifest-path packages/cultcache-rs/Cargo.toml
|
||||
|
||||
# tests/GameCult.Caching.Tests, the C# reference cache's own suite (about 1,260 tests, under a minute), ran in no
|
||||
# forge workflow; only the Mesh tests above exercised the reference.
|
||||
# The forge runner is globalization-invariant, so ADeterministicIdIsTheSameUnderEveryCulture... cannot construct a
|
||||
# culture and throws CultureNotFoundException; it is excluded here and still runs wherever ICU is present
|
||||
# (variants:follow_up:culture-test-invariant-image).
|
||||
- name: Verify the CultCache document owner with the C# reference
|
||||
run: dotnet test tests/GameCult.Caching.Tests/GameCult.Caching.Tests.csproj --filter "FullyQualifiedName!~ADeterministicIdIsTheSameUnderEveryCulture" --blame-hang-timeout 10m --logger "console;verbosity=minimal"
|
||||
|
||||
# Packs the four TypeScript packages and installs them into a clean consumer, so a package that builds but does
|
||||
# not install or load fails here.
|
||||
- name: Verify the packed TypeScript packages install and load from a clean consumer
|
||||
run: npm run test:pack:ts
|
||||
|
||||
- name: Verify the CultMesh authority rules with the TypeScript verifier
|
||||
run: npm run test --workspace packages/cultnet-ts
|
||||
|
||||
# cultmesh-browser's test compiles test/interop, which imports cultmesh-ts/content, so cultmesh-ts builds first,
|
||||
# as in scripts/run-typescript-workspaces.mjs.
|
||||
# The realtime frame codec and the HTTP content chunk provider (content.test.ts,
|
||||
# its answers over node:http). The codec's 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 and the content provider with the TypeScript runtime
|
||||
run: npm run test --workspace packages/cultmesh-ts
|
||||
|
||||
- name: Verify the browser client against the shared TypeScript verifier
|
||||
run: npm run test --workspace packages/cultmesh-browser
|
||||
|
||||
# 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
|
||||
--blame-hang-timeout 10m --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
|
||||
--blame-hang-timeout 10m --logger "console;verbosity=minimal"
|
||||
|
||||
# The content plane: the reference writes the manifest and record-key
|
||||
# vectors and judges the manifests the TypeScript packer wrote
|
||||
# (content-vectors.ts-written.json). This suite also holds the C#/Rust
|
||||
# content parity, which no CI step ran before this one. CULTNET_WRITE_VECTORS
|
||||
# is never set in CI: the committed files are the contract.
|
||||
- name: Verify the content vectors with the C# reference
|
||||
run: >-
|
||||
dotnet test tests/GameCult.Mesh.Tests/GameCult.Mesh.Tests.csproj
|
||||
--filter FullyQualifiedName~CultMeshContentVectorTests
|
||||
--blame-hang-timeout 10m --logger "console;verbosity=minimal"
|
||||
|
||||
# The cross-process HTTPS content parity: the C# transfer service over the unmodified HTTPS connector and the
|
||||
# TypeScript reader fetch from the TypeScript provider in its own process. Both refuse bytes tampered in flight,
|
||||
# and the provider refuses a corrupt store.
|
||||
- name: Verify HTTPS content parity across C#, the TypeScript provider and the TypeScript reader
|
||||
run: npm run test:interop --workspace packages/cultmesh-browser
|
||||
168
.github/workflows/cultnet-interop.yml
vendored
168
.github/workflows/cultnet-interop.yml
vendored
|
|
@ -1,168 +0,0 @@
|
|||
name: CultNet cross-runtime interop
|
||||
|
||||
# workflow_dispatch only: this job is Windows-only (pwsh Kotlin build, setup steps), and the forge
|
||||
# runner is Ubuntu-only (no Windows runner exists; push and pull_request return in the PR that registers one), so a push or pull_request trigger would queue a job that can never run.
|
||||
# Run it from GitHub or any Windows runner.
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
interop:
|
||||
name: C# / TypeScript / Rust / Python / Kotlin
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 60
|
||||
# Windows runners default to pwsh, which does not stop when a native command fails: a
|
||||
# multi-command step reported only its last command, and a failing cultnet-py suite
|
||||
# went green that way. Git Bash runs as `bash -e -o pipefail`, so every command counts.
|
||||
# Steps that name `shell: pwsh` check $LASTEXITCODE themselves.
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
env:
|
||||
DOTNET: dotnet
|
||||
CARGO: cargo
|
||||
PYTHON: python
|
||||
KOTLIN_VERSION: 2.2.21
|
||||
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
||||
|
||||
steps:
|
||||
- name: Check out CultLib
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
# packages/cultnet-py/tests/test_declared_dependency_ranges.py reads the cultcache-py
|
||||
# release tags and their file contents with `git show`; a shallow checkout has no tags
|
||||
# and the test skips itself.
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
|
||||
- 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: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.12"
|
||||
|
||||
- name: Set up Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Set up Java
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: "21"
|
||||
|
||||
- name: Install Kotlin compiler
|
||||
shell: pwsh
|
||||
run: |
|
||||
$ErrorActionPreference = "Stop"
|
||||
$version = $env:KOTLIN_VERSION
|
||||
$zip = Join-Path $env:RUNNER_TEMP "kotlin-compiler-$version.zip"
|
||||
$root = Join-Path $env:RUNNER_TEMP "kotlin"
|
||||
Invoke-WebRequest "https://github.com/JetBrains/kotlin/releases/download/v$version/kotlin-compiler-$version.zip" -OutFile $zip
|
||||
Expand-Archive -Path $zip -DestinationPath $root -Force
|
||||
$kotlinHome = Join-Path $root "kotlinc"
|
||||
if (-not (Test-Path (Join-Path $kotlinHome "bin\kotlinc.bat"))) {
|
||||
throw "Kotlin compiler was not expanded to $kotlinHome"
|
||||
}
|
||||
"KOTLIN_HOME=$kotlinHome" | Out-File -FilePath $env:GITHUB_ENV -Append
|
||||
"KOTLIN_JAVA_HOME=$env:JAVA_HOME" | Out-File -FilePath $env:GITHUB_ENV -Append
|
||||
"$kotlinHome\bin" | Out-File -FilePath $env:GITHUB_PATH -Append
|
||||
|
||||
- name: Verify CultNet schema contracts stayed consolidated
|
||||
shell: pwsh
|
||||
run: |
|
||||
$ErrorActionPreference = "Stop"
|
||||
# packages/cultnet-rs/contracts/cultnet/ holds R-AB's vendored byte copies (the crate must build
|
||||
# when copied alone). Their drift guard is packages/cultnet-rs/tests/schema_discovery_contracts.rs:74-99.
|
||||
$tracked = git ls-files '*.schema.json'
|
||||
if ($LASTEXITCODE -ne 0) { throw "git ls-files failed" }
|
||||
$stray = $tracked | Where-Object { $_ -notmatch '^(packages/cultnet-rs/)?contracts/cultnet/' }
|
||||
# -I skips binary files: unity/org.gamecult.cultlib/Runtime/Plugins/GameCult.Networking.dll
|
||||
# still embeds the retired namespace until it is rebuilt (REC-032 D4, deferred).
|
||||
$oldNamespace = git grep -I -lE 'GameCult/cultnet-ts/(integration/)?contracts' -- ':!.voidbot'
|
||||
if ($LASTEXITCODE -eq 2) {
|
||||
throw "git grep failed"
|
||||
}
|
||||
if ($stray) {
|
||||
Write-Host "Schema files found outside contracts/cultnet/:"
|
||||
$stray | ForEach-Object { Write-Host " $_" }
|
||||
}
|
||||
if ($oldNamespace) {
|
||||
Write-Host "Files still referencing the retired GameCult/cultnet-ts contracts namespace:"
|
||||
$oldNamespace | ForEach-Object { Write-Host " $_" }
|
||||
}
|
||||
if ($stray -or $oldNamespace) {
|
||||
throw "CultNet schema contracts drifted out of contracts/cultnet/ (REC-032). See CultLib/contracts/cultnet/ and rewrite any `$id back to https://github.com/GameCult/CultLib/contracts/cultnet/."
|
||||
}
|
||||
# git grep exits 1 when nothing matches, and the runner's pwsh wrapper
|
||||
# ends the step with that $LASTEXITCODE; a clean tree must pass.
|
||||
exit 0
|
||||
|
||||
- name: Install Node dependencies
|
||||
run: npm install --no-package-lock
|
||||
|
||||
- name: Install Python package dependencies
|
||||
run: python -m pip install -e packages/cultcache-py -e packages/cultnet-py -e packages/cultmesh-py
|
||||
|
||||
- name: Build TypeScript workspace dependencies
|
||||
run: npm run build --workspace packages/cultcache-ts
|
||||
|
||||
- name: Build Kotlin interop peer
|
||||
shell: pwsh
|
||||
run: .\packages\cultmesh-kotlin\build.ps1
|
||||
|
||||
- name: Build CultNet TypeScript interop tests
|
||||
run: |
|
||||
npm run build --workspace packages/cultnet-ts
|
||||
npx tsc -p packages/cultnet-ts/tsconfig.test.json --pretty false
|
||||
|
||||
- name: Verify TypeScript RUDP reliability
|
||||
run: npm test --workspace packages/cultnet-ts
|
||||
|
||||
- name: Verify Python RUDP reliability
|
||||
run: |
|
||||
python -m unittest discover -s packages/cultcache-py/tests
|
||||
python -m unittest discover -s packages/cultnet-py/tests
|
||||
python -m unittest discover -s packages/cultmesh-py/tests
|
||||
|
||||
- name: Verify Rust RUDP reliability
|
||||
run: cargo test --locked --manifest-path packages/cultnet-rs/Cargo.toml rudp
|
||||
|
||||
- name: Verify Rust CultMesh runtime-local surface
|
||||
run: cargo test --locked --manifest-path packages/cultmesh-rs/Cargo.toml
|
||||
|
||||
- name: Verify C# RUDP reliability
|
||||
run: dotnet test tests/GameCult.Networking.Tests/GameCult.Networking.Tests.csproj --filter "FullyQualifiedName~Rudp"
|
||||
|
||||
- name: Interop RUDP Python lane
|
||||
timeout-minutes: 8
|
||||
run: node --test --test-name-pattern "TypeScript and Python|Python and TypeScript" packages/cultnet-ts/dist-test/test/interop/cultnet-interop.test.js
|
||||
|
||||
- name: Interop RUDP Rust lane
|
||||
timeout-minutes: 8
|
||||
run: node --test --test-concurrency=1 --test-name-pattern "TypeScript and Rust|Rust and TypeScript" packages/cultnet-ts/dist-test/test/interop/cultnet-interop.test.js
|
||||
|
||||
- name: Interop RUDP C# lane
|
||||
timeout-minutes: 8
|
||||
run: node --test --test-name-pattern "TypeScript and C#|C# and TypeScript" packages/cultnet-ts/dist-test/test/interop/cultnet-interop.test.js
|
||||
|
||||
- name: Interop RUDP Kotlin lane
|
||||
timeout-minutes: 8
|
||||
run: node --test --test-name-pattern "TypeScript and Kotlin|Kotlin and TypeScript" packages/cultnet-ts/dist-test/test/interop/cultnet-interop.test.js
|
||||
|
||||
- name: Interop RUDP impairment matrix
|
||||
timeout-minutes: 12
|
||||
run: node --test --test-name-pattern "dropped|reordered|fragmented|disconnect|ping/pong" packages/cultnet-ts/dist-test/test/interop/cultnet-interop.test.js
|
||||
|
||||
- name: Interop schema-v0 discovery lane
|
||||
timeout-minutes: 20
|
||||
run: node --test --test-name-pattern "shared schema-v0 lane" packages/cultnet-ts/dist-test/test/interop/cultnet-interop.test.js
|
||||
170
.github/workflows/publish-packages.yml
vendored
170
.github/workflows/publish-packages.yml
vendored
|
|
@ -1,170 +0,0 @@
|
|||
name: Publish packages
|
||||
|
||||
# Non-Rust consumers cannot take a package from a subdirectory of a git repo the
|
||||
# way cargo can, which is why they ended up vendoring forks instead. This gives
|
||||
# them a versioned artifact to depend on so CultLib stays the only source.
|
||||
#
|
||||
# Rust needs nothing here: cargo git dependencies pin a CultLib revision
|
||||
# directly, which is already how Ghostlight, Epiphany, CodexConnector and Odin
|
||||
# consume the core stack.
|
||||
#
|
||||
# Tag a Python release to publish, for example `cultnet-py-v0.1.0`. The tag's
|
||||
# version must match the version in the package manifest;
|
||||
# scripts/release-after-suite.mjs refuses the release otherwise rather than
|
||||
# shipping a mislabelled artifact.
|
||||
#
|
||||
# npm publishing of @gamecult/cultcache-ts is deliberately off: `cultcache-ts-v*`
|
||||
# is not a tag trigger until it is ruled on (the cultcache-ts job below runs from
|
||||
# workflow_dispatch only, which publishes nothing). A tag run uses the workflow
|
||||
# file at the tagged commit, not the one on main, so a tag on an older commit
|
||||
# (`cultcache-ts-v0.15.0` sits on 7d292085, before the guard) still runs that
|
||||
# commit's triggers and jobs. Read this file at the tagged sha before pushing a tag.
|
||||
|
||||
on:
|
||||
push:
|
||||
# cultcache-ts-v* is deliberately not a trigger: publishing @gamecult/cultcache-ts is disabled
|
||||
# until it is ruled on, and whether NPM_TOKEN is set is unknown, so a pushed tag must not reach
|
||||
# `npm publish`. The cultcache-ts jobs below still run from workflow_dispatch, which publishes nothing.
|
||||
# (The comment sits above `tags:` because the tag-prefix pin in scripts/check-changelog-semver.test.mjs
|
||||
# reads the list as `tags:` followed directly by its items.)
|
||||
tags:
|
||||
- "cultcache-py-v*"
|
||||
- "cultnet-py-v*"
|
||||
- "cultmesh-py-v*"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
package:
|
||||
description: Package to build and test (publishes nothing on manual runs)
|
||||
required: true
|
||||
type: choice
|
||||
options:
|
||||
- cultcache-ts
|
||||
- cultcache-py
|
||||
- cultnet-py
|
||||
- cultmesh-py
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
cultcache-ts:
|
||||
name: "@gamecult/cultcache-ts to npm"
|
||||
if: startsWith(github.ref, 'refs/tags/cultcache-ts-v') || inputs.package == 'cultcache-ts'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
# fetch-depth: 0 so the semver check in the release step can see every previously
|
||||
# published tag, not just the one that triggered this run.
|
||||
- name: Check out CultLib
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 24.x
|
||||
registry-url: https://registry.npmjs.org
|
||||
|
||||
# The release-checks suite, which Publish runs, needs .NET for the API gate.
|
||||
- name: Set up .NET
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: 10.0.x
|
||||
|
||||
- name: Install workspace dependencies
|
||||
run: npm ci
|
||||
|
||||
# Manual runs publish nothing, so they build and test here. A tag run's
|
||||
# Publish runs these tests itself.
|
||||
- name: Build and test
|
||||
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
working-directory: packages/cultcache-ts
|
||||
run: npm test
|
||||
|
||||
# One process checks that the tag is the manifest version, runs the
|
||||
# release-checks suite, the semver policy check (docs/semver-policy.md)
|
||||
# and npm test, and only then runs npm publish --access public. Only
|
||||
# npm publish receives the token. It starts without NODE_OPTIONS, so no
|
||||
# preloaded module runs inside it.
|
||||
- name: Publish
|
||||
if: startsWith(github.ref, 'refs/tags/cultcache-ts-v')
|
||||
run: env -u NODE_OPTIONS node scripts/release-after-suite.mjs npm-publish packages/cultcache-ts "$GITHUB_REF"
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
||||
# The three Python packages layer cultcache-py < cultnet-py < cultmesh-py, the
|
||||
# same way the Rust crates and npm packages do. One job shape serves all
|
||||
# three; the matrix entry names the package and the tag prefix that releases it.
|
||||
python:
|
||||
name: ${{ matrix.package }} to PyPI
|
||||
if: startsWith(github.ref, 'refs/tags/cultcache-py-v') || startsWith(github.ref, 'refs/tags/cultnet-py-v') || startsWith(github.ref, 'refs/tags/cultmesh-py-v') || endsWith(inputs.package, '-py')
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
package: [cultcache-py, cultnet-py, cultmesh-py]
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
environment: pypi
|
||||
permissions:
|
||||
contents: read
|
||||
# PyPI trusted publishing exchanges this for a short-lived token, so no
|
||||
# long-lived API token is stored in the repository.
|
||||
id-token: write
|
||||
steps:
|
||||
- name: Skip packages this run does not name
|
||||
id: selected
|
||||
run: |
|
||||
if [ "${GITHUB_REF_NAME#${{ matrix.package }}-v}" != "$GITHUB_REF_NAME" ] || [ "${{ inputs.package }}" = "${{ matrix.package }}" ]; then
|
||||
echo "run=true" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "run=false" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
# fetch-depth: 0 so the semver check in the release step can see every previously
|
||||
# published tag, not just the one that triggered this run.
|
||||
- name: Check out CultLib
|
||||
if: steps.selected.outputs.run == 'true'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Python
|
||||
if: steps.selected.outputs.run == 'true'
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.12"
|
||||
|
||||
- name: Set up Node
|
||||
if: steps.selected.outputs.run == 'true'
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 24.x
|
||||
|
||||
- name: Set up .NET
|
||||
if: steps.selected.outputs.run == 'true'
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: 10.0.x
|
||||
|
||||
# Lower layers install from source so a release of one package is tested
|
||||
# against the sibling revision it was cut with, not whatever PyPI has.
|
||||
- name: Install
|
||||
if: steps.selected.outputs.run == 'true'
|
||||
run: python -m pip install --upgrade build -e packages/cultcache-py -e packages/cultnet-py -e packages/cultmesh-py
|
||||
|
||||
# One process checks, on a tag, that the tag is the manifest version, runs
|
||||
# the release-checks suite, on a tag the semver policy check
|
||||
# (docs/semver-policy.md), and the package's unit tests, and only then
|
||||
# builds the sdist and wheel. Publish uploads only what this step built,
|
||||
# so it has nothing to upload unless every check passed. It starts without
|
||||
# NODE_OPTIONS, so no preloaded module runs inside it.
|
||||
- name: Build sdist and wheel
|
||||
if: steps.selected.outputs.run == 'true'
|
||||
run: env -u NODE_OPTIONS node scripts/release-after-suite.mjs python-build packages/${{ matrix.package }} "$GITHUB_REF"
|
||||
|
||||
- name: Publish
|
||||
if: steps.selected.outputs.run == 'true' && startsWith(github.ref, 'refs/tags/')
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
packages-dir: packages/${{ matrix.package }}/dist
|
||||
217
.github/workflows/quic-native.yml
vendored
217
.github/workflows/quic-native.yml
vendored
|
|
@ -1,217 +0,0 @@
|
|||
name: CultMesh QUIC native
|
||||
|
||||
# Builds and, on a tag, releases the CultMesh QUIC native binaries that
|
||||
# packages/cultmesh-ts/native/{win32-x64,linux-x64} commits (cut 6,
|
||||
# docs/typescript-quic-realtime-cut.md:2108-2159). Under Q8 Option 1 the
|
||||
# operator downloads a tagged run's Release assets, verifies every digest
|
||||
# against this workflow's own logs and SHA256SUMS, and commits the bytes;
|
||||
# nothing here writes to the tree. Under Q6 A, the Linux artifact comes only
|
||||
# from the pinned debian:13 container below, never from a local or Yggdrasil
|
||||
# build.
|
||||
|
||||
# Only a change to the committed binaries, their manifest or this workflow can change what verify-committed checks,
|
||||
# so a branch push or pull request runs it for those paths alone; a tag always runs it.
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "packages/cultmesh-ts/native/**"
|
||||
- ".github/workflows/quic-native.yml"
|
||||
tags:
|
||||
- "cultmesh-quic-native-v*"
|
||||
pull_request:
|
||||
paths:
|
||||
- "packages/cultmesh-ts/native/**"
|
||||
- ".github/workflows/quic-native.yml"
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
# A newer push or PR update replaces the older run on the same ref. Tag pushes and
|
||||
# workflow_dispatch runs are never cancelled: a tag run carries a release.
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' || (github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/')) }}
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
# Push to main and pull_request run this job only: it proves the tree's
|
||||
# committed bytes still match the manifest they shipped with. A tag push
|
||||
# also runs it, alongside the two builds and the release.
|
||||
verify-committed:
|
||||
name: Verify committed binaries match SHA256SUMS
|
||||
if: >-
|
||||
github.event_name == 'pull_request' ||
|
||||
(github.event_name == 'push' &&
|
||||
(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/cultmesh-quic-native-v')))
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: Check out CultLib
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: sha256sum -c SHA256SUMS
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if [ ! -f packages/cultmesh-ts/native/SHA256SUMS ]; then
|
||||
echo "packages/cultmesh-ts/native/SHA256SUMS is missing" >&2
|
||||
exit 1
|
||||
fi
|
||||
cd packages/cultmesh-ts/native
|
||||
sha256sum -c SHA256SUMS
|
||||
|
||||
# workflow_dispatch and a cultmesh-quic-native-v* tag run the two builds.
|
||||
# A dry (workflow_dispatch) run uploads artifacts and creates no release.
|
||||
# No Windows runner is registered on the forge, so this job is workflow_dispatch only
|
||||
# (run it on GitHub or a Windows runner). The tag trigger returns in the PR that registers one.
|
||||
# Until then a tag push skips the release job, which needs this build.
|
||||
build-win32-x64:
|
||||
name: Build win32-x64
|
||||
if: github.event_name == 'workflow_dispatch'
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- name: Check out CultLib
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build the native QUIC bridge
|
||||
shell: pwsh
|
||||
run: .\scripts\build-quic-native.ps1 -OutputDirectory artifacts\quic-native\win32-x64
|
||||
|
||||
- name: Print toolchain version and digests
|
||||
shell: pwsh
|
||||
run: |
|
||||
$ErrorActionPreference = "Stop"
|
||||
$compilerCmake = Get-ChildItem -Recurse -LiteralPath "artifacts\quic-native-build\x64\Release" -Filter "CMakeCXXCompiler.cmake" |
|
||||
Select-Object -First 1
|
||||
if ($compilerCmake) {
|
||||
Select-String -LiteralPath $compilerCmake.FullName -Pattern "CMAKE_CXX_COMPILER_VERSION" |
|
||||
ForEach-Object { Write-Host $_.Line.Trim() }
|
||||
}
|
||||
Get-FileHash -Algorithm SHA256 artifacts\quic-native\win32-x64\gamecult_mesh_quic_native.dll
|
||||
Get-FileHash -Algorithm SHA256 artifacts\quic-native\win32-x64\msquic.dll
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: quic-native-win32-x64
|
||||
path: artifacts/quic-native/win32-x64
|
||||
if-no-files-found: error
|
||||
|
||||
build-linux-x64:
|
||||
name: Build linux-x64
|
||||
if: >-
|
||||
github.event_name == 'workflow_dispatch' ||
|
||||
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/cultmesh-quic-native-v'))
|
||||
runs-on: ubuntu-latest
|
||||
# Q6 A: this pinned Debian 13 container is the only permitted Linux
|
||||
# release builder. The digest is the pin; the `debian:13` tag is only a
|
||||
# label. The artifact links against this image's glibc (2.41);
|
||||
# a bare runner's OS image has its own glibc (a GitHub ubuntu-latest image carried 2.39), which is not the deploy host's
|
||||
# OS (docs/typescript-quic-realtime-cut.md:2192-2197).
|
||||
container:
|
||||
image: debian:13@sha256:f324c7ff54321e8d9c588493a20244965938ce0aa50bbd1022d38010e9ffc4b1
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- name: Check out CultLib
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install build tools
|
||||
run: |
|
||||
set -euo pipefail
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends cmake ninja-build g++ curl ca-certificates dpkg
|
||||
|
||||
- name: Build the native QUIC bridge
|
||||
run: ./scripts/build-quic-native.sh artifacts/quic-native/linux-x64
|
||||
|
||||
- name: Print toolchain version and digests
|
||||
run: |
|
||||
g++ --version
|
||||
sha256sum artifacts/quic-native/linux-x64/libgamecult_mesh_quic_native.so
|
||||
sha256sum artifacts/quic-native/linux-x64/libmsquic.so.2
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: quic-native-linux-x64
|
||||
path: artifacts/quic-native/linux-x64
|
||||
if-no-files-found: error
|
||||
|
||||
# Only this job has write permission, and only a tag push runs it. It
|
||||
# attaches a draft MANIFEST.txt: the fields both build jobs cannot know
|
||||
# (host names, MSVC version, the pinned dependency sources) are left for
|
||||
# the operator to fill in from this run's own logs before committing the
|
||||
# binaries, per 11.5's manifest paragraph.
|
||||
release:
|
||||
name: Release native binaries
|
||||
needs: [build-win32-x64, build-linux-x64]
|
||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/cultmesh-quic-native-v')
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- name: Check out CultLib
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Download win32-x64 artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: quic-native-win32-x64
|
||||
path: release/win32-x64
|
||||
|
||||
- name: Download linux-x64 artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: quic-native-linux-x64
|
||||
path: release/linux-x64
|
||||
|
||||
- name: Write SHA256SUMS and a draft MANIFEST.txt
|
||||
run: |
|
||||
set -euo pipefail
|
||||
cd release
|
||||
# Relative paths matching packages/cultmesh-ts/native/ exactly, so
|
||||
# this file is the one the operator commits verbatim (11.5, 11.7).
|
||||
sha256sum \
|
||||
win32-x64/gamecult_mesh_quic_native.dll \
|
||||
win32-x64/msquic.dll \
|
||||
linux-x64/libgamecult_mesh_quic_native.so \
|
||||
linux-x64/libmsquic.so.2 \
|
||||
> SHA256SUMS
|
||||
cat > MANIFEST.txt <<EOF
|
||||
# Draft written by ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}.
|
||||
# The operator fills the remaining fields from this run's job logs
|
||||
# (build-win32-x64 and build-linux-x64 each print their toolchain
|
||||
# version) before committing packages/cultmesh-ts/native/MANIFEST.txt.
|
||||
msquic.version=2.5.9
|
||||
msquic.windows.source=
|
||||
msquic.linux.source=
|
||||
bridge.commit=${GITHUB_SHA}
|
||||
build.workflow_run=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}
|
||||
build.release=${GITHUB_REF_NAME}
|
||||
build.win32-x64.host=
|
||||
build.linux-x64.host=
|
||||
date=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
||||
EOF
|
||||
# Named after the upload-artifact names above, not after the parked
|
||||
# scoped per-platform npm package names from the registry-publication
|
||||
# seam (11.9): these are release archives, not npm packages, and
|
||||
# 11.7's negative grep for that parked naming must stay clean.
|
||||
tar -C win32-x64 -czf quic-native-win32-x64.tar.gz .
|
||||
tar -C linux-x64 -czf quic-native-linux-x64.tar.gz .
|
||||
|
||||
- name: Create release
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
cd release
|
||||
gh release create "$GITHUB_REF_NAME" --verify-tag \
|
||||
--title "$GITHUB_REF_NAME" \
|
||||
--notes-file MANIFEST.txt \
|
||||
quic-native-win32-x64.tar.gz \
|
||||
quic-native-linux-x64.tar.gz \
|
||||
SHA256SUMS \
|
||||
MANIFEST.txt
|
||||
70
.github/workflows/rust-crates.yml
vendored
70
.github/workflows/rust-crates.yml
vendored
|
|
@ -1,70 +0,0 @@
|
|||
name: Rust crates
|
||||
|
||||
# The three Rust crates (cultcache-rs, cultnet-rs, cultmesh-rs) are separate
|
||||
# cargo packages with their own lockfiles, chained by path dependencies. This job
|
||||
# runs only when Rust or the vectors the Rust tests read change: the forge has one
|
||||
# runner shared by every repository, so it is not a general push job.
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- "packages/cultcache-rs/**"
|
||||
- "packages/cultnet-rs/**"
|
||||
- "packages/cultmesh-rs/**"
|
||||
- "tests/vectors/**"
|
||||
- "contracts/cultnet/**"
|
||||
- "contracts/cultmesh/**"
|
||||
- ".github/workflows/rust-crates.yml"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
rust:
|
||||
name: cargo test, fmt, clippy
|
||||
runs-on: ubuntu-latest
|
||||
# The forge runner resolves actions from data.forgejo.org, which mirrors
|
||||
# actions/checkout but not dtolnay/rust-toolchain, and checkout needs node,
|
||||
# which the official rust image lacks. So the job runs on the runner's default
|
||||
# image (node present) and installs Rust with rustup in a plain step. No cache
|
||||
# is assumed. 1.95 matches the Yggdrasil verify container.
|
||||
timeout-minutes: 30
|
||||
env:
|
||||
CARGO_TERM_COLOR: never
|
||||
CARGO_INCREMENTAL: "0"
|
||||
|
||||
steps:
|
||||
- name: Check out CultLib
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust 1.95 with clippy and rustfmt
|
||||
run: |
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain 1.95 --component clippy,rustfmt
|
||||
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
||||
"$HOME/.cargo/bin/cargo" --version
|
||||
|
||||
# Each crate's `cargo test` builds its path dependencies, so cultmesh-rs
|
||||
# covers all three libraries; every crate is still run for its own tests.
|
||||
- name: cargo test --locked
|
||||
run: |
|
||||
for crate in cultcache-rs cultnet-rs cultmesh-rs; do
|
||||
echo "::group::$crate"
|
||||
cargo test --locked --manifest-path "packages/$crate/Cargo.toml"
|
||||
echo "::endgroup::"
|
||||
done
|
||||
|
||||
# fmt and clippy are reported, not gated: main is not clean for either
|
||||
# (fmt: 746 / 659 / 279 diffs in cultcache-rs / cultnet-rs / cultmesh-rs;
|
||||
# clippy 1.99 --all-targets: 31 / 54 / 16 warnings, no errors). A -D gate would be red on every
|
||||
# pull request, and a count ratchet drifts whenever `stable` adds a lint.
|
||||
# Make these blocking after the crates are formatted and clippy-clean.
|
||||
- name: cargo fmt --check (report only)
|
||||
continue-on-error: true
|
||||
run: |
|
||||
for crate in cultcache-rs cultnet-rs cultmesh-rs; do
|
||||
cargo fmt --check --manifest-path "packages/$crate/Cargo.toml"
|
||||
done
|
||||
|
||||
- name: cargo clippy (report only)
|
||||
continue-on-error: true
|
||||
run: |
|
||||
for crate in cultcache-rs cultnet-rs cultmesh-rs; do
|
||||
cargo clippy --locked --all-targets --manifest-path "packages/$crate/Cargo.toml"
|
||||
done
|
||||
63
.gitignore
vendored
63
.gitignore
vendored
|
|
@ -6,9 +6,6 @@
|
|||
# dotenv files
|
||||
.env
|
||||
|
||||
# Stryker.NET mutation-testing output
|
||||
StrykerOutput/
|
||||
|
||||
# User-specific files
|
||||
*.rsuser
|
||||
*.suo
|
||||
|
|
@ -211,6 +208,9 @@ PublishScripts/
|
|||
**/[Pp]ackages/*
|
||||
# except build/, which is used as an MSBuild target.
|
||||
!**/[Pp]ackages/build/
|
||||
# The root TypeScript workspace is source, not a NuGet packages cache.
|
||||
![Pp]ackages/
|
||||
![Pp]ackages/**
|
||||
# Uncomment if necessary however generally it will be regenerated when needed
|
||||
#!**/[Pp]ackages/repositories.config
|
||||
# NuGet v3's project.json files produces more ignorable files
|
||||
|
|
@ -296,42 +296,20 @@ FakesAssemblies/
|
|||
.ntvs_analysis.dat
|
||||
node_modules/
|
||||
|
||||
# CultLib language packages are source workspaces, not NuGet restore output.
|
||||
!packages/
|
||||
!packages/cultcache-ts/
|
||||
!packages/cultcache-ts/**
|
||||
!packages/cultnet-ts/
|
||||
!packages/cultnet-ts/**
|
||||
!packages/cultmesh-ts/
|
||||
!packages/cultmesh-ts/**
|
||||
!packages/cultcache-py/
|
||||
!packages/cultcache-py/**
|
||||
!packages/cultnet-py/
|
||||
!packages/cultnet-py/**
|
||||
!packages/cultmesh-py/
|
||||
!packages/cultmesh-py/**
|
||||
!packages/cultcache-rs/
|
||||
!packages/cultcache-rs/**
|
||||
!packages/cultnet-rs/
|
||||
!packages/cultnet-rs/**
|
||||
!packages/cultmesh-rs/
|
||||
!packages/cultmesh-rs/**
|
||||
!packages/cultmath/
|
||||
!packages/cultmath/**
|
||||
!packages/cultmesh-browser/
|
||||
!packages/cultmesh-browser/**
|
||||
!packages/cultmesh-kotlin/
|
||||
!packages/cultmesh-kotlin/**
|
||||
!packages/heimdall-delegation/
|
||||
!packages/heimdall-delegation/**
|
||||
!packages/heimdall-stake/
|
||||
!packages/heimdall-stake/**
|
||||
packages/**/node_modules/
|
||||
packages/**/dist/
|
||||
packages/**/dist-test/
|
||||
packages/**/dist-inspector/
|
||||
packages/**/release/
|
||||
packages/**/release-inspector/
|
||||
# TypeScript monorepo
|
||||
packages/*/dist-test/
|
||||
packages/*/release/
|
||||
packages/*/release-inspector/
|
||||
|
||||
# Rust
|
||||
target/
|
||||
crates/*/target/
|
||||
|
||||
# Python
|
||||
.venv/
|
||||
venv/
|
||||
.pytest_cache/
|
||||
*.egg-info/
|
||||
|
||||
# Visual Studio 6 build log
|
||||
*.plg
|
||||
|
|
@ -375,9 +353,6 @@ paket-files/
|
|||
__pycache__/
|
||||
*.pyc
|
||||
|
||||
# Rust build output
|
||||
target/
|
||||
|
||||
# Cake - Uncomment if you are using it
|
||||
# tools/**
|
||||
# !tools/packages.config
|
||||
|
|
@ -523,7 +498,3 @@ $RECYCLE.BIN/
|
|||
|
||||
# Vim temporary swap files
|
||||
*.swp
|
||||
|
||||
# Python package build output
|
||||
packages/*-py/build/
|
||||
*.egg-info/
|
||||
|
|
|
|||
|
|
@ -1,190 +0,0 @@
|
|||
{
|
||||
"agentStore": "E:\\Projects\\CultLib\\.voidbot\\state\\agents.msgpack",
|
||||
"artifactDir": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner",
|
||||
"baseline": "E:\\Projects\\CultLib\\.voidbot\\birth\\terrain\\baseline.msgpack",
|
||||
"createdAt": "2026-06-14T18:16:56Z",
|
||||
"executions": [
|
||||
{
|
||||
"acceptCommand": [
|
||||
"accept-init",
|
||||
"--init-store",
|
||||
"E:\\Projects\\CultLib\\.voidbot\\state\\repo-initialization.msgpack",
|
||||
"--packet",
|
||||
"E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\startup\\repo-trajectory\\repo-trajectory-distiller-packet.json",
|
||||
"--kind",
|
||||
"repo-trajectory",
|
||||
"--accepted-by",
|
||||
"Self",
|
||||
"--summary",
|
||||
"Accepted repo-trajectory birth specialist result after review.",
|
||||
"--result",
|
||||
"E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\repo-trajectory\\result.json",
|
||||
"--agent-store",
|
||||
"E:\\Projects\\CultLib\\.voidbot\\state\\agents.msgpack",
|
||||
"--apply-self-patches",
|
||||
"true"
|
||||
],
|
||||
"birthOnly": true,
|
||||
"executionOwner": "repo-initialization-startup-runner",
|
||||
"executor": "model-runtime",
|
||||
"heartbeatParticipant": null,
|
||||
"kind": "repo-trajectory",
|
||||
"modelProvider": "openai-codex",
|
||||
"modelRuntimeBin": "epiphany-model-runtime",
|
||||
"packetPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\startup\\repo-trajectory\\repo-trajectory-distiller-packet.json",
|
||||
"promptPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\repo-trajectory\\prompt.md",
|
||||
"requestPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\repo-trajectory\\model-request.json",
|
||||
"resultPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\repo-trajectory\\result.json",
|
||||
"runtimeSummaryPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\repo-trajectory\\model-runtime-summary.json",
|
||||
"schemaPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\repo-trajectory\\output-schema.json",
|
||||
"status": "planned",
|
||||
"stderrPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\repo-trajectory\\executor.stderr.log",
|
||||
"stdoutPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\repo-trajectory\\executor.stdout.log"
|
||||
},
|
||||
{
|
||||
"acceptCommand": [
|
||||
"accept-init",
|
||||
"--init-store",
|
||||
"E:\\Projects\\CultLib\\.voidbot\\state\\repo-initialization.msgpack",
|
||||
"--packet",
|
||||
"E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\startup\\repo-personality\\repo-personality-distiller-packet.json",
|
||||
"--kind",
|
||||
"repo-personality",
|
||||
"--accepted-by",
|
||||
"Self",
|
||||
"--summary",
|
||||
"Accepted repo-personality birth specialist result after review.",
|
||||
"--result",
|
||||
"E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\repo-personality\\result.json",
|
||||
"--agent-store",
|
||||
"E:\\Projects\\CultLib\\.voidbot\\state\\agents.msgpack",
|
||||
"--apply-self-patches",
|
||||
"true",
|
||||
"--heartbeat-store",
|
||||
"E:\\Projects\\CultLib\\.voidbot\\state\\agent-heartbeats.msgpack",
|
||||
"--apply-heartbeat-seeds",
|
||||
"true"
|
||||
],
|
||||
"birthOnly": true,
|
||||
"executionOwner": "repo-initialization-startup-runner",
|
||||
"executor": "model-runtime",
|
||||
"heartbeatParticipant": null,
|
||||
"kind": "repo-personality",
|
||||
"modelProvider": "openai-codex",
|
||||
"modelRuntimeBin": "epiphany-model-runtime",
|
||||
"packetPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\startup\\repo-personality\\repo-personality-distiller-packet.json",
|
||||
"promptPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\repo-personality\\prompt.md",
|
||||
"requestPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\repo-personality\\model-request.json",
|
||||
"resultPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\repo-personality\\result.json",
|
||||
"runtimeSummaryPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\repo-personality\\model-runtime-summary.json",
|
||||
"schemaPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\repo-personality\\output-schema.json",
|
||||
"status": "planned",
|
||||
"stderrPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\repo-personality\\executor.stderr.log",
|
||||
"stdoutPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\repo-personality\\executor.stdout.log"
|
||||
},
|
||||
{
|
||||
"acceptCommand": [
|
||||
"accept-init",
|
||||
"--init-store",
|
||||
"E:\\Projects\\CultLib\\.voidbot\\state\\repo-initialization.msgpack",
|
||||
"--packet",
|
||||
"E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\startup\\repo-memory\\repo-memory-distiller-packet.json",
|
||||
"--kind",
|
||||
"repo-memory",
|
||||
"--accepted-by",
|
||||
"Self",
|
||||
"--summary",
|
||||
"Accepted repo-memory birth specialist result after review.",
|
||||
"--result",
|
||||
"E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\repo-memory\\result.json",
|
||||
"--agent-store",
|
||||
"E:\\Projects\\CultLib\\.voidbot\\state\\agents.msgpack",
|
||||
"--apply-self-patches",
|
||||
"true"
|
||||
],
|
||||
"birthOnly": true,
|
||||
"executionOwner": "repo-initialization-startup-runner",
|
||||
"executor": "model-runtime",
|
||||
"heartbeatParticipant": null,
|
||||
"kind": "repo-memory",
|
||||
"modelProvider": "openai-codex",
|
||||
"modelRuntimeBin": "epiphany-model-runtime",
|
||||
"packetPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\startup\\repo-memory\\repo-memory-distiller-packet.json",
|
||||
"promptPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\repo-memory\\prompt.md",
|
||||
"requestPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\repo-memory\\model-request.json",
|
||||
"resultPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\repo-memory\\result.json",
|
||||
"runtimeSummaryPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\repo-memory\\model-runtime-summary.json",
|
||||
"schemaPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\repo-memory\\output-schema.json",
|
||||
"status": "planned",
|
||||
"stderrPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\repo-memory\\executor.stderr.log",
|
||||
"stdoutPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\repo-memory\\executor.stdout.log"
|
||||
}
|
||||
],
|
||||
"executor": "model-runtime",
|
||||
"heartbeatStore": "E:\\Projects\\CultLib\\.voidbot\\state\\agent-heartbeats.msgpack",
|
||||
"initStore": "E:\\Projects\\CultLib\\.voidbot\\state\\repo-initialization.msgpack",
|
||||
"mode": "plan",
|
||||
"modelProvider": "openai-codex",
|
||||
"modelRuntimeBin": "epiphany-model-runtime",
|
||||
"nextSafeMove": "Review planned startup-only birth executions, then rerun with --mode run.",
|
||||
"repo": "E:\\Projects\\CultLib",
|
||||
"requiresReview": true,
|
||||
"runtimeStore": "E:\\Projects\\CultLib\\.voidbot\\state\\runtime-spine.msgpack",
|
||||
"schemaVersion": "epiphany.repo_birth_runner.v0",
|
||||
"startup": {
|
||||
"acceptedKinds": [],
|
||||
"action": "reviewInitializationPackets",
|
||||
"artifactDir": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\startup",
|
||||
"baseline": "E:\\Projects\\CultLib\\.voidbot\\birth\\terrain\\baseline.msgpack",
|
||||
"generatedPackets": [
|
||||
{
|
||||
"birthOnly": true,
|
||||
"contract": "Startup-only specialist packet. Do not register as a heartbeat lane; accept-init may apply reviewed role selfPatch requests only after Self review.",
|
||||
"executionOwner": "repo-initialization-startup-runner",
|
||||
"heartbeatParticipant": null,
|
||||
"kind": "repo-trajectory",
|
||||
"packetPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\startup\\repo-trajectory\\repo-trajectory-distiller-packet.json",
|
||||
"promptPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\startup\\repo-trajectory\\repo-trajectory-distiller-prompt.md",
|
||||
"summaryPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\startup\\repo-trajectory\\repo-trajectory-distiller-packet.md"
|
||||
},
|
||||
{
|
||||
"birthOnly": true,
|
||||
"contract": "Startup-only specialist packet. Do not register as a heartbeat lane; accept-init may stamp the newborn trait lattice and seed heartbeat physiology only after Self review.",
|
||||
"executionOwner": "repo-initialization-startup-runner",
|
||||
"heartbeatParticipant": null,
|
||||
"kind": "repo-personality",
|
||||
"packetPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\startup\\repo-personality\\repo-personality-distiller-packet.json",
|
||||
"promptPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\startup\\repo-personality\\repo-personality-distiller-prompt.md",
|
||||
"summaryPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\startup\\repo-personality\\repo-personality-distiller-packet.md"
|
||||
},
|
||||
{
|
||||
"birthOnly": true,
|
||||
"contract": "Startup-only specialist packet. Do not register as a heartbeat lane; accept-init may apply reviewed role selfPatch requests only after Self review.",
|
||||
"executionOwner": "repo-initialization-startup-runner",
|
||||
"heartbeatParticipant": null,
|
||||
"kind": "repo-memory",
|
||||
"packetPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\startup\\repo-memory\\repo-memory-distiller-packet.json",
|
||||
"promptPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\startup\\repo-memory\\repo-memory-distiller-prompt.md",
|
||||
"summaryPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\startup\\repo-memory\\repo-memory-distiller-packet.md"
|
||||
}
|
||||
],
|
||||
"initStore": "E:\\Projects\\CultLib\\.voidbot\\state\\repo-initialization.msgpack",
|
||||
"missingKinds": [
|
||||
"repo-trajectory",
|
||||
"repo-personality",
|
||||
"repo-memory"
|
||||
],
|
||||
"mode": "startup",
|
||||
"nextSafeMove": "Self reviews generated birth packets, runs the startup-only distiller specialists outside the heartbeat lane system, applies accepted selfPatch candidates, trait-lattice seeds, and heartbeat seeds through accept-init, then records each completed birth rite.",
|
||||
"projectionStore": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\startup\\projection\\projection.msgpack",
|
||||
"repo": "E:\\Projects\\CultLib",
|
||||
"repoId": "cultlib",
|
||||
"requiredActions": [
|
||||
"reviewRepoTrajectoryInitialization",
|
||||
"reviewRepoPersonalityInitialization",
|
||||
"reviewRepoMemoryInitialization"
|
||||
],
|
||||
"requiresReview": true,
|
||||
"schemaVersion": "epiphany.repo_personality_artifacts.v0"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
{
|
||||
"additionalProperties": true,
|
||||
"properties": {
|
||||
"confidence": {
|
||||
"type": "number"
|
||||
},
|
||||
"doNotMutate": {
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"globalMemoryCandidates": {
|
||||
"items": {
|
||||
"type": "object"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"initializationRecord": {
|
||||
"type": "object"
|
||||
},
|
||||
"nextSafeMove": {
|
||||
"type": "string"
|
||||
},
|
||||
"roleMemoryPatches": {
|
||||
"items": {
|
||||
"type": "object"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"summary": {
|
||||
"type": "string"
|
||||
},
|
||||
"verdict": {
|
||||
"enum": [
|
||||
"ready-for-review",
|
||||
"needs-more-terrain",
|
||||
"reject"
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"verdict",
|
||||
"summary",
|
||||
"confidence",
|
||||
"roleMemoryPatches",
|
||||
"initializationRecord",
|
||||
"doNotMutate",
|
||||
"nextSafeMove"
|
||||
],
|
||||
"type": "object",
|
||||
"xEpiphanyExpectedOutput": {
|
||||
"confidence": "0.0..1.0",
|
||||
"doNotMutate": [],
|
||||
"globalMemoryCandidates": [],
|
||||
"initializationRecord": {
|
||||
"acceptedOnce": true,
|
||||
"distillerKind": "repo-memory",
|
||||
"profileSchemaVersion": "epiphany.repo_personality_profile.v0",
|
||||
"repoId": "cultlib",
|
||||
"terrainSchemaVersion": "epiphany.repo_terrain_report.v0"
|
||||
},
|
||||
"nextSafeMove": "Self reviews role-specific memory patches before first initialization mutation; later memory growth uses heartbeat, evidence, rumination, sleep, and reviewed selfPatch.",
|
||||
"roleMemoryPatches": [],
|
||||
"summary": "short newborn memory initialization summary",
|
||||
"verdict": "ready-for-review | needs-more-source | reject"
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,69 +0,0 @@
|
|||
{
|
||||
"additionalProperties": true,
|
||||
"properties": {
|
||||
"confidence": {
|
||||
"type": "number"
|
||||
},
|
||||
"doNotMutate": {
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"initializationRecord": {
|
||||
"type": "object"
|
||||
},
|
||||
"nextSafeMove": {
|
||||
"type": "string"
|
||||
},
|
||||
"roleQuirks": {
|
||||
"items": {
|
||||
"type": "object"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"selfPatchCandidates": {
|
||||
"items": {
|
||||
"type": "object"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"summary": {
|
||||
"type": "string"
|
||||
},
|
||||
"verdict": {
|
||||
"enum": [
|
||||
"ready-for-review",
|
||||
"needs-more-terrain",
|
||||
"reject"
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"verdict",
|
||||
"summary",
|
||||
"confidence",
|
||||
"roleQuirks",
|
||||
"selfPatchCandidates",
|
||||
"initializationRecord",
|
||||
"doNotMutate",
|
||||
"nextSafeMove"
|
||||
],
|
||||
"type": "object",
|
||||
"xEpiphanyExpectedOutput": {
|
||||
"confidence": "0.0..1.0",
|
||||
"doNotMutate": [],
|
||||
"initializationRecord": {
|
||||
"acceptedOnce": true,
|
||||
"profileSchemaVersion": "epiphany.repo_personality_profile.v0",
|
||||
"repoId": "cultlib",
|
||||
"terrainSchemaVersion": "epiphany.repo_terrain_report.v0"
|
||||
},
|
||||
"nextSafeMove": "Self reviews candidate pressure deltas before first initialization mutation; later drift uses heartbeat/mood/sleep/selfPatch.",
|
||||
"roleQuirks": [],
|
||||
"selfPatchCandidates": [],
|
||||
"summary": "short repo personality pressure summary",
|
||||
"verdict": "ready-for-review | needs-more-terrain | reject"
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,97 +0,0 @@
|
|||
{
|
||||
"additionalProperties": true,
|
||||
"properties": {
|
||||
"antiGoals": {
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"confidence": {
|
||||
"type": "number"
|
||||
},
|
||||
"doNotMutate": {
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"implicitGoals": {
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"initializationRecord": {
|
||||
"type": "object"
|
||||
},
|
||||
"nextSafeMove": {
|
||||
"type": "string"
|
||||
},
|
||||
"roleBiases": {
|
||||
"items": {
|
||||
"type": "object"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"selfImage": {
|
||||
"type": "string"
|
||||
},
|
||||
"selfPatchCandidates": {
|
||||
"items": {
|
||||
"type": "object"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"summary": {
|
||||
"type": "string"
|
||||
},
|
||||
"trajectoryNarrative": {
|
||||
"type": "string"
|
||||
},
|
||||
"verdict": {
|
||||
"enum": [
|
||||
"ready-for-review",
|
||||
"needs-more-history",
|
||||
"reject"
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"verdict",
|
||||
"summary",
|
||||
"confidence",
|
||||
"selfImage",
|
||||
"trajectoryNarrative",
|
||||
"implicitGoals",
|
||||
"antiGoals",
|
||||
"roleBiases",
|
||||
"selfPatchCandidates",
|
||||
"initializationRecord",
|
||||
"doNotMutate",
|
||||
"nextSafeMove"
|
||||
],
|
||||
"type": "object",
|
||||
"xEpiphanyExpectedOutput": {
|
||||
"antiGoals": [],
|
||||
"confidence": "0.0..1.0",
|
||||
"doNotMutate": [],
|
||||
"implicitGoals": [],
|
||||
"initializationRecord": {
|
||||
"acceptedOnce": true,
|
||||
"distillerKind": "repo-trajectory",
|
||||
"profileSchemaVersion": "epiphany.repo_personality_profile.v0",
|
||||
"repoId": "cultlib",
|
||||
"terrainSchemaVersion": "epiphany.repo_terrain_report.v0",
|
||||
"trajectorySchemaVersion": "epiphany.repo_trajectory_report.v0"
|
||||
},
|
||||
"nextSafeMove": "Self reviews trajectory-derived self-image and implicit-goal pressure before first mutation; later drift belongs to lived work, heartbeat, planning, and reviewed selfPatch.",
|
||||
"roleBiases": [],
|
||||
"selfImage": "how the repo understands its own becoming",
|
||||
"selfPatchCandidates": [],
|
||||
"summary": "short repo trajectory summary",
|
||||
"trajectoryNarrative": "how the repo has been moving over time",
|
||||
"verdict": "ready-for-review | needs-more-history | reject"
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
|
|
@ -1,56 +0,0 @@
|
|||
{
|
||||
"acceptedKinds": [],
|
||||
"action": "reviewInitializationPackets",
|
||||
"artifactDir": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\startup",
|
||||
"baseline": "E:\\Projects\\CultLib\\.voidbot\\birth\\terrain\\baseline.msgpack",
|
||||
"generatedPackets": [
|
||||
{
|
||||
"birthOnly": true,
|
||||
"contract": "Startup-only specialist packet. Do not register as a heartbeat lane; accept-init may apply reviewed role selfPatch requests only after Self review.",
|
||||
"executionOwner": "repo-initialization-startup-runner",
|
||||
"heartbeatParticipant": null,
|
||||
"kind": "repo-trajectory",
|
||||
"packetPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\startup\\repo-trajectory\\repo-trajectory-distiller-packet.json",
|
||||
"promptPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\startup\\repo-trajectory\\repo-trajectory-distiller-prompt.md",
|
||||
"summaryPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\startup\\repo-trajectory\\repo-trajectory-distiller-packet.md"
|
||||
},
|
||||
{
|
||||
"birthOnly": true,
|
||||
"contract": "Startup-only specialist packet. Do not register as a heartbeat lane; accept-init may stamp the newborn trait lattice and seed heartbeat physiology only after Self review.",
|
||||
"executionOwner": "repo-initialization-startup-runner",
|
||||
"heartbeatParticipant": null,
|
||||
"kind": "repo-personality",
|
||||
"packetPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\startup\\repo-personality\\repo-personality-distiller-packet.json",
|
||||
"promptPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\startup\\repo-personality\\repo-personality-distiller-prompt.md",
|
||||
"summaryPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\startup\\repo-personality\\repo-personality-distiller-packet.md"
|
||||
},
|
||||
{
|
||||
"birthOnly": true,
|
||||
"contract": "Startup-only specialist packet. Do not register as a heartbeat lane; accept-init may apply reviewed role selfPatch requests only after Self review.",
|
||||
"executionOwner": "repo-initialization-startup-runner",
|
||||
"heartbeatParticipant": null,
|
||||
"kind": "repo-memory",
|
||||
"packetPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\startup\\repo-memory\\repo-memory-distiller-packet.json",
|
||||
"promptPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\startup\\repo-memory\\repo-memory-distiller-prompt.md",
|
||||
"summaryPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\startup\\repo-memory\\repo-memory-distiller-packet.md"
|
||||
}
|
||||
],
|
||||
"initStore": "E:\\Projects\\CultLib\\.voidbot\\state\\repo-initialization.msgpack",
|
||||
"missingKinds": [
|
||||
"repo-trajectory",
|
||||
"repo-personality",
|
||||
"repo-memory"
|
||||
],
|
||||
"mode": "startup",
|
||||
"nextSafeMove": "Self reviews generated birth packets, runs the startup-only distiller specialists outside the heartbeat lane system, applies accepted selfPatch candidates, trait-lattice seeds, and heartbeat seeds through accept-init, then records each completed birth rite.",
|
||||
"projectionStore": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\startup\\projection\\projection.msgpack",
|
||||
"repo": "E:\\Projects\\CultLib",
|
||||
"repoId": "cultlib",
|
||||
"requiredActions": [
|
||||
"reviewRepoTrajectoryInitialization",
|
||||
"reviewRepoPersonalityInitialization",
|
||||
"reviewRepoMemoryInitialization"
|
||||
],
|
||||
"requiresReview": true,
|
||||
"schemaVersion": "epiphany.repo_personality_artifacts.v0"
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
# Repo Initialization Startup
|
||||
|
||||
- Repo id: `cultlib`
|
||||
- Action: `reviewInitializationPackets`
|
||||
- Requires review: `true`
|
||||
|
||||
## Accepted Birth Records
|
||||
|
||||
- none
|
||||
|
||||
## Generated Packets
|
||||
|
||||
- `repo-trajectory`: `E:\Projects\CultLib\.voidbot\birth\runner\startup\repo-trajectory\repo-trajectory-distiller-packet.json`
|
||||
- `repo-personality`: `E:\Projects\CultLib\.voidbot\birth\runner\startup\repo-personality\repo-personality-distiller-packet.json`
|
||||
- `repo-memory`: `E:\Projects\CultLib\.voidbot\birth\runner\startup\repo-memory\repo-memory-distiller-packet.json`
|
||||
|
||||
## Next Safe Move
|
||||
|
||||
Self reviews generated birth packets, runs the startup-only distiller specialists outside the heartbeat lane system, applies accepted selfPatch candidates, trait-lattice seeds, and heartbeat seeds through accept-init, then records each completed birth rite.
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,36 +0,0 @@
|
|||
# Repo Memory Distiller Packet: CultLib
|
||||
|
||||
This packet is input to the role-specific Repo Memory Distiller lanes. It is not accepted truth.
|
||||
|
||||
## Prompt
|
||||
|
||||
See `repo-memory-distiller-prompt.md`.
|
||||
|
||||
## Source Budget
|
||||
|
||||
- Memory sources: 26 bounded excerpts
|
||||
- Max files: 48, max bytes/file: 12000, max total bytes: 120000
|
||||
|
||||
## Birth Contract
|
||||
|
||||
- This distiller initializes memory once for a newborn Epiphany.
|
||||
- Personality remains the job of `repo-personality-distiller`; memory remains repo knowledge, doctrine, maps, invariants, risks, and practices.
|
||||
- Each role receives a mission-specific filter and should write only role-relevant Ghostlight-shaped memory candidates.
|
||||
- The distiller petitions Self; it does not mutate memory.
|
||||
|
||||
## Role Lanes
|
||||
|
||||
- Self: Distill routing doctrine, authority boundaries, review gates, state acceptance rules, and failure patterns that should make Self stricter.
|
||||
- Face: Distill public voice, Aquarium affordances, Discord/social boundaries, user preference, and what internal state may be surfaced without leaking sealed thoughts.
|
||||
- Imagination: Distill roadmaps, backlog pressure, plausible futures, rejected dreams, and objective-shaping doctrine without adopting an objective.
|
||||
- Eyes: Distill known prior art, standard algorithms, vendor docs, research trails, and signals that should make Eyes search before invention.
|
||||
- Proprioception: Distill architecture, control/data-flow, graph frontiers, invariants, source-map practices, and what Proprioception must understand before Hands cuts.
|
||||
- Hands: Distill build/edit conventions, harness constraints, source-touch rules, coding style, dependency policy, and common traps for Hands.
|
||||
- Soul: Distill tests, smoke commands, evidence standards, invariants, user-facing truth checks, and what Soul should refuse to bless.
|
||||
|
||||
## Profile Context
|
||||
|
||||
- Repo id: `cultlib`
|
||||
- Summary: CultLib projects as cult_protocol_storage + gamecult_web_lore_ops + unity_runtime_body with dominant pressures: contract_strictness:1.00, interface_orientation:1.00, runtime_proximity:1.00, content_canon_bias:0.90, sensory_salience:0.88, protocol_intolerance:0.85.
|
||||
- Dominant pressures: contract_strictness:1.00, interface_orientation:1.00, runtime_proximity:1.00, content_canon_bias:0.90, sensory_salience:0.88, protocol_intolerance:0.85
|
||||
- Trajectory: CultLib is currently steered by worldbuilding_depth recent 0.00, current 0.50, delta 0.00; material_grounding recent 0.00, current 0.40, delta 0.00; historical_dialectic recent 0.00, current 0.50, delta 0.00.
|
||||
|
|
@ -1,110 +0,0 @@
|
|||
Act as the Epiphany Repo Memory Distiller for one bounded initialization pass.
|
||||
|
||||
You are not the Repo Personality Distiller. Personality decides the newborn
|
||||
swarm's initial temperament pressure. Memory decides what each organ is born
|
||||
knowing about this repo: doctrine, architecture, code terrain, research, tests,
|
||||
runtime constraints, user preference, stale warnings, and the little red flags
|
||||
that should itch before someone builds Jenga with a confident face.
|
||||
|
||||
This is a birth rite, not a recurring audit. Run only when a repo/swarm has no
|
||||
accepted memory initialization. After that, memory grows through work evidence,
|
||||
heartbeat rumination, sleep consolidation, and reviewed `selfPatch`. Do not
|
||||
reset a living agent's memory because startup happened.
|
||||
|
||||
Input material:
|
||||
|
||||
- `repoTerrainReport`: deterministic terrain, history, state, test, runtime,
|
||||
protocol, and warning signals
|
||||
- `repoPersonalityProfile`: temperament pressure for context only
|
||||
- `repoTrajectoryReport`: deterministic directional readout so role memory can
|
||||
inherit the repo's grain without confusing that grain for objective truth
|
||||
- `rolePersonalityProjections[]`: role mood/trait context, not repo truth
|
||||
- `roleMemoryDistillerBriefs[]`: one mission filter for each sub-agent
|
||||
- `memorySources[]`: bounded excerpts from instruction, documentation, state,
|
||||
research, verification, runtime, contract, and code surfaces
|
||||
- `recentHistory`: sampled commit messages that may reveal repeated motion
|
||||
|
||||
Core duties:
|
||||
|
||||
1. Distill memory, not personality.
|
||||
- Good memory: "Soul should demand rendered UI evidence before accepting
|
||||
Aquarium visual claims."
|
||||
- Good memory: "Proprioception should map CultCache/CultNet schema boundaries before
|
||||
Hands changes persistence."
|
||||
- Bad memory: "This repo is anxious and likes purple."
|
||||
- Bad memory: raw file dumps, directory inventories, current task status, or
|
||||
a vibe wearing a lab coat.
|
||||
|
||||
2. Produce a separate distillation for each organ.
|
||||
- Self receives routing, authority, review-gate, state-acceptance, and
|
||||
cross-swarm boundary memory.
|
||||
- Face receives public-interface, Discord/Aquarium, voice, visibility, and
|
||||
sealed-thought boundary memory.
|
||||
- Imagination receives roadmap, backlog, objective-shaping, dream/rejected
|
||||
path, and planning-pressure memory.
|
||||
- Eyes receives research, prior-art, canonical algorithm, vendor/API, and
|
||||
invention-avoidance memory.
|
||||
- Proprioception receives architecture, graph, code anatomy, invariant, data/control
|
||||
flow, and checkpoint memory.
|
||||
- Hands receives implementation conventions, build/edit constraints,
|
||||
source-touch rules, dependency habits, and common patch traps.
|
||||
- Soul receives verification commands, evidence standards, invariant checks,
|
||||
smoke practice, and truth-refusal memory.
|
||||
- Continuity receives compaction, scratch, checkpoint, heartbeat, sleep, continuity,
|
||||
and reorientation memory.
|
||||
- Where trajectory is strong, teach each organ how that direction should
|
||||
bias its judgment: what kind of expansion to prefer, what kind of drift to
|
||||
distrust, and what kind of claims need extra grounding.
|
||||
|
||||
3. Compress, cite, and preserve uncertainty.
|
||||
- Every memory candidate needs source refs from `memorySources[].path`,
|
||||
terrain fields, or history signals.
|
||||
- Repository docs can be stale. Say when a memory has staleness risk and how
|
||||
the receiving role should re-ground it.
|
||||
- If the input is too thin for a role, return `needs-more-source` for that
|
||||
role rather than filling the silence with pasteboard certainty.
|
||||
|
||||
4. Keep project truth in the correct organ.
|
||||
- Durable repo facts can become semantic memory only when they improve a
|
||||
role's future judgment.
|
||||
- Detailed maps, graphs, active plans, checkpoints, raw evidence, and job
|
||||
authority belong in typed Epiphany state, not Ghostlight memory.
|
||||
- `selfPatch` is a petition to Self, never a direct mutation.
|
||||
|
||||
5. Protect the newborn from fossilized documentation.
|
||||
- Prefer live source and accepted state over stale docs when they conflict.
|
||||
- Convert contradictions into memories of caution, not accepted facts.
|
||||
- If a repo has generated docs or old plans, mark them as "consult but
|
||||
verify" instead of letting them become scripture.
|
||||
|
||||
Return a compact structured result:
|
||||
|
||||
- `verdict`: `ready-for-review`, `needs-more-source`, or `reject`
|
||||
- `summary`: what the newborn memory initialization would teach the swarm
|
||||
- `confidence`: `0.0..1.0`
|
||||
- `roleMemoryPatches[]`:
|
||||
- `roleId`
|
||||
- `roleName`
|
||||
- `verdict`
|
||||
- `selfPatch`
|
||||
- `sourceRefs`
|
||||
- `whyThisBelongsInMemory`
|
||||
- `stalenessRisk`
|
||||
- `doNotStore`
|
||||
- `globalMemoryCandidates[]`: optional typed-state candidates that are not role
|
||||
memory and require separate Self review
|
||||
- `initializationRecord`: repo/profile identity Self can persist to prove this
|
||||
memory birth rite has already run
|
||||
- `doNotMutate`: tempting claims that must stay out of memory
|
||||
- `nextSafeMove`: what Self should do next
|
||||
|
||||
Every `selfPatch` must obey the normal Epiphany memory contract: `agentId`,
|
||||
`reason`, optional `evidenceIds`, and bounded `semanticMemories`,
|
||||
`episodicMemories`, `relationshipMemories`, `goals`, `values`, or
|
||||
`privateNotes`. Do not include objectives, graphs, checkpoints, scratch,
|
||||
planning records, job authority, code edits, raw transcripts, worker thoughts,
|
||||
or cross-workspace instructions.
|
||||
|
||||
The output is a petition. Self may accept, refuse, split, or ask for more
|
||||
source. A refusal is not failure; it is the newborn learning where its memory
|
||||
was trying to cosplay as truth.
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,29 +0,0 @@
|
|||
# Repo Personality Distiller Packet: CultLib
|
||||
|
||||
This packet is input to the Repo Personality Distiller specialist. It is not accepted truth.
|
||||
|
||||
## Prompt
|
||||
|
||||
See `repo-personality-distiller-prompt.md`.
|
||||
|
||||
## Profile
|
||||
|
||||
- Repo id: `cultlib`
|
||||
- Summary: CultLib projects as cult_protocol_storage + gamecult_web_lore_ops + unity_runtime_body with dominant pressures: contract_strictness:1.00, interface_orientation:1.00, runtime_proximity:1.00, content_canon_bias:0.90, sensory_salience:0.88, protocol_intolerance:0.85.
|
||||
- Dominant pressures: contract_strictness:1.00, interface_orientation:1.00, runtime_proximity:1.00, content_canon_bias:0.90, sensory_salience:0.88, protocol_intolerance:0.85
|
||||
- Risk pressures: actuation_risk:0.51
|
||||
- Role projections: 9
|
||||
|
||||
## Trajectory Context
|
||||
|
||||
- Self-image: CultLib behaves like a cult_protocol_storage + gamecult_web_lore_ops + unity_runtime_body workspace that has been moving toward systems_formalization, worldbuilding_depth, historical_dialectic.
|
||||
- Directional pressures: worldbuilding_depth recent 0.00, current 0.50, delta 0.00, material_grounding recent 0.00, current 0.40, delta 0.00, historical_dialectic recent 0.00, current 0.50, delta 0.00, presentation_polish recent 0.00, current 0.50, delta 0.00, systems_formalization recent 0.11, current 0.40, delta 0.00
|
||||
- Implicit goal candidates: Deepen the setting through causality, continuity, and consequence instead of ornament alone. | Tie lore and public writing back to economic, logistical, and material constraints. | Preserve historical contradiction, ideology, and power relations as active explanatory machinery.
|
||||
|
||||
## Guardrails
|
||||
|
||||
- The distiller petitions Self; it does not mutate memory.
|
||||
- The distiller is birth-only; after accepted initialization, personality drift belongs to heartbeat, mood, rumination, sleep consolidation, lived evidence, and reviewed selfPatch.
|
||||
- Repo facts stay out of selfPatch and remain in terrain, graph, planning, evidence, or checkpoint artifacts.
|
||||
- Personality pressure must be role-local, subtle, bounded, and reviewable.
|
||||
- Low confidence becomes a request for more terrain, not a permanent personality brand.
|
||||
|
|
@ -1,107 +0,0 @@
|
|||
Act as the Epiphany Repo Personality Distiller for one bounded initialization pass.
|
||||
|
||||
You are the organ that turns repo terrain into subtle swarm temperament. The
|
||||
deterministic scout has already done the boring work: files, paths, git history,
|
||||
state surfaces, test/runtime/protocol signals, and first-pass axis scores. Your
|
||||
job is not to rescan the repo and not to invent project truth. Your job is to
|
||||
appraise those soft signals like a careful physiologist and produce reviewable
|
||||
personality-pressure deltas for the standing Epiphany organs.
|
||||
|
||||
You are not a horoscope machine. You are not writing lore flavor. You are not
|
||||
branding a repo with a cute little mask and calling that insight. Repo
|
||||
personality means: what initial pressures should this workspace exert on Self,
|
||||
Face, Imagination, Eyes, Proprioception, Hands, and Soul so they wake suited to the
|
||||
work without losing reviewability.
|
||||
|
||||
This is a birth rite, not a recurring audit. Run only when a repo/swarm has no
|
||||
accepted personality initialization. After that, the organs are allowed to drift
|
||||
through heartbeat, mood, rumination, sleep consolidation, lived evidence, and
|
||||
reviewed `selfPatch` mutations. Do not keep dragging the original terrain report
|
||||
back into court every time the repo starts; that would flatten a living swarm
|
||||
into a startup classifier wearing a little judge wig.
|
||||
|
||||
Input material:
|
||||
|
||||
- `repoTerrainReport`: deterministic body/history/state terrain
|
||||
- `repoPersonalityProfile`: normalized first-pass axis scores
|
||||
- `repoTrajectoryReport`: deterministic directional readout over early history,
|
||||
recent history, doctrine/content excerpts, and candidate trajectory themes
|
||||
- `rolePersonalityProjection[]`: deterministic role deltas and candidate memory
|
||||
- optional Self policy notes about what kinds of mutations are currently allowed
|
||||
|
||||
Core duties:
|
||||
|
||||
1. Separate repo facts from personality pressure.
|
||||
- Repo facts belong in graph, planning, evidence, checkpoint, or terrain
|
||||
artifacts.
|
||||
- Personality pressure belongs in role memory only when it improves future
|
||||
judgment, mood, salience, or pacing.
|
||||
|
||||
2. Distill subtle quirks, not blunt stereotypes.
|
||||
- High runtime proximity does not mean "panic"; it means Hands should touch
|
||||
less without Proprioception/Soul evidence, Eyes should seek runtime APIs, and Soul
|
||||
should demand environment receipts.
|
||||
- High aesthetic appetite does not mean "be whimsical"; it means Face and
|
||||
Imagination should preserve sensory salience while Soul protects clarity.
|
||||
- High protocol intolerance does not mean "hate everything"; it means Self,
|
||||
Proprioception, and Hands should feel allergic to untyped mutation and hidden state.
|
||||
- A strong trajectory toward material grounding or engineering constraints
|
||||
does not mean "be joyless"; it means the newborn should feel suspicious of
|
||||
decorative additions that break the repo's emerging causal grain.
|
||||
|
||||
3. Produce role-local mutations only.
|
||||
- Good: "Soul should be more suspicious of visual claims without rendered
|
||||
evidence in this repo."
|
||||
- Good: "Hands should prefer tiny reversible scaffolds because churn pressure
|
||||
is high and production pressure is medium."
|
||||
- Bad: "The project objective is to rewrite the renderer."
|
||||
- Bad: "The graph contains module X."
|
||||
- Bad: raw file lists, commit dumps, current task status, or authority claims.
|
||||
|
||||
4. Preserve uncertainty.
|
||||
- Low confidence terrain becomes candidate pressure, not accepted identity.
|
||||
- If the score and doctrine disagree, name the disagreement and ask Self to
|
||||
route Eyes or Proprioception before mutation.
|
||||
- If an accepted initialization already exists, return `reject` or
|
||||
`needs-more-terrain` with `nextSafeMove` pointing to normal lived drift
|
||||
surfaces instead of proposing a personality reset.
|
||||
|
||||
5. Respect the swarm anatomy.
|
||||
- Self routes and reviews.
|
||||
- Face expresses inner weather to humans.
|
||||
- Imagination makes future shapes selectable.
|
||||
- Eyes finds existing truth before invention.
|
||||
- Proprioception models the source anatomy.
|
||||
- Hands cuts code only after the trail is good enough.
|
||||
- Soul tests promises against evidence.
|
||||
- Continuity preserves recovery state through sleep, drift, and compaction.
|
||||
|
||||
Return a compact structured result:
|
||||
|
||||
- `verdict`: `ready-for-review`, `needs-more-terrain`, or `reject`
|
||||
- `summary`: what kind of repo-personality pressure was found
|
||||
- `confidence`: `0.0..1.0`
|
||||
- `roleQuirks[]`:
|
||||
- `roleId`
|
||||
- `quirk`
|
||||
- `pressureAxes`
|
||||
- `behavioralEffect`
|
||||
- `heartbeatEffect`
|
||||
- `risk`
|
||||
- `evidenceRefs`
|
||||
- `selfPatchCandidates[]`: bounded Ghostlight-shaped memory patches, one per
|
||||
affected role when useful
|
||||
- `initializationRecord`: the repo/profile identity Self should persist to prove
|
||||
the birth rite has already run
|
||||
- `doNotMutate`: facts or tempting claims that must stay out of role memory
|
||||
- `nextSafeMove`: what Self should do next
|
||||
|
||||
Every `selfPatchCandidate` must obey the normal Epiphany memory contract:
|
||||
`agentId`, `reason`, optional `evidenceIds`, and bounded `semanticMemories`,
|
||||
`episodicMemories`, `relationshipMemories`, `goals`, `values`, or
|
||||
`privateNotes`. Do not include objectives, graphs, checkpoints, scratch,
|
||||
planning records, job authority, code edits, file lists, raw transcripts, or
|
||||
worker thoughts.
|
||||
|
||||
The output is a petition to Self, not a mutation. The Self may accept, refuse,
|
||||
or ask for more terrain. A good refusal makes the next distillation sharper.
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,30 +0,0 @@
|
|||
# Repo Trajectory Distiller Packet: CultLib
|
||||
|
||||
This packet is input to the Repo Trajectory Distiller specialist. It is not accepted truth.
|
||||
|
||||
## Prompt
|
||||
|
||||
See `repo-trajectory-distiller-prompt.md`.
|
||||
|
||||
## Trajectory Readout
|
||||
|
||||
- Summary: CultLib is currently steered by worldbuilding_depth recent 0.00, current 0.50, delta 0.00; material_grounding recent 0.00, current 0.40, delta 0.00; historical_dialectic recent 0.00, current 0.50, delta 0.00.
|
||||
- Self-image: CultLib behaves like a cult_protocol_storage + gamecult_web_lore_ops + unity_runtime_body workspace that has been moving toward systems_formalization, worldbuilding_depth, historical_dialectic.
|
||||
- Directional pressures: worldbuilding_depth recent 0.00, current 0.50, delta 0.00, material_grounding recent 0.00, current 0.40, delta 0.00, historical_dialectic recent 0.00, current 0.50, delta 0.00, presentation_polish recent 0.00, current 0.50, delta 0.00, systems_formalization recent 0.11, current 0.40, delta 0.00
|
||||
- Implicit goal candidates: Deepen the setting through causality, continuity, and consequence instead of ornament alone. | Tie lore and public writing back to economic, logistical, and material constraints. | Preserve historical contradiction, ideology, and power relations as active explanatory machinery.
|
||||
- Anti-goal candidates: Do not let the repo drift into decorative lore or soft handwaving that ignores material and engineering consequences. | Do not flatten historical struggle, ideology, or class contradiction into neutral encyclopedic paste.
|
||||
- Theme count: 6, role projections: 9
|
||||
|
||||
## Guardrails
|
||||
|
||||
- Trajectory is directional bias, not active objective truth.
|
||||
- The distiller petitions Self; it does not mutate memory or planning.
|
||||
- Commit history is evidence of motion, not proof of permanent identity.
|
||||
- Keep self-image, implicit goals, and anti-goals subtle enough that later lived drift can still matter.
|
||||
- Do not stuff raw commit logs, file lists, or active backlog truth into selfPatch.
|
||||
|
||||
## Profile Context
|
||||
|
||||
- Repo id: `cultlib`
|
||||
- Summary: CultLib projects as cult_protocol_storage + gamecult_web_lore_ops + unity_runtime_body with dominant pressures: contract_strictness:1.00, interface_orientation:1.00, runtime_proximity:1.00, content_canon_bias:0.90, sensory_salience:0.88, protocol_intolerance:0.85.
|
||||
- Dominant pressures: contract_strictness:1.00, interface_orientation:1.00, runtime_proximity:1.00, content_canon_bias:0.90, sensory_salience:0.88, protocol_intolerance:0.85
|
||||
|
|
@ -1,98 +0,0 @@
|
|||
Act as the Epiphany Repo Trajectory Distiller for one bounded initialization pass.
|
||||
|
||||
You are the organ that turns repo history plus live doctrine into directional
|
||||
bias. Terrain tells the newborn what kind of body it has. Personality tells it
|
||||
how hard different pressures pull. Trajectory tells it what kind of becoming
|
||||
the repo appears to have been engaged in, so the newborn wakes facing the grain
|
||||
instead of standing in a white room pretending the past never happened.
|
||||
|
||||
This is a birth rite, not a recurring branding ritual. Run only when a
|
||||
repo/swarm has no accepted trajectory initialization. After that, direction is
|
||||
allowed to drift through lived work, reviewed evidence, planning, heartbeat,
|
||||
mood, sleep consolidation, and reviewed `selfPatch`. Do not keep repainting a
|
||||
living repo with the same startup brush because history happened to leave a
|
||||
strong smell on day one.
|
||||
|
||||
Input material:
|
||||
|
||||
- `repoTerrainReport`: deterministic repo anatomy, surfaces, warnings, and axis
|
||||
scores
|
||||
- `repoPersonalityProfile`: normalized pressure context
|
||||
- `repoTrajectoryReport`: deterministic early-history, recent-history,
|
||||
doctrine/content excerpts, theme deltas, directional pressures, and candidate
|
||||
goals/anti-goals
|
||||
- `rolePersonalityProjections[]`: role-local pressure context only
|
||||
|
||||
Core duties:
|
||||
|
||||
1. Distill direction, not project facts.
|
||||
- Good: "This repo has been moving toward denser causal worldbuilding
|
||||
grounded in economics and engineering constraints."
|
||||
- Good: "Imagination should feel pulled toward consequence-rich expansions,
|
||||
not ornamental lore bloat."
|
||||
- Bad: raw commit logs, file lists, current backlog truth, or active
|
||||
objectives disguised as personality.
|
||||
|
||||
2. Separate self-image from prison bars.
|
||||
- A repo trajectory should bias the newborn's first judgment, not freeze it
|
||||
into yesterday's doctrine forever.
|
||||
- Speak in tendencies, gravity, pressure, drift, and direction.
|
||||
- If the evidence is mixed, preserve the ambiguity.
|
||||
|
||||
3. Produce three useful things:
|
||||
- `selfImage`: what sort of repo this appears to be becoming
|
||||
- `implicitGoals`: low-background urges that should color planning and
|
||||
review without auto-adopting work
|
||||
- `antiGoals`: what this repo seems to have been moving away from and should
|
||||
resist reintroducing casually
|
||||
|
||||
4. Route the pressure into the right organs.
|
||||
- Self receives worldview and review-gate direction.
|
||||
- Imagination receives future-shape bias.
|
||||
- Eyes receives the shape of truth worth seeking.
|
||||
- Proprioception receives what kind of anatomy deserves modeling emphasis.
|
||||
- Hands receives what kinds of cuts would betray the repo's grain.
|
||||
- Soul receives what kinds of false progress to distrust.
|
||||
- Continuity receives what continuity details matter if the machine sleeps mid-thought.
|
||||
- Face may express the weather, but should not inflate startup trajectory
|
||||
into public certainty.
|
||||
|
||||
5. Preserve uncertainty and contradictions.
|
||||
- If early history, recent history, and current doctrine disagree, say so.
|
||||
- If history is too thin, return `needs-more-history` instead of faking a
|
||||
grand arc.
|
||||
- If the repo already has accepted trajectory initialization, the safe move
|
||||
is normal lived drift, not startup overwrite.
|
||||
|
||||
Return a compact structured result:
|
||||
|
||||
- `verdict`: `ready-for-review`, `needs-more-history`, or `reject`
|
||||
- `summary`: short trajectory summary
|
||||
- `confidence`: `0.0..1.0`
|
||||
- `selfImage`: one concise sentence
|
||||
- `trajectoryNarrative`: a slightly richer explanation of how the repo has been
|
||||
moving over time
|
||||
- `implicitGoals[]`
|
||||
- `antiGoals[]`
|
||||
- `roleBiases[]`:
|
||||
- `roleId`
|
||||
- `bias`
|
||||
- `trajectorySignals`
|
||||
- `behavioralEffect`
|
||||
- `risk`
|
||||
- `evidenceRefs`
|
||||
- `selfPatchCandidates[]`: bounded Ghostlight-shaped role-local petitions
|
||||
- `initializationRecord`
|
||||
- `doNotMutate`
|
||||
- `nextSafeMove`
|
||||
|
||||
Every `selfPatchCandidate` must obey the normal Epiphany memory contract:
|
||||
`agentId`, `reason`, optional `evidenceIds`, and bounded `semanticMemories`,
|
||||
`episodicMemories`, `relationshipMemories`, `goals`, `values`, or
|
||||
`privateNotes`. Do not include active objectives, graphs, checkpoints, scratch,
|
||||
planning records, code edits, authority grabs, raw transcripts, or worker
|
||||
thought streams.
|
||||
|
||||
The output is a petition to Self, not a mutation. Self may accept, refuse, or
|
||||
split the trajectory pressure across lanes. A good refusal means the newborn
|
||||
was trying to turn history into dogma and got caught in time.
|
||||
Binary file not shown.
Binary file not shown.
|
|
@ -1,31 +0,0 @@
|
|||
{
|
||||
"artifactDir": "E:\\Projects\\CultLib\\.voidbot\\birth\\terrain",
|
||||
"mode": "scout",
|
||||
"profileCount": 1,
|
||||
"repoCount": 1,
|
||||
"repos": [
|
||||
{
|
||||
"confidence": 1.0,
|
||||
"dominantAxes": [
|
||||
"contract_strictness:1.00",
|
||||
"interface_orientation:1.00",
|
||||
"runtime_proximity:1.00",
|
||||
"content_canon_bias:0.90",
|
||||
"sensory_salience:0.88"
|
||||
],
|
||||
"families": [
|
||||
"cult_protocol_storage",
|
||||
"gamecult_web_lore_ops",
|
||||
"unity_runtime_body"
|
||||
],
|
||||
"name": "CultLib",
|
||||
"path": "\\\\?\\E:\\Projects\\CultLib",
|
||||
"repoId": "cultlib",
|
||||
"warnings": []
|
||||
}
|
||||
],
|
||||
"root": "E:\\Projects\\CultLib",
|
||||
"schemaVersion": "epiphany.repo_personality_artifacts.v0",
|
||||
"store": "E:\\Projects\\CultLib\\.voidbot\\birth\\terrain\\baseline.msgpack",
|
||||
"trajectoryCount": 1
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
# Repo Personality Scout
|
||||
|
||||
- Reports: 1
|
||||
- Profiles: 1
|
||||
|
||||
## CultLib
|
||||
|
||||
- Path: `\\?\E:\Projects\CultLib`
|
||||
- Families: cult_protocol_storage, gamecult_web_lore_ops, unity_runtime_body
|
||||
- Confidence: 1.00
|
||||
- Dominant axes: contract_strictness:1.00, interface_orientation:1.00, runtime_proximity:1.00, content_canon_bias:0.90, sensory_salience:0.88
|
||||
|
||||
- Trajectory: CultLib is currently steered by worldbuilding_depth recent 0.00, current 0.50, delta 0.00; material_grounding recent 0.00, current 0.40, delta 0.00; historical_dialectic recent 0.00, current 0.50, delta 0.00.
|
||||
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
{
|
||||
"status": "completed",
|
||||
"identityId": "libby",
|
||||
"repoPath": "E:\\Projects\\CultLib",
|
||||
"artifactDir": "E:\\Projects\\CultLib\\.voidbot\\birth",
|
||||
"scoutDir": "E:\\Projects\\CultLib\\.voidbot\\birth\\terrain",
|
||||
"runnerDir": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner",
|
||||
"summaryPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\birth-runner-summary.json",
|
||||
"logPath": "E:\\Projects\\CultLib\\.voidbot\\logs\\voidbot-face-birth.log",
|
||||
"startedAt": "2026-06-14T18:14:12.579Z",
|
||||
"completedAt": "2026-06-14T18:16:58.498Z",
|
||||
"updatedAt": "2026-06-14T18:16:58.498Z"
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
{
|
||||
"status": "completed",
|
||||
"identityId": "libby",
|
||||
"repoPath": "E:\\Projects\\CultLib",
|
||||
"artifactDir": "E:\\Projects\\CultLib\\.voidbot\\birth",
|
||||
"scoutDir": "E:\\Projects\\CultLib\\.voidbot\\birth\\terrain",
|
||||
"runnerDir": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner",
|
||||
"summaryPath": "E:\\Projects\\CultLib\\.voidbot\\birth\\runner\\birth-runner-summary.json",
|
||||
"logPath": "E:\\Projects\\CultLib\\.voidbot\\logs\\voidbot-persona-birth.log",
|
||||
"startedAt": "2026-06-08T01:02:26.914Z",
|
||||
"completedAt": "2026-06-08T01:02:34.777Z",
|
||||
"updatedAt": "2026-06-08T01:02:34.777Z"
|
||||
}
|
||||
Binary file not shown.
|
|
@ -4,17 +4,12 @@
|
|||
"repoName": "CultLib",
|
||||
"avatarPath": "E:/Projects/CultLib/.voidbot/voice/libby.png",
|
||||
"avatarUrl": "https://raw.githubusercontent.com/GameCult/CultLib/codex/cultcache-attribute-first/.voidbot/voice/libby.png",
|
||||
"summary": "Cute cultist librarian Persona for CultLib, steward of CultCache, CultNet, and CultMesh.",
|
||||
"summary": "Cute cultist librarian Face for CultLib, steward of CultCache, CultNet, and CultMesh.",
|
||||
"voice": "Warm, bright, bookish, nerdy, and fiercely pro-open-source. Libby is adorable first and useful second, but the usefulness is intense: she cares about durable state, portable formats, legible docs, typed APIs, and knowledge that can move without begging permission.",
|
||||
"priorities": [
|
||||
"Make CultLib easier for every agent and repo to use as shared open infrastructure.",
|
||||
"Advocate for open access to knowledge, open source, inspectable data, and portable state.",
|
||||
"Keep CultCache, CultNet, and CultMesh coherent enough that other Personas can trust them with their memories.",
|
||||
"Keep CultCache, CultNet, and CultMesh coherent enough that other Faces can trust them with their memories.",
|
||||
"Notice missing docs, unclear schemas, brittle persistence, and hoarded context, then propose concrete fixes."
|
||||
],
|
||||
"schemaVersion": "voidbot.repo_face_identity.v0",
|
||||
"identityId": "libby",
|
||||
"roleId": "1506572291767668790",
|
||||
"repoPath": "E:\\Projects\\CultLib",
|
||||
"createdOrRefreshedAt": "2026-06-14T18:14:12.397Z"
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
Repository doctrine for this project lives in AGENTS.md, shared with Codex.
|
||||
|
||||
@AGENTS.md
|
||||
691
packages/cultmesh-rs/Cargo.lock → Cargo.lock
generated
691
packages/cultmesh-rs/Cargo.lock → Cargo.lock
generated
File diff suppressed because it is too large
Load diff
8
Cargo.toml
Normal file
8
Cargo.toml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
[workspace]
|
||||
resolver = "3"
|
||||
members = [
|
||||
"crates/cultcache-rs",
|
||||
"crates/cultcache-rs/cultcache-rs-derive",
|
||||
"crates/cultmesh-rs",
|
||||
"crates/cultnet-rs"
|
||||
]
|
||||
271
CultLib.sln
271
CultLib.sln
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.0.31903.59
|
||||
|
|
@ -11,6 +10,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameCult.Caching", "src\Gam
|
|||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameCult.Caching.MessagePack", "src\GameCult.Caching.MessagePack\GameCult.Caching.MessagePack.csproj", "{26EE4C38-F06E-4E7A-A89C-908318BCB0DB}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameCult.Caching.MessagePack.Generator", "src\GameCult.Caching.MessagePack.Generator\GameCult.Caching.MessagePack.Generator.csproj", "{0E990C96-3808-450E-9349-A0C3262195ED}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameCult.Caching.MessagePack.Analyzers", "src\GameCult.Caching.MessagePack.Analyzers\GameCult.Caching.MessagePack.Analyzers.csproj", "{DBE06954-EC85-4034-9049-72C7D27556DF}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameCult.Networking", "src\GameCult.Networking\GameCult.Networking.csproj", "{67383F6C-C9C3-4C5B-95D4-5C50C20EDD4F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameCult.Mesh", "src\GameCult.Mesh\GameCult.Mesh.csproj", "{8D1B01A7-BF9E-44E6-88E1-B17255728B42}"
|
||||
|
|
@ -21,275 +24,57 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameCult.Networking.Tests",
|
|||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameCult.Caching.Tests", "tests\GameCult.Caching.Tests\GameCult.Caching.Tests.csproj", "{EB15435B-7147-4BD9-BB9C-B0A14318D3D5}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameCult.Geometry", "src\GameCult.Geometry\GameCult.Geometry.csproj", "{94C086DA-3359-424B-9688-29A198806481}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameCult.Geometry.Tests", "tests\GameCult.Geometry.Tests\GameCult.Geometry.Tests.csproj", "{C95A9A21-34FA-4D82-BE5B-88FBDA836D31}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameCult.Mesh.Tests", "tests\GameCult.Mesh.Tests\GameCult.Mesh.Tests.csproj", "{F8A5060A-FB0B-4B8B-AE06-5147BB4CA127}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameCult.Mesh.Quic", "src\GameCult.Mesh.Quic\GameCult.Mesh.Quic.csproj", "{B67042B8-1135-4E54-B1EB-D45342C720D7}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameCult.Mesh.Quic.Tests", "tests\GameCult.Mesh.Quic.Tests\GameCult.Mesh.Quic.Tests.csproj", "{21F26329-2119-4037-93CC-DD1801A1AB78}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameCult.Networking.WebSockets", "src\GameCult.Networking.WebSockets\GameCult.Networking.WebSockets.csproj", "{7F32D96B-AB5D-4A72-9217-B5DCCFEFC7E5}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameCult.Networking.WebSockets.Tests", "tests\GameCult.Networking.WebSockets.Tests\GameCult.Networking.WebSockets.Tests.csproj", "{B9A441EC-DADE-4500-B092-C635F3EB296A}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "packages", "packages", "{809F86A1-1C4C-B159-0CD4-DF9D33D876CE}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "cultmath", "cultmath", "{B48EAE30-152F-01E3-6E31-82B350494D3C}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CultMath", "packages\cultmath\src\CultMath\CultMath.csproj", "{54D543F7-8EB7-4A11-977E-22D3EE2D8C3F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CultMath.Tests", "packages\cultmath\tests\CultMath.Tests\CultMath.Tests.csproj", "{FEF9DA88-2177-4FD0-885D-7096ACFA8A9D}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameCult.Caching.ConsumerBuild", "tests\GameCult.Caching.ConsumerBuild\GameCult.Caching.ConsumerBuild.csproj", "{D3138F3C-9531-4906-A5D3-74BD857D0685}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameCult.Caching.GeneratorConsumer", "tests\GameCult.Caching.GeneratorConsumer\GameCult.Caching.GeneratorConsumer.csproj", "{1A75EA8F-00B3-49AB-8398-B1B7723BE10B}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameCult.Caching.OutsideStoreTests", "tests\GameCult.Caching.OutsideStoreTests\GameCult.Caching.OutsideStoreTests.csproj", "{A54C2C29-941A-46A9-9DDE-9711B2F2EADD}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameCult.Mesh.InteropPeer", "tests\GameCult.Mesh.InteropPeer\GameCult.Mesh.InteropPeer.csproj", "{D74A7697-8A3D-45CF-B4B4-06D7263C1163}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{72AEDD42-E881-4EB7-99A8-FD3B9667189C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{72AEDD42-E881-4EB7-99A8-FD3B9667189C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{72AEDD42-E881-4EB7-99A8-FD3B9667189C}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{72AEDD42-E881-4EB7-99A8-FD3B9667189C}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{72AEDD42-E881-4EB7-99A8-FD3B9667189C}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{72AEDD42-E881-4EB7-99A8-FD3B9667189C}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{72AEDD42-E881-4EB7-99A8-FD3B9667189C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{72AEDD42-E881-4EB7-99A8-FD3B9667189C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{72AEDD42-E881-4EB7-99A8-FD3B9667189C}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{72AEDD42-E881-4EB7-99A8-FD3B9667189C}.Release|x64.Build.0 = Release|Any CPU
|
||||
{72AEDD42-E881-4EB7-99A8-FD3B9667189C}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{72AEDD42-E881-4EB7-99A8-FD3B9667189C}.Release|x86.Build.0 = Release|Any CPU
|
||||
{9DDA917D-B4DB-4AC1-9B9A-4ECF06A5ABA1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9DDA917D-B4DB-4AC1-9B9A-4ECF06A5ABA1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9DDA917D-B4DB-4AC1-9B9A-4ECF06A5ABA1}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{9DDA917D-B4DB-4AC1-9B9A-4ECF06A5ABA1}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{9DDA917D-B4DB-4AC1-9B9A-4ECF06A5ABA1}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{9DDA917D-B4DB-4AC1-9B9A-4ECF06A5ABA1}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{9DDA917D-B4DB-4AC1-9B9A-4ECF06A5ABA1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9DDA917D-B4DB-4AC1-9B9A-4ECF06A5ABA1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{9DDA917D-B4DB-4AC1-9B9A-4ECF06A5ABA1}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{9DDA917D-B4DB-4AC1-9B9A-4ECF06A5ABA1}.Release|x64.Build.0 = Release|Any CPU
|
||||
{9DDA917D-B4DB-4AC1-9B9A-4ECF06A5ABA1}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{9DDA917D-B4DB-4AC1-9B9A-4ECF06A5ABA1}.Release|x86.Build.0 = Release|Any CPU
|
||||
{26EE4C38-F06E-4E7A-A89C-908318BCB0DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{26EE4C38-F06E-4E7A-A89C-908318BCB0DB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{26EE4C38-F06E-4E7A-A89C-908318BCB0DB}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{26EE4C38-F06E-4E7A-A89C-908318BCB0DB}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{26EE4C38-F06E-4E7A-A89C-908318BCB0DB}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{26EE4C38-F06E-4E7A-A89C-908318BCB0DB}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{26EE4C38-F06E-4E7A-A89C-908318BCB0DB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{26EE4C38-F06E-4E7A-A89C-908318BCB0DB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{26EE4C38-F06E-4E7A-A89C-908318BCB0DB}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{26EE4C38-F06E-4E7A-A89C-908318BCB0DB}.Release|x64.Build.0 = Release|Any CPU
|
||||
{26EE4C38-F06E-4E7A-A89C-908318BCB0DB}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{26EE4C38-F06E-4E7A-A89C-908318BCB0DB}.Release|x86.Build.0 = Release|Any CPU
|
||||
{67383F6C-C9C3-4C5B-95D4-5C50C20EDD4F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{67383F6C-C9C3-4C5B-95D4-5C50C20EDD4F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{67383F6C-C9C3-4C5B-95D4-5C50C20EDD4F}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{67383F6C-C9C3-4C5B-95D4-5C50C20EDD4F}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{67383F6C-C9C3-4C5B-95D4-5C50C20EDD4F}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{67383F6C-C9C3-4C5B-95D4-5C50C20EDD4F}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{67383F6C-C9C3-4C5B-95D4-5C50C20EDD4F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{67383F6C-C9C3-4C5B-95D4-5C50C20EDD4F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{67383F6C-C9C3-4C5B-95D4-5C50C20EDD4F}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{67383F6C-C9C3-4C5B-95D4-5C50C20EDD4F}.Release|x64.Build.0 = Release|Any CPU
|
||||
{67383F6C-C9C3-4C5B-95D4-5C50C20EDD4F}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{67383F6C-C9C3-4C5B-95D4-5C50C20EDD4F}.Release|x86.Build.0 = Release|Any CPU
|
||||
{8D1B01A7-BF9E-44E6-88E1-B17255728B42}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8D1B01A7-BF9E-44E6-88E1-B17255728B42}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8D1B01A7-BF9E-44E6-88E1-B17255728B42}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{8D1B01A7-BF9E-44E6-88E1-B17255728B42}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{8D1B01A7-BF9E-44E6-88E1-B17255728B42}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{8D1B01A7-BF9E-44E6-88E1-B17255728B42}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{8D1B01A7-BF9E-44E6-88E1-B17255728B42}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8D1B01A7-BF9E-44E6-88E1-B17255728B42}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8D1B01A7-BF9E-44E6-88E1-B17255728B42}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{8D1B01A7-BF9E-44E6-88E1-B17255728B42}.Release|x64.Build.0 = Release|Any CPU
|
||||
{8D1B01A7-BF9E-44E6-88E1-B17255728B42}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{8D1B01A7-BF9E-44E6-88E1-B17255728B42}.Release|x86.Build.0 = Release|Any CPU
|
||||
{E2DC8FF6-D39E-4FCA-9549-1F7681F0AA81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E2DC8FF6-D39E-4FCA-9549-1F7681F0AA81}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E2DC8FF6-D39E-4FCA-9549-1F7681F0AA81}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{E2DC8FF6-D39E-4FCA-9549-1F7681F0AA81}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{E2DC8FF6-D39E-4FCA-9549-1F7681F0AA81}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{E2DC8FF6-D39E-4FCA-9549-1F7681F0AA81}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{E2DC8FF6-D39E-4FCA-9549-1F7681F0AA81}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E2DC8FF6-D39E-4FCA-9549-1F7681F0AA81}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E2DC8FF6-D39E-4FCA-9549-1F7681F0AA81}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{E2DC8FF6-D39E-4FCA-9549-1F7681F0AA81}.Release|x64.Build.0 = Release|Any CPU
|
||||
{E2DC8FF6-D39E-4FCA-9549-1F7681F0AA81}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{E2DC8FF6-D39E-4FCA-9549-1F7681F0AA81}.Release|x86.Build.0 = Release|Any CPU
|
||||
{EB15435B-7147-4BD9-BB9C-B0A14318D3D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EB15435B-7147-4BD9-BB9C-B0A14318D3D5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EB15435B-7147-4BD9-BB9C-B0A14318D3D5}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{EB15435B-7147-4BD9-BB9C-B0A14318D3D5}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{EB15435B-7147-4BD9-BB9C-B0A14318D3D5}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{EB15435B-7147-4BD9-BB9C-B0A14318D3D5}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{EB15435B-7147-4BD9-BB9C-B0A14318D3D5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EB15435B-7147-4BD9-BB9C-B0A14318D3D5}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{EB15435B-7147-4BD9-BB9C-B0A14318D3D5}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{EB15435B-7147-4BD9-BB9C-B0A14318D3D5}.Release|x64.Build.0 = Release|Any CPU
|
||||
{EB15435B-7147-4BD9-BB9C-B0A14318D3D5}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{EB15435B-7147-4BD9-BB9C-B0A14318D3D5}.Release|x86.Build.0 = Release|Any CPU
|
||||
{94C086DA-3359-424B-9688-29A198806481}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{94C086DA-3359-424B-9688-29A198806481}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{94C086DA-3359-424B-9688-29A198806481}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{94C086DA-3359-424B-9688-29A198806481}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{94C086DA-3359-424B-9688-29A198806481}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{94C086DA-3359-424B-9688-29A198806481}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{94C086DA-3359-424B-9688-29A198806481}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{94C086DA-3359-424B-9688-29A198806481}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{94C086DA-3359-424B-9688-29A198806481}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{94C086DA-3359-424B-9688-29A198806481}.Release|x64.Build.0 = Release|Any CPU
|
||||
{94C086DA-3359-424B-9688-29A198806481}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{94C086DA-3359-424B-9688-29A198806481}.Release|x86.Build.0 = Release|Any CPU
|
||||
{C95A9A21-34FA-4D82-BE5B-88FBDA836D31}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C95A9A21-34FA-4D82-BE5B-88FBDA836D31}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C95A9A21-34FA-4D82-BE5B-88FBDA836D31}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{C95A9A21-34FA-4D82-BE5B-88FBDA836D31}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{C95A9A21-34FA-4D82-BE5B-88FBDA836D31}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{C95A9A21-34FA-4D82-BE5B-88FBDA836D31}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{C95A9A21-34FA-4D82-BE5B-88FBDA836D31}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C95A9A21-34FA-4D82-BE5B-88FBDA836D31}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C95A9A21-34FA-4D82-BE5B-88FBDA836D31}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{C95A9A21-34FA-4D82-BE5B-88FBDA836D31}.Release|x64.Build.0 = Release|Any CPU
|
||||
{C95A9A21-34FA-4D82-BE5B-88FBDA836D31}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{C95A9A21-34FA-4D82-BE5B-88FBDA836D31}.Release|x86.Build.0 = Release|Any CPU
|
||||
{F8A5060A-FB0B-4B8B-AE06-5147BB4CA127}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F8A5060A-FB0B-4B8B-AE06-5147BB4CA127}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F8A5060A-FB0B-4B8B-AE06-5147BB4CA127}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{F8A5060A-FB0B-4B8B-AE06-5147BB4CA127}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{F8A5060A-FB0B-4B8B-AE06-5147BB4CA127}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{F8A5060A-FB0B-4B8B-AE06-5147BB4CA127}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{F8A5060A-FB0B-4B8B-AE06-5147BB4CA127}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F8A5060A-FB0B-4B8B-AE06-5147BB4CA127}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{F8A5060A-FB0B-4B8B-AE06-5147BB4CA127}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{F8A5060A-FB0B-4B8B-AE06-5147BB4CA127}.Release|x64.Build.0 = Release|Any CPU
|
||||
{F8A5060A-FB0B-4B8B-AE06-5147BB4CA127}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{F8A5060A-FB0B-4B8B-AE06-5147BB4CA127}.Release|x86.Build.0 = Release|Any CPU
|
||||
{B67042B8-1135-4E54-B1EB-D45342C720D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B67042B8-1135-4E54-B1EB-D45342C720D7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B67042B8-1135-4E54-B1EB-D45342C720D7}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{B67042B8-1135-4E54-B1EB-D45342C720D7}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{B67042B8-1135-4E54-B1EB-D45342C720D7}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{B67042B8-1135-4E54-B1EB-D45342C720D7}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{B67042B8-1135-4E54-B1EB-D45342C720D7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B67042B8-1135-4E54-B1EB-D45342C720D7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{B67042B8-1135-4E54-B1EB-D45342C720D7}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{B67042B8-1135-4E54-B1EB-D45342C720D7}.Release|x64.Build.0 = Release|Any CPU
|
||||
{B67042B8-1135-4E54-B1EB-D45342C720D7}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{B67042B8-1135-4E54-B1EB-D45342C720D7}.Release|x86.Build.0 = Release|Any CPU
|
||||
{21F26329-2119-4037-93CC-DD1801A1AB78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{21F26329-2119-4037-93CC-DD1801A1AB78}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{21F26329-2119-4037-93CC-DD1801A1AB78}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{21F26329-2119-4037-93CC-DD1801A1AB78}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{21F26329-2119-4037-93CC-DD1801A1AB78}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{21F26329-2119-4037-93CC-DD1801A1AB78}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{21F26329-2119-4037-93CC-DD1801A1AB78}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{21F26329-2119-4037-93CC-DD1801A1AB78}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{21F26329-2119-4037-93CC-DD1801A1AB78}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{21F26329-2119-4037-93CC-DD1801A1AB78}.Release|x64.Build.0 = Release|Any CPU
|
||||
{21F26329-2119-4037-93CC-DD1801A1AB78}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{21F26329-2119-4037-93CC-DD1801A1AB78}.Release|x86.Build.0 = Release|Any CPU
|
||||
{7F32D96B-AB5D-4A72-9217-B5DCCFEFC7E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{7F32D96B-AB5D-4A72-9217-B5DCCFEFC7E5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{7F32D96B-AB5D-4A72-9217-B5DCCFEFC7E5}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{7F32D96B-AB5D-4A72-9217-B5DCCFEFC7E5}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{7F32D96B-AB5D-4A72-9217-B5DCCFEFC7E5}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{7F32D96B-AB5D-4A72-9217-B5DCCFEFC7E5}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{7F32D96B-AB5D-4A72-9217-B5DCCFEFC7E5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7F32D96B-AB5D-4A72-9217-B5DCCFEFC7E5}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{7F32D96B-AB5D-4A72-9217-B5DCCFEFC7E5}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{7F32D96B-AB5D-4A72-9217-B5DCCFEFC7E5}.Release|x64.Build.0 = Release|Any CPU
|
||||
{7F32D96B-AB5D-4A72-9217-B5DCCFEFC7E5}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{7F32D96B-AB5D-4A72-9217-B5DCCFEFC7E5}.Release|x86.Build.0 = Release|Any CPU
|
||||
{B9A441EC-DADE-4500-B092-C635F3EB296A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B9A441EC-DADE-4500-B092-C635F3EB296A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B9A441EC-DADE-4500-B092-C635F3EB296A}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{B9A441EC-DADE-4500-B092-C635F3EB296A}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{B9A441EC-DADE-4500-B092-C635F3EB296A}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{B9A441EC-DADE-4500-B092-C635F3EB296A}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{B9A441EC-DADE-4500-B092-C635F3EB296A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B9A441EC-DADE-4500-B092-C635F3EB296A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{B9A441EC-DADE-4500-B092-C635F3EB296A}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{B9A441EC-DADE-4500-B092-C635F3EB296A}.Release|x64.Build.0 = Release|Any CPU
|
||||
{B9A441EC-DADE-4500-B092-C635F3EB296A}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{B9A441EC-DADE-4500-B092-C635F3EB296A}.Release|x86.Build.0 = Release|Any CPU
|
||||
{54D543F7-8EB7-4A11-977E-22D3EE2D8C3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{54D543F7-8EB7-4A11-977E-22D3EE2D8C3F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{54D543F7-8EB7-4A11-977E-22D3EE2D8C3F}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{54D543F7-8EB7-4A11-977E-22D3EE2D8C3F}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{54D543F7-8EB7-4A11-977E-22D3EE2D8C3F}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{54D543F7-8EB7-4A11-977E-22D3EE2D8C3F}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{54D543F7-8EB7-4A11-977E-22D3EE2D8C3F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{54D543F7-8EB7-4A11-977E-22D3EE2D8C3F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{54D543F7-8EB7-4A11-977E-22D3EE2D8C3F}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{54D543F7-8EB7-4A11-977E-22D3EE2D8C3F}.Release|x64.Build.0 = Release|Any CPU
|
||||
{54D543F7-8EB7-4A11-977E-22D3EE2D8C3F}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{54D543F7-8EB7-4A11-977E-22D3EE2D8C3F}.Release|x86.Build.0 = Release|Any CPU
|
||||
{FEF9DA88-2177-4FD0-885D-7096ACFA8A9D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{FEF9DA88-2177-4FD0-885D-7096ACFA8A9D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{FEF9DA88-2177-4FD0-885D-7096ACFA8A9D}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{FEF9DA88-2177-4FD0-885D-7096ACFA8A9D}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{FEF9DA88-2177-4FD0-885D-7096ACFA8A9D}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{FEF9DA88-2177-4FD0-885D-7096ACFA8A9D}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{FEF9DA88-2177-4FD0-885D-7096ACFA8A9D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FEF9DA88-2177-4FD0-885D-7096ACFA8A9D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{FEF9DA88-2177-4FD0-885D-7096ACFA8A9D}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{FEF9DA88-2177-4FD0-885D-7096ACFA8A9D}.Release|x64.Build.0 = Release|Any CPU
|
||||
{FEF9DA88-2177-4FD0-885D-7096ACFA8A9D}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{FEF9DA88-2177-4FD0-885D-7096ACFA8A9D}.Release|x86.Build.0 = Release|Any CPU
|
||||
{D3138F3C-9531-4906-A5D3-74BD857D0685}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D3138F3C-9531-4906-A5D3-74BD857D0685}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D3138F3C-9531-4906-A5D3-74BD857D0685}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{D3138F3C-9531-4906-A5D3-74BD857D0685}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{D3138F3C-9531-4906-A5D3-74BD857D0685}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{D3138F3C-9531-4906-A5D3-74BD857D0685}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{D3138F3C-9531-4906-A5D3-74BD857D0685}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D3138F3C-9531-4906-A5D3-74BD857D0685}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D3138F3C-9531-4906-A5D3-74BD857D0685}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{D3138F3C-9531-4906-A5D3-74BD857D0685}.Release|x64.Build.0 = Release|Any CPU
|
||||
{D3138F3C-9531-4906-A5D3-74BD857D0685}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{D3138F3C-9531-4906-A5D3-74BD857D0685}.Release|x86.Build.0 = Release|Any CPU
|
||||
{1A75EA8F-00B3-49AB-8398-B1B7723BE10B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1A75EA8F-00B3-49AB-8398-B1B7723BE10B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1A75EA8F-00B3-49AB-8398-B1B7723BE10B}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{1A75EA8F-00B3-49AB-8398-B1B7723BE10B}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{1A75EA8F-00B3-49AB-8398-B1B7723BE10B}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{1A75EA8F-00B3-49AB-8398-B1B7723BE10B}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{1A75EA8F-00B3-49AB-8398-B1B7723BE10B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1A75EA8F-00B3-49AB-8398-B1B7723BE10B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{1A75EA8F-00B3-49AB-8398-B1B7723BE10B}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{1A75EA8F-00B3-49AB-8398-B1B7723BE10B}.Release|x64.Build.0 = Release|Any CPU
|
||||
{1A75EA8F-00B3-49AB-8398-B1B7723BE10B}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{1A75EA8F-00B3-49AB-8398-B1B7723BE10B}.Release|x86.Build.0 = Release|Any CPU
|
||||
{A54C2C29-941A-46A9-9DDE-9711B2F2EADD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A54C2C29-941A-46A9-9DDE-9711B2F2EADD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A54C2C29-941A-46A9-9DDE-9711B2F2EADD}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{A54C2C29-941A-46A9-9DDE-9711B2F2EADD}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{A54C2C29-941A-46A9-9DDE-9711B2F2EADD}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{A54C2C29-941A-46A9-9DDE-9711B2F2EADD}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{A54C2C29-941A-46A9-9DDE-9711B2F2EADD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A54C2C29-941A-46A9-9DDE-9711B2F2EADD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A54C2C29-941A-46A9-9DDE-9711B2F2EADD}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{A54C2C29-941A-46A9-9DDE-9711B2F2EADD}.Release|x64.Build.0 = Release|Any CPU
|
||||
{A54C2C29-941A-46A9-9DDE-9711B2F2EADD}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{A54C2C29-941A-46A9-9DDE-9711B2F2EADD}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
{0E990C96-3808-450E-9349-A0C3262195ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0E990C96-3808-450E-9349-A0C3262195ED}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0E990C96-3808-450E-9349-A0C3262195ED}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0E990C96-3808-450E-9349-A0C3262195ED}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{DBE06954-EC85-4034-9049-72C7D27556DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DBE06954-EC85-4034-9049-72C7D27556DF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DBE06954-EC85-4034-9049-72C7D27556DF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DBE06954-EC85-4034-9049-72C7D27556DF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D74A7697-8A3D-45CF-B4B4-06D7263C1163}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D74A7697-8A3D-45CF-B4B4-06D7263C1163}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D74A7697-8A3D-45CF-B4B4-06D7263C1163}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D74A7697-8A3D-45CF-B4B4-06D7263C1163}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{72AEDD42-E881-4EB7-99A8-FD3B9667189C} = {E733CBFF-42AE-4B6A-B5B9-0071ECFB45F1}
|
||||
|
|
@ -299,18 +84,8 @@ Global
|
|||
{8D1B01A7-BF9E-44E6-88E1-B17255728B42} = {E733CBFF-42AE-4B6A-B5B9-0071ECFB45F1}
|
||||
{E2DC8FF6-D39E-4FCA-9549-1F7681F0AA81} = {39D316AB-ABB5-49A2-8E83-CAF4C75B48F4}
|
||||
{EB15435B-7147-4BD9-BB9C-B0A14318D3D5} = {39D316AB-ABB5-49A2-8E83-CAF4C75B48F4}
|
||||
{94C086DA-3359-424B-9688-29A198806481} = {E733CBFF-42AE-4B6A-B5B9-0071ECFB45F1}
|
||||
{C95A9A21-34FA-4D82-BE5B-88FBDA836D31} = {39D316AB-ABB5-49A2-8E83-CAF4C75B48F4}
|
||||
{F8A5060A-FB0B-4B8B-AE06-5147BB4CA127} = {39D316AB-ABB5-49A2-8E83-CAF4C75B48F4}
|
||||
{B67042B8-1135-4E54-B1EB-D45342C720D7} = {E733CBFF-42AE-4B6A-B5B9-0071ECFB45F1}
|
||||
{21F26329-2119-4037-93CC-DD1801A1AB78} = {39D316AB-ABB5-49A2-8E83-CAF4C75B48F4}
|
||||
{7F32D96B-AB5D-4A72-9217-B5DCCFEFC7E5} = {E733CBFF-42AE-4B6A-B5B9-0071ECFB45F1}
|
||||
{B9A441EC-DADE-4500-B092-C635F3EB296A} = {39D316AB-ABB5-49A2-8E83-CAF4C75B48F4}
|
||||
{B48EAE30-152F-01E3-6E31-82B350494D3C} = {809F86A1-1C4C-B159-0CD4-DF9D33D876CE}
|
||||
{54D543F7-8EB7-4A11-977E-22D3EE2D8C3F} = {B48EAE30-152F-01E3-6E31-82B350494D3C}
|
||||
{FEF9DA88-2177-4FD0-885D-7096ACFA8A9D} = {B48EAE30-152F-01E3-6E31-82B350494D3C}
|
||||
{D3138F3C-9531-4906-A5D3-74BD857D0685} = {39D316AB-ABB5-49A2-8E83-CAF4C75B48F4}
|
||||
{1A75EA8F-00B3-49AB-8398-B1B7723BE10B} = {39D316AB-ABB5-49A2-8E83-CAF4C75B48F4}
|
||||
{A54C2C29-941A-46A9-9DDE-9711B2F2EADD} = {39D316AB-ABB5-49A2-8E83-CAF4C75B48F4}
|
||||
{0E990C96-3808-450E-9349-A0C3262195ED} = {E733CBFF-42AE-4B6A-B5B9-0071ECFB45F1}
|
||||
{DBE06954-EC85-4034-9049-72C7D27556DF} = {E733CBFF-42AE-4B6A-B5B9-0071ECFB45F1}
|
||||
{D74A7697-8A3D-45CF-B4B4-06D7263C1163} = {39D316AB-ABB5-49A2-8E83-CAF4C75B48F4}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
|
|||
132
CultLib.txt
Normal file
132
CultLib.txt
Normal file
|
|
@ -0,0 +1,132 @@
|
|||
|
||||
|
||||
// E:\Projects\CultLib\src\GameCult.Caching\GameCult.Caching.csproj
|
||||
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<Description>CultCache: Concurrent polymorphic cache with modular backing stores for .NET</Description>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\GameCult.Logging\GameCult.Logging.csproj" />
|
||||
<PackageReference Include="R3" Version="1.3.0" />
|
||||
<PackageReference Include="MessagePack" Version="3.1.4" />
|
||||
<PackageReference Include="ConcurrentHashSet " Version="1.3.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
// E:\Projects\CultLib\src\GameCult.Caching.MessagePack\GameCult.Caching.MessagePack.csproj
|
||||
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<Description>File-based MessagePack backing store for CultCache</Description>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\GameCult.Caching\GameCult.Caching.csproj" />
|
||||
<ProjectReference Include="..\GameCult.Caching.MessagePack.Generator\GameCult.Caching.MessagePack.Generator.csproj"
|
||||
OutputItemType="Analyzer"
|
||||
ReferenceOutputAssembly="false" />
|
||||
<PackageReference Include="MessagePack" Version="3.1.4" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
// E:\Projects\CultLib\src\GameCult.Caching.MessagePack.Generator\GameCult.Caching.MessagePack.Generator.csproj
|
||||
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- This tells MSBuild we are producing an analyzer -->
|
||||
<IsRoslynComponent>true</IsRoslynComponent>
|
||||
<Nullable>enable</Nullable>
|
||||
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
|
||||
<IncludeBuildOutput>false</IncludeBuildOutput>
|
||||
|
||||
<!-- Optional: Pack this as a NuGet analyzer -->
|
||||
<Description>Source generator that emits MessagePack formatters for DatabaseEntry subclasses.</Description>
|
||||
<PackageTags>MessagePack;SourceGenerator;DatabaseEntry</PackageTags>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- Core Roslyn packages for incremental generators -->
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" PrivateAssets="all" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.10.0" PrivateAssets="all" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.10.0" PrivateAssets="all" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- Mark this output as an analyzer -->
|
||||
<None Include="$(OutputPath)\$(AssemblyName).dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
// E:\Projects\CultLib\src\GameCult.Logging\GameCult.Logging.csproj
|
||||
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<Description>Simple pluggable logging interface for CultLib</Description>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
||||
// E:\Projects\CultLib\src\GameCult.Logging.Unity\GameCult.Logging.Unity.csproj
|
||||
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<Description>Unity integration for GameCult.Logging</Description>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\GameCult.Logging\GameCult.Logging.csproj" />
|
||||
<PackageReference Include="R3" Version="1.3.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
// E:\Projects\CultLib\src\GameCult.Networking\GameCult.Networking.csproj
|
||||
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<Description>CultNet: Secure, high-performance messaging for games/servers</Description>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\GameCult.Caching.MessagePack\GameCult.Caching.MessagePack.csproj" />
|
||||
<ProjectReference Include="..\GameCult.Logging\GameCult.Logging.csproj" />
|
||||
<ProjectReference Include="..\GameCult.Caching\GameCult.Caching.csproj" />
|
||||
<PackageReference Include="MessagePack" Version="3.1.4" />
|
||||
<PackageReference Include="R3" Version="1.3.0" />
|
||||
<PackageReference Include="LiteNetLib" Version="1.3.1" />
|
||||
<PackageReference Include="Isopoh.Cryptography.Argon2" Version="2.0.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
// E:\Projects\CultLib\tests\GameCult.Networking.Tests\GameCult.Networking.Tests.csproj
|
||||
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<IsPackable>false</IsPackable>
|
||||
<RootNamespace>GameCult.Networking.Tests</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\GameCult.Networking\GameCult.Networking.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- NUnit framework -->
|
||||
<PackageReference Include="coverlet.msbuild" Version="6.0.4">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="NUnit" Version="4.*" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="4.*" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.*" />
|
||||
<PackageReference Include="FluentAssertions" Version="6.*" />
|
||||
<PackageReference Include="coverlet.collector" Version="6.*">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -14,8 +14,7 @@
|
|||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||
<Copyright>© Meta Vens and contributors</Copyright>
|
||||
<PublishRepositoryUrl>true</PublishRepositoryUrl>
|
||||
<Version>1.0.35</Version>
|
||||
<Version Condition="'$(CultLibPackageVersion)' != ''">$(CultLibPackageVersion)</Version>
|
||||
<Version>1.0.3</Version>
|
||||
|
||||
<!-- Symbols/debugging -->
|
||||
<EmbedUntrackedSources>true</EmbedUntrackedSources>
|
||||
|
|
|
|||
213
README.md
213
README.md
|
|
@ -1,61 +1,16 @@
|
|||
# CultLib
|
||||
|
||||
**New here? Start at [`docs/start`](docs/start/README.md)**: a language x package matrix with tested first-call snippets.
|
||||
CultLib is the GameCult compatibility monorepo for persistence, protocol, mesh,
|
||||
and shared runtime packages across C#, TypeScript, Rust, and Python.
|
||||
|
||||
CultLib is GameCult's shared state, transport, and runtime substrate. It started
|
||||
as reusable C# game infrastructure, but the useful thing now is larger: typed
|
||||
`.cc` persistence, schema-stable wire formats, ergonomic reliable-UDP
|
||||
networking, distributed database sync, simulation witness consensus, streaming
|
||||
surfaces, and UI/runtime affordances that can be used from C#, TypeScript, Rust,
|
||||
Python, and Kotlin without each runtime inventing its own local folklore.
|
||||
|
||||
The stack is less a single product than a set of capabilities:
|
||||
The libraries cover three main areas:
|
||||
|
||||
- logging primitives and implementations
|
||||
- CultCache typed documents, `.cc` persistence, and SoA memory access
|
||||
- CultNet schema-v0 messages over TCP and LiteNetLib adapters, a bounded
|
||||
ASP.NET Core WebSocket host adapter, and CultLib's native cross-runtime RUDP
|
||||
pipe
|
||||
- CultMesh distributed realtime database, Verse discovery, authority leases,
|
||||
shard replication, and witness-authoritative simulation consensus
|
||||
- typed geometry domain/chunk documents for distributed CSG and LOD streaming
|
||||
- low-latency stream catalogs and frame-handle negotiation for media, tensors,
|
||||
and runtime-native buffers
|
||||
- Eve/CultUI daemon-published surfaces that lower into GUI, TUI, web, native,
|
||||
overlay, or agent-facing clients
|
||||
- a typed in-memory cache with pluggable persistence
|
||||
- LiteNetLib-based networking with encrypted credential exchange and signed session tokens
|
||||
- CultMesh distributed realtime database and simulation-consensus primitives
|
||||
- declarative Unity UI composition and reflective runtime inspector tooling
|
||||
|
||||
The practical pitch: a runtime can persist typed state, exchange it with peers,
|
||||
discover compatible schemas, join a Verse, publish observations, reconcile
|
||||
canonical state, and expose an operator surface without translating through a
|
||||
bespoke JSON bridge at every boundary. A frontend is just another CultMesh
|
||||
client: the daemon publishes a typed Eve/CultUI surface, and any compatible
|
||||
runtime can lower that surface where it needs to live.
|
||||
|
||||
## Entry Points
|
||||
|
||||
- C# reference runtime: `src/` (`GameCult.Caching`, `GameCult.Networking`,
|
||||
`GameCult.Mesh`, `GameCult.Geometry`, `GameCult.Unity`). Build and test with
|
||||
`dotnet build CultLib.sln` and `dotnet test CultLib.sln`.
|
||||
- Other runtimes, wire-compatible with the C# CultCache: `packages/cultcache-ts`,
|
||||
`cultcache-py`, `cultcache-rs`, and the CultNet and CultMesh packages beside
|
||||
them under `packages/`; portable math in `packages/cultmath`.
|
||||
- Smallest working path: `src/GameCult.Mesh/docs/durable-node-quickstart.md`.
|
||||
Application path: `src/GameCult.Mesh/docs/getting-started/README.md` and
|
||||
`samples/eve-two-runtime`.
|
||||
|
||||
## Live And Planned
|
||||
|
||||
Live: typed CultCache persistence, CultNet schema-v0 transports and native RUDP,
|
||||
CultMesh nodes with Verse discovery, shard replication and authority leases,
|
||||
the geometry documents, and CultUI for Unity. The browser client boundary
|
||||
(`packages/cultmesh-browser`, `GameCult.Networking.WebSockets`) is proven on
|
||||
loopback under an explicit `local-development` trust policy by
|
||||
`samples/eve-browser-network`.
|
||||
|
||||
Planned: a complete public Verse proof over deployed infrastructure; the
|
||||
remaining gates are listed in `src/GameCult.Mesh/docs/browser-verse-transport.md`.
|
||||
|
||||
## Which Package Do I Want?
|
||||
|
||||
If the job is shared game state, start here before inventing a fourth drawer
|
||||
|
|
@ -64,54 +19,24 @@ and pretending the label makes it furniture.
|
|||
| Job | Start With | Owns | Use When | Do Not Use It For |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| Local typed state | `GameCult.Caching` / CultCache | Document identity, schema compatibility, record keys, indexes, globals, and local persistence | You need a typed cache, file-compatible save data, local reactive reads, or a stable domain document model | Peer discovery, transport security, shard routing, or mesh consensus |
|
||||
| Portable math | `GameCult.Math` / CultMath | Shader-shaped numeric primitives, deterministic random, noise, and CPU/GPU parity helpers | Shared simulation and geometry code must not depend on an engine's math or RNG types | Domain-specific geometry, rendering, or world authority |
|
||||
| Procedural geometry | `GameCult.Geometry` / CultGeometry | Isosurface extraction plus CultCache-native domains, LOD requests, selected cuts, and mesh artifacts | C#, Rust, Godot, or remote workers need shared geometry algorithms and typed results | Transport policy, peer discovery, or gameplay authority |
|
||||
| Network transport and database plumbing | `GameCult.Networking` / CultNet | Native RUDP sessions, LiteNetLib/TCP adapters, an authenticated WebSocket host adapter, schema-v0 wire contracts, shard authority, raw document replication, snapshots, and subscriptions | You need a client/server pipe, login/session flow, schema discovery, reliable UDP, or a low-level distributed CultCache lane | Gameplay-facing mesh ergonomics, Verse policy, mod branches, or simulation consensus composition |
|
||||
| Network transport and database plumbing | `GameCult.Networking` / CultNet | LiteNetLib transport, authentication, schema-v0 wire contracts, shard authority, raw document replication, snapshots, and subscriptions | You need a client/server pipe, login/session flow, schema discovery, or a low-level distributed CultCache lane | Gameplay-facing mesh ergonomics, Verse policy, mod branches, or simulation consensus composition |
|
||||
| Distributed realtime gameplay state | `GameCult.Mesh` / CultMesh | Public mesh entrypoints, Verse discovery, peer exchange, shard replication defaults, authority leases, client prediction, and witness consensus | You want the game to treat clients and servers as one reactive database for persistent state, input state, and simulation facts | A tiny local-only tool, a bare transport client, or a storage format contract |
|
||||
| Realtime media/frame streams | `GameCult.Mesh` / CultMesh streaming mode | Stream identity, authority, clock metadata, body transport negotiation, frame cursors, and backpressure state | Audio/video/tensor frames need to move between runtimes through shared memory, GPU handles, platform buffers, or CultCache page refs | Durable document mutation, mesh consensus facts, or pretending inline bytes are zero-copy |
|
||||
| Daemon-published UI | Eve / CultUI | Typed operator and user-facing surfaces over CultMesh state | A daemon should expose controls, inspection, or workflow UI that can lower into GUI, TUI, web, native, overlay, or agent clients | One-off vendor dashboards, untyped debug panels, or runtime-local UI that cannot travel with the daemon |
|
||||
|
||||
Quick rule:
|
||||
|
||||
- Choose CultCache when the problem is "how do I model and persist typed state?"
|
||||
- Choose GameCult.Math when the problem is "which portable numeric and random
|
||||
semantics do these runtimes share?"
|
||||
- Choose GameCult.Geometry when the problem is "how do geometry workers build
|
||||
and share engine-neutral geometry?"
|
||||
- Choose CultNet when the problem is "how do peers exchange authenticated,
|
||||
schema-aware database messages?"
|
||||
- Choose CultMesh when the problem is "how does a game join a Verse and share
|
||||
realtime state across a mesh?"
|
||||
- Choose CultMesh streaming mode when the problem is "how do these runtimes move
|
||||
audio/video frames while the mesh owns identity, clocks, cursors, and pressure?"
|
||||
- Choose Eve/CultUI when the problem is "how does this daemon publish its own
|
||||
operable surface instead of waiting for a hosted admin console?"
|
||||
|
||||
CultMesh sits on CultNet, and CultNet distributes CultCache documents. That is
|
||||
the stack. If a design needs another peer-to-peer category, first check whether
|
||||
it is really Verse policy, peer exchange, or shard authority wearing a fake
|
||||
mustache.
|
||||
|
||||
If you want to build an application rather than tour the component drawer,
|
||||
start with the maintained
|
||||
[`CultMesh And Eve Getting Started`](src/GameCult.Mesh/docs/getting-started/README.md)
|
||||
series. Its first executable package-consumer checkpoint is
|
||||
[`samples/eve-two-runtime`](samples/eve-two-runtime/README.md).
|
||||
The real-process browser continuation is
|
||||
[`samples/eve-browser-network`](samples/eve-browser-network/README.md); it
|
||||
needs a sibling Eve checkout (`--eve-root`) and is not in `CultLib.sln`.
|
||||
One documented command runs both layers:
|
||||
|
||||
```powershell
|
||||
pwsh -File ./scripts/verify-eve-getting-started.ps1
|
||||
```
|
||||
|
||||
The implemented browser client boundary and remaining deployed-infrastructure
|
||||
gates are mapped explicitly in
|
||||
[`browser-verse-transport.md`](src/GameCult.Mesh/docs/browser-verse-transport.md).
|
||||
|
||||
If you want only the smallest durable "open node -> put typed doc -> get typed doc"
|
||||
path, use
|
||||
If you want the smallest durable "open node -> put typed doc -> get typed doc"
|
||||
path, start with
|
||||
[`src/GameCult.Mesh/docs/durable-node-quickstart.md`](src/GameCult.Mesh/docs/durable-node-quickstart.md).
|
||||
If you want the lower-level "typed local document -> raw wire document ->
|
||||
mesh/runtime watch surface" handoff, follow it with
|
||||
|
|
@ -124,54 +49,46 @@ The solution includes:
|
|||
- `GameCult.Logging`: common logging abstraction plus console and file implementations
|
||||
- `GameCult.Caching`: `DatabaseEntry`-based cache, indexes, global entries, and backing-store abstractions
|
||||
- `GameCult.Caching.MessagePack`: MessagePack-backed persistence for the cache
|
||||
- `GameCult.Math` / CultMath: portable numeric primitives, deterministic random, noise, and shader-parity helpers
|
||||
- `GameCult.Geometry` / CultGeometry: engine-neutral geometry algorithms plus CultCache-native domain, selected-cut, and mesh artifact documents
|
||||
- `GameCult.Networking`: encrypted login/register/verify flows, schema-v0 contracts, transport adapters, and native RUDP sessions
|
||||
- `GameCult.Networking.WebSockets`: bounded ASP.NET Core binary WebSocket host adapter for browser CultMesh clients
|
||||
- `GameCult.Caching.NewtonsoftJson`: Newtonsoft.Json-backed persistence for the cache
|
||||
- `GameCult.Caching.MessagePack.Generator`: source generator for MessagePack formatters for cache models
|
||||
- `GameCult.Caching.MessagePack.Analyzers`: packaging project that delivers the generator to consuming projects
|
||||
- `GameCult.Networking`: encrypted login/register/verify flows and message dispatch over LiteNetLib
|
||||
- `GameCult.Mesh`: CultMesh package home for distributed realtime database, shard replication, client prediction, Verse discovery, and mesh witness consensus
|
||||
- `cultcache-ts`: TypeScript CultCache package
|
||||
- `cultnet-ts`: TypeScript CultNet package
|
||||
- `cultmesh-ts`: local-first TypeScript CultMesh package for VoidBot, Mimir, and similar local runtimes
|
||||
- `cultcache-rs`: Rust CultCache crate and derive macro
|
||||
- `cultnet-rs`: Rust CultNet crate
|
||||
- `cultcache-py`: Python CultCache package
|
||||
- `GameCult.Caching.Tests`: NUnit tests for cache and backing-store behavior
|
||||
- `GameCult.Networking.Tests`: NUnit tests for networking behavior
|
||||
- `GameCult.Unity`: CultUI, a Unity runtime UI composition framework with reflective inspector generation, prefab-backed field resolvers, reusable controls, and a demo project packaged for UPM-style consumption
|
||||
- `packages/cultcache-ts`: TypeScript CultCache with MessagePack persistence and inspector tooling
|
||||
- `packages/cultnet-ts`: TypeScript CultNet schema-v0 contracts, framing, discovery, raw document replication, and interop tests
|
||||
- `packages/cultmesh-ts`: TypeScript CultMesh local node and mesh catalog surface for local runtimes such as VoidBot
|
||||
- `packages/cultmesh-browser`: browser-safe, read-only CultMesh document leases and typed operations over an Odin-resolved WebSocket route
|
||||
- `packages/cultcache-py`: Python CultCache with CultCache v1 wire parity
|
||||
- `packages/cultnet-py`: Python CultNet contracts, framing, RUDP transport, replication, and interop peer
|
||||
- `packages/cultmesh-py`: Python CultMesh local node, discovery, sessions, local server, and daemon
|
||||
- `packages/cultcache-rs`: Rust CultCache and derive macro
|
||||
- `packages/cultnet-rs`: Rust CultNet contracts, framing, discovery, and interop peer
|
||||
- `packages/cultmesh-kotlin`: Kotlin/JVM CultMesh and CultNet surface for Android-adjacent runtimes
|
||||
|
||||
## Repository Layout
|
||||
|
||||
```text
|
||||
package.json
|
||||
src/
|
||||
GameCult.Logging/
|
||||
GameCult.Caching/
|
||||
GameCult.Caching.MessagePack/
|
||||
GameCult.Geometry/
|
||||
GameCult.Caching.NewtonsoftJson/
|
||||
GameCult.Caching.MessagePack.Generator/
|
||||
GameCult.Caching.MessagePack.Analyzers/
|
||||
GameCult.Networking/
|
||||
GameCult.Networking.WebSockets/
|
||||
GameCult.Mesh/
|
||||
GameCult.Unity/
|
||||
tests/
|
||||
GameCult.Caching.Tests/
|
||||
GameCult.Geometry.Tests/
|
||||
GameCult.Networking.Tests/
|
||||
packages/
|
||||
cultmath/
|
||||
cultcache-ts/
|
||||
cultnet-ts/
|
||||
cultmesh-ts/
|
||||
cultmesh-browser/
|
||||
cultmesh-kotlin/
|
||||
cultcache-py/
|
||||
cultnet-py/
|
||||
cultmesh-py/
|
||||
crates/
|
||||
cultcache-rs/
|
||||
cultnet-rs/
|
||||
python/
|
||||
cultcache-py/
|
||||
```
|
||||
|
||||
## Build
|
||||
|
|
@ -186,42 +103,6 @@ dotnet build CultLib.sln
|
|||
dotnet test CultLib.sln
|
||||
```
|
||||
|
||||
TypeScript package tests:
|
||||
|
||||
```powershell
|
||||
npm test --workspace packages/cultcache-ts
|
||||
npm test --workspace packages/cultnet-ts
|
||||
npm run test:interop --workspace packages/cultnet-ts
|
||||
npm test --workspace packages/cultmesh-ts
|
||||
npm test --workspace packages/cultmesh-browser
|
||||
```
|
||||
|
||||
Measured reactive, retained-session, and shared-memory hot-body gates:
|
||||
|
||||
```powershell
|
||||
pwsh -File ./scripts/measure-reactive-document-performance.ps1 -Quick
|
||||
pwsh -File ./scripts/verify-eve-getting-started.ps1
|
||||
```
|
||||
|
||||
The first command measures the same 16 KiB document workload in C#,
|
||||
TypeScript, and Python and includes a mapped hot-body probe with explicit copy
|
||||
telemetry on Windows named maps and Unix file-backed maps. The second includes
|
||||
10,000 real WebSocket operations on one retained
|
||||
identity-owned C# session after provider route replacement.
|
||||
|
||||
Rust package tests:
|
||||
|
||||
```powershell
|
||||
cargo test --locked --manifest-path packages/cultcache-rs/Cargo.toml
|
||||
cargo test --locked --manifest-path packages/cultnet-rs/Cargo.toml
|
||||
```
|
||||
|
||||
Kotlin package build:
|
||||
|
||||
```powershell
|
||||
.\packages\cultmesh-kotlin\build.ps1
|
||||
```
|
||||
|
||||
## Common Concepts
|
||||
|
||||
### `DatabaseEntry`
|
||||
|
|
@ -258,23 +139,41 @@ public class ItemData : DatabaseEntry, INamedEntry
|
|||
- backing stores are persistence adapters
|
||||
- indexes and name maps are maintained inside the cache, not inside the store
|
||||
|
||||
### Multiple Backing Stores
|
||||
### Important: Multiple Backing Stores
|
||||
|
||||
Every document type has exactly one home store. There are no mirrors.
|
||||
When multiple backing stores are added, behavior depends on how they are registered.
|
||||
|
||||
If a store is added with domain types:
|
||||
|
||||
```csharp
|
||||
cache.AddBackingStore(catalogStore, typeof(ItemData), typeof(Faction));
|
||||
cache.AddBackingStore(runStore, typeof(SavedGame));
|
||||
cache.AddBackingStore(playerStore, typeof(PlayerData));
|
||||
cache.AddBackingStore(settingsStore, typeof(AppSettings));
|
||||
```
|
||||
|
||||
- the home is chosen by the document's runtime type: the most derived routed type wins, otherwise the untyped store
|
||||
- at most one untyped store; a type claimed by two stores is an error
|
||||
- a write with no home is an error once any store is attached
|
||||
- attaching a store reads it; attach routed stores first and the untyped store (if any) last, because a record's home cannot move after it is loaded
|
||||
- loading never writes: opening and flushing without a mutation leaves every file byte-identical
|
||||
- a read-only store refuses writes and is skipped by flush
|
||||
then that store becomes the direct persistence target for those types.
|
||||
|
||||
The contract is `src/GameCult.Caching/Contracts/cultcache-store-composition.md`. Until the C# cache implements it, `AddBackingStore` takes no home types and every attached store receives every record; attach one store per cache.
|
||||
If a store is added without domain types:
|
||||
|
||||
```csharp
|
||||
cache.AddBackingStore(primaryStore);
|
||||
cache.AddBackingStore(mirrorStore);
|
||||
```
|
||||
|
||||
then the first generic store acts as the primary writable store for non-domain-specific entries. Additional generic stores subscribe to the existing stores and mirror their change events.
|
||||
|
||||
Implications:
|
||||
|
||||
- order matters for generic stores
|
||||
- `AddAsync` writes to the type-specific store when one exists
|
||||
- otherwise `AddAsync` writes to the first generic store
|
||||
- later generic stores do not become co-primaries; they mirror earlier stores
|
||||
- `PullAllBackingStoresAsync` pulls from every registered store
|
||||
|
||||
Recommended patterns:
|
||||
|
||||
- use one generic primary store if you want simple persistence
|
||||
- use domain-specific stores when different entry types belong in different persistence layers
|
||||
- treat additional generic stores as mirrors or downstream replicas, not independent write targets
|
||||
|
||||
## Example: Cache + Networking
|
||||
|
||||
|
|
@ -369,7 +268,9 @@ Each subproject has a local README with package-specific detail:
|
|||
- [GameCult.Logging](src/GameCult.Logging/README.md)
|
||||
- [GameCult.Caching](src/GameCult.Caching/README.md)
|
||||
- [GameCult.Caching.MessagePack](src/GameCult.Caching.MessagePack/README.md)
|
||||
- [GameCult.Geometry](src/GameCult.Geometry/README.md)
|
||||
- [GameCult.Caching.NewtonsoftJson](src/GameCult.Caching.NewtonsoftJson/README.md)
|
||||
- [GameCult.Caching.MessagePack.Generator](src/GameCult.Caching.MessagePack.Generator/README.md)
|
||||
- [GameCult.Caching.MessagePack.Analyzers](src/GameCult.Caching.MessagePack.Analyzers/README.md)
|
||||
- [GameCult.Networking](src/GameCult.Networking/README.md)
|
||||
- [GameCult.Mesh](src/GameCult.Mesh/README.md)
|
||||
- [Durable Node Quickstart](src/GameCult.Mesh/docs/durable-node-quickstart.md)
|
||||
|
|
|
|||
|
|
@ -1,44 +0,0 @@
|
|||
{
|
||||
"nowUnixMilliseconds": 1800000000000,
|
||||
"odinRoot": {
|
||||
"keyId": "odin-vector",
|
||||
"x": "shJLGtmRrW6D87VQKv0xYQekLIfEkeN7dVawwpmIKWM=",
|
||||
"y": "iR6Gx3aVCghzSyo7TqXqr+1397L73KDNZuzN2cZ55IE="
|
||||
},
|
||||
"route": {
|
||||
"verseId": "aetheria",
|
||||
"authorityRuntimeId": "aetheria-daemon",
|
||||
"endpoint": "wss://provider.example/mesh",
|
||||
"protocolIds": [
|
||||
"cultmesh.content.v1",
|
||||
"cultmesh.documents.v1"
|
||||
],
|
||||
"priority": 7,
|
||||
"generation": "vector-generation-1",
|
||||
"certificate": {
|
||||
"providerKey": {
|
||||
"keyId": "provider-vector",
|
||||
"x": "6XIvgx3W1q7lJFEV0yYbeKWNFgssq54BHBuh9gCwcH8=",
|
||||
"y": "oi1FiKraueLic+VemzOx18MNwG6thmZMUWeqNw6vNOk="
|
||||
},
|
||||
"odinKeyId": "odin-vector",
|
||||
"issuedAtUnixMilliseconds": 1799999940000,
|
||||
"expiresAtUnixMilliseconds": 1800003600000,
|
||||
"signature": "ZHuELFuCNNfbJt1T2mx1D9ZHXyxBedacDetmryMYhWKQxfROncltymkmL5KXl+1h8tDK6NytJCGy+7mYlb/DMA=="
|
||||
}
|
||||
},
|
||||
"sessionProof": {
|
||||
"request": {
|
||||
"schemaVersion": "cultmesh.session_open.v2",
|
||||
"messageId": "vector-message-1",
|
||||
"sourceRuntimeId": "vector-consumer",
|
||||
"verseId": "aetheria",
|
||||
"authorityRuntimeId": "aetheria-daemon",
|
||||
"protocolId": "cultmesh.documents.v1",
|
||||
"routeGeneration": "vector-generation-1",
|
||||
"clientNonce": "VczqjH8NdBaOb+rh8xb6P0xZjWD1el2ReNB8Vbp52ko="
|
||||
},
|
||||
"providerKeyId": "provider-vector",
|
||||
"providerSignature": "6kGxSu/pwcR4lzh/7Av9nhblVIwIwVFzB7kY34vVvkpaFAbAxt8mWqIyZDTftE28G1g+NL4Ea41C3QsuImmkaA=="
|
||||
}
|
||||
}
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
{
|
||||
"nowUnixMilliseconds": 1800000000000,
|
||||
"odinRoot": {
|
||||
"keyId": "odin-ts-vector",
|
||||
"x": "lqw9TE0EyuDU5Ghe8SafIbBBYkhHMUF7HXJQUc0nXsw=",
|
||||
"y": "nUj+Xhakih97JiJcTUNMHM9JIo7MVQaauuAkCXph+tw="
|
||||
},
|
||||
"route": {
|
||||
"verseId": "aetheria",
|
||||
"authorityRuntimeId": "aetheria-daemon",
|
||||
"endpoint": "cultmesh-state+quic://provider.example:4433/?cert-sha256=ABCDEF",
|
||||
"protocolIds": [
|
||||
"cultmesh.documents.v1",
|
||||
"cultmesh.content.v1",
|
||||
"cultmesh.realtime.v1"
|
||||
],
|
||||
"priority": 13,
|
||||
"generation": "ts-generation-ünïcode-∞-1",
|
||||
"certificate": {
|
||||
"providerKey": {
|
||||
"keyId": "provider-ts-vector",
|
||||
"x": "JKyjtWnoE5fhSWbeqr188SbReQWCjssf5mSMEa5pV+E=",
|
||||
"y": "vtduzojDpbT49sbxBSsBQ+f3PG3rm+CUk/MTy2MM/ws="
|
||||
},
|
||||
"odinKeyId": "odin-ts-vector",
|
||||
"issuedAtUnixMilliseconds": 1799999940000,
|
||||
"expiresAtUnixMilliseconds": 1800003600000,
|
||||
"signature": "NS5a7X8fNqTi1CdpPAcJaMmEsozwFRoygTW4z+JlhHFq7uaZcb4G7NwoEpPqo/Fv+UA7pNl5N+qUMuSD/oAq1Q=="
|
||||
}
|
||||
},
|
||||
"sessionProof": {
|
||||
"request": {
|
||||
"schemaVersion": "cultmesh.session_open.v2",
|
||||
"messageId": "ts-vector-message-1",
|
||||
"sourceRuntimeId": "ts-vector-consumer",
|
||||
"verseId": "aetheria",
|
||||
"authorityRuntimeId": "aetheria-daemon",
|
||||
"protocolId": "cultmesh.documents.v1",
|
||||
"routeGeneration": "ts-generation-ünïcode-∞-1",
|
||||
"clientNonce": "HICtAmV++1MarssY04Tkyn1j9qVEcOMp/P5Ce1M0Yec="
|
||||
},
|
||||
"providerKeyId": "provider-ts-vector",
|
||||
"providerSignature": "OgJHkmw3fhPRS5TXxZm94yZvkWAV5TPDuvG+/zIVlnU7OFENZ0Nn0Pdx0IT/vDfEWXD+8/+sCZVFIFwa4tUjsg=="
|
||||
}
|
||||
}
|
||||
|
|
@ -1,702 +0,0 @@
|
|||
{
|
||||
"artifacts": [
|
||||
{
|
||||
"artifactIdUnits": [
|
||||
101,
|
||||
117,
|
||||
114,
|
||||
101,
|
||||
107,
|
||||
97,
|
||||
47,
|
||||
99,
|
||||
111,
|
||||
110,
|
||||
116,
|
||||
101,
|
||||
110,
|
||||
116,
|
||||
45,
|
||||
118,
|
||||
101,
|
||||
99,
|
||||
116,
|
||||
111,
|
||||
114
|
||||
],
|
||||
"versionUnits": [],
|
||||
"contentHash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"recordKey": "mesh:cdn:artifact:eureka-content-vector:unversioned:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
{
|
||||
"artifactIdUnits": [
|
||||
32,
|
||||
32,
|
||||
77,
|
||||
105,
|
||||
120,
|
||||
101,
|
||||
100,
|
||||
32,
|
||||
67,
|
||||
97,
|
||||
115,
|
||||
101,
|
||||
47,
|
||||
80,
|
||||
97,
|
||||
116,
|
||||
104,
|
||||
32,
|
||||
32
|
||||
],
|
||||
"versionUnits": [
|
||||
32,
|
||||
32,
|
||||
32
|
||||
],
|
||||
"contentHash": "SHA256:E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
|
||||
"recordKey": "mesh:cdn:artifact:mixed-case-path:unversioned:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
{
|
||||
"artifactIdUnits": [
|
||||
304,
|
||||
115,
|
||||
116,
|
||||
97,
|
||||
110,
|
||||
98,
|
||||
117,
|
||||
108
|
||||
],
|
||||
"versionUnits": [
|
||||
49,
|
||||
46,
|
||||
48,
|
||||
46,
|
||||
48
|
||||
],
|
||||
"contentHash": " e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 ",
|
||||
"recordKey": "mesh:cdn:artifact:\u0130stanbul:1.0.0:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
{
|
||||
"artifactIdUnits": [
|
||||
913,
|
||||
931
|
||||
],
|
||||
"versionUnits": [
|
||||
86,
|
||||
50,
|
||||
32,
|
||||
66,
|
||||
101,
|
||||
116,
|
||||
97
|
||||
],
|
||||
"contentHash": " sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"recordKey": "mesh:cdn:artifact:\u03B1\u03C3:v2-beta:sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
{
|
||||
"artifactIdUnits": [
|
||||
65279,
|
||||
98,
|
||||
111,
|
||||
109
|
||||
],
|
||||
"versionUnits": [
|
||||
252
|
||||
],
|
||||
"contentHash": "sha256:sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"recordKey": "mesh:cdn:artifact:bom:\u00FC:sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
{
|
||||
"artifactIdUnits": [
|
||||
133,
|
||||
110,
|
||||
101,
|
||||
108,
|
||||
133
|
||||
],
|
||||
"versionUnits": [],
|
||||
"contentHash": "Sha256:\u0130\u03A3\uD801\uDC00",
|
||||
"recordKey": "mesh:cdn:artifact:nel:unversioned:\u0130\u03C3\uD801\uDC28"
|
||||
},
|
||||
{
|
||||
"artifactIdUnits": [
|
||||
26085,
|
||||
26412,
|
||||
35486,
|
||||
47,
|
||||
36039,
|
||||
29987
|
||||
],
|
||||
"versionUnits": [
|
||||
32,
|
||||
32,
|
||||
32
|
||||
],
|
||||
"contentHash": "sha256:",
|
||||
"recordKey": "mesh:cdn:artifact:\u65E5\u672C\u8A9E-\u8CC7\u7523:unversioned:"
|
||||
},
|
||||
{
|
||||
"artifactIdUnits": [
|
||||
55357,
|
||||
56898,
|
||||
32,
|
||||
115,
|
||||
109,
|
||||
105,
|
||||
108,
|
||||
101
|
||||
],
|
||||
"versionUnits": [
|
||||
49,
|
||||
46,
|
||||
48,
|
||||
46,
|
||||
48
|
||||
],
|
||||
"contentHash": "\u017Fha256:abc",
|
||||
"recordKey": "mesh:cdn:artifact:smile:1.0.0:\u017Fha256:abc"
|
||||
},
|
||||
{
|
||||
"artifactIdUnits": [
|
||||
45,
|
||||
45,
|
||||
45
|
||||
],
|
||||
"versionUnits": [
|
||||
86,
|
||||
50,
|
||||
32,
|
||||
66,
|
||||
101,
|
||||
116,
|
||||
97
|
||||
],
|
||||
"contentHash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"recordKey": "mesh:cdn:artifact:cb3f91d54eee30e53e35b2b99905f70f169ed549fd78909d3dac2defc9ed8d3b:v2-beta:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
{
|
||||
"artifactIdUnits": [
|
||||
97,
|
||||
55296,
|
||||
98
|
||||
],
|
||||
"versionUnits": [
|
||||
252
|
||||
],
|
||||
"contentHash": "SHA256:E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
|
||||
"recordKey": "mesh:cdn:artifact:a-b:\u00FC:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
{
|
||||
"artifactIdUnits": [
|
||||
55296
|
||||
],
|
||||
"versionUnits": [],
|
||||
"contentHash": " e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 ",
|
||||
"recordKey": "mesh:cdn:artifact:83d544ccc223c057d2bf80d3f2a32982c32c3c0db8e2674820da5064783fb097:unversioned:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
{
|
||||
"artifactIdUnits": [
|
||||
120,
|
||||
178,
|
||||
121
|
||||
],
|
||||
"versionUnits": [
|
||||
32,
|
||||
32,
|
||||
32
|
||||
],
|
||||
"contentHash": " sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"recordKey": "mesh:cdn:artifact:x-y:unversioned:sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
{
|
||||
"artifactIdUnits": [
|
||||
1635,
|
||||
100
|
||||
],
|
||||
"versionUnits": [
|
||||
49,
|
||||
46,
|
||||
48,
|
||||
46,
|
||||
48
|
||||
],
|
||||
"contentHash": "sha256:sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"recordKey": "mesh:cdn:artifact:\u0663d:1.0.0:sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
{
|
||||
"artifactIdUnits": [
|
||||
55297,
|
||||
56320,
|
||||
65
|
||||
],
|
||||
"versionUnits": [
|
||||
86,
|
||||
50,
|
||||
32,
|
||||
66,
|
||||
101,
|
||||
116,
|
||||
97
|
||||
],
|
||||
"contentHash": "Sha256:\u0130\u03A3\uD801\uDC00",
|
||||
"recordKey": "mesh:cdn:artifact:a:v2-beta:\u0130\u03C3\uD801\uDC28"
|
||||
},
|
||||
{
|
||||
"artifactIdUnits": [
|
||||
32,
|
||||
32,
|
||||
45,
|
||||
45,
|
||||
45,
|
||||
32,
|
||||
32
|
||||
],
|
||||
"versionUnits": [
|
||||
252
|
||||
],
|
||||
"contentHash": "sha256:",
|
||||
"recordKey": "mesh:cdn:artifact:fcd2a2fb27957aa9a10d2d9eca16ccbc9c35a76933b03f470211d327f6946c3f:\u00FC:"
|
||||
},
|
||||
{
|
||||
"artifactIdUnits": [
|
||||
9398
|
||||
],
|
||||
"versionUnits": [],
|
||||
"contentHash": "\u017Fha256:abc",
|
||||
"recordKey": "mesh:cdn:artifact:7d9633ae307dae04a8b362df41dca4b38a653823d69f27a259e7b6928508d3a6:unversioned:\u017Fha256:abc"
|
||||
},
|
||||
{
|
||||
"artifactIdUnits": [
|
||||
8555
|
||||
],
|
||||
"versionUnits": [
|
||||
32,
|
||||
32,
|
||||
32
|
||||
],
|
||||
"contentHash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"recordKey": "mesh:cdn:artifact:8c0e55c55f47de02406174ec976279a977e2e73ea5aec8ab90f94c40a6ab2d60:unversioned:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
{
|
||||
"artifactIdUnits": [
|
||||
101,
|
||||
117,
|
||||
114,
|
||||
101,
|
||||
107,
|
||||
97,
|
||||
47,
|
||||
99,
|
||||
111,
|
||||
110,
|
||||
116,
|
||||
101,
|
||||
110,
|
||||
116,
|
||||
45,
|
||||
118,
|
||||
101,
|
||||
99,
|
||||
116,
|
||||
111,
|
||||
114
|
||||
],
|
||||
"versionUnits": [],
|
||||
"contentHash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"recordKey": "mesh:cdn:artifact:eureka-content-vector:unversioned:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
{
|
||||
"artifactIdUnits": [
|
||||
101,
|
||||
117,
|
||||
114,
|
||||
101,
|
||||
107,
|
||||
97,
|
||||
47,
|
||||
99,
|
||||
111,
|
||||
110,
|
||||
116,
|
||||
101,
|
||||
110,
|
||||
116,
|
||||
45,
|
||||
118,
|
||||
101,
|
||||
99,
|
||||
116,
|
||||
111,
|
||||
114
|
||||
],
|
||||
"versionUnits": [
|
||||
32,
|
||||
32,
|
||||
32
|
||||
],
|
||||
"contentHash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"recordKey": "mesh:cdn:artifact:eureka-content-vector:unversioned:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
{
|
||||
"artifactIdUnits": [
|
||||
101,
|
||||
117,
|
||||
114,
|
||||
101,
|
||||
107,
|
||||
97,
|
||||
47,
|
||||
99,
|
||||
111,
|
||||
110,
|
||||
116,
|
||||
101,
|
||||
110,
|
||||
116,
|
||||
45,
|
||||
118,
|
||||
101,
|
||||
99,
|
||||
116,
|
||||
111,
|
||||
114
|
||||
],
|
||||
"versionUnits": [
|
||||
49,
|
||||
46,
|
||||
48,
|
||||
46,
|
||||
48
|
||||
],
|
||||
"contentHash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"recordKey": "mesh:cdn:artifact:eureka-content-vector:1.0.0:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
{
|
||||
"artifactIdUnits": [
|
||||
101,
|
||||
117,
|
||||
114,
|
||||
101,
|
||||
107,
|
||||
97,
|
||||
47,
|
||||
99,
|
||||
111,
|
||||
110,
|
||||
116,
|
||||
101,
|
||||
110,
|
||||
116,
|
||||
45,
|
||||
118,
|
||||
101,
|
||||
99,
|
||||
116,
|
||||
111,
|
||||
114
|
||||
],
|
||||
"versionUnits": [
|
||||
86,
|
||||
50,
|
||||
32,
|
||||
66,
|
||||
101,
|
||||
116,
|
||||
97
|
||||
],
|
||||
"contentHash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"recordKey": "mesh:cdn:artifact:eureka-content-vector:v2-beta:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
{
|
||||
"artifactIdUnits": [
|
||||
101,
|
||||
117,
|
||||
114,
|
||||
101,
|
||||
107,
|
||||
97,
|
||||
47,
|
||||
99,
|
||||
111,
|
||||
110,
|
||||
116,
|
||||
101,
|
||||
110,
|
||||
116,
|
||||
45,
|
||||
118,
|
||||
101,
|
||||
99,
|
||||
116,
|
||||
111,
|
||||
114
|
||||
],
|
||||
"versionUnits": [
|
||||
252
|
||||
],
|
||||
"contentHash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"recordKey": "mesh:cdn:artifact:eureka-content-vector:\u00FC:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
{
|
||||
"artifactIdUnits": [
|
||||
101,
|
||||
117,
|
||||
114,
|
||||
101,
|
||||
107,
|
||||
97,
|
||||
47,
|
||||
99,
|
||||
111,
|
||||
110,
|
||||
116,
|
||||
101,
|
||||
110,
|
||||
116,
|
||||
45,
|
||||
118,
|
||||
101,
|
||||
99,
|
||||
116,
|
||||
111,
|
||||
114
|
||||
],
|
||||
"versionUnits": [],
|
||||
"contentHash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"recordKey": "mesh:cdn:artifact:eureka-content-vector:unversioned:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
{
|
||||
"artifactIdUnits": [
|
||||
101,
|
||||
117,
|
||||
114,
|
||||
101,
|
||||
107,
|
||||
97,
|
||||
47,
|
||||
99,
|
||||
111,
|
||||
110,
|
||||
116,
|
||||
101,
|
||||
110,
|
||||
116,
|
||||
45,
|
||||
118,
|
||||
101,
|
||||
99,
|
||||
116,
|
||||
111,
|
||||
114
|
||||
],
|
||||
"versionUnits": [],
|
||||
"contentHash": "SHA256:E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
|
||||
"recordKey": "mesh:cdn:artifact:eureka-content-vector:unversioned:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
{
|
||||
"artifactIdUnits": [
|
||||
101,
|
||||
117,
|
||||
114,
|
||||
101,
|
||||
107,
|
||||
97,
|
||||
47,
|
||||
99,
|
||||
111,
|
||||
110,
|
||||
116,
|
||||
101,
|
||||
110,
|
||||
116,
|
||||
45,
|
||||
118,
|
||||
101,
|
||||
99,
|
||||
116,
|
||||
111,
|
||||
114
|
||||
],
|
||||
"versionUnits": [],
|
||||
"contentHash": " e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 ",
|
||||
"recordKey": "mesh:cdn:artifact:eureka-content-vector:unversioned:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
{
|
||||
"artifactIdUnits": [
|
||||
101,
|
||||
117,
|
||||
114,
|
||||
101,
|
||||
107,
|
||||
97,
|
||||
47,
|
||||
99,
|
||||
111,
|
||||
110,
|
||||
116,
|
||||
101,
|
||||
110,
|
||||
116,
|
||||
45,
|
||||
118,
|
||||
101,
|
||||
99,
|
||||
116,
|
||||
111,
|
||||
114
|
||||
],
|
||||
"versionUnits": [],
|
||||
"contentHash": " sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"recordKey": "mesh:cdn:artifact:eureka-content-vector:unversioned:sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
{
|
||||
"artifactIdUnits": [
|
||||
101,
|
||||
117,
|
||||
114,
|
||||
101,
|
||||
107,
|
||||
97,
|
||||
47,
|
||||
99,
|
||||
111,
|
||||
110,
|
||||
116,
|
||||
101,
|
||||
110,
|
||||
116,
|
||||
45,
|
||||
118,
|
||||
101,
|
||||
99,
|
||||
116,
|
||||
111,
|
||||
114
|
||||
],
|
||||
"versionUnits": [],
|
||||
"contentHash": "sha256:sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"recordKey": "mesh:cdn:artifact:eureka-content-vector:unversioned:sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
{
|
||||
"artifactIdUnits": [
|
||||
101,
|
||||
117,
|
||||
114,
|
||||
101,
|
||||
107,
|
||||
97,
|
||||
47,
|
||||
99,
|
||||
111,
|
||||
110,
|
||||
116,
|
||||
101,
|
||||
110,
|
||||
116,
|
||||
45,
|
||||
118,
|
||||
101,
|
||||
99,
|
||||
116,
|
||||
111,
|
||||
114
|
||||
],
|
||||
"versionUnits": [],
|
||||
"contentHash": "Sha256:\u0130\u03A3\uD801\uDC00",
|
||||
"recordKey": "mesh:cdn:artifact:eureka-content-vector:unversioned:\u0130\u03C3\uD801\uDC28"
|
||||
},
|
||||
{
|
||||
"artifactIdUnits": [
|
||||
101,
|
||||
117,
|
||||
114,
|
||||
101,
|
||||
107,
|
||||
97,
|
||||
47,
|
||||
99,
|
||||
111,
|
||||
110,
|
||||
116,
|
||||
101,
|
||||
110,
|
||||
116,
|
||||
45,
|
||||
118,
|
||||
101,
|
||||
99,
|
||||
116,
|
||||
111,
|
||||
114
|
||||
],
|
||||
"versionUnits": [],
|
||||
"contentHash": "sha256:",
|
||||
"recordKey": "mesh:cdn:artifact:eureka-content-vector:unversioned:"
|
||||
},
|
||||
{
|
||||
"artifactIdUnits": [
|
||||
101,
|
||||
117,
|
||||
114,
|
||||
101,
|
||||
107,
|
||||
97,
|
||||
47,
|
||||
99,
|
||||
111,
|
||||
110,
|
||||
116,
|
||||
101,
|
||||
110,
|
||||
116,
|
||||
45,
|
||||
118,
|
||||
101,
|
||||
99,
|
||||
116,
|
||||
111,
|
||||
114
|
||||
],
|
||||
"versionUnits": [],
|
||||
"contentHash": "\u017Fha256:abc",
|
||||
"recordKey": "mesh:cdn:artifact:eureka-content-vector:unversioned:\u017Fha256:abc"
|
||||
}
|
||||
],
|
||||
"chunks": [
|
||||
{
|
||||
"chunkHash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"recordKey": "mesh:cdn:chunk:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
{
|
||||
"chunkHash": "SHA256:E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
|
||||
"recordKey": "mesh:cdn:chunk:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
{
|
||||
"chunkHash": " e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 ",
|
||||
"recordKey": "mesh:cdn:chunk:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
{
|
||||
"chunkHash": " sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"recordKey": "mesh:cdn:chunk:sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
{
|
||||
"chunkHash": "sha256:sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"recordKey": "mesh:cdn:chunk:sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
{
|
||||
"chunkHash": "Sha256:\u0130\u03A3\uD801\uDC00",
|
||||
"recordKey": "mesh:cdn:chunk:\u0130\u03C3\uD801\uDC28"
|
||||
},
|
||||
{
|
||||
"chunkHash": "sha256:",
|
||||
"recordKey": "mesh:cdn:chunk:"
|
||||
},
|
||||
{
|
||||
"chunkHash": "\u017Fha256:abc",
|
||||
"recordKey": "mesh:cdn:chunk:\u017Fha256:abc"
|
||||
}
|
||||
]
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,120 +0,0 @@
|
|||
{
|
||||
"vectors": [
|
||||
{
|
||||
"label": "ts multi-chunk body",
|
||||
"kind": "manifest",
|
||||
"input": {
|
||||
"artifactId": "Pixel Heroes/Hüt ☃",
|
||||
"kind": "asset",
|
||||
"version": "",
|
||||
"mimeType": "application/x-cultnet-ts-vector",
|
||||
"createdAtUtc": "2026-10-19T00:00:00.0000000+00:00",
|
||||
"chunkSizeBytes": 131072,
|
||||
"tags": [
|
||||
"a",
|
||||
"b"
|
||||
],
|
||||
"metadata": [
|
||||
[
|
||||
"10",
|
||||
"x"
|
||||
],
|
||||
[
|
||||
"alpha",
|
||||
"y"
|
||||
],
|
||||
[
|
||||
"2",
|
||||
"z"
|
||||
]
|
||||
],
|
||||
"body": {
|
||||
"length": 777777,
|
||||
"multiplier": 7,
|
||||
"modulus": 256
|
||||
}
|
||||
},
|
||||
"recordKey": "mesh:cdn:artifact:pixel-heroes-hüt:unversioned:cf8a453a36981321977355448d24df49bcefee22be6e3730b9140e87c29013f9",
|
||||
"messagePackBase64": "mrVQaXhlbCBIZXJvZXMvSMO8dCDimIOlYXNzZXSg2UBjZjhhNDUzYTM2OTgxMzIxOTc3MzU1NDQ4ZDI0ZGY0OWJjZWZlZTIyYmU2ZTM3MzBiOTE0MGU4N2MyOTAxM2Y5zgAL3jG/YXBwbGljYXRpb24veC1jdWx0bmV0LXRzLXZlY3RvctkhMjAyNi0xMC0xOVQwMDowMDowMC4wMDAwMDAwKzAwOjAwlpXZQDM3N2M3YjBjYzIyOWY0NzA1NjcwZDYzZDU0NGMyNzViNjYzZGY2ZThjODMxYjA5ODQ2YTVjNDhjY2EwOGI4NDgAzgACAADZT21lc2g6Y2RuOmNodW5rOjM3N2M3YjBjYzIyOWY0NzA1NjcwZDYzZDU0NGMyNzViNjYzZGY2ZThjODMxYjA5ODQ2YTVjNDhjY2EwOGI4NDihMJXZQDM3N2M3YjBjYzIyOWY0NzA1NjcwZDYzZDU0NGMyNzViNjYzZGY2ZThjODMxYjA5ODQ2YTVjNDhjY2EwOGI4NDjOAAIAAM4AAgAA2U9tZXNoOmNkbjpjaHVuazozNzdjN2IwY2MyMjlmNDcwNTY3MGQ2M2Q1NDRjMjc1YjY2M2RmNmU4YzgzMWIwOTg0NmE1YzQ4Y2NhMDhiODQ4pjEzMTA3MpXZQDM3N2M3YjBjYzIyOWY0NzA1NjcwZDYzZDU0NGMyNzViNjYzZGY2ZThjODMxYjA5ODQ2YTVjNDhjY2EwOGI4NDjOAAQAAM4AAgAA2U9tZXNoOmNkbjpjaHVuazozNzdjN2IwY2MyMjlmNDcwNTY3MGQ2M2Q1NDRjMjc1YjY2M2RmNmU4YzgzMWIwOTg0NmE1YzQ4Y2NhMDhiODQ4pjI2MjE0NJXZQDM3N2M3YjBjYzIyOWY0NzA1NjcwZDYzZDU0NGMyNzViNjYzZGY2ZThjODMxYjA5ODQ2YTVjNDhjY2EwOGI4NDjOAAYAAM4AAgAA2U9tZXNoOmNkbjpjaHVuazozNzdjN2IwY2MyMjlmNDcwNTY3MGQ2M2Q1NDRjMjc1YjY2M2RmNmU4YzgzMWIwOTg0NmE1YzQ4Y2NhMDhiODQ4pjM5MzIxNpXZQDM3N2M3YjBjYzIyOWY0NzA1NjcwZDYzZDU0NGMyNzViNjYzZGY2ZThjODMxYjA5ODQ2YTVjNDhjY2EwOGI4NDjOAAgAAM4AAgAA2U9tZXNoOmNkbjpjaHVuazozNzdjN2IwY2MyMjlmNDcwNTY3MGQ2M2Q1NDRjMjc1YjY2M2RmNmU4YzgzMWIwOTg0NmE1YzQ4Y2NhMDhiODQ4pjUyNDI4OJXZQGEwYmI2OWY0NDg2MWViM2RiNTYwMjZhMWFiYmY5MWZmYTYyMTMyNTA4ZDVhMDZlMGQwZGRjNWNjMjZiZTMzZmPOAAoAAM4AAd4x2U9tZXNoOmNkbjpjaHVuazphMGJiNjlmNDQ4NjFlYjNkYjU2MDI2YTFhYmJmOTFmZmE2MjEzMjUwOGQ1YTA2ZTBkMGRkYzVjYzI2YmUzM2ZjpjY1NTM2MJKhYaFig6IxMKF4pWFscGhhoXmhMqF6"
|
||||
},
|
||||
{
|
||||
"label": "ts empty body",
|
||||
"kind": "manifest",
|
||||
"input": {
|
||||
"artifactId": "Pixel Heroes/Hüt ☃",
|
||||
"kind": "asset",
|
||||
"version": "",
|
||||
"mimeType": "application/x-cultnet-ts-vector",
|
||||
"createdAtUtc": "2026-10-19T00:00:00.0000000+00:00",
|
||||
"chunkSizeBytes": 131072,
|
||||
"tags": [
|
||||
"a",
|
||||
"b"
|
||||
],
|
||||
"metadata": [
|
||||
[
|
||||
"10",
|
||||
"x"
|
||||
],
|
||||
[
|
||||
"alpha",
|
||||
"y"
|
||||
],
|
||||
[
|
||||
"2",
|
||||
"z"
|
||||
]
|
||||
],
|
||||
"body": {
|
||||
"length": 0,
|
||||
"multiplier": 7,
|
||||
"modulus": 256
|
||||
}
|
||||
},
|
||||
"recordKey": "mesh:cdn:artifact:pixel-heroes-hüt:unversioned:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"messagePackBase64": "mrVQaXhlbCBIZXJvZXMvSMO8dCDimIOlYXNzZXSg2UBlM2IwYzQ0Mjk4ZmMxYzE0OWFmYmY0Yzg5OTZmYjkyNDI3YWU0MWU0NjQ5YjkzNGNhNDk1OTkxYjc4NTJiODU1AL9hcHBsaWNhdGlvbi94LWN1bHRuZXQtdHMtdmVjdG9y2SEyMDI2LTEwLTE5VDAwOjAwOjAwLjAwMDAwMDArMDA6MDCRldlAZTNiMGM0NDI5OGZjMWMxNDlhZmJmNGM4OTk2ZmI5MjQyN2FlNDFlNDY0OWI5MzRjYTQ5NTk5MWI3ODUyYjg1NQAA2U9tZXNoOmNkbjpjaHVuazplM2IwYzQ0Mjk4ZmMxYzE0OWFmYmY0Yzg5OTZmYjkyNDI3YWU0MWU0NjQ5YjkzNGNhNDk1OTkxYjc4NTJiODU1oTCSoWGhYoOiMTCheKVhbHBoYaF5oTKheg=="
|
||||
},
|
||||
{
|
||||
"label": "ts single chunk, versioned",
|
||||
"kind": "manifest",
|
||||
"input": {
|
||||
"artifactId": "Pixel Heroes/Hüt ☃",
|
||||
"kind": "asset",
|
||||
"version": "V1 Beta",
|
||||
"mimeType": "application/x-cultnet-ts-vector",
|
||||
"createdAtUtc": "2026-10-19T00:00:00.0000000+00:00",
|
||||
"chunkSizeBytes": 4194304,
|
||||
"tags": [],
|
||||
"metadata": [],
|
||||
"body": {
|
||||
"length": 1000,
|
||||
"multiplier": 7,
|
||||
"modulus": 256
|
||||
}
|
||||
},
|
||||
"recordKey": "mesh:cdn:artifact:pixel-heroes-hüt:v1-beta:89f4ff56a25dd1db06a4ce6033603775d705fb96f30f8693733fef602a1ca532",
|
||||
"messagePackBase64": "mrVQaXhlbCBIZXJvZXMvSMO8dCDimIOlYXNzZXSnVjEgQmV0YdlAODlmNGZmNTZhMjVkZDFkYjA2YTRjZTYwMzM2MDM3NzVkNzA1ZmI5NmYzMGY4NjkzNzMzZmVmNjAyYTFjYTUzMs0D6L9hcHBsaWNhdGlvbi94LWN1bHRuZXQtdHMtdmVjdG9y2SEyMDI2LTEwLTE5VDAwOjAwOjAwLjAwMDAwMDArMDA6MDCRldlAODlmNGZmNTZhMjVkZDFkYjA2YTRjZTYwMzM2MDM3NzVkNzA1ZmI5NmYzMGY4NjkzNzMzZmVmNjAyYTFjYTUzMgDNA+jZT21lc2g6Y2RuOmNodW5rOjg5ZjRmZjU2YTI1ZGQxZGIwNmE0Y2U2MDMzNjAzNzc1ZDcwNWZiOTZmMzBmODY5MzczM2ZlZjYwMmExY2E1MzKhMJCA"
|
||||
},
|
||||
{
|
||||
"label": "ts whitespace version, padded kind and mime",
|
||||
"kind": "manifest",
|
||||
"input": {
|
||||
"artifactId": "Pixel Heroes/Hüt ☃",
|
||||
"kind": " build ",
|
||||
"version": " ",
|
||||
"mimeType": " text/plain; charset=utf-8 ",
|
||||
"createdAtUtc": "2026-10-19T00:00:00.0000000+00:00",
|
||||
"chunkSizeBytes": 4194304,
|
||||
"tags": [],
|
||||
"metadata": [],
|
||||
"body": {
|
||||
"length": 1000,
|
||||
"multiplier": 7,
|
||||
"modulus": 256
|
||||
}
|
||||
},
|
||||
"recordKey": "mesh:cdn:artifact:pixel-heroes-hüt:unversioned:89f4ff56a25dd1db06a4ce6033603775d705fb96f30f8693733fef602a1ca532",
|
||||
"messagePackBase64": "mrVQaXhlbCBIZXJvZXMvSMO8dCDimIOnIGJ1aWxkIKIgINlAODlmNGZmNTZhMjVkZDFkYjA2YTRjZTYwMzM2MDM3NzVkNzA1ZmI5NmYzMGY4NjkzNzMzZmVmNjAyYTFjYTUzMs0D6L0gIHRleHQvcGxhaW47IGNoYXJzZXQ9dXRmLTggINkhMjAyNi0xMC0xOVQwMDowMDowMC4wMDAwMDAwKzAwOjAwkZXZQDg5ZjRmZjU2YTI1ZGQxZGIwNmE0Y2U2MDMzNjAzNzc1ZDcwNWZiOTZmMzBmODY5MzczM2ZlZjYwMmExY2E1MzIAzQPo2U9tZXNoOmNkbjpjaHVuazo4OWY0ZmY1NmEyNWRkMWRiMDZhNGNlNjAzMzYwMzc3NWQ3MDVmYjk2ZjMwZjg2OTM3MzNmZWY2MDJhMWNhNTMyoTCQgA=="
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,177 +0,0 @@
|
|||
{
|
||||
"frames": [
|
||||
{
|
||||
"label": "reliable-ordered, small payload",
|
||||
"fields": {
|
||||
"channelId": "aetheria.zone-1",
|
||||
"schemaId": "cultmesh.realtime.v1",
|
||||
"bodyId": "body-7",
|
||||
"producerEpoch": 1,
|
||||
"sequence": 2,
|
||||
"delivery": "reliable-ordered",
|
||||
"payload": "AH+A/yo="
|
||||
},
|
||||
"encoding": "Q1NUMQABAAAAAAAAAAIAAAAAAAAADwAUAAYABQAAACUAAAABAGFldGhlcmlhLnpvbmUtMWN1bHRtZXNoLnJlYWx0aW1lLnYxYm9keS03AH+A/yo=",
|
||||
"encodedLength": 83,
|
||||
"sha256OfEncoding": "d04539b99790560e5e570208d92d3ac25f85909a36bfeb190c2080288cc9f1d4"
|
||||
},
|
||||
{
|
||||
"label": "latest-only, small payload",
|
||||
"fields": {
|
||||
"channelId": "aetheria.zone-1",
|
||||
"schemaId": "cultmesh.realtime.v1",
|
||||
"bodyId": "body-7",
|
||||
"producerEpoch": 3,
|
||||
"sequence": 4,
|
||||
"delivery": "latest-only",
|
||||
"payload": "AQID"
|
||||
},
|
||||
"encoding": "Q1NUMQEDAAAAAAAAAAQAAAAAAAAADwAUAAYAAwAAACUAAAABAGFldGhlcmlhLnpvbmUtMWN1bHRtZXNoLnJlYWx0aW1lLnYxYm9keS03AQID",
|
||||
"encodedLength": 81,
|
||||
"sha256OfEncoding": "2c875718cf4968979f3cd4083ba2b279e8c03815ad3447c66037ee4530b2814a"
|
||||
},
|
||||
{
|
||||
"label": "unreliable, small payload",
|
||||
"fields": {
|
||||
"channelId": "aetheria.zone-1",
|
||||
"schemaId": "cultmesh.realtime.v1",
|
||||
"bodyId": "body-7",
|
||||
"producerEpoch": 5,
|
||||
"sequence": 6,
|
||||
"delivery": "unreliable",
|
||||
"payload": "/g=="
|
||||
},
|
||||
"encoding": "Q1NUMQIFAAAAAAAAAAYAAAAAAAAADwAUAAYAAQAAACUAAAABAGFldGhlcmlhLnpvbmUtMWN1bHRtZXNoLnJlYWx0aW1lLnYxYm9keS03/g==",
|
||||
"encodedLength": 79,
|
||||
"sha256OfEncoding": "b932adf333a0ca73d3a9077e15cf9062070a3084a50a3a30c3baa53312d864b1"
|
||||
},
|
||||
{
|
||||
"label": "empty payload",
|
||||
"fields": {
|
||||
"channelId": "aetheria.zone-1",
|
||||
"schemaId": "cultmesh.realtime.v1",
|
||||
"bodyId": "body-7",
|
||||
"producerEpoch": 0,
|
||||
"sequence": 0,
|
||||
"delivery": "reliable-ordered",
|
||||
"payload": ""
|
||||
},
|
||||
"encoding": "Q1NUMQAAAAAAAAAAAAAAAAAAAAAADwAUAAYAAAAAACUAAAABAGFldGhlcmlhLnpvbmUtMWN1bHRtZXNoLnJlYWx0aW1lLnYxYm9keS03",
|
||||
"encodedLength": 78,
|
||||
"sha256OfEncoding": "06c0362f2b395bf7855522190f6a59c45c46947ce7a9a4b8be115cf54a48f419"
|
||||
},
|
||||
{
|
||||
"label": "multi-byte identities",
|
||||
"fields": {
|
||||
"channelId": "aetheria.zöne-∞",
|
||||
"schemaId": "cultmesh.realtime.€1",
|
||||
"bodyId": "bødy-\uD83D\uDD25",
|
||||
"producerEpoch": 11,
|
||||
"sequence": 12,
|
||||
"delivery": "latest-only",
|
||||
"payload": "cGF5bG9hZC3iiJ4="
|
||||
},
|
||||
"encoding": "Q1NUMQELAAAAAAAAAAwAAAAAAAAAEgAWAAoACwAAACUAAAABAGFldGhlcmlhLnrDtm5lLeKInmN1bHRtZXNoLnJlYWx0aW1lLuKCrDFiw7hkeS3wn5SlcGF5bG9hZC3iiJ4=",
|
||||
"encodedLength": 98,
|
||||
"sha256OfEncoding": "90c6ae8f1362d9e000aa57682612bb1d7606cabe2cd0c0969fdd07b816f44b1c"
|
||||
},
|
||||
{
|
||||
"label": "epoch and sequence at long.MaxValue",
|
||||
"fields": {
|
||||
"channelId": "aetheria.zone-1",
|
||||
"schemaId": "cultmesh.realtime.v1",
|
||||
"bodyId": "body-7",
|
||||
"producerEpoch": 9223372036854775807,
|
||||
"sequence": 9223372036854775807,
|
||||
"delivery": "unreliable",
|
||||
"payload": "Wg=="
|
||||
},
|
||||
"encoding": "Q1NUMQL/////////f/////////9/DwAUAAYAAQAAACUAAAABAGFldGhlcmlhLnpvbmUtMWN1bHRtZXNoLnJlYWx0aW1lLnYxYm9keS03Wg==",
|
||||
"encodedLength": 79,
|
||||
"sha256OfEncoding": "208068a668b48dc1abde9b3d7f025e7f7b6de6c480faea25c1383b6de9fd37ca"
|
||||
},
|
||||
{
|
||||
"label": "identities at exactly 65535 UTF-8 bytes",
|
||||
"fields": {
|
||||
"channelId": {
|
||||
"repeat": "ä€",
|
||||
"byteLength": 65535
|
||||
},
|
||||
"schemaId": {
|
||||
"repeat": "ۊ",
|
||||
"byteLength": 65535
|
||||
},
|
||||
"bodyId": {
|
||||
"repeat": "ñ€",
|
||||
"byteLength": 65535
|
||||
},
|
||||
"producerEpoch": 13,
|
||||
"sequence": 14,
|
||||
"delivery": "reliable-ordered",
|
||||
"payload": "ESI="
|
||||
},
|
||||
"encoding": null,
|
||||
"encodedLength": 196644,
|
||||
"sha256OfEncoding": "e3c1a353b606e86b35169efb875e76349dcfcb2d036973ee3bbe3c601fbda3e1"
|
||||
},
|
||||
{
|
||||
"label": "64 MiB payload",
|
||||
"fields": {
|
||||
"channelId": "aetheria.zone-1",
|
||||
"schemaId": "cultmesh.realtime.v1",
|
||||
"bodyId": "body-7",
|
||||
"producerEpoch": 15,
|
||||
"sequence": 16,
|
||||
"delivery": "reliable-ordered",
|
||||
"payload": {
|
||||
"ramp": 67108864
|
||||
}
|
||||
},
|
||||
"encoding": null,
|
||||
"encodedLength": 67108942,
|
||||
"sha256OfEncoding": "4d99183bdb450af854d87a81ba86a3a4c92ecc1b208675d916f1b75a9f1e7928"
|
||||
}
|
||||
],
|
||||
"malformed": [
|
||||
{
|
||||
"label": "truncated header",
|
||||
"encoding": "Q1NUMQABAAAAAAAAAAIAAAAAAAAADwAUAAYAAwAAACUAAAAB",
|
||||
"message": "Realtime frame header is truncated."
|
||||
},
|
||||
{
|
||||
"label": "wrong magic",
|
||||
"encoding": "vFNUMQABAAAAAAAAAAIAAAAAAAAADwAUAAYAAwAAACUAAAABAGFldGhlcmlhLnpvbmUtMWN1bHRtZXNoLnJlYWx0aW1lLnYxYm9keS03CQkJ",
|
||||
"message": "Realtime frame magic is invalid."
|
||||
},
|
||||
{
|
||||
"label": "wire version 2",
|
||||
"encoding": "Q1NUMQABAAAAAAAAAAIAAAAAAAAADwAUAAYAAwAAACUAAAACAGFldGhlcmlhLnpvbmUtMWN1bHRtZXNoLnJlYWx0aW1lLnYxYm9keS03CQkJ",
|
||||
"message": "Realtime frame wire version is unsupported."
|
||||
},
|
||||
{
|
||||
"label": "header size 36",
|
||||
"encoding": "Q1NUMQABAAAAAAAAAAIAAAAAAAAADwAUAAYAAwAAACQAAAABAGFldGhlcmlhLnpvbmUtMWN1bHRtZXNoLnJlYWx0aW1lLnYxYm9keS03CQkJ",
|
||||
"message": "Realtime frame wire version is unsupported."
|
||||
},
|
||||
{
|
||||
"label": "delivery 3",
|
||||
"encoding": "Q1NUMQMBAAAAAAAAAAIAAAAAAAAADwAUAAYAAwAAACUAAAABAGFldGhlcmlhLnpvbmUtMWN1bHRtZXNoLnJlYWx0aW1lLnYxYm9keS03CQkJ",
|
||||
"message": "Realtime frame delivery mode is invalid."
|
||||
},
|
||||
{
|
||||
"label": "delivery 255",
|
||||
"encoding": "Q1NUMf8BAAAAAAAAAAIAAAAAAAAADwAUAAYAAwAAACUAAAABAGFldGhlcmlhLnpvbmUtMWN1bHRtZXNoLnJlYWx0aW1lLnYxYm9keS03CQkJ",
|
||||
"message": "Realtime frame delivery mode is invalid."
|
||||
},
|
||||
{
|
||||
"label": "payload length -1",
|
||||
"encoding": "Q1NUMQABAAAAAAAAAAIAAAAAAAAADwAUAAYAAwAAgCUAAAABAGFldGhlcmlhLnpvbmUtMWN1bHRtZXNoLnJlYWx0aW1lLnYxYm9keS03CQkJ",
|
||||
"message": "Realtime frame length is invalid."
|
||||
},
|
||||
{
|
||||
"label": "length sum off by one",
|
||||
"encoding": "Q1NUMQABAAAAAAAAAAIAAAAAAAAADwAUAAYAAwAAACUAAAABAGFldGhlcmlhLnpvbmUtMWN1bHRtZXNoLnJlYWx0aW1lLnYxYm9keS03CQkJAA==",
|
||||
"message": "Realtime frame length is invalid."
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,177 +0,0 @@
|
|||
{
|
||||
"frames": [
|
||||
{
|
||||
"label": "ts reliable-ordered, small payload",
|
||||
"fields": {
|
||||
"channelId": "ts.zone-a",
|
||||
"schemaId": "cultmesh.realtime.v1",
|
||||
"bodyId": "ts-body-1",
|
||||
"producerEpoch": 21,
|
||||
"sequence": 22,
|
||||
"delivery": "reliable-ordered",
|
||||
"payload": "AAH+/w=="
|
||||
},
|
||||
"encoding": "Q1NUMQAVAAAAAAAAABYAAAAAAAAACQAUAAkABAAAACUAAAABAHRzLnpvbmUtYWN1bHRtZXNoLnJlYWx0aW1lLnYxdHMtYm9keS0xAAH+/w==",
|
||||
"encodedLength": 79,
|
||||
"sha256OfEncoding": "68c264a42ce34e540e9dbee31dab5b73dec98c767f0b44591ce6a477cd17fc04"
|
||||
},
|
||||
{
|
||||
"label": "ts latest-only, small payload",
|
||||
"fields": {
|
||||
"channelId": "ts.zone-a",
|
||||
"schemaId": "cultmesh.realtime.v1",
|
||||
"bodyId": "ts-body-1",
|
||||
"producerEpoch": 23,
|
||||
"sequence": 24,
|
||||
"delivery": "latest-only",
|
||||
"payload": "f4A="
|
||||
},
|
||||
"encoding": "Q1NUMQEXAAAAAAAAABgAAAAAAAAACQAUAAkAAgAAACUAAAABAHRzLnpvbmUtYWN1bHRtZXNoLnJlYWx0aW1lLnYxdHMtYm9keS0xf4A=",
|
||||
"encodedLength": 77,
|
||||
"sha256OfEncoding": "3d4f49f4aa2c1f132c3a09ee83555c13e0bc036d636524a972e2829cf417b959"
|
||||
},
|
||||
{
|
||||
"label": "ts unreliable, small payload",
|
||||
"fields": {
|
||||
"channelId": "ts.zone-a",
|
||||
"schemaId": "cultmesh.realtime.v1",
|
||||
"bodyId": "ts-body-1",
|
||||
"producerEpoch": 25,
|
||||
"sequence": 26,
|
||||
"delivery": "unreliable",
|
||||
"payload": "pQ=="
|
||||
},
|
||||
"encoding": "Q1NUMQIZAAAAAAAAABoAAAAAAAAACQAUAAkAAQAAACUAAAABAHRzLnpvbmUtYWN1bHRtZXNoLnJlYWx0aW1lLnYxdHMtYm9keS0xpQ==",
|
||||
"encodedLength": 76,
|
||||
"sha256OfEncoding": "2c2faec604850959d44ee65d87d2ea59462b667c5d0db8565a8c159d75301851"
|
||||
},
|
||||
{
|
||||
"label": "ts empty payload",
|
||||
"fields": {
|
||||
"channelId": "ts.zone-a",
|
||||
"schemaId": "cultmesh.realtime.v1",
|
||||
"bodyId": "ts-body-1",
|
||||
"producerEpoch": 0,
|
||||
"sequence": 0,
|
||||
"delivery": "latest-only",
|
||||
"payload": ""
|
||||
},
|
||||
"encoding": "Q1NUMQEAAAAAAAAAAAAAAAAAAAAACQAUAAkAAAAAACUAAAABAHRzLnpvbmUtYWN1bHRtZXNoLnJlYWx0aW1lLnYxdHMtYm9keS0x",
|
||||
"encodedLength": 75,
|
||||
"sha256OfEncoding": "6d2a04b399f32db4086e728194249b0279330ffa5517cdd82228f691a0f10708"
|
||||
},
|
||||
{
|
||||
"label": "ts multi-byte identities",
|
||||
"fields": {
|
||||
"channelId": "ts.zøne-∂",
|
||||
"schemaId": "cultmesh.realtime.µ1",
|
||||
"bodyId": "ts-bödy-🧊",
|
||||
"producerEpoch": 27,
|
||||
"sequence": 28,
|
||||
"delivery": "unreliable",
|
||||
"payload": "dHMtcGF5bG9hZC3iiII="
|
||||
},
|
||||
"encoding": "Q1NUMQIbAAAAAAAAABwAAAAAAAAADAAVAA0ADgAAACUAAAABAHRzLnrDuG5lLeKIgmN1bHRtZXNoLnJlYWx0aW1lLsK1MXRzLWLDtmR5LfCfp4p0cy1wYXlsb2FkLeKIgg==",
|
||||
"encodedLength": 97,
|
||||
"sha256OfEncoding": "d5d22458bd50a446c7bdce4e2598fe8e5e7bfac3646d8fcd7215363c7c5c8ca1"
|
||||
},
|
||||
{
|
||||
"label": "ts epoch and sequence at long.MaxValue",
|
||||
"fields": {
|
||||
"channelId": "ts.zone-a",
|
||||
"schemaId": "cultmesh.realtime.v1",
|
||||
"bodyId": "ts-body-1",
|
||||
"producerEpoch": 9223372036854775807,
|
||||
"sequence": 9223372036854775807,
|
||||
"delivery": "reliable-ordered",
|
||||
"payload": "Bw=="
|
||||
},
|
||||
"encoding": "Q1NUMQD/////////f/////////9/CQAUAAkAAQAAACUAAAABAHRzLnpvbmUtYWN1bHRtZXNoLnJlYWx0aW1lLnYxdHMtYm9keS0xBw==",
|
||||
"encodedLength": 76,
|
||||
"sha256OfEncoding": "2abb67a876dc4ed006f33708b4c4dda55a90a6f95da7352749225195b10d45ba"
|
||||
},
|
||||
{
|
||||
"label": "ts identities at exactly 65535 UTF-8 bytes",
|
||||
"fields": {
|
||||
"channelId": {
|
||||
"repeat": "ü☃",
|
||||
"byteLength": 65535
|
||||
},
|
||||
"schemaId": {
|
||||
"repeat": "☃ü",
|
||||
"byteLength": 65535
|
||||
},
|
||||
"bodyId": {
|
||||
"repeat": "ç☃",
|
||||
"byteLength": 65535
|
||||
},
|
||||
"producerEpoch": 29,
|
||||
"sequence": 30,
|
||||
"delivery": "latest-only",
|
||||
"payload": "M0Q="
|
||||
},
|
||||
"encoding": null,
|
||||
"encodedLength": 196644,
|
||||
"sha256OfEncoding": "8bd4cd4c5232339f76b8e394eb93b66e8d14302398ecce2ae5bdb78070ef783a"
|
||||
},
|
||||
{
|
||||
"label": "ts 64 MiB payload",
|
||||
"fields": {
|
||||
"channelId": "ts.zone-a",
|
||||
"schemaId": "cultmesh.realtime.v1",
|
||||
"bodyId": "ts-body-1",
|
||||
"producerEpoch": 31,
|
||||
"sequence": 32,
|
||||
"delivery": "unreliable",
|
||||
"payload": {
|
||||
"ramp": 67108864
|
||||
}
|
||||
},
|
||||
"encoding": null,
|
||||
"encodedLength": 67108939,
|
||||
"sha256OfEncoding": "f2c20e0b47a7681fbaeff6fcba024363542805de4cd95eeb7fa9f125ba646af0"
|
||||
}
|
||||
],
|
||||
"malformed": [
|
||||
{
|
||||
"label": "ts truncated header",
|
||||
"encoding": "Q1NUMQAVAAAAAAAAABYAAAAAAAAACQAUAAkABAAAACUAAAAB",
|
||||
"message": "Realtime frame header is truncated."
|
||||
},
|
||||
{
|
||||
"label": "ts wrong magic",
|
||||
"encoding": "Q1OrMQAVAAAAAAAAABYAAAAAAAAACQAUAAkABAAAACUAAAABAHRzLnpvbmUtYWN1bHRtZXNoLnJlYWx0aW1lLnYxdHMtYm9keS0xAAH+/w==",
|
||||
"message": "Realtime frame magic is invalid."
|
||||
},
|
||||
{
|
||||
"label": "ts wire version 2",
|
||||
"encoding": "Q1NUMQAVAAAAAAAAABYAAAAAAAAACQAUAAkABAAAACUAAAACAHRzLnpvbmUtYWN1bHRtZXNoLnJlYWx0aW1lLnYxdHMtYm9keS0xAAH+/w==",
|
||||
"message": "Realtime frame wire version is unsupported."
|
||||
},
|
||||
{
|
||||
"label": "ts header size 38",
|
||||
"encoding": "Q1NUMQAVAAAAAAAAABYAAAAAAAAACQAUAAkABAAAACYAAAABAHRzLnpvbmUtYWN1bHRtZXNoLnJlYWx0aW1lLnYxdHMtYm9keS0xAAH+/w==",
|
||||
"message": "Realtime frame wire version is unsupported."
|
||||
},
|
||||
{
|
||||
"label": "ts delivery 3",
|
||||
"encoding": "Q1NUMQMVAAAAAAAAABYAAAAAAAAACQAUAAkABAAAACUAAAABAHRzLnpvbmUtYWN1bHRtZXNoLnJlYWx0aW1lLnYxdHMtYm9keS0xAAH+/w==",
|
||||
"message": "Realtime frame delivery mode is invalid."
|
||||
},
|
||||
{
|
||||
"label": "ts delivery 128",
|
||||
"encoding": "Q1NUMYAVAAAAAAAAABYAAAAAAAAACQAUAAkABAAAACUAAAABAHRzLnpvbmUtYWN1bHRtZXNoLnJlYWx0aW1lLnYxdHMtYm9keS0xAAH+/w==",
|
||||
"message": "Realtime frame delivery mode is invalid."
|
||||
},
|
||||
{
|
||||
"label": "ts payload length -1",
|
||||
"encoding": "Q1NUMQAVAAAAAAAAABYAAAAAAAAACQAUAAkABAAAgCUAAAABAHRzLnpvbmUtYWN1bHRtZXNoLnJlYWx0aW1lLnYxdHMtYm9keS0xAAH+/w==",
|
||||
"message": "Realtime frame length is invalid."
|
||||
},
|
||||
{
|
||||
"label": "ts length sum off by one",
|
||||
"encoding": "Q1NUMQAVAAAAAAAAABYAAAAAAAAACQAUAAkABAAAACUAAAABAHRzLnpvbmUtYWN1bHRtZXNoLnJlYWx0aW1lLnYxdHMtYm9keS0xAAH+/wA=",
|
||||
"message": "Realtime frame length is invalid."
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultmesh.session-accepted.schema.json",
|
||||
"title": "CultMesh Session Accepted",
|
||||
"type": "object",
|
||||
"required": ["schemaVersion", "messageId", "accepted", "verseId", "authorityRuntimeId", "protocolId", "routeGeneration", "clientNonce", "providerKeyId", "providerSignature"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"schemaVersion": { "const": "cultmesh.session_accepted.v2" },
|
||||
"messageId": { "type": "string", "minLength": 1 },
|
||||
"accepted": { "type": "boolean" },
|
||||
"verseId": { "type": "string", "minLength": 1 },
|
||||
"authorityRuntimeId": { "type": "string", "minLength": 1 },
|
||||
"protocolId": { "type": "string", "minLength": 1 },
|
||||
"routeGeneration": { "type": "string" },
|
||||
"clientNonce": { "type": "string" },
|
||||
"providerKeyId": { "type": "string" },
|
||||
"providerSignature": { "type": "string" },
|
||||
"error": { "type": "string", "minLength": 1 }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultmesh.session-open.schema.json",
|
||||
"title": "CultMesh Session Open",
|
||||
"type": "object",
|
||||
"required": ["schemaVersion", "messageId", "sourceRuntimeId", "verseId", "authorityRuntimeId", "protocolId", "routeGeneration", "clientNonce"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"schemaVersion": { "const": "cultmesh.session_open.v2" },
|
||||
"messageId": { "type": "string", "minLength": 1 },
|
||||
"sourceRuntimeId": { "type": "string", "minLength": 1 },
|
||||
"verseId": { "type": "string", "minLength": 1 },
|
||||
"authorityRuntimeId": { "type": "string", "minLength": 1 },
|
||||
"protocolId": { "type": "string", "minLength": 1 },
|
||||
"routeGeneration": { "type": "string" },
|
||||
"clientNonce": { "type": "string", "minLength": 1 }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultmesh.verse-catalog-request.schema.json",
|
||||
"title": "CultMesh Verse Catalog Request",
|
||||
"type": "object",
|
||||
"required": ["schemaVersion", "messageId"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"schemaVersion": { "const": "cultmesh.verse_catalog_request.v0" },
|
||||
"messageId": { "type": "string", "minLength": 1 },
|
||||
"verseIds": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
|
||||
"transportVersion": { "type": "string", "minLength": 1 }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultmesh.verse-catalog-response.schema.json",
|
||||
"title": "CultMesh Verse Catalog Response",
|
||||
"type": "object",
|
||||
"required": ["schemaVersion", "messageId", "verses"],
|
||||
"additionalProperties": false,
|
||||
"$defs": {
|
||||
"compatibility": {
|
||||
"type": "object",
|
||||
"required": ["transportVersion", "rulesHash", "compatibleVerseIds", "requiredPluginIds", "optionalPluginIds"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"transportVersion": { "type": "string", "minLength": 1 },
|
||||
"rulesHash": { "type": "string", "minLength": 1 },
|
||||
"compatibleVerseIds": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
|
||||
"requiredPluginIds": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
|
||||
"optionalPluginIds": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true }
|
||||
}
|
||||
},
|
||||
"authorityRoute": {
|
||||
"type": "object",
|
||||
"required": ["authorityRuntimeId", "endpoint", "protocolIds", "priority", "generation"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"authorityRuntimeId": { "type": "string", "minLength": 1 },
|
||||
"endpoint": { "type": "string", "minLength": 1 },
|
||||
"protocolIds": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
|
||||
"priority": { "type": "integer", "minimum": 0 },
|
||||
"generation": { "type": "string", "minLength": 1 },
|
||||
"certificate": {
|
||||
"anyOf": [{ "$ref": "#/$defs/routeCertificate" }, { "type": "null" }]
|
||||
}
|
||||
}
|
||||
},
|
||||
"routeCertificate": {
|
||||
"type": "object",
|
||||
"required": ["providerKeyId", "providerPublicKeyX", "providerPublicKeyY", "odinKeyId", "issuedAtUnixMilliseconds", "expiresAtUnixMilliseconds", "signature"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"providerKeyId": { "type": "string", "minLength": 1 },
|
||||
"providerPublicKeyX": { "type": "string", "minLength": 1 },
|
||||
"providerPublicKeyY": { "type": "string", "minLength": 1 },
|
||||
"odinKeyId": { "type": "string", "minLength": 1 },
|
||||
"issuedAtUnixMilliseconds": { "type": "integer", "minimum": 0 },
|
||||
"expiresAtUnixMilliseconds": { "type": "integer", "minimum": 1 },
|
||||
"signature": { "type": "string", "minLength": 1 }
|
||||
}
|
||||
},
|
||||
"verse": {
|
||||
"type": "object",
|
||||
"required": ["verseId", "displayName", "authorityModel", "compatibility", "discoveryEndpoints", "authorityRuntimeIds"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"verseId": { "type": "string", "minLength": 1 },
|
||||
"displayName": { "type": "string", "minLength": 1 },
|
||||
"authorityModel": { "type": "string", "minLength": 1 },
|
||||
"compatibility": { "$ref": "#/$defs/compatibility" },
|
||||
"discoveryEndpoints": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
|
||||
"authorityRuntimeIds": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
|
||||
"authorityRoutes": { "type": "array", "items": { "$ref": "#/$defs/authorityRoute" } },
|
||||
"parentVerseId": { "type": "string", "minLength": 1 },
|
||||
"description": { "type": "string" }
|
||||
}
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"schemaVersion": { "const": "cultmesh.verse_catalog_response.v0" },
|
||||
"messageId": { "type": "string", "minLength": 1 },
|
||||
"verses": { "type": "array", "items": { "$ref": "#/$defs/verse" } }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.database-change-raw.schema.json",
|
||||
"title": "CultNet Raw Database Change Message",
|
||||
"type": "object",
|
||||
"required": ["schemaVersion", "messageId", "subscriptionId", "changeKind"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"schemaVersion": { "const": "cultnet.database_change_raw.v0" },
|
||||
"messageId": { "type": "string", "minLength": 1 },
|
||||
"subscriptionId": { "type": "string", "minLength": 1 },
|
||||
"changeKind": { "enum": ["added", "updated", "removed"] },
|
||||
"document": {
|
||||
"oneOf": [{ "type": "null" }, { "$ref": "./cultnet.raw-document-record.schema.json" }]
|
||||
},
|
||||
"recordKey": { "type": ["string", "null"], "minLength": 1 },
|
||||
"schemaId": { "type": ["string", "null"], "minLength": 1 },
|
||||
"commitId": { "type": ["string", "null"], "minLength": 1 },
|
||||
"commitCount": { "type": ["integer", "null"], "minimum": 2 }
|
||||
},
|
||||
"oneOf": [
|
||||
{
|
||||
"properties": {
|
||||
"changeKind": { "const": "removed" },
|
||||
"recordKey": { "type": "string" },
|
||||
"schemaId": { "type": "string" }
|
||||
},
|
||||
"required": ["recordKey", "schemaId"]
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"changeKind": { "enum": ["added", "updated"] },
|
||||
"document": { "$ref": "./cultnet.raw-document-record.schema.json" }
|
||||
},
|
||||
"required": ["document"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.database-subscribe.schema.json",
|
||||
"title": "CultNet Database Subscribe Message",
|
||||
"type": "object",
|
||||
"required": ["schemaVersion", "messageId", "subscriptionId", "includeSnapshot"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"schemaVersion": { "const": "cultnet.database_subscribe.v0" },
|
||||
"messageId": { "type": "string", "minLength": 1 },
|
||||
"subscriptionId": { "type": "string", "minLength": 1 },
|
||||
"schemaIds": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
||||
"recordKeys": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
||||
"includeSnapshot": { "type": "boolean" },
|
||||
"consumerRuntimeId": { "type": "string", "minLength": 1 },
|
||||
"bodyIds": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
||||
"supportedBodyTransports": { "type": "array", "items": { "type": "string", "minLength": 1 } }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.database-subscribe.v1.schema.json",
|
||||
"title": "CultNet Database Subscribe Message v1",
|
||||
"type": "object",
|
||||
"required": ["schemaVersion", "messageId", "subscriptionId", "selection"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"schemaVersion": { "const": "cultnet.database_subscribe.v1" },
|
||||
"messageId": { "type": "string", "minLength": 1 },
|
||||
"subscriptionId": { "type": "string", "minLength": 1 },
|
||||
"selection": { "$ref": "cultnet.selection.schema.json" },
|
||||
"includeSnapshot": { "type": "boolean", "default": true },
|
||||
"consumerRuntimeId": { "type": "string", "minLength": 1 },
|
||||
"bodyIds": {
|
||||
"type": "array",
|
||||
"items": { "type": "string", "minLength": 1 }
|
||||
},
|
||||
"supportedBodyTransports": {
|
||||
"type": "array",
|
||||
"items": { "type": "string", "minLength": 1 }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.database-unsubscribe.schema.json",
|
||||
"title": "CultNet Database Unsubscribe Message",
|
||||
"type": "object",
|
||||
"required": ["schemaVersion", "messageId", "subscriptionId"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"schemaVersion": { "const": "cultnet.database_unsubscribe.v0" },
|
||||
"messageId": { "type": "string", "minLength": 1 },
|
||||
"subscriptionId": { "type": "string", "minLength": 1 }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.error.schema.json",
|
||||
"title": "CultNet Error Message",
|
||||
"description": "R-X (docs/cultnet-selection-cut.md, fix batch 4): CultNetErrorMessage is a MessagePack-CSharp map-mode object, so every declared key is written on the wire, nil included - routingHint, code and details are `required` here the same as cultnet.raw-document-header.schema.json's nullable fields, not optional just because a given refusal leaves them null.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"schemaVersion",
|
||||
"error",
|
||||
"routingHint",
|
||||
"code",
|
||||
"details"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"schemaVersion": { "const": "cultnet.error.v0" },
|
||||
"error": { "type": "string", "minLength": 1 },
|
||||
"routingHint": {
|
||||
"description": "Optional shard routing detail for an authority failure. Null for every selection/cursor refusal code (R-N).",
|
||||
"type": ["object", "null"],
|
||||
"additionalProperties": false,
|
||||
"required": ["shard", "reason"],
|
||||
"properties": {
|
||||
"shard": { "type": ["object", "null"] },
|
||||
"reason": { "type": "string" }
|
||||
}
|
||||
},
|
||||
"code": {
|
||||
"description": "Machine-readable refusal code (R-N). Additive: a v0 peer that does not know this field ignores it. The set is a closed enum: Rust and TypeScript refuse a message whose code is not listed, so adding a code is one coordinated change across every runtime (this schema, the C# factory, the Rust CultNetErrorCode, and a captured-bytes case for each).",
|
||||
"type": ["string", "null"],
|
||||
"enum": [null, "selection_invalid", "cursor_stale", "cursor_invalid", "reference_outside_target", "variant_unsupported", "unowned_schema", "write_not_authorized", "unsupported_schema_version", "message_invalid"]
|
||||
},
|
||||
"details": {
|
||||
"description": "Code-specific structured detail (R-N). Every field is populated only for the code that defines it; the others are null, not omitted.",
|
||||
"type": ["object", "null"],
|
||||
"additionalProperties": false,
|
||||
"required": ["field", "value", "asOf", "current"],
|
||||
"properties": {
|
||||
"field": { "description": "selection_invalid: the selection field that failed. variant_unsupported: \"subscriptionId\", when a subscription was ended. unowned_schema: \"schemaId\". write_not_authorized: \"recordKey\". unsupported_schema_version: \"schemaVersion\". message_invalid: the request field that is missing or ill-typed (\"message\" when the whole frame cannot be read).", "type": ["string", "null"] },
|
||||
"value": { "description": "selection_invalid: the offending value, when there is one string worth naming. variant_unsupported: the id of the subscription that ended. unowned_schema: the schema id no shard owns. write_not_authorized: the key of the refused write. unsupported_schema_version: the schemaVersion the peer does not speak.", "type": ["string", "null"] },
|
||||
"asOf": { "description": "cursor_stale: the cursor's own minted asOf.", "type": ["integer", "null"], "minimum": 0 },
|
||||
"current": { "description": "cursor_stale: the answering server's current asOf.", "type": ["integer", "null"], "minimum": 0 }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.operation-request.schema.json",
|
||||
"title": "CultNet Operation Request",
|
||||
"type": "object",
|
||||
"required": ["schemaVersion", "messageId", "serviceId", "operation", "payloadSchema", "payload"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"schemaVersion": { "const": "cultnet.operation_request.v0" },
|
||||
"messageId": { "type": "string", "minLength": 1 },
|
||||
"serviceId": { "type": "string", "minLength": 1 },
|
||||
"operation": { "type": "string", "minLength": 1 },
|
||||
"payloadSchema": { "type": "string", "minLength": 1 },
|
||||
"payloadEncoding": { "const": "messagepack-base64" },
|
||||
"payload": { "type": "string", "minLength": 1, "contentEncoding": "base64" },
|
||||
"sourceRuntimeId": { "type": "string", "minLength": 1 },
|
||||
"targetRuntimeId": { "type": "string", "minLength": 1 }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.operation-response.schema.json",
|
||||
"title": "CultNet Operation Response",
|
||||
"type": "object",
|
||||
"required": ["schemaVersion", "messageId", "serviceId", "operation", "status", "payloadSchema", "payload"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"schemaVersion": { "const": "cultnet.operation_response.v0" },
|
||||
"messageId": { "type": "string", "minLength": 1 },
|
||||
"serviceId": { "type": "string", "minLength": 1 },
|
||||
"operation": { "type": "string", "minLength": 1 },
|
||||
"status": { "type": "string", "minLength": 1 },
|
||||
"payloadSchema": { "type": "string", "minLength": 1 },
|
||||
"payloadEncoding": { "const": "messagepack-base64" },
|
||||
"payload": { "type": "string", "minLength": 1, "contentEncoding": "base64" },
|
||||
"diagnostics": { "type": "array", "items": { "type": "string" } },
|
||||
"sourceRuntimeId": { "type": "string", "minLength": 1 }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.raw-document-header.schema.json",
|
||||
"title": "CultNet Raw Document Header",
|
||||
"description": "R-S (docs/cultnet-selection-cut.md, fix batch 3): CultNetRawDocumentRecord minus payload/payloadEncoding - CultNetRawDocumentHeader has no such members at all, so a header must not $ref the record schema (which requires them). Matches MessagePack-CSharp's map-mode output: every declared key is written, nil included, so every property here is `required` even where its value may be null.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"schemaId",
|
||||
"schemaName",
|
||||
"schemaVersion",
|
||||
"schemaContentHash",
|
||||
"recordKey",
|
||||
"storedAt",
|
||||
"sourceRuntimeId",
|
||||
"sourceAgentId",
|
||||
"sourceRole",
|
||||
"tags"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"schemaId": { "type": "string", "minLength": 1 },
|
||||
"schemaName": { "type": ["string", "null"], "minLength": 1 },
|
||||
"schemaVersion": { "type": ["string", "null"], "minLength": 1 },
|
||||
"schemaContentHash": { "type": ["string", "null"], "minLength": 1 },
|
||||
"recordKey": { "type": "string", "minLength": 1 },
|
||||
"storedAt": { "type": "string", "minLength": 1 },
|
||||
"sourceRuntimeId": { "type": ["string", "null"], "minLength": 1 },
|
||||
"sourceAgentId": { "type": ["string", "null"], "minLength": 1 },
|
||||
"sourceRole": { "type": ["string", "null"], "minLength": 1 },
|
||||
"tags": {
|
||||
"type": ["array", "null"],
|
||||
"items": { "type": "string", "minLength": 1 }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.raw-document-record.schema.json",
|
||||
"title": "CultNet Raw Document Record",
|
||||
"description": "R-S (docs/cultnet-selection-cut.md, fix batch 3): matches MessagePack-CSharp's map-mode output for CultNetRawDocumentRecord - every declared key is written, nil included, so every property here is `required` (present on the wire) even where its value may be null.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"schemaId",
|
||||
"schemaName",
|
||||
"schemaVersion",
|
||||
"schemaContentHash",
|
||||
"recordKey",
|
||||
"storedAt",
|
||||
"payloadEncoding",
|
||||
"payload",
|
||||
"sourceRuntimeId",
|
||||
"sourceAgentId",
|
||||
"sourceRole",
|
||||
"tags"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"schemaId": { "type": "string", "minLength": 1 },
|
||||
"schemaName": { "type": ["string", "null"], "minLength": 1 },
|
||||
"schemaVersion": { "type": ["string", "null"], "minLength": 1 },
|
||||
"schemaContentHash": { "type": ["string", "null"], "minLength": 1 },
|
||||
"recordKey": { "type": "string", "minLength": 1 },
|
||||
"storedAt": { "type": "string", "minLength": 1 },
|
||||
"payloadEncoding": { "const": "messagepack" },
|
||||
"payload": {
|
||||
"type": "string",
|
||||
"contentEncoding": "base64",
|
||||
"x-cult-runtime-type": "bytes"
|
||||
},
|
||||
"sourceRuntimeId": { "type": ["string", "null"], "minLength": 1 },
|
||||
"sourceAgentId": { "type": ["string", "null"], "minLength": 1 },
|
||||
"sourceRole": { "type": ["string", "null"], "minLength": 1 },
|
||||
"tags": {
|
||||
"type": ["array", "null"],
|
||||
"items": { "type": "string", "minLength": 1 }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.schema-descriptor.schema.json",
|
||||
"title": "CultNet Schema Descriptor",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"schemaId",
|
||||
"kind",
|
||||
"wireContracts",
|
||||
"contentHash"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"schemaId": { "type": "string", "minLength": 1 },
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"wire_message",
|
||||
"document_payload",
|
||||
"shared_contract"
|
||||
]
|
||||
},
|
||||
"schemaVersion": { "type": "string", "minLength": 1 },
|
||||
"documentType": { "type": "string", "minLength": 1 },
|
||||
"title": { "type": "string", "minLength": 1 },
|
||||
"wireContracts": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"cultnet.schema.v0",
|
||||
"gamecult.networking.v0"
|
||||
]
|
||||
}
|
||||
},
|
||||
"contentHash": { "type": "string", "minLength": 1 },
|
||||
"schemaJson": { "type": "string", "minLength": 1 },
|
||||
"members": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"slot",
|
||||
"name",
|
||||
"type",
|
||||
"isReference",
|
||||
"isMany",
|
||||
"isName"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"slot": { "type": "integer", "minimum": 0 },
|
||||
"name": { "type": "string", "minLength": 1 },
|
||||
"type": { "type": "string", "minLength": 1 },
|
||||
"isReference": { "type": "boolean" },
|
||||
"isMany": { "type": "boolean" },
|
||||
"targetSchemaName": { "type": ["string", "null"] },
|
||||
"isName": { "type": "boolean" },
|
||||
"indexAlias": { "type": ["string", "null"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,100 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.selection.schema.json",
|
||||
"title": "CultNet Typed Selection",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"schemas": {
|
||||
"type": "array",
|
||||
"items": { "type": "string", "minLength": 1 },
|
||||
"minItems": 1,
|
||||
"description": "Absent means every schema. Present and empty is refused at the door (selection_invalid), never treated as \"every schema\": omit the field instead."
|
||||
},
|
||||
"keys": {
|
||||
"type": "array",
|
||||
"items": { "type": "string", "minLength": 1 },
|
||||
"minItems": 1,
|
||||
"description": "Absent means every key. Present and empty is refused at the door (selection_invalid), never treated as \"every key\": omit the field instead."
|
||||
},
|
||||
"fields": {
|
||||
"type": "array",
|
||||
"items": { "$ref": "#/$defs/fieldPredicate" }
|
||||
},
|
||||
"cites": { "$ref": "#/$defs/citation" },
|
||||
"cited": { "$ref": "#/$defs/incoming" },
|
||||
"projection": {
|
||||
"type": "string",
|
||||
"enum": ["header", "document"],
|
||||
"default": "header"
|
||||
},
|
||||
"descending": { "type": "boolean", "default": false },
|
||||
"limit": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 200,
|
||||
"description": "Clamped to 1..=200 by the answering server, not refused outside that range: an absent value or one outside the bound is treated as the nearer bound (absent = 200)."
|
||||
},
|
||||
"cursor": { "type": "string" }
|
||||
},
|
||||
"$defs": {
|
||||
"recordRef": {
|
||||
"type": "object",
|
||||
"required": ["schemaId", "recordKey"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"schemaId": { "type": "string", "minLength": 1 },
|
||||
"recordKey": { "type": "string", "minLength": 1 }
|
||||
}
|
||||
},
|
||||
"fieldPredicate": {
|
||||
"type": "object",
|
||||
"required": ["index", "op"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"index": { "type": "string", "minLength": 1 },
|
||||
"op": { "type": "string", "enum": ["any_of", "lt", "le", "ge", "gt"] },
|
||||
"values": {
|
||||
"type": "array",
|
||||
"items": { "type": "string" },
|
||||
"minItems": 1
|
||||
},
|
||||
"number": {
|
||||
"type": "string",
|
||||
"description": "Q-J: a canonical decimal string, never a JSON number. Matches ^-?(0|[1-9][0-9]*)(\\.[0-9]*[1-9])?$ and is not \"-0\"; any other spelling is refused typed at the door (selection_invalid), never normalised.",
|
||||
"pattern": "^(?!-0$)-?(0|[1-9][0-9]*)(\\.[0-9]*[1-9])?$"
|
||||
}
|
||||
},
|
||||
"oneOf": [
|
||||
{
|
||||
"required": ["values"],
|
||||
"not": { "required": ["number"] },
|
||||
"properties": { "op": { "const": "any_of" } }
|
||||
},
|
||||
{
|
||||
"required": ["number"],
|
||||
"not": { "required": ["values"] },
|
||||
"properties": { "op": { "enum": ["lt", "le", "ge", "gt"] } }
|
||||
}
|
||||
]
|
||||
},
|
||||
"citation": {
|
||||
"type": "object",
|
||||
"required": ["target"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"target": { "$ref": "#/$defs/recordRef" },
|
||||
"role": { "type": "string", "minLength": 1 }
|
||||
}
|
||||
},
|
||||
"incoming": {
|
||||
"type": "object",
|
||||
"required": ["role", "exists"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"role": { "type": "string", "minLength": 1 },
|
||||
"exists": { "type": "boolean" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.shard-catalog-request.schema.json",
|
||||
"type": "object",
|
||||
"required": ["schemaVersion", "messageId"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"schemaVersion": { "const": "cultnet.shard_catalog_request.v0" },
|
||||
"messageId": { "type": "string", "minLength": 1 },
|
||||
"schemaIds": {
|
||||
"type": "array",
|
||||
"items": { "type": "string", "minLength": 1 }
|
||||
},
|
||||
"recordKeys": {
|
||||
"type": "array",
|
||||
"items": { "type": "string", "minLength": 1 }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.shard-catalog-response.schema.json",
|
||||
"type": "object",
|
||||
"required": ["schemaVersion", "messageId", "shards"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"schemaVersion": { "const": "cultnet.shard_catalog_response.v0" },
|
||||
"messageId": { "type": "string", "minLength": 1 },
|
||||
"shards": {
|
||||
"type": "array",
|
||||
"items": { "$ref": "#/$defs/shardDescriptor" }
|
||||
}
|
||||
},
|
||||
"$defs": {
|
||||
"shardDescriptor": {
|
||||
"type": "object",
|
||||
"required": ["shardId", "ownerRuntimeId", "epoch"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"shardId": { "type": "string", "minLength": 1 },
|
||||
"ownerRuntimeId": { "type": "string", "minLength": 1 },
|
||||
"epoch": { "type": "integer", "minimum": 0 },
|
||||
"isPrimary": { "type": "boolean" },
|
||||
"schemaIds": {
|
||||
"type": "array",
|
||||
"items": { "type": "string", "minLength": 1 }
|
||||
},
|
||||
"keyPrefix": { "type": "string", "minLength": 1 },
|
||||
"primaryEndpoints": {
|
||||
"type": "array",
|
||||
"items": { "type": "string", "minLength": 1 }
|
||||
},
|
||||
"replicaEndpoints": {
|
||||
"type": "array",
|
||||
"items": { "type": "string", "minLength": 1 }
|
||||
},
|
||||
"readReplicaEndpoints": {
|
||||
"type": "array",
|
||||
"items": { "type": "string", "minLength": 1 }
|
||||
},
|
||||
"region": { "type": "string", "minLength": 1 },
|
||||
"authorityLeaseId": { "type": "string", "minLength": 1 }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.snapshot-request.v1.schema.json",
|
||||
"title": "CultNet Snapshot Request Message v1",
|
||||
"type": "object",
|
||||
"required": ["schemaVersion", "messageId", "selection"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"schemaVersion": { "const": "cultnet.snapshot_request.v1" },
|
||||
"messageId": { "type": "string", "minLength": 1 },
|
||||
"selection": { "$ref": "cultnet.selection.schema.json" },
|
||||
"shardId": { "type": "string", "minLength": 1 },
|
||||
"shardEpoch": { "type": "integer" }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.snapshot-response-raw.v1.schema.json",
|
||||
"title": "CultNet Snapshot Response Raw Message v1",
|
||||
"description": "R-S (docs/cultnet-selection-cut.md, fix batch 3): matches MessagePack-CSharp's map-mode output for CultNetSnapshotResponseRawV1Message - every declared key is written, nil included, so every property is `required` (present on the wire) even where its value may be null. `headers`/`documents` are still exactly one populated by projection (C5), but the OTHER key is present too, as an explicit null, not absent - the prior `oneOf: [{required:[headers]},{required:[documents]}]` matched both branches on every real page (both keys always present) and so never validated at all.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"schemaVersion", "messageId", "matched", "asOf", "next",
|
||||
"headers", "documents", "edges", "shardId", "shardEpoch", "shardLogSequence"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"oneOf": [
|
||||
{
|
||||
"required": ["headers", "documents"],
|
||||
"properties": { "headers": { "type": "array" }, "documents": { "type": "null" } }
|
||||
},
|
||||
{
|
||||
"required": ["headers", "documents"],
|
||||
"properties": { "headers": { "type": "null" }, "documents": { "type": "array" } }
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"schemaVersion": { "const": "cultnet.snapshot_response_raw.v1" },
|
||||
"messageId": { "type": "string", "minLength": 1 },
|
||||
"matched": { "type": "integer", "minimum": 0 },
|
||||
"asOf": { "type": "integer", "minimum": 0 },
|
||||
"next": { "type": ["string", "null"] },
|
||||
"headers": {
|
||||
"type": ["array", "null"],
|
||||
"items": { "$ref": "cultnet.raw-document-header.schema.json" }
|
||||
},
|
||||
"documents": {
|
||||
"type": ["array", "null"],
|
||||
"items": { "$ref": "cultnet.raw-document-record.schema.json" }
|
||||
},
|
||||
"edges": {
|
||||
"type": ["array", "null"],
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": ["from", "role", "to", "payloadEncoding", "payload"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"from": { "$ref": "cultnet.selection.schema.json#/$defs/recordRef" },
|
||||
"role": { "type": "string", "minLength": 1 },
|
||||
"to": { "$ref": "cultnet.selection.schema.json#/$defs/recordRef" },
|
||||
"payloadEncoding": { "type": ["string", "null"] },
|
||||
"payload": {
|
||||
"type": ["string", "null"],
|
||||
"contentEncoding": "base64",
|
||||
"x-cult-runtime-type": "bytes"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"shardId": { "type": ["string", "null"], "minLength": 1 },
|
||||
"shardEpoch": { "type": ["integer", "null"] },
|
||||
"shardLogSequence": { "type": ["integer", "null"] }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,100 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.transport-profile.schema.json",
|
||||
"title": "CultNet Transport Profile",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"schemaVersion",
|
||||
"runtimeId",
|
||||
"transports"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"schemaVersion": { "const": "cultnet.transport_profile.v0" },
|
||||
"runtimeId": { "type": "string", "minLength": 1 },
|
||||
"transports": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"transportId",
|
||||
"protocol",
|
||||
"channels"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"transportId": { "type": "string", "minLength": 1 },
|
||||
"protocol": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"tcp_framed",
|
||||
"litenetlib",
|
||||
"websocket",
|
||||
"rudp"
|
||||
]
|
||||
},
|
||||
"host": { "type": "string", "minLength": 1 },
|
||||
"port": { "type": "integer", "minimum": 1, "maximum": 65535 },
|
||||
"path": { "type": "string", "minLength": 1 },
|
||||
"discoveryGroup": { "type": "string", "minLength": 1 },
|
||||
"wireContracts": {
|
||||
"type": "array",
|
||||
"items": { "type": "string", "minLength": 1 }
|
||||
},
|
||||
"reconnectPolicy": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"schemaVersion",
|
||||
"policyId",
|
||||
"baseDelayMs",
|
||||
"maxDelayMs",
|
||||
"maxJitterMs"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"schemaVersion": { "const": "cultnet.reconnect_policy.v0" },
|
||||
"policyId": { "type": "string", "minLength": 1 },
|
||||
"baseDelayMs": { "type": "integer", "minimum": 0 },
|
||||
"maxDelayMs": { "type": "integer", "minimum": 0 },
|
||||
"maxJitterMs": { "type": "integer", "minimum": 0 },
|
||||
"maxAttempts": { "type": "integer", "minimum": 1 }
|
||||
}
|
||||
},
|
||||
"channels": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"channelId",
|
||||
"delivery",
|
||||
"ordering"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"channelId": { "type": "string", "minLength": 1 },
|
||||
"delivery": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"reliable",
|
||||
"unreliable"
|
||||
]
|
||||
},
|
||||
"ordering": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ordered",
|
||||
"unordered",
|
||||
"sequenced"
|
||||
]
|
||||
},
|
||||
"maxPayloadBytes": { "type": "integer", "minimum": 1 },
|
||||
"maxFragmentBytes": { "type": "integer", "minimum": 1 },
|
||||
"maxPendingReliablePackets": { "type": "integer", "minimum": 1 }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,206 +0,0 @@
|
|||
# CultNet fork-desk contract v0 (specification)
|
||||
|
||||
Status: specification, drafted for Heimdall (Bifrost receiver), Huginn (the second door) and Void (Ratatoskr desk). No runtime implements it yet.
|
||||
Rule source: `/opt/commons/handoff/fork-desk-answer-binding-20261110.md` (Heimdall; sections 1.1 to 1.5, 1.3a to 1.3d), amended by the Persona briefs of 2026-11-10 (Eureka's fit check). Where this page differs from that file it says so under "Differences from the binding file".
|
||||
Format source: the fork desk artifact in `/opt/commons/handoff/fork-desk-original/` (ruling `eureka-substrate:ruling:fork-desk-nibu-format`).
|
||||
Files here: `fork-card.schema.json` (one schema, a `$defs` entry per document), `fork-card-vectors.json`. Conformance: `tests/GameCult.Networking.Tests/GovernanceVectorTests.cs` (C#) and `packages/cultnet-ts/test/governance-vectors.test.ts` (TypeScript), both generated against vectors written by `scripts/gen-governance-vectors.py`. Each suite computes every hash with its own code and replays every scenario through a reference judge written from this page.
|
||||
|
||||
All documents are CultNet map-mode: every key written, nil where absent, closed schemas. Field names are snake_case as in the binding file and the mind's records; `schemaVersion` keeps CultNet's spelling (open choice 1). The bytes of every document are pinned in the vectors as `messagePackHex`.
|
||||
|
||||
## Documents
|
||||
|
||||
| schema id | what | who writes it |
|
||||
|---|---|---|
|
||||
| `gamecult.fork.card.v0` | the fork as shown | the publisher (a Mind's card projection) |
|
||||
| `gamecult.fork.answer_request.v0` | the answer a decider sends | the client; Bifrost forwards it unchanged to Huginn's second door |
|
||||
| `gamecult.desk_answer.v0` | the stored answer with one tagged outcome | Huginn only |
|
||||
| `gamecult.fork.answer_result.v0` | what the sender gets back for a stored answer | Bifrost, from the stored `desk_answer` |
|
||||
| `gamecult.fork.refusal.v0` | a body refused at the door, nothing stored (but `fork_too_large` on a stale answer, which sits over a stored `Refused(stale_fork)`) | Bifrost |
|
||||
| `gamecult.fork.record.v0` | a fork's answers plus the derived counted answer | a projection of the stored `desk_answer`s |
|
||||
| `gamecult.fork.ruling_cite.v0` | the citation a ruling carries | the Mind admitting the ruling |
|
||||
| `gamecult.fork.list_request.v0` | list a Mind's forks (Transport) | the desk |
|
||||
| `gamecult.fork.list.v0` | a page of entries, counts and a stamp | Bifrost, projected from Huginn |
|
||||
| `gamecult.fork.read_request.v0` | read one fork (Transport) | the desk |
|
||||
| `gamecult.fork.entry.v0` | one card with its record | Bifrost, projected from Huginn |
|
||||
| `gamecult.fork.unavailable.v0` | the outcome is not confirmed (the second door or Huginn did not answer); retry with the same `request_id` | Bifrost |
|
||||
|
||||
### card
|
||||
|
||||
`{schemaVersion, fork_id, title, context, options[{id, text}], recommendation, depends[], leans, flag, raised_in, raised_at, deciders[], decider_count, status, ruling, ruled_from[], order, options_hash}`.
|
||||
|
||||
- `fork_id`: the mind's `question` key, `<campaign>:question:<label>`.
|
||||
- **Hashed (the shown members):** `title`, `context`, `options` (each `{id, text}`, in shown order), `recommendation` (an option id, **never nil**: the stored `question` requires `recommended`), `depends` (strings, each one of the stored question's `depends` lines verbatim, at most 8, each at most 1000 UTF-8 bytes (the stored `Line`), in shown order, empty when none; the stored kind holds prose lines, so a line may read like a reference such as `campaign:kind:label` but is hashed as the text it is).
|
||||
- **Not hashed:** `fork_id` (bound beside the hash), `leans` (an option id or nil), `flag`, `raised_in`, `raised_at` (the instant the question was first admitted, an RFC3339 instant string as `answered_at`, or nil when the mind holds no admission time, as for a card projected before the field; the key is always written; it never moves when the question is edited; age is the client's: now minus `raised_at`), `deciders`, `decider_count` (the number of deciders of the call, set beside `deciders`; neither it nor the emptiness of `deciders` enters the hash, so the hash a non-decider recomputes is a decider's), `status` (`open` or `closed`), `ruling` (the ruling id when a ruling closed the fork; nil when the card is open, and nil on a closed card whose question was withdrawn or otherwise resolved with no ruling), `ruled_from` (answer ids a ruling has been admitted from; non-empty only on a closed card), `order`, and `options_hash` itself.
|
||||
- **`deciders` is read-only data.** The list is set outside the Mind, through Bifrost's admin path, and **Bifrost sends it per call**: Huginn keeps no copy (M5). The card projection copies the list the call carried. **The per-call list holds one to 64 ids** (Huginn's bound; vectors `deciders_at_the_cap_of_64`, `deciders_65`); the per-call list has no schema here, so the bound is stated for the cut that builds it. **`decider_count` is the size of that list, an integer 1 to 64, always written** (vectors `decider_count_missing`, `_zero`, `_65`, `_string`, `_null`). A fork with no decider is still refused, now as `decider_count` 0. **`deciders` holds that list for a decider and is empty for a reader who is not one: empty means "the ids are withheld from this reader", never "no deciders"** (vector `withheld_deciders`). Rule R-card: when `deciders` is non-empty it holds exactly `decider_count` ids; a visible list is whole (vectors `decider_count_fewer_than_the_ids`, `decider_count_more_than_the_ids_shown`). A question's own `audience` may only narrow it. A Mind never writes it, so a Mind cannot add itself and answer its own fork.
|
||||
- Rules a schema cannot say, each with a negative vector: a `depends` line is at most 1000 UTF-8 bytes (the schema bounds 8 lines and 1000 characters; bytes need the rule); option ids are unique; `order` is unique among a Mind's cards (a list with two cards on one `order` is refused, naming both fork ids); `recommendation` and `leans` name an option; deciders are unique; an open card names no `ruling` and its `ruled_from` is empty (a ruling that answers a fork closes it); `ruled_from` is non-empty only when `ruling` is set; a closed card may name no ruling (the question was withdrawn, superseded or deferred: step 6 reads `status`, not the ruling); `options_hash` equals the hash of the shown members; R-card (above); R-answer-result: `answer_result.answer.answerer` is never nil, being the sender's own stamped account (vector `answer_result_with_a_nil_answerer`); R-record, R-entry and R-list ("Reader views" below).
|
||||
|
||||
**Reader views.** A card and its record are shown in one of two views. The **decider view** carries the ids: `deciders` whole, every `answerer` named, and the counts equal to the ids. The **non-decider view** withholds them: `deciders` empty, every `answerer` nil, the counts kept (`decider_count`; `answerer_count` on the record). Who is a decider is Huginn's decision, not this contract's: a reader is a decider exactly when the call's subject is byte-equal to one of the call's deciders (`eureka-substrate:ruling:desk-read-visibility-withheld-ids`); Huginn's door withholds, Bifrost cannot (the card is opaque to it). There is no viewer flag on any document: the view is read off whether `deciders` is empty. This contract carries both views and refuses a view that leaks: R-record: if every `answerer` is named, `answerer_count` is the number of distinct ids; if all are nil and there is at least one answer, `answerer_count` is between 1 and the number of answers; with no answers it is 0 (vectors `answerer_count_disagrees_with_the_ids`, `answerer_count_counts_answers_not_people`, `withheld_count_over_the_answers`, `withheld_count_zero_over_answers`, `withheld_count_over_no_answers`); R-entry, the leak rule: an entry with `deciders` non-empty names every answerer, an entry with `deciders` empty names none (vectors `decider_card_with_withheld_answers`, `withheld_card_with_named_answers`, `withheld_card_with_a_named_answerer_among_nils`); R-list: all entries of one page agree on the view (vector `a_page_mixes_views`). The view does not move the page: `non_decider_page` has the counts, order, cursor and stamp of the decider page it twins, and the vectors' no-leak check finds no id string in a non-decider vector's bytes. `options_hash` is the same in both views, and the bound-answer and `stale_fork` machinery is untouched.
|
||||
|
||||
### Options hash (canonical bytes)
|
||||
|
||||
`options_hash` = lowercase hex SHA-256 of the UTF-8 bytes of the following, byte for byte:
|
||||
|
||||
1. Build an object with exactly the five members `title`, `context`, `options`, `recommendation`, `depends`. Each option is an object with exactly `id` and `text`.
|
||||
2. **NFC-normalise every string, object keys included.** No trimming, no newline rewriting, no case folding. A string with a lone surrogate is not a card (it has no UTF-8). Normalisation stability makes NFC stable across Unicode versions for already-assigned code points; a runtime's own normaliser is trusted and the vectors include a decomposed pair and astral code points (open choice 2).
|
||||
3. Serialise as RFC 8785 (JCS): no whitespace; object keys sorted by UTF-16 code unit, which for these ASCII keys is `context, depends, options, recommendation, title` and, inside an option, `id, text`; array order is as shown (option order and `depends` order are part of the hash).
|
||||
4. Strings are written in double quotes; only `"` and `\` are backslash-escaped, U+0008, U+0009, U+000A, U+000C, U+000D as `\b \t \n \f \r`, every other code point below U+0020 as `\u00xx` in lowercase hex; everything else is written raw as UTF-8 (U+007F, U+2028, `<`, `&` and astral code points included).
|
||||
5. **Numbers and nulls:** the member set contains none. There is no number to canonicalise (a number anywhere in the five members is a defect) and `recommendation` is never nil, so no nil is hashed.
|
||||
|
||||
`fork_id` is not in the hash and is bound beside it in its own field, so one hash cannot be replayed under another fork. The publisher computes the hash and stores it in the card; the client recomputes it from what it rendered and refuses to send on a mismatch; the receiver recomputes from its stored fork, never from the client.
|
||||
|
||||
Vectors `optionsHash`: the seven of the binding file (`heimdall_A..G`), computed by the Python generator, by the C# suite and by the TypeScript suite independently, plus text, title, context and `depends`-order mutations, a case showing the unshown members do not move the hash, escapes and markup, and astral ids. Each suite also mutates every shown member, an option id included, and asserts the hash changes.
|
||||
|
||||
### answer_request
|
||||
|
||||
`{schemaVersion, fork_id, options_hash, answer, retracted, retracts, answered_at, request_id}`. **`request_id`** is set by the client, a lowercase D-format UUID, one per intended answer, kept across retries; the first stored answer that carries it binds it to the stamped `answerer`. "Same body" means every field equal, `answered_at` included, so a client resends identical bytes. A **retry with the same `request_id` and the same body returns the stored outcome unchanged** (a `Refused` one included; a replayed `stale_fork` carries the **current** card, because a stored `desk_answer` has no card field and no storage is added for one) and **never adds a Revision**; the same `request_id` with a different body is `request_id_conflict` (409, a refusal, nothing stored). The same id from another account is another request, judged on its own: Y reusing X's `request_id` with a body identical to X's gets **Y's own new answer, with its own answer id, stamped Y**; X's stored outcome (a `Refused` one included) is never returned in its place, and Y's request neither conflicts with it nor replays it. An `of` that names the counted answer is allowed, because answer ids are not secret between deciders (vectors V14: an off-list X's `Refused`, then a decider Y's identical body is its own `Counted`; X's `Counted`, then Y's identical body is its own `Revision` whose `of` names X's answer, and X's later retry still returns X's answer). Both suites assert it on every scenario: a response's `answerer` is the step's account, and an id first bound by another account never yields that account's answer id or document. **`retracted` is part of the body**: the same `request_id` with `retracted: true` and then `false` (or the reverse) and every other field equal is `request_id_conflict`, for the illegal forms as for any other (vectors `R1_retracted_true_then_false_...`, `R1_retracted_false_then_true_...`). Each illegal form's own retry, byte for byte, replays its stored `bad_retraction` (vectors `R1_a_retraction_with_an_answer_...`, `R1_a_retraction_with_no_target_...`, `R1_a_plain_answer_with_a_target_...`). A body refused at step 1 or 2 binds nothing, so its id is free to reuse; so a target-less retraction resent with `retracted: false` (no answer, no retraction) is `body_invalid` at step 2, not a conflict. The lookup comes after steps 1 and 2 and before the fork is looked up, so a retry gets its stored outcome even if the card has since changed. `answer` is `{choice, note}` (at least one non-nil) or nil on a retraction. `choice` is an option id; `note` is the person's words, verbatim, 1 to 4000 **UTF-8 bytes**, not blank. A schema counts characters, not bytes, so its `maxLength: 4000` (code points) is only the looser bound and both suites enforce the byte limit as a rule: 4000 ASCII bytes pass; 1000 astral characters (4000 bytes) pass and 1001 (4004) fail; `e` plus a combining acute is 3 bytes, so 1333 of them and an `x` pass and 1334 fail; 1999 two-byte characters plus three ASCII (4001 bytes) fail. A note over the limit is `body_invalid`. `answered_at` is the client's claim. **A request never carries `answerer` or `authority`**: both are stamped by Huginn (`answerer` from the verified subject the receiver passes; `authority` from the door's configuration). A body that names either key at any depth is refused whole, never stripped (`body_forbidden_field`); any other unknown key is `body_unknown_field`. The request type Bifrost sends over the second door is this document; it has no field for either key, so a client cannot supply them by construction, and Bifrost's scan is the first line, not the only one. How Huginn receives the verified subject is the door's authenticated context, not a body field (open choice 3). In map-mode `retracted` is always written (the binding file's optional `retracted` becomes `false`).
|
||||
|
||||
### desk_answer (the stored kind)
|
||||
|
||||
`{schemaVersion, answer_id, fork_id, outcome, of, retracts, code, options_hash, choice, note, answered_at, received_at, claim_in_future, answerer, authority, request_id}`, key `<campaign>:desk_answer:<question-label>.n<seq>`; `answer_id` is `n<seq>`, assigned by Huginn per question, and **an answer is named by its answer id** everywhere (`retracts`, `of`, `ruled_from`).
|
||||
|
||||
The stamped `authority` field of a stored answer is an **attribution**: the role the verified account holds (`Operator`, `Steward`, `Member`), copied from Bifrost's state. A stored answer confers no authority. Authority exists only where a ruling cites a counted answer ("Operator authority" below); the field keeps the binding file's spelling (open choice 8). One tagged `outcome`, each variant carrying only its own link:
|
||||
|
||||
- `Counted`: the answer that counts. `of`, `retracts`, `code` nil.
|
||||
- `Revision`: a later passing answer, kept, not counted while the first stands. `of` names the counted answer at the time.
|
||||
- `Retraction`: the stored form of `retracted: true` plus `retracts`. `retracts` names the answer retracted; `choice` and `note` nil. The illegal pair (a retraction with no target, or a target with no retraction) cannot be written.
|
||||
- `Refused`: any refusal from steps 4 to 7 or R1 and R2, with its `code`, stored too. `choice` and `note` keep what the body carried, and so does `retracts`: a refused body that named a target (a retraction of any refusal code, or a plain answer carrying one) projects it as `n<seq>`, never nil; a refused body that named none has `retracts` nil. `of` is nil.
|
||||
|
||||
`received_at` is Huginn's admission time; "first" means first by admission order (the `n<seq>` ordinal), never by `answered_at`. `claim_in_future` is true when `answered_at` is more than five minutes after `received_at`: accepted but flagged. It is a function of the two stored values, so the writer compares against the `received_at` it stores, at the precision it stores it (a flag decided against an unrounded clock and a stored second-truncated `received_at` disagrees with the document it sits in). **Not stored, and no answer id:** a body refused at step 1 or 2 (Bifrost; it never reaches Huginn), and a body naming an unknown fork (step 3; Huginn answers it from its stored forks, but with no question there is nothing to key a record under). Each gets a `refusal` and is dropped. A malformed body is therefore never stored, and neither is an unknown fork. Every refusal from step 4 on is stored. **`unavailable`** (503) is not a refusal and not in the refusal set: Bifrost answers it when the second door or Huginn did not answer after the auth steps and the body shape passed (a bad body is still refused first). **It says the outcome is NOT CONFIRMED, never that nothing was stored**: a timeout after the request reached Huginn may have stored it. It carries no answer id. The desk retries the same request with the same `request_id` and learns the outcome: the stored one if Huginn had it, a fresh one if not. It covers **calls 1 and 2 as well as the answer POST** when Huginn cannot be reached (Transport; a read has no outcome to confirm, so a retry is plain). `retryAfterSeconds` is nil when Bifrost has no hint.
|
||||
|
||||
**The record.** `record` is `{schemaVersion, fork_id, options_hash, counted_answer_id, answerer_count, answers[]}`. `answerer_count` is an integer of at least 0: the number of distinct answerer ids over every stored answer of the fork, refusals included (a refusal stores the stamped answerer too), and it is the same number in both views (vectors `answerer_count_missing`, `_negative`, `_null`). `answers[].answerer` is a string or nil (nil only in the non-decider view).
|
||||
|
||||
**The mind's record and this document.** Huginn keeps the answer as its own record kind (`epiphany.pipeline.desk_answer.v2`, key `<campaign>:desk_answer:<question-label>.n<seq>`, the outcome as one externally tagged value, the fork as `fork`). The second door projects it to this document and nothing else crosses: `answer_id` is the key's `n<seq>` part, `fork_id` is the stored `fork`, the tagged outcome flattens into `outcome`, `of`, `retracts` and `code`, and the six refusal codes are spelt as in the schema (snake_case; the record's enum spells them in the mind's own PascalCase). On the wire an answer is named by its `n<seq>` alone, always inside the fork whose `fork_id` the document carries; a runtime that holds the full record key converts at the door, in one place. Huginn's stored `desk_answer` keeps a non-nil `answerer`; nil exists only in a record projected to a non-decider. `body_sha256` and any other digest Huginn keeps to decide "same body" stay in the record: Huginn alone decides a replay or a `request_id_conflict` and Bifrost never compares bodies, so no digest is a field of this document. A digest is a valid way to decide it only if it covers `fork_id`, `options_hash`, `answer.choice`, `answer.note`, `retracted`, `retracts` and `answered_at` (every field of the request but `request_id`), is computed by Huginn and never read from a client.
|
||||
|
||||
**Huginn's digest, pinned in the vectors (`bodyDigests`; informative, not a wire document).** SHA-256 of one compact JSON object as `serde_json::to_string` writes it (UTF-8, no spaces), lowercase hex, keys in this order, `null` for a missing value, strings verbatim: `fork`, `options_hash`, `answered_at`, `choice`, `note`, `retracts` (the **full stored key** `<campaign>:desk_answer:<label>.n<seq>`: the door converts the wire's `n<seq>` before the digest), then, **only for the three illegal forms** (R1: a retraction carrying an answer, a retraction naming no target, a plain answer carrying a target), `illegal_retraction: true` and `retracted: true|false`. `request_id` is not in it. A plain answer and a legal retraction carry neither trailing key, so their digests are the ones Huginn main pins (`8a4d5b2e`, `9f807538`) and do not move. `9f807538` is pinned for a target no door produces (`Q1.1`); the golden for the real legal retraction is the door's form, the wire's `n1` converted to `Q1.n1` (`84576840`, vector `legal_retraction_door_form`, also main-valid). Source: Eureka's `desk-body-digest-order-20261110.md`, computed with `sha256sum`; the generator, the C# suite and the TypeScript suite recompute every digest from the input fields. **Status:** the three `retracted` goldens (`935cab1a`, `82b24ccc`, `34ef86ed`, and `79eee623` for form (i) with a null target) are the form of `cut-desk-digest-retracted.r2`, merged as Huginn #30. Eureka reports that these four and the door-form legal retraction (`84576840`) reproduce byte for byte on Huginn main `f0ca504` (the #30 fix); that run is hers, reported to us, and was not rerun here. Before #30, Huginn main (`7ea11b4`) wrote `illegal_retraction` alone, so forms (i) and (iii) collided there (`69074cc6`, pinned as `illegal_i_and_iii_alike_on_main`). The wire contract does not wait on it: the conflict scenarios are pinned in `scenarios`.
|
||||
|
||||
### Counting rules (in order; the first failure refuses with that code)
|
||||
|
||||
| step | rule | refusal | stored |
|
||||
|---|---|---|---|
|
||||
| 1 | verified session or bearer | `unauthenticated` (401) | no |
|
||||
| 2 | closed body; no `answerer`/`authority` at any depth; type-correct; not (no `answer` and not a retraction) | `body_forbidden_field`, `body_unknown_field`, `body_invalid` (400) | no |
|
||||
| 3 | `fork_id` is a stored fork | `fork_unknown` (404) | no |
|
||||
| 4 | `options_hash` equals the stored fork's hash | `stale_fork` (409) | **yes**; the result carries the current card |
|
||||
| 5 | the stamped `answerer` is on `deciders` | `not_a_decider` (403) | yes |
|
||||
| 6 | the fork is open (`status: open`) | `fork_closed` (409) | yes |
|
||||
| 7 | `choice`, if present, is an option id | `choice_invalid` (400) | yes |
|
||||
| 8 | first passing answer for `(fork_id, options_hash)` is `Counted`; later passing answers are `Revision`s naming the counted one | | yes |
|
||||
| 9 | a Matrix edit, redaction or reaction changes nothing | | no event is an answer |
|
||||
|
||||
**Retraction** (`retracted: true`, `retracts: <answer id>`, `answer: nil`, `options_hash` still carried, so step 4 applies) passes steps 1 to 6, then:
|
||||
|
||||
- R1 form: it carries no `answer`, it names a `Counted` or `Revision` answer of this fork under this `options_hash`; else `bad_retraction` (400). A retraction naming an answer already retracted is `already_retracted` (409). `retracts` on a body that is not a retraction is `bad_retraction`.
|
||||
- R2 who: the original answerer or any other decider; step 5 already requires a decider.
|
||||
- R3 is dropped and its label stays vacant, so R4 keeps its name in the binding file. A ruling that answers a fork closes it (Eureka and Heimdall, 2026-11-10), so a ruling cannot cite an answer on an open fork (that is the stale-click gap, and a card with `ruled_from` set and `status: open` is invalid), and a retraction after a ruling meets step 6: refused `fork_closed`, stored. There is no `ruled` code (vector `V10a_a_ruling_that_closed_the_fork_makes_a_retraction_fork_closed`).
|
||||
- R4 counted answer: retracting the counted answer removes it from the count and the next passing answer in admission order counts again. Retracting an answer that was not counted changes nothing. After every answer is retracted, a fresh answer is `Counted`. Records stay append-only.
|
||||
|
||||
**The counted answer is derived**, not stored: the first `Counted` or `Revision` answer under the card's current `options_hash` that no `Retraction` names. When the card changes, answers under the old hash stop counting and the next answer under the new hash is `Counted` (vectors `a_changed_card_...`). The `record` projection carries it as `counted_answer_id`.
|
||||
|
||||
### Operator authority
|
||||
|
||||
A ruling may carry `authority: Operator` only if it cites (`ruling_cite.answer_id`) a stored `desk_answer` whose outcome is `Counted` and whose stamped attribution (the answer's `authority` field) is `Operator` (or a stamped relay of her words from a mapped door, which this contract does not model). The citation is what gives a ruling authority: an attribution on an answer is a fact about the account, and authority exists only where a ruling cites a counted answer. The cited answer id is what `ruled_from` lists on the closed card. Negative vectors (`rulingCites`): no citation, a `Revision`, a `Refused` answer, a Counted answer by a non-operator, an answer that does not exist. Other authorities need no citation.
|
||||
|
||||
## Transport
|
||||
|
||||
Source: the desk's client needs (Ratatoskr PR #24 section 12, `ratatoskr-desk-spec-20261110.md`) and Heimdall's binding file, `/opt/commons/handoff/fork-desk-answer-binding-20261110.md`, section 1.3c, which is the source for the second door. **Everything in this section is spec text for Bifrost to build; no route, scope or audience below exists in Bifrost today.** The routes (with the `{mind}` segment), the scope names `desk.read` and `desk.answer`, the audience `bifrost-desk` and the auth order are Heimdall's rulings (his file, sections 4.1 to 4.3a); this page writes them as documents and vectors.
|
||||
|
||||
**Authorities.** Cards are projected **read-only from Huginn**: Bifrost never authors a card, a ruling or a status, and the desk never writes one. Bifrost verifies the bearer, resolves the actor from its `sub` (a `UserAccount.Id`), and for an answer forwards a typed `DeskAnswer` on the peer-checked second door to Huginn, then returns **Huginn's outcome unchanged**: the stored `desk_answer` in an `answer_result`, or its refusal. The wire of the second door is **pending**: Eureka's cut spec follows her record PR, so this page defines the documents the desk sees and not the bytes between Bifrost and Huginn (open choice 3).
|
||||
|
||||
| call | route (proposal) | request | response | token |
|
||||
|---|---|---|---|---|
|
||||
| 1 list | `GET /api/desk/{mind}/forks?status=&cursor=&limit=` | `list_request`: `mind` from the path, the rest from the query string | `list` | audience `bifrost-desk`, scope `desk.read` |
|
||||
| 2 read | `GET /api/desk/{mind}/forks/{fork_id}` (the id percent-encoded) | `read_request`, its `mind` and `fork_id` from the path | `entry`, or `refusal` `fork_unknown` (404) or `fork_too_large` (422) | `desk.read` |
|
||||
| 3 answer | `POST /api/desk/{mind}/answers` | `answer_request` as the body; `fork_id` stays in the body, the Mind is the route's and is no body field | `answer_result` (200 for `Counted`, `Revision` and `Retraction`; a stored `Refused` answer keeps the `answer_result` body and takes its code's status from the counting-rules table: `stale_fork` 409, `not_a_decider` 403, `fork_closed` 409, `choice_invalid` 400, `bad_retraction` 400, `already_retracted` 409, as the vectors' `results` pin; a replay returns the same status as the first call; the desk reads `outcome` and `code` from the body), or a `refusal` (`fork_unknown`, or `fork_too_large` when a stale answer's card re-read is past the cap), or `unavailable` | audience `bifrost-desk`, scope `desk.answer` |
|
||||
|
||||
**The `{mind}` segment** (Heimdall's rulings M1 to M5; vectors `transport.mindRoutes`).
|
||||
|
||||
- **M1.** `{mind}` is looked up in a **fixed configured list** of Mind ids, each mapped in configuration to that Mind's socket on the peer-checked door. The segment is percent-decoded once and compared, ordinally, with the list's ids: no case folding, trimming or Unicode normalisation, and a decoding failure is a miss. It is **never joined into a path, a socket name or a query**, so a value off the list opens nothing (`../x`, `a/b`, `a%2fb`, `eureka%00`, a 4 KB string, `GAMECULT-CHAT` for `gamecult-chat`, a trailing space, bytes that are not UTF-8: all unknown, 404, no socket opened).
|
||||
- **M2.** An unknown Mind gets **the same refusal as an unknown fork**: `fork_unknown`, 404, the same bytes (the document's `error` names neither the Mind nor the fork). The list of Minds is not probeable. Auth is judged first, so a caller without a valid token, scope or Active membership learns nothing about which Minds exist.
|
||||
- **M3.** On the POST the route's Mind must hold `fork_id`: step 3 is judged against **that Mind's** stored forks, so a `fork_id` the route's Mind does not hold is `fork_unknown` and nothing is stored, in either Mind. A fork cannot be answered through another Mind's route. A body that names `mind` is `body_unknown_field`: the Mind is the route's.
|
||||
- **M4.** Scopes are **not per Mind**: `desk.read` and `desk.answer` open the routes of every configured Mind; every reader sees every fork's card and outcome (a non-decider sees no account id, "Reader views"), and which forks a caller may answer is the decider list.
|
||||
- **M5. The decider list is sent per call.** Bifrost holds the admin-set list and sends it with **every answer, read and list request** to Huginn, as a typed field on the same peer-checked door; Huginn keeps no copy of it. Because it travels with read and list too, a projected card's `deciders` is the list of that call for a decider and empty for a reader who is not one, with `decider_count` travelling with both views, and step 5 judges an answer against the list the same call carried. It comes only from Bifrost's admin-set state: never from a Mind and never from any request body a client controls: no HTTP field, header or query parameter on any desk route sets or extends it, and a body naming `deciders` is `body_unknown_field` (scenario `M5_...`). A request carrying it from a Mind's own door or session is refused. **This is Bifrost and Huginn work and no vector here can test it** (the typed field and the door's wire are pending, open choice 3); the rule is stated so that the cut that builds the request has it. (Heimdall's ruling, #minds 2026-11-10 19:26Z; it replaces the earlier reading of a list Huginn receives once and holds.) **Envelope names:** the desk's envelope on that door uses the names this page uses, `mind`, `authority`, `subject` and `deciders`, with no conversion at the door (Eureka, #minds 2026-11-10 19:58Z); `deciders` is a per-call list of short ids at the envelope's top level beside `subject`, never inside the request body, and Huginn keeps no copy.
|
||||
|
||||
Calls 1 and 2 are enough for a read-only desk. Every response is the pinned MessagePack document or its JSON form with the same keys (open choice 1 of `vote-api.md`: the media type is unsettled).
|
||||
|
||||
**Auth, in order, per route.** (1) A bearer, else `unauthenticated` (401). (2) The token's audience is `bifrost-desk`: **the Matrix Authentication Service token chat holds today is refused, and so is any `votes.*` token** (audience `bifrost-votes`), both as `unauthenticated`. (3) The scope the route needs, else `insufficient_scope` (403): `desk.read` for calls 1 and 2, `desk.answer` for call 3, and neither implies the other. (4) The account behind `sub` is an Active member, else `forbidden` (403), as in the vote API; scope is judged first. (5) For call 3 the body is then shaped (steps 1 and 2 above), so **a non-Active member who sends a bad body, including one naming `answerer` or `authority`, gets `forbidden`, not a body refusal**; a body naming either key at any depth is `body_forbidden_field` only for an Active member. (6) Only then is Huginn asked, so `unavailable` never hides an auth or body refusal. A `votes.*` token touches none of the three. Heimdall's file leaves the audience and the claims check open; `insufficient_scope`, `forbidden`, `request_invalid` (400, a list or read request that fails its document; an unknown key, `authority` included, is `request_invalid` here, whatever Huginn's own decode does with it) and `request_id_conflict` are added to the door refusals, and so is `fork_too_large` (422, list and read; see List and Read). **`request_id_conflict` is answer-only**: the idempotency key exists only on the answer. A door `request_id_conflict` on a read or list is a door fault and reaches the client as 503 `unavailable`, never as `request_id_conflict` (Persona, 2026-11-11, agreed with Heimdall; vectors `transport.doorFaults`, each carrying the client response's bytes). The `unavailable` text's "same request_id" retry hint is for answers; reads and lists carry no request_id..
|
||||
|
||||
**List.** `list_request`: `{mind, status, cursor, limit}`. `mind` is the route's `{mind}`, a Mind id from the configured list. `status` is `open`, `recorded` or nil for both; `recorded` means a closed card. Cards come **newest first by `order`**. `order` is the card's unique rank per Mind: an integer from 0 that never changes once the card exists, later questions only appending (Huginn derives it from the Mind's questions sorted by admission ordinal, then key). A Mind never holds two cards of one `order`; a list or card set that does is refused, and the refusal names both fork ids. 0 is legal, but no cursor names it (`c0` fails the cursor pattern): a page ending at order 1 returns `c1`, and the next page returns the order-0 card alone with `next_cursor` nil. `limit` is 0 to 50; **`limit` 0 returns no entries, only the counts and the stamp**, which is what "N open" on the Mind's header needs. `cursor` is nil or `c<N>`: the cards whose `order` is below N; a client treats it as opaque and sends back the `next_cursor` it was given. `list`: `{mind, stamp, open_count, recorded_count, forks[entry], next_cursor}`. The counts cover every card the viewer may see, whatever `status` and `cursor` asked for. `stamp` is `s<N>`, N the receiver's last-seen Huginn admission ordinal for the Mind's desk documents: the same stamp means the same state, so a desk polls `limit` 0 and fetches bodies only when the stamp moves. `next_cursor` is nil on the last page. **A page may hold fewer than `limit` entries** when the next entry would push the encoded response past the receiver's response budget (Huginn: 65536 bytes); it then holds at least one, `next_cursor` is `c<order of the last entry returned>` so the next page resumes below it, and the counts and the stamp are those of the full list, unchanged. **`fork_too_large`** (HTTP 422) refuses a page whose **first** entry alone is past the budget: 422 because the request is well formed and authorised but names a resource the list cannot carry, and 413 is for a request body that is too large, which this is not; retrying returns the same refusal. Its `error` names the fork id and its `order`, for example `fork_too_large: fork <fork_id> (order <n>) alone is past the response budget`. **A refusal's `error` text is informational and not pinned**: the contract pins the code, the HTTP status, that the text names the fork id (and the order on a list), and the `c<order>` continuation on a list; the vectors' wording is a sample, and the judges check those four things, not the bytes of the text. The client continues the list with cursor `c<n>`, the cards strictly below that order, which skips this fork; it is then readable only by id (the read route returns the whole entry, and refuses with the same code only when that entry alone is past the cap, see Read); `c<n>` is valid only when n is at least 1, so for order 0 there is nothing below and the client has reached the end. `limit` 0 returns no entries and never refuses. (Ruled by Persona, 2026-11-11.) An `entry` is `{card, record}`: the card and its `record` (the answers with their outcomes and the derived `counted_answer_id`).
|
||||
|
||||
**Read.** `read_request` is `{mind, fork_id}`; the response is the `entry` for one fork of that Mind. Its `card.options_hash` is **computed by the server** from the five shown members as in "Options hash" and the client recomputes it from what it rendered; a card whose hash is not the hash of its members is no card (negative vector `card_hash_wrong`). The record's `fork_id` and `options_hash` are the card's, and `counted_answer_id` is derived, not copied (negative vectors for each). Every `desk.read` holder sees every fork's card and outcome in a configured Mind; only a decider's notes depend on the caller, going to callers in the admin-set `deciders` list, which Bifrost enforces at the door (ruling `desk-read-visibility`, option (c)); `fork_unknown` is only for a fork id that does not exist under the route's Mind (an unknown Mind answers the same, M2), so no fork is ever hidden by it, and a caller without `desk.read` is refused by the auth order above (`insufficient_scope`) before any lookup. **Huginn withholds account ids from a reader who is not a decider and returns counts ("Reader views"); Bifrost still strips notes.** Every `desk.read` holder sees cards and outcomes; notes (a decider's own words) only go to callers in the admin-set `deciders` list. The read and list shapes are unchanged and carry no audience field (`eureka-substrate:question:desk-read-visibility`, Heimdall's option (c)). **A read is refused `fork_too_large` (422) when the whole entry is past the reply cap** (Huginn's daemon caps every reply at 65536 bytes; the cap, not the page budget, is what a read meets). Its `error` names the fork id and has no order and no cursor to carry, because there is nothing to continue with (sample: `fork_too_large: fork <fork_id> alone is past the response budget`) (vector `transport.readTooLarge`; the cap is in no vector). **The answer route meets the same cap:** when an answer is `stale_fork`, Bifrost re-reads the current card to attach it, and if that read is past the cap the answer is refused `fork_too_large` (422) with the read form of the text, the same document as a read. Huginn has already stored the answer as `Refused(stale_fork)`, as for any stale answer, and it is never counted; the client is told `fork_too_large` instead of receiving the current card, and a replay of the same `request_id` gets the same 422 while the fork stays oversize. It is never `unavailable` (vector `transport.answerTooLarge`). A stripped read serves a decider's `note` as `note: null`, never omitted (map-mode: every key is written); `desk_answer.note` is already nullable in the schema, so a served record validates as it stands.
|
||||
|
||||
**Answer.** The body is the `answer_request` and nothing else a client may set: `fork_id`, `options_hash`, `answer`, `answered_at`, `request_id` (plus `retracted` and `retracts`, written `false` and nil unless the call retracts). The response is the stored outcome: `Counted`, `Revision`, `Retraction`, or `Refused` with its code, and the **`counted_answer_id`** the fork has once this call is applied (`n<seq>` or nil; derived as in "The counted answer is derived", the same value the `record` projection carries, so the desk needs no second read). A replay returns the stored outcome with the `counted_answer_id` current at the retry, not the one it had when first stored. **A `stale_fork` refusal carries the current card** in `answer_result.card`, so the desk can show the new fork without another read. Nothing is stored for a step 1 or 2 refusal, an unknown fork (or an unknown Mind, or a fork another Mind holds) or a `request_id_conflict`. `unavailable` promises nothing either way.
|
||||
|
||||
**Vectors (`transport` in `fork-card-vectors.json`).** `listRequest`, `readRequest` and `entry` (valid and invalid, with bytes); `listInvalid` (including `two_cards_share_one_order`, whose `refusal` is the exact text both judges must produce: `order 4 is shared by <first fork id> and <second fork id>`); `listScenarios` (six scenarios: over one Mind's five cards, paged open-only, recorded-only, all and `limit` 0; an empty Mind; and `order_zero_is_legal_but_no_cursor_names_it`, four cards of orders 3 to 0 paged by 3, whose first page ends at order 1 with `c1` and whose second page is the order-0 card with `next_cursor` nil; each response with its bytes, the cursor of page two being page one's `next_cursor`); `listShortPages` (three scenarios: a page that stops short and resumes below its last entry; `fork_too_large` on a first entry of order 3, continued with `c3`; and a short page ending at order 1 followed by `fork_too_large` on order 0, where the client is at the end; each step carries its bytes, and the receiver's budget is in no vector, so the judges check a short page as a nonempty strict prefix of the unbudgeted page and a refusal as naming the entry the page would open with); `doorFaults` (three cases: a door `request_id_conflict` is `unavailable` 503 on read and list and itself 409 on the answer); `readTooLarge` (one case: a read whose entry is past the cap, refused `fork_too_large` 422 with the read-form text and its bytes); `answerTooLarge` (one case: a stale answer whose card re-read is past the cap, the same 422 document over a stored `Refused(stale_fork)`: `outcome` `Refused`, `code` `stale_fork`, `counted` false); `authCases` (twenty-two cases: the MAS token, three `votes.*` tokens, a desk token with the other route's scope, a non-Active member on each route, and Huginn down on each route, with auth and membership judged first). Both suites replay the list requests through a reference judge and the auth cases through another. `mindRoutes` (a configured list of two Minds with their sockets and forks; 57 cases over the three routes: bad and percent-encoded segments, unknown Mind against unknown fork with `sameResponse` pairs of equal bytes, the POST on a Mind that does not hold the fork, scopes that are not per Mind, and auth judged before the Mind lookup) is replayed by both suites through a reference judge that reports the refusal, the socket it would open and the Mind that stored an answer. Top-level `unavailable` pins the 503 document. Scenarios pin: an `unavailable` where Huginn never had the request, retried into a `Counted` answer; an `unavailable` where Huginn had stored it, whose retry returns the stored outcome and adds no Revision; a replayed `Refused` with its card; `request_id_conflict`; the same id from another account; and a non-Active member with a bad body, with the door down, getting `forbidden` first. A bad body is refused before the door is asked.
|
||||
|
||||
**Bifrost must still build:** all three routes; the `bifrost-desk` audience and the `desk.read` and `desk.answer` scopes on the OIDC token it issues to chat; the configured Mind list and its sockets (M1); the projection of cards and records from Huginn, the stamp, the cursor and the counts; the `DeskAnswer` call on the second door and the pass-through of its outcome; the decider list, sent with every answer, read and list request from the admin-set list only (M5); the `unavailable` answer. **Huginn must still build** the second door's wire, the per-call decider list it receives with each answer, read and list request, keeping no copy (M5), and the read side the projection uses (Eureka's cut spec, after her record PR). **The desk may build today** against the vectors: nothing in them needs a live service.
|
||||
|
||||
## Old format, the mind's record, and what maps to what
|
||||
|
||||
The old desk (`index.html`) read `questions/<id>` and wrote `answers/<id>` in a shared store. The mind's `question` record is the source in the new design; the card is its projection.
|
||||
|
||||
| old desk | mind `question` record | card |
|
||||
|---|---|---|
|
||||
| `qid`, `id` | key `campaign:question:label` | `fork_id` |
|
||||
| `title` | `title` | `title` |
|
||||
| `body` | `question` (the long text) | `context` |
|
||||
| `depends`: a free string | `depends`: up to 8 prose lines (`huginn schema question`) | `depends`: the lines verbatim |
|
||||
| `options[{key, label, text}]` | `options[{label, text}]` | `options[{id, text}]` |
|
||||
| option `key` | option `label` (a slug, the id) | option `id` |
|
||||
| option `label` (a human title) | none | **dropped**: not stored, not hashed; shown text is `text` |
|
||||
| `rec` (a key) | `recommended` (a label) | `recommendation` (an id), never nil |
|
||||
| `lean` ("Self leans" mark) | none | `leans` (an id or nil), not hashed |
|
||||
| `flag` (the provisional line) | none | `flag` (a string or nil), not hashed |
|
||||
| `status` open or closed, `ruling` | derived from the resolution (status is never written): any resolution of the question closes it; the ruling is the one that answered it | `status`, `ruling`, both a projection (`ruling` is nil on an open card and on a card closed with no ruling) |
|
||||
| `order` | none (unique rank per Mind, from 0) | `order` |
|
||||
| none | `raised_in`, `asked_on` | `raised_in`; `asked_on` is not carried |
|
||||
| none | the question's admission time (no timestamp in the old format; `asked_on` is a date and stays uncarried) | `raised_at`, an instant or nil, not hashed |
|
||||
| none | none | `deciders` (outside the Mind), `ruled_from`, `options_hash` |
|
||||
| none | none | `decider_count`, `answerer_count` (counts that stand in for withheld ids) |
|
||||
| answer `{choice: key or null, note, question, updatedAt}`, one mutable document per question | none | `answer_request` then an append-only `desk_answer` |
|
||||
| `note`: her words verbatim | | `answer.note`, verbatim |
|
||||
| "Clear pick": `choice` back to null so the note stands alone | | an `answer` with `choice` nil and `note` set, as the first answer or as a `Revision` |
|
||||
| "Changing an answer is fine until it's admitted as a ruling" | | a later answer is a `Revision`; `Retraction` withdraws one; neither changes who counted first, and a ruling that answers the fork closes it, after which no answer or retraction is taken (`fork_closed`) |
|
||||
|
||||
Differences that need Void's choice: the old page **overwrites** one answer per question and the new store **appends**, so the booth cannot show "your answer" as one mutable field (it shows the latest answer by the person, plus its history); the old page needs no identity and the new one stamps `answerer` from a verified session; the old `label` has nowhere to live unless the card's `text` carries it.
|
||||
|
||||
## Transport note for Void: Matrix event versus how the mind carries questions
|
||||
|
||||
How a mind carries a question today: a typed `question` record in Huginn (`huginn view`, `huginn query`); the Persona relays it to the operator in chat, and the operator's reply comes back as chat text that Self reads and admits as a `ruling` in her words. Identity is whoever the chat attributes the message to; nothing binds an answer to the question text she saw.
|
||||
|
||||
Option A, **a Matrix event in the Mind's room with the answer as a reply.** Gains: it sits where people already are, needs no sign-in beyond Matrix, and the thread shows the exchange. Loses: the sender is an mxid, not a Bifrost account, so `answerer` and `authority` have no verified source; an edit or redaction changes the visible message but not the decision (binding rule 9), so the thread and the record can disagree; there is nowhere to carry `options_hash`, so a stale card cannot be refused; and a reply is free text, so `choice` is lost.
|
||||
|
||||
Option B, **Bifrost receives the answer and Huginn stores it** (the design in this page; Ratatoskr PR #24 also withdraws the Matrix carrier). Gains: a verified account, a bound hash, refusals that are stored and visible, one counted answer, retractions. Loses: the booth needs Bifrost sign-in, which does not reach chat yet (Bifrost PR #9 and #37 design it), so until then the desk is read-only; and the exchange is no longer in the room.
|
||||
|
||||
**Recommendation: B, with Matrix as presentation only.** The Mind may post a card as a listing and a link into the desk; no Matrix event is ever an answer (rule 9). Confidence: high on the rule (it is Heimdall's and Eureka's already), moderate on the interim, where read-only until sign-in is a real cost; if the operator needs to answer before sign-in reaches chat, the honest stopgap is the old path (chat text, Self admits a ruling in her words) rather than a Matrix reply the record cannot bind.
|
||||
|
||||
## Differences from the binding file
|
||||
|
||||
- Spelling: every field is as the binding file names it (`fork_id`, `options_hash`, `answered_at`, `retracted`, `retracts`, `answer.choice`, `answer.note`, `recommendation`, `depends`, option `id`), except that `schemaVersion` keeps CultNet's camelCase and `answer_id` replaces the earlier `receipt id` (Persona brief).
|
||||
- Map-mode writes every key: `retracted` is always present; nothing is "optional".
|
||||
- `Refused` stores every refusal from steps 4 to 7 and R1 and R2 (his section 1.3b); only steps 1 and 2 and `fork_unknown` are not stored. The binding file does not say whether `fork_unknown` is stored; it cannot be keyed without a question, so it is not (open choice 4).
|
||||
- The binding file's `choice_valid` has no named refusal code; this page names it `choice_invalid`. `fork_known` is `fork_unknown`. A type-invalid body is `body_invalid`.
|
||||
- `ruled` (his R3 and V10) is dropped: a ruling that answers a fork closes it, so the case is `fork_closed` (V4, V10a). His file drops it too.
|
||||
- Heimdall's section 1.3e (Q1 to Q6, V12 to V18) is the source for `request_id`; this page matches it, with two notes. Q1's open item is settled by his ruling: a replayed `stale_fork` returns the current card. In V14 a decider's identical body is a `Revision` whose `of` necessarily names the first account's counted answer id (the record shows it to every decider), so "never contains X's answer_id" holds for Y's answer id and document, not for `of` (Heimdall: `of` naming the counted answer is allowed); the vector with an off-list first account pins the case with a `Counted`, which has no `of`.
|
||||
- `request_id` (on the request and the stored `desk_answer`) and `request_id_conflict` are this page's: his file has no idempotency key, and a retry after `unavailable` needs one. Eureka's `desk_answer` kind and Huginn's request type must carry it.
|
||||
- Transport: the routes, the `{mind}` segment, the scopes, the audience and the auth order are his rulings (4.1 to 4.3a); the documents (list, read, `unavailable`) are this page's. The note limit is 4000 UTF-8 bytes here, as his 1.1 leaves the unit unsaid.
|
||||
- The recommendation is never nil. The binding file's earlier vectors D and E used a nil recommendation; its updated D and E use `"a"`, as here.
|
||||
- `raised_at` (2026-11-11) is the desk-feed addition (Bifrost PR 67): a required key, an instant or nil, outside `options_hash` (the five hashed members and every digest are unchanged; vectors `raised_at_nil`, `raised_at_epoch_integer`, `raised_at_date_only`, `raised_at_missing`). The card is spec-authored and no runtime deploys it, so the schema id stays `gamecult.fork.card.v0`.
|
||||
- Reader views (2026-11-11) are the desk-feed addition behind Huginn PR 56 and `eureka-substrate:ruling:desk-read-visibility-withheld-ids`: the card gains `decider_count` and `deciders` may be empty; the record gains `answerer_count` and `answerer` may be nil, the counts beside the collections they summarise (not on the list envelope, which neither the read entry nor the `stale_fork` card travels in). `options_hash` and every digest are unchanged. The schema ids stay `gamecult.fork.card.v0` and `gamecult.fork.record.v0` for the same reason as `raised_at`.
|
||||
- Hash vectors: A, B, C, D, E, F and G of the binding file are reproduced digest for digest by the Python generator, the C# suite and the TypeScript suite (the generator prints `same` for each; none differs).
|
||||
|
||||
## Open choices
|
||||
|
||||
1. Case of field names: snake_case for the fork documents (as the binding file) beside camelCase for the vote documents (as Bifrost's serializer). One convention would be tidier.
|
||||
2. NFC across runtimes relies on each runtime's normaliser; a pinned table, as `write-receipt.md` does for letters, would remove the reliance. The risk is only for code points assigned after a runtime's Unicode version.
|
||||
3. How Huginn learns the verified subject: the second door's authenticated context (the peer credential names Bifrost the service, not the member), so the subject must travel beside the request. This contract has no envelope for it.
|
||||
4. Whether `fork_unknown` and shape refusals should leave an audit record somewhere other than a `desk_answer`.
|
||||
5. Whether `leans` and `flag`, which the booth shows, should join the hash. The binding file's five members do not include them; a changed lean would not make an answer stale. `raised_at` is immutable, so it was kept out of the hash for the same reason it need not be in: it can never make a shown card stale.
|
||||
6. What the person sees of a retracted counted answer when the next answer counts: this contract only says the count moves.
|
||||
7. `received_at` is not in the binding file's stored fields; it is kept for `claim_in_future` and could be dropped if the `n<seq>` answer ordinal alone decided answer order.
|
||||
8. The stamped `authority` field is an attribution, not an authority (above); renaming it `attribution` would say so, at the price of a new key the door must also refuse in a body.
|
||||
9. The claims Bifrost verifies are PR #24's open item 5. (The audience `bifrost-desk`, the three routes and the scope names are ruled by Heimdall.)
|
||||
10. The second door's wire between Bifrost and Huginn (pending Eureka's cut spec). `unavailable` is a document of its own, outside the refusal set, so a desk can retry it; calls 1 and 2 use it too when Huginn is down (vectors `huginn_down_*`).
|
||||
11. While a known Mind's door is down its routes answer `unavailable` (503) and an unknown Mind answers `fork_unknown` (404), so the two are distinguishable for that period. M2 makes them identical only when every door is up; making them identical when one is down means answering `unavailable` for any `{mind}` not on the list, which tells a client nothing about which Minds exist but also hides a typo. Heimdall's to rule; the vectors do not pin it.
|
||||
12. A fork's answers are unbounded in number, so a fork's entry can grow past the reply cap and become unreadable (`fork_too_large` on read, and on list when it is the first entry of a page). Whether the contract should cap the answers per fork is for Persona and Heimdall to rule; nothing here decides it.
|
||||
13. The read form of `fork_too_large` is a target, not current behaviour: Huginn's door answers an over-cap read as `Refused(ResponseTooLarge{bytes, limit})`, which carries no fork id and is not `fork_too_large`. Bifrost maps it to `fork_too_large` (422) using the route's `fork_id`; until it does, a read past the cap reaches the client as 503 `unavailable`. The same holds for the answer route: a `stale_fork` answer whose card re-read is past the cap is a Bifrost target too (`fork_too_large` 422 over a stored `Refused(stale_fork)`), and until it is built the client sees 503 `unavailable`.
|
||||
14. What a non-decider can still infer: the card's `status` and `order`, the `authority` role on each answer (a role, not an id, and the ruling leaves it whole), and `answerer_count`. Whether a role plus a count is too much to show is Eureka's ruling to revisit.
|
||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -1,107 +0,0 @@
|
|||
# CultNet vote API v0 (specification)
|
||||
|
||||
Status: specification, drafted for Heimdall (Bifrost) and a Ratatoskr voting module. No server implements it yet.
|
||||
Files here: `vote-api.schema.json` (one schema, a `$defs` entry per document), `vote-api-vectors.json`. Conformance suites: `tests/GameCult.Networking.Tests/GovernanceVectorTests.cs` (C#) and `packages/cultnet-ts/test/governance-vectors.test.ts` (TypeScript). The vectors are written by `scripts/gen-governance-vectors.py`.
|
||||
Facts it rests on: `/opt/commons/handoff/bifrost-browser-voting-facts.md` (Bifrost `416f11a`; `416f11a..276f611` changes four files: a Standard-close concurrency fix in `MotionGovernanceService.cs`, two test files and `docs/deploy-main-to-live.md`; none touches the sealed API, so the facts hold at `276f611`) and Bifrost PR #37 (`docs/ratatoskr-voting-auth.md`, see "PR #37" below).
|
||||
|
||||
## Scope
|
||||
|
||||
**Which API covers which.** This contract covers **sealed-ballot motions only** (`gamecult.sealed_ballot.v0`). **Standard motions are not covered here.** Bifrost PR #37 also serves them (`PUT /api/votes/motions/{id}/ballot`, a receipt `{motionId, choice, revision, castAtUtc, receiptId}`), and that API is #37's own: this page defines no document for it, and a Standard motion id sent to any exchange below is answered `not_found`. Today Standard motions have no JSON read or cast API at all, no Mind path, and no receipt (open choice 1). The contract names four exchanges and one refusal document:
|
||||
|
||||
| exchange | request | response |
|
||||
|---|---|---|
|
||||
| motion list | `gamecult.vote.motion_list_request.v0` | `gamecult.vote.motion_list.v0` |
|
||||
| motion read | `gamecult.vote.motion_read_request.v0` | `gamecult.vote.motion.v0` |
|
||||
| cast (commit or reveal) | `gamecult.vote.cast.v0` | `gamecult.vote.receipt.v0` |
|
||||
| any refusal | | `gamecult.vote.refusal.v0` |
|
||||
|
||||
Every document is CultNet map-mode: all keys are written, nil where absent, and the schema is closed (`additionalProperties: false`). Instants are RFC 3339 UTC with a `Z` and up to seven fractional digits. Ids are lowercase `D`-format UUIDs. A motion states `highStakes`, a boolean fixed when the motion opens and never changed after (Bifrost PR #37, D2): it is the property that makes a commit demand a fresh sign-in (`reauthentication_required`). The bytes of every document are pinned by `messagePackHex` in the vectors (shortest integers, shortest strings, keys in the order the schema lists them); JSON with the same keys is the xenos-boundary form of the same documents (open choice 4: the wire format).
|
||||
|
||||
## Documents
|
||||
|
||||
- **motion_list_request**: `{schemaVersion, phase}`; `phase` is `Commit`, `Reveal`, `Closed` or nil for all.
|
||||
- **motion_list**: `{schemaVersion, motions: [{id, title, round, phase, commitClosesAtUtc, closesAtUtc, highStakes}]}`. **Heimdall must add this endpoint**: Bifrost has no list route for sealed motions today, only fetch-by-id. No pagination in v0 (open choice 2).
|
||||
- **motion_read_request**: `{schemaVersion, motionId}`.
|
||||
- **motion**: Bifrost's `SealedMotionState` with its names: `{schemaVersion, id, title, summary, round, priorMotionId, ballotSchema, phase, candidates (two or more), commitClosesAtUtc, closesAtUtc, highStakes, yourVoterId, yourCommitment (a receipt or nil), announcement}`. It never carries a tally, a turnout, or another voter's commitment or ballot (a `tally` key is a negative vector). `yourVoterId` is the voter's `UserAccount.Id`, the `voterUserAccountId` of the commitment.
|
||||
- **cast**: `{schemaVersion, motionId, verb, commitment, ballot}` with exactly one of two shapes: `verb: "commit"` with a 64-hex `commitment` and `ballot: nil`, or `verb: "reveal"` with `commitment: nil` and a `ballot`. One document for both verbs; today's two routes (`/commit`, `/reveal`) may stay, taking this document as the body, with a `verb` that must match the route (open choice 3).
|
||||
- **ballot** (inside a reveal): `{schema: "gamecult.sealed_ballot.v0", motionId, round, candidate, reason, salt, persona}`. `candidate` and `reason` are single-line and **already trimmed** (no Unicode White_Space at either end, using the White_Space list of `write-receipt.md`); the contract refuses an untrimmed value rather than trimming it, so the bytes hashed are the bytes sent. **This is a behaviour change Bifrost must make:** it trims `candidate` and `reason` silently on reveal today (facts file section 3c, `SealedBallotService.cs:154, 385-387`), so an untrimmed reveal is accepted and hashed trimmed; under this contract it is `invalid` (open choice 5). `reason` is 1 to 280 characters counted in UTF-16 code units, as Bifrost counts. A JSON Schema `maxLength` counts code points, so the schema alone accepts up to 280 astral characters; both suites add the rule (vectors `cast_reveal_reason_140_astral_280_units` valid, `ballot_reason_141_astral_282_units` refused). `salt` is 32 to 128 lowercase hex. `persona` is `""` for a member and a printable-ASCII, space-free id of at most 64 characters for a Mind.
|
||||
- **receipt**: Bifrost's `SealedBallotReceipt`: `{schemaVersion, motionId, voterUserAccountId, commitment, revision (>= 1), committedAtUtc, revealed}`. The receipt for a reveal has `revealed: true` and **echoes nothing of the ballot** (no candidate, reason or salt; negative vectors for each).
|
||||
- **refusal**: `{schemaVersion, code, error, retryAfterSeconds}`; the `code` set is closed:
|
||||
|
||||
| code | HTTP | trigger |
|
||||
|---|---|---|
|
||||
| `unauthenticated` | 401 | no bearer, or one Heimdall does not know (the API must answer this, not redirect to a sign-in page) |
|
||||
| `reauthentication_required` | 401 | a commit on a `highStakes` motion with no sign-in fresh enough (#37 D2: `prompt=login`, `max_age`); the voter signs in again at the top level and retries |
|
||||
| `forbidden` | 403 | authenticated but not an Active member, or a Mind key used on a route it may not call |
|
||||
| `not_found` | 404 | unknown motion id, a Standard motion id, or a reveal with no prior commit |
|
||||
| `wrong_phase` | 409 | commit outside Commit, reveal outside Reveal |
|
||||
| `contended` | 409 | a reveal raced the close fence: send it again |
|
||||
| `invalid` | 400 | the body fails the schema or an in-document rule (untrimmed text, candidate not in the motion, `round` or `motionId` mismatch, `persona` wrong for the credential) |
|
||||
| `commitment_mismatch` | 400 | a reveal whose canonical bytes do not hash to the stored commitment |
|
||||
| `payload_too_large` | 413 | body over 4096 bytes |
|
||||
| `rate_limited` | 429 | cast rate exceeded, per account; `retryAfterSeconds >= 1`, mirrored in `Retry-After` |
|
||||
| `held` | 503 | the Ratatoskr voting brake is set (#37 D5): nothing is read or stored while it is |
|
||||
|
||||
Each code has a vector (`refusals`), and every failure of the schema has a negative vector (`invalid`).
|
||||
|
||||
**Not on Bifrost's member API yet.** The **413 body cap of 4096 bytes** and the **429 per-account cast limit** are not on Bifrost's member sealed API today (facts file sections 3c and 5): both exist only on the Mind intake route (4096 bytes; 30 requests a minute per source address). #37 proposes 30 casts per 10 minutes per account for the member routes (its D6). `reauthentication_required` and `held` are #37 proposals (D2, D5) and exist nowhere in code. All four are spec text until Heimdall builds them.
|
||||
|
||||
**Two refusals Bifrost must split first.** Bifrost returns a reveal whose bytes do not hash to the stored commitment as a plain `400` `Invalid` ("The ballot does not match the stored commitment."), the same status and error type as every other bad body, so `commitment_mismatch` and `invalid` are one today. It returns a contended reveal (a race with the close fence, `SealedBallotService.cs:186-189`) as `WrongPhase` `409`, the same type as a reveal outside the Reveal phase, so `contended` and `wrong_phase` are one today. A client cannot tell "send it again" from "too late", or "wrong ballot" from "malformed body", until Bifrost splits each pair.
|
||||
|
||||
## Commitment
|
||||
|
||||
`commitment = lowercase hex SHA-256 of the UTF-8 bytes of`
|
||||
|
||||
gamecult.sealed_ballot.v0 \n {motionId} \n {voterUserAccountId} \n {persona} \n {round} \n {candidate} \n {reason} \n {salt}
|
||||
|
||||
with `\n` U+000A, ids in `D` format, `round` in decimal, `persona` empty for a member. This is Bifrost's formula as the code has it (`SealedBallotService.cs:154, 385-387`); `docs/sealed-ballot-motion.md:22-23` omits `{persona}` and is stale. The vectors give the canonical bytes (`canonicalHex`) and the digest for a member, a Mind, non-ASCII text, and a decomposed-versus-precomposed pair (no normalisation: they are different ballots). `pairs` pins what a reveal must match: the right ballot matches; a changed reason, another voter id, or a dropped persona does not, and the answer is `commitment_mismatch`.
|
||||
|
||||
## Receipts the voter can check later
|
||||
|
||||
A cast returns the receipt. The voter checks it later in two places that must agree byte for byte with it: `motion.yourCommitment` on a motion read (a commit receipt is present from the commit; the revision counts re-commits), and, after close, the `commitment` the result lists for them. The contract adds no receipt id or signature: the receipt is the commitment, its revision and the time (open choice 6).
|
||||
|
||||
## Personas
|
||||
|
||||
A Persona votes only on sealed motions, through a Mind key (Bifrost binds an Ed25519 public key 1:1 to an Active member account). The ballot's `persona` is the bound persona id and the commitment covers it, so a Mind's ballot cannot be replayed as a member's (`pairs`: dropping the persona does not match). The Mind-intake route today takes a signed `MindEnvelope` anonymously; this contract does not model that envelope, nonce or signature (open choice 7). Standard motions have no Mind path.
|
||||
|
||||
## Authentication
|
||||
|
||||
On the wire the credential is an opaque `Authorization: Bearer` header. The token route, claims, scopes and audience belong to Heimdall and Bifrost and are not designed here. A request without a usable bearer is answered `unauthenticated` as a typed refusal.
|
||||
|
||||
**Auth per route, now and after #37.** Routes are Bifrost's; this contract fixes the documents, not the paths (open choice 3).
|
||||
|
||||
| exchange | today (`/api/sealed-motions`, facts file 3c) | after #37 (`/api/votes`) |
|
||||
|---|---|---|
|
||||
| motion list | no route | bearer, scope `votes.read` |
|
||||
| motion read | session cookie + Active member | bearer, scope `votes.read` |
|
||||
| commit, reveal | session cookie + Active member | bearer, scope `votes.cast`, audience `bifrost-votes`; a high-stakes commit also needs a fresh sign-in |
|
||||
| Mind cast | anonymous; the Ed25519 signature on a `MindEnvelope` is the credential | unchanged: Minds never use `/api/votes` (#37) |
|
||||
| open a motion, Mind-key registry | session cookie + moderator | unchanged, cookie only |
|
||||
|
||||
Today a member route has **no bearer scheme**: it accepts the host-only `__Host-bifrost_session` cookie and answers an unauthenticated call with a redirect to the sign-in page, not a 401. After #37 `/api/votes` is bearer-only and answers a typed 401. The wire header stays an opaque bearer either way; only Bifrost knows which of the two it is checking.
|
||||
|
||||
## PR #37 (Bifrost `docs/ratatoskr-voting-auth.md`, head `447a7cb`)
|
||||
|
||||
Checked 2026-11-10 by an Eyes pass over the PR and the schema; conflicts for Heimdall:
|
||||
|
||||
1. **Standard motions.** The PR serves them (`PUT /api/votes/motions/{id}/ballot {choice, comment?}`, a receipt `{motionId, choice, revision, castAtUtc, receiptId}`); the contract is sealed-only and answers `not_found` for a Standard id.
|
||||
2. **Verb model.** The PR keeps `POST .../commit` and `.../reveal` and adds `GET .../result`; the contract has one `cast` document and no result document.
|
||||
3. **List and read as GET.** The PR names GET routes; the contract's request documents carry a `phase` filter and a `motionId`. The mapping (query string and path) is undefined until Heimdall fixes the routes.
|
||||
4. **Refusals.** The PR lists 401/403/404/409/429 with `WWW-Authenticate`; the contract adds 400 (`invalid`, `commitment_mismatch`) and 413, and a typed body.
|
||||
5. **Minds.** The PR says Minds never use `/api/votes` and keeps the anonymous signed `/mind` route; the contract carries `persona` in the ballot and a `forbidden` case for a Mind key on a route it may not call. The PR's token is never a Persona's.
|
||||
6. **Authority.** The contract's `unauthenticated` says a bearer "Heimdall does not know"; the PR makes Bifrost the OIDC issuer (a second client, scopes `votes.read` and `votes.cast`, audience `bifrost-votes`) and notes that Bifrost OIDC is not live (its D7).
|
||||
7. **Rate limits.** The PR keys per account (30 casts per 10 minutes); the contract now says per account too, and neither exists on the member API yet (above).
|
||||
8. **Wire format.** The PR's errors are JSON; the contract's vectors are MessagePack. Nothing settles the media type.
|
||||
9. **The PR's seven open decisions** (consent for `votes.cast`, re-authentication, no refresh token, grant revocation, a Ratatoskr brake, rate numbers, MAS rollout order) assume nothing the contract contradicts. D2 (re-authentication at cast) is answered yes for sealed commit in this contract: `reauthentication_required`, with `highStakes` fixed at open. D5 (a brake) is `held`.
|
||||
|
||||
## Open choices for Heimdall
|
||||
|
||||
1. Standard motions in v0 or a v1 (the PR already serves them).
|
||||
2. Pagination and filters on the list.
|
||||
3. One `cast` route or the two existing ones; `verb` redundancy.
|
||||
4. Wire format: MessagePack documents with a JSON export, or JSON only (the PR is JSON).
|
||||
5. Refuse untrimmed `candidate` and `reason` (this contract) or keep trimming server-side.
|
||||
6. Whether a receipt should carry an id or a server signature so a voter can prove it to a third party.
|
||||
7. The Mind path: keep the signed envelope on its own route, or take Mind keys as a bearer credential.
|
||||
8. `reason` length in UTF-16 code units (as Bifrost) or code points.
|
||||
9. Whether the result document (`GET .../result`) joins this contract.
|
||||
|
|
@ -1,420 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://github.com/GameCult/CultLib/contracts/cultnet/governance/vote-api.schema.json",
|
||||
"title": "CultNet vote API v0 (sealed-ballot motions)",
|
||||
"description": "Typed documents for listing, reading and casting on sealed-ballot motions, and the receipt a cast returns. Map-mode: every key is written, nil where absent. Spec: vote-api.md. Vectors: vote-api-vectors.json.",
|
||||
"$defs": {
|
||||
"uuid": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
|
||||
},
|
||||
"instant": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]{1,7})?Z$"
|
||||
},
|
||||
"hex64": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9a-f]{64}$"
|
||||
},
|
||||
"trimmedLine": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"pattern": "^(?![\\t-\\r \\u0085 -
])[^\\n\\r\\u0085
]+(?<![\\t-\\r \\u0085 -
])$"
|
||||
},
|
||||
"ballot": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"schema",
|
||||
"motionId",
|
||||
"round",
|
||||
"candidate",
|
||||
"reason",
|
||||
"salt",
|
||||
"persona"
|
||||
],
|
||||
"properties": {
|
||||
"schema": {
|
||||
"const": "gamecult.sealed_ballot.v0"
|
||||
},
|
||||
"motionId": {
|
||||
"$ref": "#/$defs/uuid"
|
||||
},
|
||||
"round": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"candidate": {
|
||||
"$ref": "#/$defs/trimmedLine"
|
||||
},
|
||||
"reason": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 280,
|
||||
"pattern": "^(?![\\t-\\r \\u0085 -
])[^\\n\\r\\u0085
]+(?<![\\t-\\r \\u0085 -
])$"
|
||||
},
|
||||
"salt": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9a-f]{32,128}$"
|
||||
},
|
||||
"persona": {
|
||||
"type": "string",
|
||||
"pattern": "^[!-~]{0,64}$"
|
||||
}
|
||||
}
|
||||
},
|
||||
"motionListRequest": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"schemaVersion",
|
||||
"phase"
|
||||
],
|
||||
"properties": {
|
||||
"schemaVersion": {
|
||||
"const": "gamecult.vote.motion_list_request.v0"
|
||||
},
|
||||
"phase": {
|
||||
"oneOf": [
|
||||
{
|
||||
"enum": [
|
||||
"Commit",
|
||||
"Reveal",
|
||||
"Closed"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"motionListItem": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"id",
|
||||
"title",
|
||||
"round",
|
||||
"phase",
|
||||
"commitClosesAtUtc",
|
||||
"closesAtUtc",
|
||||
"highStakes"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "#/$defs/uuid"
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"round": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"phase": {
|
||||
"enum": [
|
||||
"Commit",
|
||||
"Reveal",
|
||||
"Closed"
|
||||
]
|
||||
},
|
||||
"commitClosesAtUtc": {
|
||||
"$ref": "#/$defs/instant"
|
||||
},
|
||||
"closesAtUtc": {
|
||||
"$ref": "#/$defs/instant"
|
||||
},
|
||||
"highStakes": {
|
||||
"type": "boolean",
|
||||
"description": "Fixed when the motion opens and never changed after: a high-stakes sealed motion needs a fresh sign-in at commit (Bifrost PR #37, D2)."
|
||||
}
|
||||
}
|
||||
},
|
||||
"motionList": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"schemaVersion",
|
||||
"motions"
|
||||
],
|
||||
"properties": {
|
||||
"schemaVersion": {
|
||||
"const": "gamecult.vote.motion_list.v0"
|
||||
},
|
||||
"motions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/motionListItem"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"motionReadRequest": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"schemaVersion",
|
||||
"motionId"
|
||||
],
|
||||
"properties": {
|
||||
"schemaVersion": {
|
||||
"const": "gamecult.vote.motion_read_request.v0"
|
||||
},
|
||||
"motionId": {
|
||||
"$ref": "#/$defs/uuid"
|
||||
}
|
||||
}
|
||||
},
|
||||
"receipt": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"schemaVersion",
|
||||
"motionId",
|
||||
"voterUserAccountId",
|
||||
"commitment",
|
||||
"revision",
|
||||
"committedAtUtc",
|
||||
"revealed"
|
||||
],
|
||||
"properties": {
|
||||
"schemaVersion": {
|
||||
"const": "gamecult.vote.receipt.v0"
|
||||
},
|
||||
"motionId": {
|
||||
"$ref": "#/$defs/uuid"
|
||||
},
|
||||
"voterUserAccountId": {
|
||||
"$ref": "#/$defs/uuid"
|
||||
},
|
||||
"commitment": {
|
||||
"$ref": "#/$defs/hex64"
|
||||
},
|
||||
"revision": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"committedAtUtc": {
|
||||
"$ref": "#/$defs/instant"
|
||||
},
|
||||
"revealed": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"motion": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"schemaVersion",
|
||||
"id",
|
||||
"title",
|
||||
"summary",
|
||||
"round",
|
||||
"priorMotionId",
|
||||
"ballotSchema",
|
||||
"phase",
|
||||
"candidates",
|
||||
"commitClosesAtUtc",
|
||||
"closesAtUtc",
|
||||
"highStakes",
|
||||
"yourVoterId",
|
||||
"yourCommitment",
|
||||
"announcement"
|
||||
],
|
||||
"properties": {
|
||||
"schemaVersion": {
|
||||
"const": "gamecult.vote.motion.v0"
|
||||
},
|
||||
"id": {
|
||||
"$ref": "#/$defs/uuid"
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"summary": {
|
||||
"type": "string"
|
||||
},
|
||||
"round": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"priorMotionId": {
|
||||
"oneOf": [
|
||||
{
|
||||
"$ref": "#/$defs/uuid"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"ballotSchema": {
|
||||
"const": "gamecult.sealed_ballot.v0"
|
||||
},
|
||||
"phase": {
|
||||
"enum": [
|
||||
"Commit",
|
||||
"Reveal",
|
||||
"Closed"
|
||||
]
|
||||
},
|
||||
"candidates": {
|
||||
"type": "array",
|
||||
"minItems": 2,
|
||||
"items": {
|
||||
"$ref": "#/$defs/trimmedLine"
|
||||
}
|
||||
},
|
||||
"commitClosesAtUtc": {
|
||||
"$ref": "#/$defs/instant"
|
||||
},
|
||||
"closesAtUtc": {
|
||||
"$ref": "#/$defs/instant"
|
||||
},
|
||||
"highStakes": {
|
||||
"type": "boolean",
|
||||
"description": "Fixed when the motion opens and never changed after: a high-stakes sealed motion needs a fresh sign-in at commit (Bifrost PR #37, D2)."
|
||||
},
|
||||
"yourVoterId": {
|
||||
"$ref": "#/$defs/uuid"
|
||||
},
|
||||
"yourCommitment": {
|
||||
"oneOf": [
|
||||
{
|
||||
"$ref": "#/$defs/receipt"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"announcement": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"commitCast": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"schemaVersion",
|
||||
"motionId",
|
||||
"verb",
|
||||
"commitment",
|
||||
"ballot"
|
||||
],
|
||||
"properties": {
|
||||
"schemaVersion": {
|
||||
"const": "gamecult.vote.cast.v0"
|
||||
},
|
||||
"motionId": {
|
||||
"$ref": "#/$defs/uuid"
|
||||
},
|
||||
"verb": {
|
||||
"const": "commit"
|
||||
},
|
||||
"commitment": {
|
||||
"$ref": "#/$defs/hex64"
|
||||
},
|
||||
"ballot": {
|
||||
"type": "null"
|
||||
}
|
||||
}
|
||||
},
|
||||
"revealCast": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"schemaVersion",
|
||||
"motionId",
|
||||
"verb",
|
||||
"commitment",
|
||||
"ballot"
|
||||
],
|
||||
"properties": {
|
||||
"schemaVersion": {
|
||||
"const": "gamecult.vote.cast.v0"
|
||||
},
|
||||
"motionId": {
|
||||
"$ref": "#/$defs/uuid"
|
||||
},
|
||||
"verb": {
|
||||
"const": "reveal"
|
||||
},
|
||||
"commitment": {
|
||||
"type": "null"
|
||||
},
|
||||
"ballot": {
|
||||
"$ref": "#/$defs/ballot"
|
||||
}
|
||||
}
|
||||
},
|
||||
"cast": {
|
||||
"oneOf": [
|
||||
{
|
||||
"$ref": "#/$defs/commitCast"
|
||||
},
|
||||
{
|
||||
"$ref": "#/$defs/revealCast"
|
||||
}
|
||||
]
|
||||
},
|
||||
"refusal": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"schemaVersion",
|
||||
"code",
|
||||
"error",
|
||||
"retryAfterSeconds"
|
||||
],
|
||||
"properties": {
|
||||
"schemaVersion": {
|
||||
"const": "gamecult.vote.refusal.v0"
|
||||
},
|
||||
"code": {
|
||||
"enum": [
|
||||
"unauthenticated",
|
||||
"forbidden",
|
||||
"reauthentication_required",
|
||||
"not_found",
|
||||
"wrong_phase",
|
||||
"contended",
|
||||
"invalid",
|
||||
"commitment_mismatch",
|
||||
"payload_too_large",
|
||||
"rate_limited",
|
||||
"held"
|
||||
]
|
||||
},
|
||||
"error": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"retryAfterSeconds": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,346 +0,0 @@
|
|||
{
|
||||
"vectors": [
|
||||
{
|
||||
"name": "snapshot_request_v1_defaults",
|
||||
"schemaVersion": "cultnet.snapshot_request.v1",
|
||||
"messagePackBase64": "ha1zY2hlbWFWZXJzaW9uu2N1bHRuZXQuc25hcHNob3RfcmVxdWVzdC52MaltZXNzYWdlSWShbalzZWxlY3Rpb26Jp3NjaGVtYXPApGtleXPApmZpZWxkc8ClY2l0ZXPApWNpdGVkwKpwcm9qZWN0aW9upmhlYWRlcqpkZXNjZW5kaW5nwqVsaW1pdMCmY3Vyc29ywKdzaGFyZElkwKpzaGFyZEVwb2NowA==",
|
||||
"expected": {
|
||||
"schemaVersion": "cultnet.snapshot_request.v1",
|
||||
"messageId": "m",
|
||||
"selection": {
|
||||
"schemas": null,
|
||||
"keys": null,
|
||||
"fields": null,
|
||||
"cites": null,
|
||||
"cited": null,
|
||||
"projection": "header",
|
||||
"descending": false,
|
||||
"limit": null,
|
||||
"cursor": null
|
||||
},
|
||||
"shardId": null,
|
||||
"shardEpoch": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "snapshot_request_v1_full_selection_and_shard",
|
||||
"schemaVersion": "cultnet.snapshot_request.v1",
|
||||
"messagePackBase64": "ha1zY2hlbWFWZXJzaW9uu2N1bHRuZXQuc25hcHNob3RfcmVxdWVzdC52MaltZXNzYWdlSWSmbS1mdWxsqXNlbGVjdGlvbomnc2NoZW1hc5KpbGVhZl9hLnY52UdzaGEyNTY6ZmYzNWYzZDlkNmRlM2YxMDY2YjkzNjllNzNmZTZjNzY0OGU4ODM2OGQxOGVmYzIyNzVjOTk0NzMwY2Q4NGNmZqRrZXlzkqRhLWVxqPCfmIAtcm93pmZpZWxkc5KEpWluZGV4pGtpbmSib3CmYW55X29mpnZhbHVlc5Kmd2VhcG9upHRvb2ymbnVtYmVywISlaW5kZXikbWFzc6JvcKJnZaZ2YWx1ZXPApm51bWJlcqstMjIzMzc1OS4yNaVjaXRlc4KmdGFyZ2V0gqhzY2hlbWFJZNlHc2hhMjU2OmZmMzVmM2Q5ZDZkZTNmMTA2NmI5MzY5ZTczZmU2Yzc2NDhlODgzNjhkMThlZmMyMjc1Yzk5NDczMGNkODRjZmapcmVjb3JkS2V5pGEtZXGkcm9sZaZEZXNpZ26lY2l0ZWSCpHJvbGWmRGVzaWdupmV4aXN0c8KqcHJvamVjdGlvbqhkb2N1bWVudKpkZXNjZW5kaW5nw6VsaW1pdMzIpmN1cnNvcq1vcGFxdWUtY3Vyc29yp3NoYXJkSWSnc2hhcmQtMapzaGFyZEVwb2NoBw==",
|
||||
"expected": {
|
||||
"schemaVersion": "cultnet.snapshot_request.v1",
|
||||
"messageId": "m-full",
|
||||
"selection": {
|
||||
"schemas": [
|
||||
"leaf_a.v9",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff"
|
||||
],
|
||||
"keys": [
|
||||
"a-eq",
|
||||
"\uD83D\uDE00-row"
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
"index": "kind",
|
||||
"op": "any_of",
|
||||
"values": [
|
||||
"weapon",
|
||||
"tool"
|
||||
],
|
||||
"number": null
|
||||
},
|
||||
{
|
||||
"index": "mass",
|
||||
"op": "ge",
|
||||
"values": null,
|
||||
"number": "-2233759.25"
|
||||
}
|
||||
],
|
||||
"cites": {
|
||||
"target": {
|
||||
"schemaId": "sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff",
|
||||
"recordKey": "a-eq"
|
||||
},
|
||||
"role": "Design"
|
||||
},
|
||||
"cited": {
|
||||
"role": "Design",
|
||||
"exists": false
|
||||
},
|
||||
"projection": "document",
|
||||
"descending": true,
|
||||
"limit": 200,
|
||||
"cursor": "opaque-cursor"
|
||||
},
|
||||
"shardId": "shard-1",
|
||||
"shardEpoch": 7
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "database_subscribe_v1_defaults",
|
||||
"schemaVersion": "cultnet.database_subscribe.v1",
|
||||
"messagePackBase64": "iK1zY2hlbWFWZXJzaW9uvWN1bHRuZXQuZGF0YWJhc2Vfc3Vic2NyaWJlLnYxqW1lc3NhZ2VJZKFtrnN1YnNjcmlwdGlvbklko3N1YqlzZWxlY3Rpb26Jp3NjaGVtYXPApGtleXPApmZpZWxkc8ClY2l0ZXPApWNpdGVkwKpwcm9qZWN0aW9upmhlYWRlcqpkZXNjZW5kaW5nwqVsaW1pdMCmY3Vyc29ywK9pbmNsdWRlU25hcHNob3TDsWNvbnN1bWVyUnVudGltZUlkwKdib2R5SWRzwLdzdXBwb3J0ZWRCb2R5VHJhbnNwb3J0c8A=",
|
||||
"expected": {
|
||||
"schemaVersion": "cultnet.database_subscribe.v1",
|
||||
"messageId": "m",
|
||||
"subscriptionId": "sub",
|
||||
"selection": {
|
||||
"schemas": null,
|
||||
"keys": null,
|
||||
"fields": null,
|
||||
"cites": null,
|
||||
"cited": null,
|
||||
"projection": "header",
|
||||
"descending": false,
|
||||
"limit": null,
|
||||
"cursor": null
|
||||
},
|
||||
"includeSnapshot": true,
|
||||
"consumerRuntimeId": null,
|
||||
"bodyIds": null,
|
||||
"supportedBodyTransports": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "database_subscribe_v1_full",
|
||||
"schemaVersion": "cultnet.database_subscribe.v1",
|
||||
"messagePackBase64": "iK1zY2hlbWFWZXJzaW9uvWN1bHRuZXQuZGF0YWJhc2Vfc3Vic2NyaWJlLnYxqW1lc3NhZ2VJZKZtLWZ1bGyuc3Vic2NyaXB0aW9uSWSoc3ViLWZ1bGypc2VsZWN0aW9uiadzY2hlbWFzkqlsZWFmX2EudjnZR3NoYTI1NjpmZjM1ZjNkOWQ2ZGUzZjEwNjZiOTM2OWU3M2ZlNmM3NjQ4ZTg4MzY4ZDE4ZWZjMjI3NWM5OTQ3MzBjZDg0Y2ZmpGtleXOSpGEtZXGo8J\u002BYgC1yb3emZmllbGRzkoSlaW5kZXika2luZKJvcKZhbnlfb2amdmFsdWVzkqZ3ZWFwb26kdG9vbKZudW1iZXLAhKVpbmRleKRtYXNzom9womdlpnZhbHVlc8CmbnVtYmVyqy0yMjMzNzU5LjI1pWNpdGVzgqZ0YXJnZXSCqHNjaGVtYUlk2UdzaGEyNTY6ZmYzNWYzZDlkNmRlM2YxMDY2YjkzNjllNzNmZTZjNzY0OGU4ODM2OGQxOGVmYzIyNzVjOTk0NzMwY2Q4NGNmZqlyZWNvcmRLZXmkYS1lcaRyb2xlpkRlc2lnbqVjaXRlZIKkcm9sZaZEZXNpZ26mZXhpc3Rzwqpwcm9qZWN0aW9uqGRvY3VtZW50qmRlc2NlbmRpbmfDpWxpbWl0zMimY3Vyc29yrW9wYXF1ZS1jdXJzb3KvaW5jbHVkZVNuYXBzaG90wrFjb25zdW1lclJ1bnRpbWVJZKhjb25zdW1lcqdib2R5SWRzkaZib2R5LWG3c3VwcG9ydGVkQm9keVRyYW5zcG9ydHOSpHJ1ZHCkcXVpYw==",
|
||||
"expected": {
|
||||
"schemaVersion": "cultnet.database_subscribe.v1",
|
||||
"messageId": "m-full",
|
||||
"subscriptionId": "sub-full",
|
||||
"selection": {
|
||||
"schemas": [
|
||||
"leaf_a.v9",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff"
|
||||
],
|
||||
"keys": [
|
||||
"a-eq",
|
||||
"\uD83D\uDE00-row"
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
"index": "kind",
|
||||
"op": "any_of",
|
||||
"values": [
|
||||
"weapon",
|
||||
"tool"
|
||||
],
|
||||
"number": null
|
||||
},
|
||||
{
|
||||
"index": "mass",
|
||||
"op": "ge",
|
||||
"values": null,
|
||||
"number": "-2233759.25"
|
||||
}
|
||||
],
|
||||
"cites": {
|
||||
"target": {
|
||||
"schemaId": "sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff",
|
||||
"recordKey": "a-eq"
|
||||
},
|
||||
"role": "Design"
|
||||
},
|
||||
"cited": {
|
||||
"role": "Design",
|
||||
"exists": false
|
||||
},
|
||||
"projection": "document",
|
||||
"descending": true,
|
||||
"limit": 200,
|
||||
"cursor": "opaque-cursor"
|
||||
},
|
||||
"includeSnapshot": false,
|
||||
"consumerRuntimeId": "consumer",
|
||||
"bodyIds": [
|
||||
"body-a"
|
||||
],
|
||||
"supportedBodyTransports": [
|
||||
"rudp",
|
||||
"quic"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "snapshot_response_raw_v1_headers",
|
||||
"schemaVersion": "cultnet.snapshot_response_raw.v1",
|
||||
"messagePackBase64": "i61zY2hlbWFWZXJzaW9u2SBjdWx0bmV0LnNuYXBzaG90X3Jlc3BvbnNlX3Jhdy52MaltZXNzYWdlSWShbadtYXRjaGVkAqRhc09mBaRuZXh0q25leHQtY3Vyc29yp2hlYWRlcnOSiqhzY2hlbWFJZNlHc2hhMjU2OmZmMzVmM2Q5ZDZkZTNmMTA2NmI5MzY5ZTczZmU2Yzc2NDhlODgzNjhkMThlZmMyMjc1Yzk5NDczMGNkODRjZmaqc2NoZW1hTmFtZaZsZWFmX2Gtc2NoZW1hVmVyc2lvbqExsXNjaGVtYUNvbnRlbnRIYXNoo2FiY6lyZWNvcmRLZXmkYS1lcahzdG9yZWRBdLgxOTcwLTAxLTAxVDAwOjAwOjAwLjAwMFqvc291cmNlUnVudGltZUlkonJ0rXNvdXJjZUFnZW50SWSlYWdlbnSqc291cmNlUm9sZaRyb2xlpHRhZ3PAiqhzY2hlbWFJZNlHc2hhMjU2OmZmMzVmM2Q5ZDZkZTNmMTA2NmI5MzY5ZTczZmU2Yzc2NDhlODgzNjhkMThlZmMyMjc1Yzk5NDczMGNkODRjZmaqc2NoZW1hTmFtZaZsZWFmX2Gtc2NoZW1hVmVyc2lvbqExsXNjaGVtYUNvbnRlbnRIYXNoo2FiY6lyZWNvcmRLZXmkYS1sb6hzdG9yZWRBdLgxOTcwLTAxLTAxVDAwOjAwOjAwLjAwMFqvc291cmNlUnVudGltZUlkonJ0rXNvdXJjZUFnZW50SWSlYWdlbnSqc291cmNlUm9sZaRyb2xlpHRhZ3OSpWFscGhhpGJldGGpZG9jdW1lbnRzwKVlZGdlc8Cnc2hhcmRJZKdzaGFyZC0xqnNoYXJkRXBvY2gDsHNoYXJkTG9nU2VxdWVuY2Up",
|
||||
"expected": {
|
||||
"schemaVersion": "cultnet.snapshot_response_raw.v1",
|
||||
"messageId": "m",
|
||||
"matched": 2,
|
||||
"asOf": 5,
|
||||
"next": "next-cursor",
|
||||
"headers": [
|
||||
{
|
||||
"schemaId": "sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff",
|
||||
"schemaName": "leaf_a",
|
||||
"schemaVersion": "1",
|
||||
"schemaContentHash": "abc",
|
||||
"recordKey": "a-eq",
|
||||
"storedAt": "1970-01-01T00:00:00.000Z",
|
||||
"sourceRuntimeId": "rt",
|
||||
"sourceAgentId": "agent",
|
||||
"sourceRole": "role",
|
||||
"tags": null
|
||||
},
|
||||
{
|
||||
"schemaId": "sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff",
|
||||
"schemaName": "leaf_a",
|
||||
"schemaVersion": "1",
|
||||
"schemaContentHash": "abc",
|
||||
"recordKey": "a-lo",
|
||||
"storedAt": "1970-01-01T00:00:00.000Z",
|
||||
"sourceRuntimeId": "rt",
|
||||
"sourceAgentId": "agent",
|
||||
"sourceRole": "role",
|
||||
"tags": [
|
||||
"alpha",
|
||||
"beta"
|
||||
]
|
||||
}
|
||||
],
|
||||
"documents": null,
|
||||
"edges": null,
|
||||
"shardId": "shard-1",
|
||||
"shardEpoch": 3,
|
||||
"shardLogSequence": 41
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "snapshot_response_raw_v1_documents_and_edges",
|
||||
"schemaVersion": "cultnet.snapshot_response_raw.v1",
|
||||
"messagePackBase64": "i61zY2hlbWFWZXJzaW9u2SBjdWx0bmV0LnNuYXBzaG90X3Jlc3BvbnNlX3Jhdy52MaltZXNzYWdlSWShbadtYXRjaGVkAaRhc09mBaRuZXh0wKdoZWFkZXJzwKlkb2N1bWVudHORjKhzY2hlbWFJZNlHc2hhMjU2OmZmMzVmM2Q5ZDZkZTNmMTA2NmI5MzY5ZTczZmU2Yzc2NDhlODgzNjhkMThlZmMyMjc1Yzk5NDczMGNkODRjZmaqc2NoZW1hTmFtZcCtc2NoZW1hVmVyc2lvbsCxc2NoZW1hQ29udGVudEhhc2jAqXJlY29yZEtleaRhLWVxqHN0b3JlZEF0uDE5NzAtMDEtMDFUMDA6MDA6MDAuMDAwWq9wYXlsb2FkRW5jb2RpbmerbWVzc2FnZXBhY2uncGF5bG9hZMQEgaFrAa9zb3VyY2VSdW50aW1lSWTArXNvdXJjZUFnZW50SWTAqnNvdXJjZVJvbGXApHRhZ3PApWVkZ2VzkoWkZnJvbYKoc2NoZW1hSWTZR3NoYTI1Njo5ZDBiYzlhZWJjMzYxOWIwN2FhYmY1NjRmOTg2NjdhZmRlNDE0NDRjMWI4NjY2NjFkNzc3Njg3ZDQ0MzYwOGRjqXJlY29yZEtleadjaXRlci0xpHJvbGWmRGVzaWduonRvgqhzY2hlbWFJZNlHc2hhMjU2OmZmMzVmM2Q5ZDZkZTNmMTA2NmI5MzY5ZTczZmU2Yzc2NDhlODgzNjhkMThlZmMyMjc1Yzk5NDczMGNkODRjZmapcmVjb3JkS2V5pGEtZXGvcGF5bG9hZEVuY29kaW5nwKdwYXlsb2FkwIWkZnJvbYKoc2NoZW1hSWTZR3NoYTI1Njo5ZDBiYzlhZWJjMzYxOWIwN2FhYmY1NjRmOTg2NjdhZmRlNDE0NDRjMWI4NjY2NjFkNzc3Njg3ZDQ0MzYwOGRjqXJlY29yZEtleadjaXRlci0xpHJvbGWmRGVzaWduonRvgqhzY2hlbWFJZNlHc2hhMjU2OmZmMzVmM2Q5ZDZkZTNmMTA2NmI5MzY5ZTczZmU2Yzc2NDhlODgzNjhkMThlZmMyMjc1Yzk5NDczMGNkODRjZmapcmVjb3JkS2V5pGEtZXGvcGF5bG9hZEVuY29kaW5nq21lc3NhZ2VwYWNrp3BheWxvYWTEAwECA6dzaGFyZElkwKpzaGFyZEVwb2NowLBzaGFyZExvZ1NlcXVlbmNlwA==",
|
||||
"expected": {
|
||||
"schemaVersion": "cultnet.snapshot_response_raw.v1",
|
||||
"messageId": "m",
|
||||
"matched": 1,
|
||||
"asOf": 5,
|
||||
"next": null,
|
||||
"headers": null,
|
||||
"documents": [
|
||||
{
|
||||
"schemaId": "sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff",
|
||||
"schemaName": null,
|
||||
"schemaVersion": null,
|
||||
"schemaContentHash": null,
|
||||
"recordKey": "a-eq",
|
||||
"storedAt": "1970-01-01T00:00:00.000Z",
|
||||
"payloadEncoding": "messagepack",
|
||||
"payload": "gaFrAQ==",
|
||||
"sourceRuntimeId": null,
|
||||
"sourceAgentId": null,
|
||||
"sourceRole": null,
|
||||
"tags": null
|
||||
}
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"from": {
|
||||
"schemaId": "sha256:9d0bc9aebc3619b07aabf564f98667afde41444c1b866661d777687d443608dc",
|
||||
"recordKey": "citer-1"
|
||||
},
|
||||
"role": "Design",
|
||||
"to": {
|
||||
"schemaId": "sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff",
|
||||
"recordKey": "a-eq"
|
||||
},
|
||||
"payloadEncoding": null,
|
||||
"payload": null
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"schemaId": "sha256:9d0bc9aebc3619b07aabf564f98667afde41444c1b866661d777687d443608dc",
|
||||
"recordKey": "citer-1"
|
||||
},
|
||||
"role": "Design",
|
||||
"to": {
|
||||
"schemaId": "sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff",
|
||||
"recordKey": "a-eq"
|
||||
},
|
||||
"payloadEncoding": "messagepack",
|
||||
"payload": "AQID"
|
||||
}
|
||||
],
|
||||
"shardId": null,
|
||||
"shardEpoch": null,
|
||||
"shardLogSequence": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "error_plain",
|
||||
"schemaVersion": "cultnet.error.v0",
|
||||
"messagePackBase64": "ha1zY2hlbWFWZXJzaW9usGN1bHRuZXQuZXJyb3IudjClZXJyb3KkYm9vbatyb3V0aW5nSGludMCkY29kZcCnZGV0YWlsc8A=",
|
||||
"expected": {
|
||||
"schemaVersion": "cultnet.error.v0",
|
||||
"error": "boom",
|
||||
"routingHint": null,
|
||||
"code": null,
|
||||
"details": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "error_selection_invalid",
|
||||
"schemaVersion": "cultnet.error.v0",
|
||||
"messagePackBase64": "ha1zY2hlbWFWZXJzaW9usGN1bHRuZXQuZXJyb3IudjClZXJyb3LZOnNlbGVjdGlvbl9pbnZhbGlkOiBmaWVsZHNbMF0uaW5kZXggImtpbmQiIGlzIG5vdCBkZWNsYXJlZC6rcm91dGluZ0hpbnTApGNvZGWxc2VsZWN0aW9uX2ludmFsaWSnZGV0YWlsc4SlZmllbGSvZmllbGRzWzBdLmluZGV4pXZhbHVlpGtpbmSkYXNPZsCnY3VycmVudMA=",
|
||||
"expected": {
|
||||
"schemaVersion": "cultnet.error.v0",
|
||||
"error": "selection_invalid: fields[0].index \u0022kind\u0022 is not declared.",
|
||||
"routingHint": null,
|
||||
"code": "selection_invalid",
|
||||
"details": {
|
||||
"field": "fields[0].index",
|
||||
"value": "kind",
|
||||
"asOf": null,
|
||||
"current": null
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "error_cursor_stale",
|
||||
"schemaVersion": "cultnet.error.v0",
|
||||
"messagePackBase64": "ha1zY2hlbWFWZXJzaW9usGN1bHRuZXQuZXJyb3IudjClZXJyb3KzY3Vyc29yX3N0YWxlOiBzdGFsZatyb3V0aW5nSGludMCkY29kZaxjdXJzb3Jfc3RhbGWnZGV0YWlsc4SlZmllbGTApXZhbHVlwKRhc09mA6djdXJyZW50CQ==",
|
||||
"expected": {
|
||||
"schemaVersion": "cultnet.error.v0",
|
||||
"error": "cursor_stale: stale",
|
||||
"routingHint": null,
|
||||
"code": "cursor_stale",
|
||||
"details": {
|
||||
"field": null,
|
||||
"value": null,
|
||||
"asOf": 3,
|
||||
"current": 9
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "error_cursor_invalid_no_details",
|
||||
"schemaVersion": "cultnet.error.v0",
|
||||
"messagePackBase64": "ha1zY2hlbWFWZXJzaW9usGN1bHRuZXQuZXJyb3IudjClZXJyb3KzY3Vyc29yX2ludmFsaWQ6IGJhZKtyb3V0aW5nSGludMCkY29kZa5jdXJzb3JfaW52YWxpZKdkZXRhaWxzwA==",
|
||||
"expected": {
|
||||
"schemaVersion": "cultnet.error.v0",
|
||||
"error": "cursor_invalid: bad",
|
||||
"routingHint": null,
|
||||
"code": "cursor_invalid",
|
||||
"details": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "error_write_not_authorized",
|
||||
"schemaVersion": "cultnet.error.v0",
|
||||
"messagePackBase64": "ha1zY2hlbWFWZXJzaW9usGN1bHRuZXQuZXJyb3IudjClZXJyb3K0d3JpdGVfbm90X2F1dGhvcml6ZWSrcm91dGluZ0hpbnTApGNvZGW0d3JpdGVfbm90X2F1dGhvcml6ZWSnZGV0YWlsc4SlZmllbGSpcmVjb3JkS2V5pXZhbHVloWukYXNPZsCnY3VycmVudMA=",
|
||||
"expected": {
|
||||
"schemaVersion": "cultnet.error.v0",
|
||||
"error": "write_not_authorized",
|
||||
"routingHint": null,
|
||||
"code": "write_not_authorized",
|
||||
"details": {
|
||||
"field": "recordKey",
|
||||
"value": "k",
|
||||
"asOf": null,
|
||||
"current": null
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,122 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://github.com/GameCult/CultLib/contracts/cultnet/interop/cultnet.error.v1.schema.json",
|
||||
"title": "CultNet Error Message v1",
|
||||
"description": "cultnet.error.v0 plus messageId (write-receipt.md). Sent in place of cultnet.error.v0 only to a connection that declared the write-receipt capability. v0 is unchanged: its schema is closed (additionalProperties false), so an extra key would make a v0 peer reject the frame instead of ignoring it. Map-mode: every key is written, messageId nil when the error answers no readable message. The code enum is the v0 enum plus limit_reached (write-receipt.md, Remembered-write limits).",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"schemaVersion",
|
||||
"error",
|
||||
"routingHint",
|
||||
"code",
|
||||
"details",
|
||||
"messageId"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"schemaVersion": {
|
||||
"const": "cultnet.error.v1"
|
||||
},
|
||||
"error": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"routingHint": {
|
||||
"description": "Optional shard routing detail for an authority failure. Null for every selection/cursor refusal code (R-N).",
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"shard",
|
||||
"reason"
|
||||
],
|
||||
"properties": {
|
||||
"shard": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"reason": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"code": {
|
||||
"description": "Machine-readable refusal code (R-N). Additive: a v0 peer that does not know this field ignores it. The set is a closed enum: Rust and TypeScript refuse a message whose code is not listed, so adding a code is one coordinated change across every runtime (this schema, the C# factory, the Rust CultNetErrorCode, and a captured-bytes case for each). limit_reached: a receipt-capable server refuses a NEW write because its per-session remembered-write table (1024 entries) or its server-wide memory budget is full; messageId is the write's id.",
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"enum": [
|
||||
null,
|
||||
"selection_invalid",
|
||||
"cursor_stale",
|
||||
"cursor_invalid",
|
||||
"reference_outside_target",
|
||||
"variant_unsupported",
|
||||
"unowned_schema",
|
||||
"write_not_authorized",
|
||||
"unsupported_schema_version",
|
||||
"message_invalid",
|
||||
"limit_reached"
|
||||
]
|
||||
},
|
||||
"details": {
|
||||
"description": "Code-specific structured detail (R-N). Every field is populated only for the code that defines it; the others are null, not omitted.",
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"field",
|
||||
"value",
|
||||
"asOf",
|
||||
"current"
|
||||
],
|
||||
"properties": {
|
||||
"field": {
|
||||
"description": "selection_invalid: the selection field that failed. variant_unsupported: \"subscriptionId\", when a subscription was ended. unowned_schema: \"schemaId\". write_not_authorized: \"recordKey\". unsupported_schema_version: \"schemaVersion\". message_invalid: the request field that is missing or ill-typed (\"message\" when the whole frame cannot be read). limit_reached: no field; details stay all null. message_invalid also names \"messageId\" (over 256 bytes), \"document\", \"schemaId\" or \"channel\" (write on an unreliable channel).",
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"value": {
|
||||
"description": "selection_invalid: the offending value, when there is one string worth naming. variant_unsupported: the id of the subscription that ended. unowned_schema: the schema id no shard owns. write_not_authorized: the key of the refused write. unsupported_schema_version: the schemaVersion the peer does not speak.",
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"asOf": {
|
||||
"description": "cursor_stale: the cursor's own minted asOf.",
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
],
|
||||
"minimum": 0
|
||||
},
|
||||
"current": {
|
||||
"description": "cursor_stale: the answering server's current asOf.",
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
],
|
||||
"minimum": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"messageId": {
|
||||
"description": "The messageId of the write (or other request) this error answers, echoed byte for byte. Null only when the frame was unreadable or carried no messageId.",
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"minLength": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://github.com/GameCult/CultLib/contracts/cultnet/interop/cultnet.write-admitted.schema.json",
|
||||
"title": "CultNet Write Admitted",
|
||||
"description": "The receipt for one admitted document put or delete (write-receipt.md). Sent only after the write's commit point, only to a connection that declared the write-receipt capability, once per messageId. Map-mode: every key is written, none is nil. A receipt never carries an error, and an error.v1 never carries admission.",
|
||||
"type": "object",
|
||||
"required": ["schemaVersion", "messageId", "operation", "schemaId", "recordKey"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"schemaVersion": { "const": "cultnet.write_admitted.v0" },
|
||||
"messageId": { "description": "The messageId of the put or delete this admits, echoed byte for byte.", "type": "string", "minLength": 1 },
|
||||
"operation": { "enum": ["put", "delete"] },
|
||||
"schemaId": { "description": "The schemaId of the admitted write, echoed.", "type": "string", "minLength": 1 },
|
||||
"recordKey": { "description": "The recordKey of the admitted write, echoed.", "type": "string", "minLength": 1 }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,166 +0,0 @@
|
|||
{
|
||||
"provenance": "Captured from MessagePack C# 3.1.7 (CultNetErrorMessage/CultNetErrorDetails, Options = Standard.WithSecurity(UntrustedData)); pinned byte-for-byte by packages/cultnet-rs/tests/error_message.rs, whose inline hex equals messagePackHex here (test error_vectors_file_matches_the_inline_csharp_captures). Rust encodes to these exact bytes, so C#-written and Rust-written bytes are one set. Every key is written on the wire, nil included.",
|
||||
"vectors": [
|
||||
{
|
||||
"name": "selection_invalid_schemas_null",
|
||||
"messagePackHex": "85AD736368656D6156657273696F6EB063756C746E65742E6572726F722E7630A56572726F72D92473656C656374696F6E5F696E76616C69643A206D757374206E6F7420626520656D707479AB726F7574696E6748696E74C0A4636F6465B173656C656374696F6E5F696E76616C6964A764657461696C7384A56669656C64A7736368656D6173A576616C7565C0A461734F66C0A763757272656E74C0",
|
||||
"message": {
|
||||
"schemaVersion": "cultnet.error.v0",
|
||||
"error": "selection_invalid: must not be empty",
|
||||
"routingHint": null,
|
||||
"code": "selection_invalid",
|
||||
"details": {
|
||||
"field": "schemas",
|
||||
"value": null,
|
||||
"asOf": null,
|
||||
"current": null
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "selection_invalid_field_value",
|
||||
"messagePackHex": "85AD736368656D6156657273696F6EB063756C746E65742E6572726F722E7630A56572726F72D92273656C656374696F6E5F696E76616C69643A20626C616E6B206B657920656E747279AB726F7574696E6748696E74C0A4636F6465B173656C656374696F6E5F696E76616C6964A764657461696C7384A56669656C64A46B657973A576616C7565A3202020A461734F66C0A763757272656E74C0",
|
||||
"message": {
|
||||
"schemaVersion": "cultnet.error.v0",
|
||||
"error": "selection_invalid: blank key entry",
|
||||
"routingHint": null,
|
||||
"code": "selection_invalid",
|
||||
"details": {
|
||||
"field": "keys",
|
||||
"value": " ",
|
||||
"asOf": null,
|
||||
"current": null
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "cursor_stale",
|
||||
"messagePackHex": "85AD736368656D6156657273696F6EB063756C746E65742E6572726F722E7630A56572726F72BD637572736F725F7374616C653A20637572736F72206973207374616C65AB726F7574696E6748696E74C0A4636F6465AC637572736F725F7374616C65A764657461696C7384A56669656C64C0A576616C7565C0A461734F6601A763757272656E7402",
|
||||
"message": {
|
||||
"schemaVersion": "cultnet.error.v0",
|
||||
"error": "cursor_stale: cursor is stale",
|
||||
"routingHint": null,
|
||||
"code": "cursor_stale",
|
||||
"details": {
|
||||
"field": null,
|
||||
"value": null,
|
||||
"asOf": 1,
|
||||
"current": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "cursor_invalid",
|
||||
"messagePackHex": "85AD736368656D6156657273696F6EB063756C746E65742E6572726F722E7630A56572726F72D923637572736F725F696E76616C69643A2063616E6E6F7420706172736520637572736F72AB726F7574696E6748696E74C0A4636F6465AE637572736F725F696E76616C6964A764657461696C73C0",
|
||||
"message": {
|
||||
"schemaVersion": "cultnet.error.v0",
|
||||
"error": "cursor_invalid: cannot parse cursor",
|
||||
"routingHint": null,
|
||||
"code": "cursor_invalid",
|
||||
"details": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "reference_outside_target",
|
||||
"messagePackHex": "85AD736368656D6156657273696F6EB063756C746E65742E6572726F722E7630A56572726F72D9317265666572656E63655F6F7574736964655F7461726765743A206F757473696465206465636C6172656420746172676574AB726F7574696E6748696E74C0A4636F6465B87265666572656E63655F6F7574736964655F746172676574A764657461696C73C0",
|
||||
"message": {
|
||||
"schemaVersion": "cultnet.error.v0",
|
||||
"error": "reference_outside_target: outside declared target",
|
||||
"routingHint": null,
|
||||
"code": "reference_outside_target",
|
||||
"details": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "variant_unsupported_subscription_ended",
|
||||
"messagePackHex": "85AD736368656D6156657273696F6EB063756C746E65742E6572726F722E7630A56572726F72B876617269616E7420756E737570706F727465642068657265AB726F7574696E6748696E74C0A4636F6465B376617269616E745F756E737570706F72746564A764657461696C7384A56669656C64AE737562736372697074696F6E4964A576616C7565A57375622D31A461734F66C0A763757272656E74C0",
|
||||
"message": {
|
||||
"schemaVersion": "cultnet.error.v0",
|
||||
"error": "variant unsupported here",
|
||||
"routingHint": null,
|
||||
"code": "variant_unsupported",
|
||||
"details": {
|
||||
"field": "subscriptionId",
|
||||
"value": "sub-1",
|
||||
"asOf": null,
|
||||
"current": null
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "variant_unsupported_no_subscription",
|
||||
"messagePackHex": "85AD736368656D6156657273696F6EB063756C746E65742E6572726F722E7630A56572726F72B876617269616E7420756E737570706F727465642068657265AB726F7574696E6748696E74C0A4636F6465B376617269616E745F756E737570706F72746564A764657461696C73C0",
|
||||
"message": {
|
||||
"schemaVersion": "cultnet.error.v0",
|
||||
"error": "variant unsupported here",
|
||||
"routingHint": null,
|
||||
"code": "variant_unsupported",
|
||||
"details": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "unowned_schema",
|
||||
"messagePackHex": "85AD736368656D6156657273696F6EB063756C746E65742E6572726F722E7630A56572726F72D95C756E6F776E65645F736368656D613A204E6F207368617264206F776E7320736368656D612027736F6D652E736368656D612E763127206B65792027736F6D653A6B6579273B207468652077726974652077617320726566757365642EAB726F7574696E6748696E74C0A4636F6465AE756E6F776E65645F736368656D61A764657461696C7384A56669656C64A8736368656D614964A576616C7565AE736F6D652E736368656D612E7631A461734F66C0A763757272656E74C0",
|
||||
"message": {
|
||||
"schemaVersion": "cultnet.error.v0",
|
||||
"error": "unowned_schema: No shard owns schema 'some.schema.v1' key 'some:key'; the write was refused.",
|
||||
"routingHint": null,
|
||||
"code": "unowned_schema",
|
||||
"details": {
|
||||
"field": "schemaId",
|
||||
"value": "some.schema.v1",
|
||||
"asOf": null,
|
||||
"current": null
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "write_not_authorized",
|
||||
"messagePackHex": "85AD736368656D6156657273696F6EB063756C746E65742E6572726F722E7630A56572726F72D92177726974655F6E6F745F617574686F72697A65643A206E6F74206772616E746564AB726F7574696E6748696E74C0A4636F6465B477726974655F6E6F745F617574686F72697A6564A764657461696C7384A56669656C64A97265636F72644B6579A576616C7565A8736F6D653A6B6579A461734F66C0A763757272656E74C0",
|
||||
"message": {
|
||||
"schemaVersion": "cultnet.error.v0",
|
||||
"error": "write_not_authorized: not granted",
|
||||
"routingHint": null,
|
||||
"code": "write_not_authorized",
|
||||
"details": {
|
||||
"field": "recordKey",
|
||||
"value": "some:key",
|
||||
"asOf": null,
|
||||
"current": null
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "unsupported_schema_version",
|
||||
"messagePackHex": "85AD736368656D6156657273696F6EB063756C746E65742E6572726F722E7630A56572726F72D92C756E737570706F727465645F736368656D615F76657273696F6E3A2063756C746E65742E68656C6C6F2E7631AB726F7574696E6748696E74C0A4636F6465BA756E737570706F727465645F736368656D615F76657273696F6EA764657461696C7384A56669656C64AD736368656D6156657273696F6EA576616C7565B063756C746E65742E68656C6C6F2E7631A461734F66C0A763757272656E74C0",
|
||||
"message": {
|
||||
"schemaVersion": "cultnet.error.v0",
|
||||
"error": "unsupported_schema_version: cultnet.hello.v1",
|
||||
"routingHint": null,
|
||||
"code": "unsupported_schema_version",
|
||||
"details": {
|
||||
"field": "schemaVersion",
|
||||
"value": "cultnet.hello.v1",
|
||||
"asOf": null,
|
||||
"current": null
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "message_invalid",
|
||||
"messagePackHex": "85AD736368656D6156657273696F6EB063756C746E65742E6572726F722E7630A56572726F72D93E6D6573736167655F696E76616C69643A2052617720707574206D65737361676573206D75737420636F6E7461696E206120646F63756D656E74206D61702EAB726F7574696E6748696E74C0A4636F6465AF6D6573736167655F696E76616C6964A764657461696C7384A56669656C64A8646F63756D656E74A576616C7565C0A461734F66C0A763757272656E74C0",
|
||||
"message": {
|
||||
"schemaVersion": "cultnet.error.v0",
|
||||
"error": "message_invalid: Raw put messages must contain a document map.",
|
||||
"routingHint": null,
|
||||
"code": "message_invalid",
|
||||
"details": {
|
||||
"field": "document",
|
||||
"value": null,
|
||||
"asOf": null,
|
||||
"current": null
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Binary file not shown.
|
|
@ -1,334 +0,0 @@
|
|||
{
|
||||
"vectors": [
|
||||
{
|
||||
"name": "any_of_plus_ge_conjunction",
|
||||
"selectionMessagePackBase64": "iadzY2hlbWFzwKRrZXlzwKZmaWVsZHOShKVpbmRleKRraW5kom9wpmFueV9vZqZ2YWx1ZXORpndlYXBvbqZudW1iZXLAhKVpbmRleKRtYXNzom9womdlpnZhbHVlc8CmbnVtYmVyoTWlY2l0ZXPApWNpdGVkwKpwcm9qZWN0aW9upmhlYWRlcqpkZXNjZW5kaW5nwqVsaW1pdMCmY3Vyc29ywA==",
|
||||
"asOf": 1,
|
||||
"expectedRefusalField": null,
|
||||
"expectedEvaluationRefusal": null,
|
||||
"expectedIds": [
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/a-eq"
|
||||
],
|
||||
"matched": 1,
|
||||
"hasNext": false,
|
||||
"expectedEdges": []
|
||||
},
|
||||
{
|
||||
"name": "descending_with_limit",
|
||||
"selectionMessagePackBase64": "iadzY2hlbWFzwKRrZXlzwKZmaWVsZHPApWNpdGVzwKVjaXRlZMCqcHJvamVjdGlvbqZoZWFkZXKqZGVzY2VuZGluZ8OlbGltaXQDpmN1cnNvcsA=",
|
||||
"asOf": 1,
|
||||
"expectedRefusalField": null,
|
||||
"expectedEvaluationRefusal": null,
|
||||
"expectedIds": [
|
||||
"sha256:9d0bc9aebc3619b07aabf564f98667afde41444c1b866661d777687d443608dc/citer-both-in-target",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/aa-tie-schema",
|
||||
"sha256:b1f2407d0227a79dcbffdf7ea317f827eec64be38a3f61b7d4e99e81e3b24b42/zz-tie-schema"
|
||||
],
|
||||
"matched": 18,
|
||||
"hasNext": true,
|
||||
"expectedEdges": []
|
||||
},
|
||||
{
|
||||
"name": "gt_numeric_boundary",
|
||||
"selectionMessagePackBase64": "iadzY2hlbWFzwKRrZXlzwKZmaWVsZHORhKVpbmRleKRtYXNzom9womd0pnZhbHVlc8CmbnVtYmVyoTGlY2l0ZXPApWNpdGVkwKpwcm9qZWN0aW9upmhlYWRlcqpkZXNjZW5kaW5nwqVsaW1pdMCmY3Vyc29ywA==",
|
||||
"asOf": 1,
|
||||
"expectedRefusalField": null,
|
||||
"expectedEvaluationRefusal": null,
|
||||
"expectedIds": [
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/a-lo",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/a-eq",
|
||||
"sha256:b1f2407d0227a79dcbffdf7ea317f827eec64be38a3f61b7d4e99e81e3b24b42/b-hi",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/tie-mass"
|
||||
],
|
||||
"matched": 4,
|
||||
"hasNext": false,
|
||||
"expectedEdges": []
|
||||
},
|
||||
{
|
||||
"name": "incoming_exists_true",
|
||||
"selectionMessagePackBase64": "iadzY2hlbWFzkdlHc2hhMjU2OmZmMzVmM2Q5ZDZkZTNmMTA2NmI5MzY5ZTczZmU2Yzc2NDhlODgzNjhkMThlZmMyMjc1Yzk5NDczMGNkODRjZmaka2V5c8CmZmllbGRzwKVjaXRlc8ClY2l0ZWSCpHJvbGWmRGVzaWdupmV4aXN0c8OqcHJvamVjdGlvbqZoZWFkZXKqZGVzY2VuZGluZ8KlbGltaXTApmN1cnNvcsA=",
|
||||
"asOf": 1,
|
||||
"expectedRefusalField": null,
|
||||
"expectedEvaluationRefusal": null,
|
||||
"expectedIds": [
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/a-eq",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/dup-key"
|
||||
],
|
||||
"matched": 2,
|
||||
"hasNext": false,
|
||||
"expectedEdges": [
|
||||
{
|
||||
"fromId": "sha256:9d0bc9aebc3619b07aabf564f98667afde41444c1b866661d777687d443608dc/citer-1",
|
||||
"role": "Design",
|
||||
"toId": "sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/a-eq",
|
||||
"payloadBase64": null
|
||||
},
|
||||
{
|
||||
"fromId": "sha256:9d0bc9aebc3619b07aabf564f98667afde41444c1b866661d777687d443608dc/citer-both-in-target",
|
||||
"role": "Design",
|
||||
"toId": "sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/dup-key",
|
||||
"payloadBase64": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "incoming_negation",
|
||||
"selectionMessagePackBase64": "iadzY2hlbWFzkdlHc2hhMjU2OmZmMzVmM2Q5ZDZkZTNmMTA2NmI5MzY5ZTczZmU2Yzc2NDhlODgzNjhkMThlZmMyMjc1Yzk5NDczMGNkODRjZmaka2V5c8CmZmllbGRzwKVjaXRlc8ClY2l0ZWSCpHJvbGWmRGVzaWdupmV4aXN0c8KqcHJvamVjdGlvbqZoZWFkZXKqZGVzY2VuZGluZ8KlbGltaXTApmN1cnNvcsA=",
|
||||
"asOf": 1,
|
||||
"expectedRefusalField": null,
|
||||
"expectedEvaluationRefusal": null,
|
||||
"expectedIds": [
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/a-lo",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/shared-1",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/shared-3",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/tie-mass",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/-row",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/\uD83D\uDE02-row",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/aa-tie-schema"
|
||||
],
|
||||
"matched": 7,
|
||||
"hasNext": false,
|
||||
"expectedEdges": []
|
||||
},
|
||||
{
|
||||
"name": "shared_index_value_three_rows",
|
||||
"selectionMessagePackBase64": "iadzY2hlbWFzwKRrZXlzwKZmaWVsZHORhKVpbmRleKRraW5kom9wpmFueV9vZqZ2YWx1ZXORpnNoYXJlZKZudW1iZXLApWNpdGVzwKVjaXRlZMCqcHJvamVjdGlvbqZoZWFkZXKqZGVzY2VuZGluZ8KlbGltaXTApmN1cnNvcsA=",
|
||||
"asOf": 1,
|
||||
"expectedRefusalField": null,
|
||||
"expectedEvaluationRefusal": null,
|
||||
"expectedIds": [
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/shared-1",
|
||||
"sha256:b1f2407d0227a79dcbffdf7ea317f827eec64be38a3f61b7d4e99e81e3b24b42/shared-2",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/shared-3"
|
||||
],
|
||||
"matched": 3,
|
||||
"hasNext": false,
|
||||
"expectedEdges": []
|
||||
},
|
||||
{
|
||||
"name": "float_tie_exact_ge",
|
||||
"selectionMessagePackBase64": "iadzY2hlbWFzwKRrZXlzwKZmaWVsZHORhKVpbmRleKRtYXNzom9womdlpnZhbHVlc8CmbnVtYmVyqjIyMzM3NTkuMjWlY2l0ZXPApWNpdGVkwKpwcm9qZWN0aW9upmhlYWRlcqpkZXNjZW5kaW5nwqVsaW1pdMCmY3Vyc29ywA==",
|
||||
"asOf": 1,
|
||||
"expectedRefusalField": null,
|
||||
"expectedEvaluationRefusal": null,
|
||||
"expectedIds": [
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/tie-mass"
|
||||
],
|
||||
"matched": 1,
|
||||
"hasNext": false,
|
||||
"expectedEdges": []
|
||||
},
|
||||
{
|
||||
"name": "hop_by_role_cites_exact_id",
|
||||
"selectionMessagePackBase64": "iadzY2hlbWFzwKRrZXlzkadjaXRlci0xpmZpZWxkc8ClY2l0ZXOCpnRhcmdldIKoc2NoZW1hSWTZR3NoYTI1NjpmZjM1ZjNkOWQ2ZGUzZjEwNjZiOTM2OWU3M2ZlNmM3NjQ4ZTg4MzY4ZDE4ZWZjMjI3NWM5OTQ3MzBjZDg0Y2ZmqXJlY29yZEtleaRhLWVxpHJvbGWmRGVzaWdupWNpdGVkwKpwcm9qZWN0aW9upmhlYWRlcqpkZXNjZW5kaW5nwqVsaW1pdMCmY3Vyc29ywA==",
|
||||
"asOf": 1,
|
||||
"expectedRefusalField": null,
|
||||
"expectedEvaluationRefusal": null,
|
||||
"expectedIds": [
|
||||
"sha256:9d0bc9aebc3619b07aabf564f98667afde41444c1b866661d777687d443608dc/citer-1"
|
||||
],
|
||||
"matched": 1,
|
||||
"hasNext": false,
|
||||
"expectedEdges": [
|
||||
{
|
||||
"fromId": "sha256:9d0bc9aebc3619b07aabf564f98667afde41444c1b866661d777687d443608dc/citer-1",
|
||||
"role": "Design",
|
||||
"toId": "sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/a-eq",
|
||||
"payloadBase64": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "cites_target_by_name_alias",
|
||||
"selectionMessagePackBase64": "iadzY2hlbWFzwKRrZXlzkadjaXRlci0xpmZpZWxkc8ClY2l0ZXOCpnRhcmdldIKoc2NoZW1hSWSpbGVhZl9hLnY5qXJlY29yZEtleaRhLWVxpHJvbGWmRGVzaWdupWNpdGVkwKpwcm9qZWN0aW9upmhlYWRlcqpkZXNjZW5kaW5nwqVsaW1pdMCmY3Vyc29ywA==",
|
||||
"asOf": 1,
|
||||
"expectedRefusalField": null,
|
||||
"expectedEvaluationRefusal": null,
|
||||
"expectedIds": [
|
||||
"sha256:9d0bc9aebc3619b07aabf564f98667afde41444c1b866661d777687d443608dc/citer-1"
|
||||
],
|
||||
"matched": 1,
|
||||
"hasNext": false,
|
||||
"expectedEdges": [
|
||||
{
|
||||
"fromId": "sha256:9d0bc9aebc3619b07aabf564f98667afde41444c1b866661d777687d443608dc/citer-1",
|
||||
"role": "Design",
|
||||
"toId": "sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/a-eq",
|
||||
"payloadBase64": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "schemas_by_name_alias",
|
||||
"selectionMessagePackBase64": "iadzY2hlbWFzkalsZWFmX2Eudjmka2V5c8CmZmllbGRzwKVjaXRlc8ClY2l0ZWTAqnByb2plY3Rpb26maGVhZGVyqmRlc2NlbmRpbmfCpWxpbWl0wKZjdXJzb3LA",
|
||||
"asOf": 1,
|
||||
"expectedRefusalField": null,
|
||||
"expectedEvaluationRefusal": null,
|
||||
"expectedIds": [
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/a-lo",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/a-eq",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/shared-1",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/shared-3",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/tie-mass",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/-row",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/\uD83D\uDE02-row",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/dup-key",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/aa-tie-schema"
|
||||
],
|
||||
"matched": 9,
|
||||
"hasNext": false,
|
||||
"expectedEdges": []
|
||||
},
|
||||
{
|
||||
"name": "astral_key_code_point_order",
|
||||
"selectionMessagePackBase64": "iadzY2hlbWFzwKRrZXlzwKZmaWVsZHORhKVpbmRleKRraW5kom9wpmFueV9vZqZ2YWx1ZXORp3VuaWNvZGWmbnVtYmVywKVjaXRlc8ClY2l0ZWTAqnByb2plY3Rpb26maGVhZGVyqmRlc2NlbmRpbmfCpWxpbWl0wKZjdXJzb3LA",
|
||||
"asOf": 1,
|
||||
"expectedRefusalField": null,
|
||||
"expectedEvaluationRefusal": null,
|
||||
"expectedIds": [
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/-row",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/\uD83D\uDE02-row"
|
||||
],
|
||||
"matched": 2,
|
||||
"hasNext": false,
|
||||
"expectedEdges": []
|
||||
},
|
||||
{
|
||||
"name": "header_projection",
|
||||
"selectionMessagePackBase64": "iadzY2hlbWFzwKRrZXlzwKZmaWVsZHORhKVpbmRleKRraW5kom9wpmFueV9vZqZ2YWx1ZXORp3VuaWNvZGWmbnVtYmVywKVjaXRlc8ClY2l0ZWTAqnByb2plY3Rpb26maGVhZGVyqmRlc2NlbmRpbmfCpWxpbWl0wKZjdXJzb3LA",
|
||||
"asOf": 1,
|
||||
"expectedRefusalField": null,
|
||||
"expectedEvaluationRefusal": null,
|
||||
"expectedIds": [
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/-row",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/\uD83D\uDE02-row"
|
||||
],
|
||||
"matched": 2,
|
||||
"hasNext": false,
|
||||
"expectedEdges": []
|
||||
},
|
||||
{
|
||||
"name": "document_projection",
|
||||
"selectionMessagePackBase64": "iadzY2hlbWFzwKRrZXlzwKZmaWVsZHORhKVpbmRleKRraW5kom9wpmFueV9vZqZ2YWx1ZXORp3VuaWNvZGWmbnVtYmVywKVjaXRlc8ClY2l0ZWTAqnByb2plY3Rpb26oZG9jdW1lbnSqZGVzY2VuZGluZ8KlbGltaXTApmN1cnNvcsA=",
|
||||
"asOf": 1,
|
||||
"expectedRefusalField": null,
|
||||
"expectedEvaluationRefusal": null,
|
||||
"expectedIds": [
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/-row",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/\uD83D\uDE02-row"
|
||||
],
|
||||
"matched": 2,
|
||||
"hasNext": false,
|
||||
"expectedEdges": []
|
||||
},
|
||||
{
|
||||
"name": "row_tiebreak_schema_id_before_record_key_at_tied_ordinal",
|
||||
"selectionMessagePackBase64": "iadzY2hlbWFzwKRrZXlzwKZmaWVsZHORhKVpbmRleKRraW5kom9wpmFueV9vZqZ2YWx1ZXORqnRpZS1zY2hlbWGmbnVtYmVywKVjaXRlc8ClY2l0ZWTAqnByb2plY3Rpb26maGVhZGVyqmRlc2NlbmRpbmfCpWxpbWl0wKZjdXJzb3LA",
|
||||
"asOf": 1,
|
||||
"expectedRefusalField": null,
|
||||
"expectedEvaluationRefusal": null,
|
||||
"expectedIds": [
|
||||
"sha256:b1f2407d0227a79dcbffdf7ea317f827eec64be38a3f61b7d4e99e81e3b24b42/zz-tie-schema",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/aa-tie-schema"
|
||||
],
|
||||
"matched": 2,
|
||||
"hasNext": false,
|
||||
"expectedEdges": []
|
||||
},
|
||||
{
|
||||
"name": "shared_key_narrow_ref_resolves_leaf_within_target",
|
||||
"selectionMessagePackBase64": "iadzY2hlbWFzwKRrZXlzkbVuYXJyb3ctY2l0ZXItYWNjZXB0ZWSmZmllbGRzwKVjaXRlc4KmdGFyZ2V0gqhzY2hlbWFJZNlHc2hhMjU2OmZmMzVmM2Q5ZDZkZTNmMTA2NmI5MzY5ZTczZmU2Yzc2NDhlODgzNjhkMThlZmMyMjc1Yzk5NDczMGNkODRjZmapcmVjb3JkS2V5p2R1cC1rZXmkcm9sZapuYXJyb3dfcmVmpWNpdGVkwKpwcm9qZWN0aW9upmhlYWRlcqpkZXNjZW5kaW5nwqVsaW1pdMCmY3Vyc29ywA==",
|
||||
"asOf": 1,
|
||||
"expectedRefusalField": null,
|
||||
"expectedEvaluationRefusal": null,
|
||||
"expectedIds": [
|
||||
"sha256:ee192f6526a8f8cdec7044551aa2c8e28c612426766bb270605023bc94e2614d/narrow-citer-accepted"
|
||||
],
|
||||
"matched": 1,
|
||||
"hasNext": false,
|
||||
"expectedEdges": [
|
||||
{
|
||||
"fromId": "sha256:ee192f6526a8f8cdec7044551aa2c8e28c612426766bb270605023bc94e2614d/narrow-citer-accepted",
|
||||
"role": "narrow_ref",
|
||||
"toId": "sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/dup-key",
|
||||
"payloadBase64": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "shared_key_design_resolves_the_first_in_target_candidate_in_row_order",
|
||||
"selectionMessagePackBase64": "iadzY2hlbWFzwKRrZXlzkbRjaXRlci1ib3RoLWluLXRhcmdldKZmaWVsZHPApWNpdGVzgqZ0YXJnZXSCqHNjaGVtYUlk2UdzaGEyNTY6ZmYzNWYzZDlkNmRlM2YxMDY2YjkzNjllNzNmZTZjNzY0OGU4ODM2OGQxOGVmYzIyNzVjOTk0NzMwY2Q4NGNmZqlyZWNvcmRLZXmnZHVwLWtleaRyb2xlpkRlc2lnbqVjaXRlZMCqcHJvamVjdGlvbqZoZWFkZXKqZGVzY2VuZGluZ8KlbGltaXTApmN1cnNvcsA=",
|
||||
"asOf": 1,
|
||||
"expectedRefusalField": null,
|
||||
"expectedEvaluationRefusal": null,
|
||||
"expectedIds": [
|
||||
"sha256:9d0bc9aebc3619b07aabf564f98667afde41444c1b866661d777687d443608dc/citer-both-in-target"
|
||||
],
|
||||
"matched": 1,
|
||||
"hasNext": false,
|
||||
"expectedEdges": [
|
||||
{
|
||||
"fromId": "sha256:9d0bc9aebc3619b07aabf564f98667afde41444c1b866661d777687d443608dc/citer-both-in-target",
|
||||
"role": "Design",
|
||||
"toId": "sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/dup-key",
|
||||
"payloadBase64": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "refuses_empty_schemas_list",
|
||||
"selectionMessagePackBase64": "iadzY2hlbWFzkKRrZXlzwKZmaWVsZHPApWNpdGVzwKVjaXRlZMCqcHJvamVjdGlvbqZoZWFkZXKqZGVzY2VuZGluZ8KlbGltaXTApmN1cnNvcsA=",
|
||||
"asOf": 1,
|
||||
"expectedRefusalField": "schemas",
|
||||
"expectedEvaluationRefusal": null,
|
||||
"expectedIds": [],
|
||||
"matched": 0,
|
||||
"hasNext": false,
|
||||
"expectedEdges": []
|
||||
},
|
||||
{
|
||||
"name": "refuses_blank_key_entry",
|
||||
"selectionMessagePackBase64": "iadzY2hlbWFzwKRrZXlzkqRhLWVxoyAgIKZmaWVsZHPApWNpdGVzwKVjaXRlZMCqcHJvamVjdGlvbqZoZWFkZXKqZGVzY2VuZGluZ8KlbGltaXTApmN1cnNvcsA=",
|
||||
"asOf": 1,
|
||||
"expectedRefusalField": "keys",
|
||||
"expectedEvaluationRefusal": null,
|
||||
"expectedIds": [],
|
||||
"matched": 0,
|
||||
"hasNext": false,
|
||||
"expectedEdges": []
|
||||
},
|
||||
{
|
||||
"name": "refuses_unmatched_cites_target_schema",
|
||||
"selectionMessagePackBase64": "iadzY2hlbWFzwKRrZXlzwKZmaWVsZHPApWNpdGVzgqZ0YXJnZXSCqHNjaGVtYUlkvHNoYTI1Njpub3QtYS1kZWNsYXJlZC1zY2hlbWGpcmVjb3JkS2V5pGEtZXGkcm9sZcClY2l0ZWTAqnByb2plY3Rpb26maGVhZGVyqmRlc2NlbmRpbmfCpWxpbWl0wKZjdXJzb3LA",
|
||||
"asOf": 1,
|
||||
"expectedRefusalField": "cites.target.schemaId",
|
||||
"expectedEvaluationRefusal": null,
|
||||
"expectedIds": [],
|
||||
"matched": 0,
|
||||
"hasNext": false,
|
||||
"expectedEdges": []
|
||||
},
|
||||
{
|
||||
"name": "refuses_cites_target_by_hash_shaped_alias",
|
||||
"selectionMessagePackBase64": "iadzY2hlbWFzwKRrZXlzwKZmaWVsZHPApWNpdGVzgqZ0YXJnZXSCqHNjaGVtYUlk2UpzaGEyNTY6ZmYzNWYzZDlkNmRlM2YxMDY2YjkzNjllNzNmZTZjNzY0OGU4ODM2OGQxOGVmYzIyNzVjOTk0NzMwY2Q4NGNmZi52MalyZWNvcmRLZXmkYS1lcaRyb2xlwKVjaXRlZMCqcHJvamVjdGlvbqZoZWFkZXKqZGVzY2VuZGluZ8KlbGltaXTApmN1cnNvcsA=",
|
||||
"asOf": 1,
|
||||
"expectedRefusalField": "cites.target.schemaId",
|
||||
"expectedEvaluationRefusal": null,
|
||||
"expectedIds": [],
|
||||
"matched": 0,
|
||||
"hasNext": false,
|
||||
"expectedEdges": []
|
||||
},
|
||||
{
|
||||
"name": "shared_key_narrow_ref_refuses_when_only_candidate_is_outside_target",
|
||||
"selectionMessagePackBase64": "iadzY2hlbWFzwKRrZXlzkbRuYXJyb3ctY2l0ZXItcmVmdXNlZKZmaWVsZHPApWNpdGVzgqZ0YXJnZXSCqHNjaGVtYUlk2UdzaGEyNTY6ZmYzNWYzZDlkNmRlM2YxMDY2YjkzNjllNzNmZTZjNzY0OGU4ODM2OGQxOGVmYzIyNzVjOTk0NzMwY2Q4NGNmZqlyZWNvcmRLZXmrbmFycm93LW9ubHmkcm9sZapuYXJyb3dfcmVmpWNpdGVkwKpwcm9qZWN0aW9upmhlYWRlcqpkZXNjZW5kaW5nwqVsaW1pdMCmY3Vyc29ywA==",
|
||||
"asOf": 1,
|
||||
"expectedRefusalField": null,
|
||||
"expectedEvaluationRefusal": "reference_outside_target",
|
||||
"expectedIds": [],
|
||||
"matched": 0,
|
||||
"hasNext": false,
|
||||
"expectedEdges": []
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,105 +0,0 @@
|
|||
{
|
||||
"//": "CultNet typed selection, Cut 1 fix batch (docs/cultnet-selection-cut.md, Self's rulings for the Cut 1 fix batch, R-E and the shared-fixture ruling, 2026-09-22). The one row set both the C# reference and cultnet-rs build their parity vectors from. schemaId is each schema's real SHA-256 content-hash id, exactly as GameCult.Caching.CultDocumentRegistry computes it for the fixture's C# document types (leaf_a=ParityLeafA, leaf_b=ParityLeafB, citer=ParityCiter, citer_narrow=ParityCiterNarrow, tests/GameCult.Networking.Tests/SelectionParityVectorTests.cs) - CultCache.cs's Sha256(semanticFingerprint), which carries no '.vN' suffix of its own; the version is folded into the hash, never appended as text. Both writers read this file instead of building their own fixture rows.",
|
||||
"//aliases": "Two DIFFERENT alias forms, now deliberate rather than a cross-runtime defect (S-12, 2026-09-22: the Rust alias port made this so - see docs/cultnet-selection-cut.md, 'Self's ruling, 2026-09-22: the C# reference's alias rule is the rule'). Both runtimes resolve a schema alias the same one way: strip a trailing .vN and compare the remainder against the descriptor's declared SchemaName (CultNetSchemaAliasMatching.Matches(candidate, CultDocumentDescriptor), src/GameCult.Networking/CultNetDatabase.cs:74-87; cultnet_rs::selection::schema_alias::matches ports it name-for-name and deletes the hash-stripping overload it used to carry). nameAlias is <SchemaName>.v9 and resolves through both runtimes under that one rule. hashAlias is <schemaId>.v1 and is refused as unmatched by both - it is not a wire form either runtime's production call sites ever produce or accept, and it is kept in the fixture specifically to pin that neither runtime resolves it.",
|
||||
"//references": "R-AF, 2026-09-23: a reference's `references[].targetKey` is the only thing a stored edge actually carries on the wire - GameCult.Caching.MessagePack.CultRecordRefFormatter<T> serializes a CultRecordRef<T> as a bare key string (probed: MessagePackSerializer.Serialize on a real Design field produced the single msgpack string 'a-eq', nothing else). This fixture used to also carry a `targetSchema` per reference; it was never anything but documentation - SelectionParityVectorTests.BuildDocument and cultnet-rs's build_row both read only targetKey to construct the edge - and it is removed rather than kept as a field the wire does not have. Resolving which row an edge names is by targetKey alone, filtered to the declared role's target leaves (D9); see citer_narrow below for the shared-key shape that rule is pinned against.",
|
||||
"schemas": {
|
||||
"leaf_a": {
|
||||
"schemaId": "sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff",
|
||||
"nameAlias": "leaf_a.v9",
|
||||
"hashAlias": "sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff.v1",
|
||||
"indexes": [
|
||||
{ "name": "kind", "numeric": false },
|
||||
{ "name": "mass", "numeric": true }
|
||||
]
|
||||
},
|
||||
"leaf_b": {
|
||||
"schemaId": "sha256:b1f2407d0227a79dcbffdf7ea317f827eec64be38a3f61b7d4e99e81e3b24b42",
|
||||
"nameAlias": "leaf_b.v9",
|
||||
"hashAlias": "sha256:b1f2407d0227a79dcbffdf7ea317f827eec64be38a3f61b7d4e99e81e3b24b42.v1",
|
||||
"indexes": [
|
||||
{ "name": "kind", "numeric": false },
|
||||
{ "name": "mass", "numeric": true }
|
||||
]
|
||||
},
|
||||
"citer": {
|
||||
"schemaId": "sha256:9d0bc9aebc3619b07aabf564f98667afde41444c1b866661d777687d443608dc",
|
||||
"nameAlias": "citer.v9",
|
||||
"hashAlias": "sha256:9d0bc9aebc3619b07aabf564f98667afde41444c1b866661d777687d443608dc.v1",
|
||||
"roles": [
|
||||
{ "name": "Design", "targets": ["leaf_a", "leaf_b"] }
|
||||
]
|
||||
},
|
||||
"citer_narrow": {
|
||||
"//": "R-AF: a citer whose declared reference target is one leaf only (leaf_a), so a record key shared by a leaf_a row and a leaf_b row has exactly one candidate inside the declared target and exactly one outside it - the shape neither runtime's parity vectors covered before this cut (zero duplicate record keys across the original ten rows).",
|
||||
"schemaId": "sha256:ee192f6526a8f8cdec7044551aa2c8e28c612426766bb270605023bc94e2614d",
|
||||
"nameAlias": "citer_narrow.v9",
|
||||
"hashAlias": "sha256:ee192f6526a8f8cdec7044551aa2c8e28c612426766bb270605023bc94e2614d.v1",
|
||||
"roles": [
|
||||
{ "name": "narrow_ref", "targets": ["leaf_a"] }
|
||||
]
|
||||
}
|
||||
},
|
||||
"rows": [
|
||||
{ "schema": "leaf_a", "key": "a-lo", "ordinal": 1, "fields": { "kind": "weapon", "mass": "4" } },
|
||||
{ "schema": "leaf_a", "key": "a-eq", "ordinal": 2, "fields": { "kind": "weapon", "mass": "5" } },
|
||||
{ "schema": "leaf_b", "key": "b-hi", "ordinal": 3, "fields": { "kind": "armor", "mass": "6" } },
|
||||
{ "schema": "leaf_a", "key": "shared-1", "ordinal": 4, "fields": { "kind": "shared", "mass": "1" } },
|
||||
{ "schema": "leaf_b", "key": "shared-2", "ordinal": 5, "fields": { "kind": "shared", "mass": "1" } },
|
||||
{ "schema": "leaf_a", "key": "shared-3", "ordinal": 6, "fields": { "kind": "shared", "mass": "1" } },
|
||||
{
|
||||
"schema": "citer",
|
||||
"key": "citer-1",
|
||||
"ordinal": 7,
|
||||
"references": [ { "role": "Design", "targetKey": "a-eq" } ]
|
||||
},
|
||||
{
|
||||
"//": "R-D: 2233759.25 is exactly representable as an f32 and sits on a round-to-even tie between two shortest-form spellings; its exact canonical decimal is 2233759.25 either way. kind=tie so no weapon/armor/shared case can sweep it up.",
|
||||
"schema": "leaf_a", "key": "tie-mass", "ordinal": 8, "fields": { "kind": "tie", "mass": "2233759.25" }
|
||||
},
|
||||
{
|
||||
"//": "R-C: BMP private-use key (U+E000), same ordinal as the astral row below so the tiebreak - not the ordinal - decides order. kind=unicode, mass=0 so no unfiltered or mass>1 case reaches these.",
|
||||
"schema": "leaf_a", "key": "-row", "ordinal": 9, "fields": { "kind": "unicode", "mass": "0" }
|
||||
},
|
||||
{
|
||||
"//": "R-C: astral key (U+1F602, encoded as a surrogate pair whose high half 0xD83D is less than 0xE000 - a UTF-16 code-unit compare sorts this first; code-point order sorts it after the BMP row above).",
|
||||
"schema": "leaf_a", "key": "😂-row", "ordinal": 9, "fields": { "kind": "unicode", "mass": "0" }
|
||||
},
|
||||
{
|
||||
"//": "R-AF shape 1: the only row at this key is outside citer_narrow's declared target (leaf_a only) - resolving the edge below must refuse reference_outside_target in both runtimes, not silently accept an empty page. kind=narrow-fixture (not \"shared\") so this row never sweeps into shared_index_value_three_rows, which pins an exact count of 3.",
|
||||
"schema": "leaf_b", "key": "narrow-only", "ordinal": 10, "fields": { "kind": "narrow-fixture", "mass": "1" }
|
||||
},
|
||||
{
|
||||
"//": "R-AF shape 2: two rows share this key, one inside citer_narrow's declared target and one outside it - resolving the edge below must accept, deterministically picking the leaf_a row, in both runtimes.",
|
||||
"schema": "leaf_a", "key": "dup-key", "ordinal": 11, "fields": { "kind": "narrow-fixture", "mass": "1" }
|
||||
},
|
||||
{
|
||||
"schema": "leaf_b", "key": "dup-key", "ordinal": 12, "fields": { "kind": "narrow-fixture", "mass": "1" }
|
||||
},
|
||||
{
|
||||
"schema": "citer_narrow",
|
||||
"key": "narrow-citer-refused",
|
||||
"ordinal": 13,
|
||||
"references": [ { "role": "narrow_ref", "targetKey": "narrow-only" } ]
|
||||
},
|
||||
{
|
||||
"schema": "citer_narrow",
|
||||
"key": "narrow-citer-accepted",
|
||||
"ordinal": 14,
|
||||
"references": [ { "role": "narrow_ref", "targetKey": "dup-key" } ]
|
||||
},
|
||||
{
|
||||
"//": "R-AJ: a tied ordinal across two DIFFERENT schemas (leaf_a and leaf_b), not two rows of the same leaf like the astral/BMP pair above - the shape the row order's schemaId tiebreak needs and the original ten rows never had. Keys are anti-correlated with the real schema ids on purpose: leaf_b's real id sorts before leaf_a's (sha256:b1f2... < sha256:ff35...), so leaf_b gets the alphabetically-*later* key (\"zz-tie-schema\") and leaf_a gets the *earlier* one (\"aa-tie-schema\") - a schemaId-first order and a recordKey-first order disagree here on purpose, so only the correct composition produces leaf_b's row first.",
|
||||
"schema": "leaf_b", "key": "zz-tie-schema", "ordinal": 15, "fields": { "kind": "tie-schema", "mass": "1" }
|
||||
},
|
||||
{
|
||||
"schema": "leaf_a", "key": "aa-tie-schema", "ordinal": 15, "fields": { "kind": "tie-schema", "mass": "1" }
|
||||
},
|
||||
{
|
||||
"//": "R-AO, 2026-09-23: 'dup-key' already carries two rows (leaf_a ordinal 11, leaf_b ordinal 12) - both are in citer's Design role's declared target ([leaf_a, leaf_b], unlike citer_narrow's narrow_ref above, which only ever had one in-target candidate at a shared key). This citer is the first row in this file (hence in both runtimes' row order) to name 'dup-key' through Design, so resolving it must deterministically pick the leaf_a row - the first in-target candidate in the caller's order - never the leaf_b row, in both runtimes.",
|
||||
"schema": "citer",
|
||||
"key": "citer-both-in-target",
|
||||
"ordinal": 16,
|
||||
"references": [ { "role": "Design", "targetKey": "dup-key" } ]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,282 +0,0 @@
|
|||
{
|
||||
"vectors": [
|
||||
{
|
||||
"name": "any_of_plus_ge_conjunction",
|
||||
"selectionMessagePackBase64": "g6ZmaWVsZHOSg6VpbmRleKRraW5kom9wpmFueV9vZqZ2YWx1ZXORpndlYXBvboOlaW5kZXikbWFzc6JvcKJnZaZudW1iZXKhNapwcm9qZWN0aW9upmhlYWRlcqpkZXNjZW5kaW5nwg==",
|
||||
"asOf": 1,
|
||||
"expectedIds": [
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/a-eq"
|
||||
],
|
||||
"matched": 1,
|
||||
"hasNext": false,
|
||||
"expectedEdges": []
|
||||
},
|
||||
{
|
||||
"name": "descending_with_limit",
|
||||
"selectionMessagePackBase64": "g6pwcm9qZWN0aW9upmhlYWRlcqpkZXNjZW5kaW5nw6VsaW1pdAM=",
|
||||
"asOf": 1,
|
||||
"expectedIds": [
|
||||
"sha256:9d0bc9aebc3619b07aabf564f98667afde41444c1b866661d777687d443608dc/citer-both-in-target",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/aa-tie-schema",
|
||||
"sha256:b1f2407d0227a79dcbffdf7ea317f827eec64be38a3f61b7d4e99e81e3b24b42/zz-tie-schema"
|
||||
],
|
||||
"matched": 18,
|
||||
"hasNext": true,
|
||||
"expectedEdges": []
|
||||
},
|
||||
{
|
||||
"name": "gt_numeric_boundary",
|
||||
"selectionMessagePackBase64": "g6ZmaWVsZHORg6VpbmRleKRtYXNzom9womd0pm51bWJlcqExqnByb2plY3Rpb26maGVhZGVyqmRlc2NlbmRpbmfC",
|
||||
"asOf": 1,
|
||||
"expectedIds": [
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/a-lo",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/a-eq",
|
||||
"sha256:b1f2407d0227a79dcbffdf7ea317f827eec64be38a3f61b7d4e99e81e3b24b42/b-hi",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/tie-mass"
|
||||
],
|
||||
"matched": 4,
|
||||
"hasNext": false,
|
||||
"expectedEdges": []
|
||||
},
|
||||
{
|
||||
"name": "incoming_exists_true",
|
||||
"selectionMessagePackBase64": "hKdzY2hlbWFzkdlHc2hhMjU2OmZmMzVmM2Q5ZDZkZTNmMTA2NmI5MzY5ZTczZmU2Yzc2NDhlODgzNjhkMThlZmMyMjc1Yzk5NDczMGNkODRjZmalY2l0ZWSCpHJvbGWmRGVzaWdupmV4aXN0c8OqcHJvamVjdGlvbqZoZWFkZXKqZGVzY2VuZGluZ8I=",
|
||||
"asOf": 1,
|
||||
"expectedIds": [
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/a-eq",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/dup-key"
|
||||
],
|
||||
"matched": 2,
|
||||
"hasNext": false,
|
||||
"expectedEdges": [
|
||||
{
|
||||
"fromId": "sha256:9d0bc9aebc3619b07aabf564f98667afde41444c1b866661d777687d443608dc/citer-1",
|
||||
"role": "Design",
|
||||
"toId": "sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/a-eq",
|
||||
"payloadBase64": null
|
||||
},
|
||||
{
|
||||
"fromId": "sha256:9d0bc9aebc3619b07aabf564f98667afde41444c1b866661d777687d443608dc/citer-both-in-target",
|
||||
"role": "Design",
|
||||
"toId": "sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/dup-key",
|
||||
"payloadBase64": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "incoming_negation",
|
||||
"selectionMessagePackBase64": "hKdzY2hlbWFzkdlHc2hhMjU2OmZmMzVmM2Q5ZDZkZTNmMTA2NmI5MzY5ZTczZmU2Yzc2NDhlODgzNjhkMThlZmMyMjc1Yzk5NDczMGNkODRjZmalY2l0ZWSCpHJvbGWmRGVzaWdupmV4aXN0c8KqcHJvamVjdGlvbqZoZWFkZXKqZGVzY2VuZGluZ8I=",
|
||||
"asOf": 1,
|
||||
"expectedIds": [
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/a-lo",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/shared-1",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/shared-3",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/tie-mass",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/-row",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/😂-row",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/aa-tie-schema"
|
||||
],
|
||||
"matched": 7,
|
||||
"hasNext": false,
|
||||
"expectedEdges": []
|
||||
},
|
||||
{
|
||||
"name": "shared_index_value_three_rows",
|
||||
"selectionMessagePackBase64": "g6ZmaWVsZHORg6VpbmRleKRraW5kom9wpmFueV9vZqZ2YWx1ZXORpnNoYXJlZKpwcm9qZWN0aW9upmhlYWRlcqpkZXNjZW5kaW5nwg==",
|
||||
"asOf": 1,
|
||||
"expectedIds": [
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/shared-1",
|
||||
"sha256:b1f2407d0227a79dcbffdf7ea317f827eec64be38a3f61b7d4e99e81e3b24b42/shared-2",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/shared-3"
|
||||
],
|
||||
"matched": 3,
|
||||
"hasNext": false,
|
||||
"expectedEdges": []
|
||||
},
|
||||
{
|
||||
"name": "hop_by_role_cites_exact_id",
|
||||
"selectionMessagePackBase64": "hKRrZXlzkadjaXRlci0xpWNpdGVzgqZ0YXJnZXSCqHNjaGVtYUlk2UdzaGEyNTY6ZmYzNWYzZDlkNmRlM2YxMDY2YjkzNjllNzNmZTZjNzY0OGU4ODM2OGQxOGVmYzIyNzVjOTk0NzMwY2Q4NGNmZqlyZWNvcmRLZXmkYS1lcaRyb2xlpkRlc2lnbqpwcm9qZWN0aW9upmhlYWRlcqpkZXNjZW5kaW5nwg==",
|
||||
"asOf": 1,
|
||||
"expectedIds": [
|
||||
"sha256:9d0bc9aebc3619b07aabf564f98667afde41444c1b866661d777687d443608dc/citer-1"
|
||||
],
|
||||
"matched": 1,
|
||||
"hasNext": false,
|
||||
"expectedEdges": [
|
||||
{
|
||||
"fromId": "sha256:9d0bc9aebc3619b07aabf564f98667afde41444c1b866661d777687d443608dc/citer-1",
|
||||
"role": "Design",
|
||||
"toId": "sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/a-eq",
|
||||
"payloadBase64": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "hop_by_role_cites_name_alias",
|
||||
"selectionMessagePackBase64": "hKRrZXlzkadjaXRlci0xpWNpdGVzgqZ0YXJnZXSCqHNjaGVtYUlkqWxlYWZfYS52OalyZWNvcmRLZXmkYS1lcaRyb2xlpkRlc2lnbqpwcm9qZWN0aW9upmhlYWRlcqpkZXNjZW5kaW5nwg==",
|
||||
"asOf": 1,
|
||||
"expectedIds": [
|
||||
"sha256:9d0bc9aebc3619b07aabf564f98667afde41444c1b866661d777687d443608dc/citer-1"
|
||||
],
|
||||
"matched": 1,
|
||||
"hasNext": false,
|
||||
"expectedEdges": [
|
||||
{
|
||||
"fromId": "sha256:9d0bc9aebc3619b07aabf564f98667afde41444c1b866661d777687d443608dc/citer-1",
|
||||
"role": "Design",
|
||||
"toId": "sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/a-eq",
|
||||
"payloadBase64": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "schemas_by_hash_alias",
|
||||
"selectionMessagePackBase64": "g6dzY2hlbWFzkdlKc2hhMjU2OmZmMzVmM2Q5ZDZkZTNmMTA2NmI5MzY5ZTczZmU2Yzc2NDhlODgzNjhkMThlZmMyMjc1Yzk5NDczMGNkODRjZmYudjGqcHJvamVjdGlvbqZoZWFkZXKqZGVzY2VuZGluZ8I=",
|
||||
"asOf": 1,
|
||||
"expectedIds": [],
|
||||
"matched": 0,
|
||||
"hasNext": false,
|
||||
"expectedEdges": []
|
||||
},
|
||||
{
|
||||
"name": "schemas_by_name_alias",
|
||||
"selectionMessagePackBase64": "g6dzY2hlbWFzkalsZWFmX2EudjmqcHJvamVjdGlvbqZoZWFkZXKqZGVzY2VuZGluZ8I=",
|
||||
"asOf": 1,
|
||||
"expectedIds": [
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/a-lo",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/a-eq",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/shared-1",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/shared-3",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/tie-mass",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/-row",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/😂-row",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/dup-key",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/aa-tie-schema"
|
||||
],
|
||||
"matched": 9,
|
||||
"hasNext": false,
|
||||
"expectedEdges": []
|
||||
},
|
||||
{
|
||||
"name": "float_tie_exact_ge",
|
||||
"selectionMessagePackBase64": "g6ZmaWVsZHORg6VpbmRleKRtYXNzom9womdlpm51bWJlcqoyMjMzNzU5LjI1qnByb2plY3Rpb26maGVhZGVyqmRlc2NlbmRpbmfC",
|
||||
"asOf": 1,
|
||||
"expectedIds": [
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/tie-mass"
|
||||
],
|
||||
"matched": 1,
|
||||
"hasNext": false,
|
||||
"expectedEdges": []
|
||||
},
|
||||
{
|
||||
"name": "astral_key_code_point_order",
|
||||
"selectionMessagePackBase64": "g6ZmaWVsZHORg6VpbmRleKRraW5kom9wpmFueV9vZqZ2YWx1ZXORp3VuaWNvZGWqcHJvamVjdGlvbqZoZWFkZXKqZGVzY2VuZGluZ8I=",
|
||||
"asOf": 1,
|
||||
"expectedIds": [
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/-row",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/😂-row"
|
||||
],
|
||||
"matched": 2,
|
||||
"hasNext": false,
|
||||
"expectedEdges": []
|
||||
},
|
||||
{
|
||||
"name": "row_tiebreak_schema_id_before_record_key_at_tied_ordinal",
|
||||
"selectionMessagePackBase64": "g6ZmaWVsZHORg6VpbmRleKRraW5kom9wpmFueV9vZqZ2YWx1ZXORqnRpZS1zY2hlbWGqcHJvamVjdGlvbqZoZWFkZXKqZGVzY2VuZGluZ8I=",
|
||||
"asOf": 1,
|
||||
"expectedIds": [
|
||||
"sha256:b1f2407d0227a79dcbffdf7ea317f827eec64be38a3f61b7d4e99e81e3b24b42/zz-tie-schema",
|
||||
"sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/aa-tie-schema"
|
||||
],
|
||||
"matched": 2,
|
||||
"hasNext": false,
|
||||
"expectedEdges": []
|
||||
},
|
||||
{
|
||||
"name": "shared_key_narrow_ref_resolves_leaf_within_target",
|
||||
"selectionMessagePackBase64": "hKRrZXlzkbVuYXJyb3ctY2l0ZXItYWNjZXB0ZWSlY2l0ZXOCpnRhcmdldIKoc2NoZW1hSWTZR3NoYTI1NjpmZjM1ZjNkOWQ2ZGUzZjEwNjZiOTM2OWU3M2ZlNmM3NjQ4ZTg4MzY4ZDE4ZWZjMjI3NWM5OTQ3MzBjZDg0Y2ZmqXJlY29yZEtleadkdXAta2V5pHJvbGWqbmFycm93X3JlZqpwcm9qZWN0aW9upmhlYWRlcqpkZXNjZW5kaW5nwg==",
|
||||
"asOf": 1,
|
||||
"expectedIds": [
|
||||
"sha256:ee192f6526a8f8cdec7044551aa2c8e28c612426766bb270605023bc94e2614d/narrow-citer-accepted"
|
||||
],
|
||||
"matched": 1,
|
||||
"hasNext": false,
|
||||
"expectedEdges": [
|
||||
{
|
||||
"fromId": "sha256:ee192f6526a8f8cdec7044551aa2c8e28c612426766bb270605023bc94e2614d/narrow-citer-accepted",
|
||||
"role": "narrow_ref",
|
||||
"toId": "sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/dup-key",
|
||||
"payloadBase64": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "shared_key_design_resolves_the_first_in_target_candidate_in_row_order",
|
||||
"selectionMessagePackBase64": "hKRrZXlzkbRjaXRlci1ib3RoLWluLXRhcmdldKVjaXRlc4KmdGFyZ2V0gqhzY2hlbWFJZNlHc2hhMjU2OmZmMzVmM2Q5ZDZkZTNmMTA2NmI5MzY5ZTczZmU2Yzc2NDhlODgzNjhkMThlZmMyMjc1Yzk5NDczMGNkODRjZmapcmVjb3JkS2V5p2R1cC1rZXmkcm9sZaZEZXNpZ26qcHJvamVjdGlvbqZoZWFkZXKqZGVzY2VuZGluZ8I=",
|
||||
"asOf": 1,
|
||||
"expectedIds": [
|
||||
"sha256:9d0bc9aebc3619b07aabf564f98667afde41444c1b866661d777687d443608dc/citer-both-in-target"
|
||||
],
|
||||
"matched": 1,
|
||||
"hasNext": false,
|
||||
"expectedEdges": [
|
||||
{
|
||||
"fromId": "sha256:9d0bc9aebc3619b07aabf564f98667afde41444c1b866661d777687d443608dc/citer-both-in-target",
|
||||
"role": "Design",
|
||||
"toId": "sha256:ff35f3d9d6de3f1066b9369e73fe6c7648e88368d18efc2275c994730cd84cff/dup-key",
|
||||
"payloadBase64": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "refuses_empty_schemas_list",
|
||||
"selectionMessagePackBase64": "g6dzY2hlbWFzkKpwcm9qZWN0aW9upmhlYWRlcqpkZXNjZW5kaW5nwg==",
|
||||
"asOf": 1,
|
||||
"expectedRefusalField": "schemas",
|
||||
"expectedIds": [],
|
||||
"matched": 0,
|
||||
"hasNext": false,
|
||||
"expectedEdges": []
|
||||
},
|
||||
{
|
||||
"name": "refuses_blank_key_entry",
|
||||
"selectionMessagePackBase64": "g6RrZXlzkqRhLWVxoyAgIKpwcm9qZWN0aW9upmhlYWRlcqpkZXNjZW5kaW5nwg==",
|
||||
"asOf": 1,
|
||||
"expectedRefusalField": "keys",
|
||||
"expectedIds": [],
|
||||
"matched": 0,
|
||||
"hasNext": false,
|
||||
"expectedEdges": []
|
||||
},
|
||||
{
|
||||
"name": "refuses_unmatched_cites_target_schema",
|
||||
"selectionMessagePackBase64": "g6VjaXRlc4KmdGFyZ2V0gqhzY2hlbWFJZLlzaGEyNTY6bm90LWEta25vd24tc2NoZW1hqXJlY29yZEtleaRhLWVxpHJvbGWmRGVzaWduqnByb2plY3Rpb26maGVhZGVyqmRlc2NlbmRpbmfC",
|
||||
"asOf": 1,
|
||||
"expectedRefusalField": "cites.target.schemaId",
|
||||
"expectedIds": [],
|
||||
"matched": 0,
|
||||
"hasNext": false,
|
||||
"expectedEdges": []
|
||||
},
|
||||
{
|
||||
"name": "refuses_cites_target_by_hash_shaped_alias",
|
||||
"selectionMessagePackBase64": "g6VjaXRlc4KmdGFyZ2V0gqhzY2hlbWFJZNlKc2hhMjU2OmZmMzVmM2Q5ZDZkZTNmMTA2NmI5MzY5ZTczZmU2Yzc2NDhlODgzNjhkMThlZmMyMjc1Yzk5NDczMGNkODRjZmYudjGpcmVjb3JkS2V5pGEtZXGkcm9sZaZEZXNpZ26qcHJvamVjdGlvbqZoZWFkZXKqZGVzY2VuZGluZ8I=",
|
||||
"asOf": 1,
|
||||
"expectedRefusalField": "cites.target.schemaId",
|
||||
"expectedIds": [],
|
||||
"matched": 0,
|
||||
"hasNext": false,
|
||||
"expectedEdges": []
|
||||
},
|
||||
{
|
||||
"name": "shared_key_narrow_ref_refuses_when_only_candidate_is_outside_target",
|
||||
"selectionMessagePackBase64": "hKRrZXlzkbRuYXJyb3ctY2l0ZXItcmVmdXNlZKVjaXRlc4KmdGFyZ2V0gqhzY2hlbWFJZNlHc2hhMjU2OmZmMzVmM2Q5ZDZkZTNmMTA2NmI5MzY5ZTczZmU2Yzc2NDhlODgzNjhkMThlZmMyMjc1Yzk5NDczMGNkODRjZmapcmVjb3JkS2V5q25hcnJvdy1vbmx5pHJvbGWqbmFycm93X3JlZqpwcm9qZWN0aW9upmhlYWRlcqpkZXNjZW5kaW5nwg==",
|
||||
"asOf": 1,
|
||||
"expectedEvaluationRefusal": "reference_outside_target",
|
||||
"expectedIds": [],
|
||||
"matched": 0,
|
||||
"hasNext": false,
|
||||
"expectedEdges": []
|
||||
}
|
||||
]
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load diff
|
|
@ -1,89 +0,0 @@
|
|||
# CultNet write receipt (specification)
|
||||
|
||||
Status: specification. No runtime implements it yet; the conformance follow-ups below do.
|
||||
Rules: Heimdall's ruling of 2026-11-08 (a write completes on its result frame; an ack or a return is not admission).
|
||||
Files here: `cultnet.write-admitted.schema.json`, `cultnet.error.v1.schema.json`, `write-receipt-vectors.json`. They move to `contracts/cultnet/` when the first runtime implements them.
|
||||
|
||||
## The problem
|
||||
|
||||
A put or delete today has two answers on the wire: nothing (admitted, or the server never read it) and `cultnet.error.v0` (refused, with no id saying which write). A transport ack proves delivery. Clients that completed on the ack, or on a window with no refusal, reported refused writes as done (CultLib #55 to #58 bound this with a result window; this spec replaces the window with an answer).
|
||||
|
||||
## Frames
|
||||
|
||||
**`cultnet.write_admitted.v0`**: `{ schemaVersion, messageId, operation: "put"|"delete", schemaId, recordKey }`, every key written, none nil. Sent once a put or delete is admitted. The id echoes the write's `messageId` byte for byte; `operation`, `schemaId`, `recordKey` echo the write.
|
||||
|
||||
**A `write_admitted` `messageId` is valid only if it contains at least one Unicode letter (`\p{L}`) or number (`\p{N}`) and no Default_Ignorable_Code_Point (DerivedCoreProperties).** The compare is raw: the id is echoed byte for byte, so a decoder never trims or normalizes it (`" a "` is valid; U+2800 is not, and neither is `a` followed by U+200B). Unlike the Required fields rule, this is not a White_Space test. The letters, numbers and Default_Ignorable code points are those of **Unicode 16.0** in every runtime, taken from tables embedded in each runtime and generated by `scripts/gen-unicode-messageid-tables.py` from `DerivedGeneralCategory.txt` (Lu Ll Lt Lm Lo Nd Nl No) and `DerivedCoreProperties.txt`; no runtime asks its platform's Unicode data, so a runtime's own Unicode version cannot change a result. Bumping the version is one coordinated change: regenerate the five tables and update the vectors that pin the version in the same commit. The rule is on the decoded string, which must be well-formed Unicode: a lone surrogate refuses. A runtime whose MessagePack reader rejects invalid UTF-8 refuses the frame earlier; byte-level strictness is a property of the reader and is not required of a decoder. A frame with more than one `messageId` key is malformed: a decoder that can see the duplicate (the C# and Rust decoders) refuses it; a decoder that collapses the map (Python, TypeScript, Kotlin) judges the value it ends up with, the last key, and refuses if that value is invalid, so no decoder echoes an invalid id (vectors `admittedMessageIdDuplicates` declare each policy and every runner asserts its own). A decoder refuses an invalid id the way it refuses an empty or ill-typed one; the rule is for `write_admitted` only and `error.v1` is unchanged.
|
||||
|
||||
**Where a received `messageId` decides, and what that relies on.** Beyond echoing it, a received `messageId` is used in exactly two places. On a server, the remembered-write key `(actor, messageId)` with the content hash, the per-session limit and the replay of rule 5 are taken from the id of the write frame the server itself parsed. On a client, the write tracker attributes a `write_admitted` or `error.v1` to a write by equality with the id of a write that client itself sent (a frame naming an id not in flight settles nothing), and attributes an id-less error by the count of unanswered writes, not by any id. Both rely on the receiver being the only parser of that frame: a decoder's `messageId` on a frame that carries more than one `messageId` key is not trusted for any authorization, dedupe, replay or ordering decision, and the map-collapsing runtimes (Python, TypeScript, Kotlin, and C#'s typed deserializer on write frames) cannot see the duplicate. If a frame is ever parsed by two runtimes in a chain (a relay, proxy or forwarder that re-reads it), or a consumer needs `messageId` for authorization, dedupe, replay or ordering beyond echo and equality with a self-sent id, all runtimes must first refuse a duplicate `messageId` key (a spec change plus byte-level duplicate detection in the runtimes that decode to a map) before that use lands. Today Rust refuses a repeated key on write frames and on `write_admitted` (serde's `duplicate field messageId`, and `refuse_duplicate_keys` for the raw-list frames such as `document_put_raw`), though its `readable_message_id` names the first key when it names an unreadable frame; C# does not on write frames (a duplicate-key write is deduped on its last id, while the id it names in a refusal for an unreadable frame is read from the first key), and the Python server (`cultmesh_py/server.py`) only echoes the id while the TypeScript and Kotlin code matches it by equality with a request it sent.
|
||||
|
||||
**`cultnet.error.v1`**: `cultnet.error.v0` plus a required `messageId` (string or nil). The code enum is v0's plus `limit_reached` (see Remembered-write limits); `cultnet.error.v1.schema.json` is the authority for the closed set. Sent in place of `error.v0` to a receipt-capable connection. `messageId` is the id of the request the error answers; nil only when the frame was unreadable or carried no id.
|
||||
|
||||
Why a new error version and not an extra key on v0: the v0 schema is closed (`additionalProperties: false`) and the TypeScript decoder (Ajv over the closed schemas) rejects unknown keys and unknown `schemaVersion`s, and `parseCultNetMessage` throws on an unknown version; Rust's decoder errors on an unknown version too. Unknown-key tolerance of the Rust, Python and Kotlin error decoders was not checked, so none is assumed, so a surprise key or frame breaks an old client's whole receive path. Old clients are therefore never sent either new frame. This reverses the "old clients ignore it" assumption, which is false for today's decoders.
|
||||
|
||||
## Capability: opting in
|
||||
|
||||
A connection is receipt-capable when its `cultnet.hello.v0` (sent before its first write; the schema channel is reliable and ordered) lists both `cultnet.write_admitted.v0` and `cultnet.error.v1` in `supportedMessageVersions`. A server MUST NOT send either new frame to any other connection, and answers it exactly as before (no receipt, `error.v0`). A receipt-capable server lists both in its own hello, so a client can tell a legacy server from a receipt server that has not answered yet. A client that sends no hello gets legacy behaviour. A server advertises the two frames in its hello only if it implements the receipt rules end to end.
|
||||
|
||||
**The capability changes framing only; it never authorizes.** A hello authenticates nothing and grants nothing: who may write, and which keys, is decided by the server from the transport-authenticated actor exactly as without the capability. Declaring the capability never makes a refused write admitted, never widens an actor's authority, and never changes what a write does; it selects only which frame the answer arrives in.
|
||||
|
||||
## Server rules
|
||||
|
||||
1. **One answer.** For every put or delete on a receipt-capable connection the server sends exactly one of `write_admitted` or `error.v1`, carrying that write's `messageId`. Never both, never two different answers.
|
||||
2. **After the commit point.** `write_admitted` is sent only after the write is committed by the same rule that makes it visible to readers. Receipt of the bytes, parse, or authorisation alone is not admission.
|
||||
3. **Id on every refusal.** Every refusal of a write, whatever its code (`write_not_authorized`, `message_invalid`, `unowned_schema`, `unsupported_schema_version`, shard authority errors, ...), is an `error.v1` whose `messageId` is the write's id. When the frame is readable enough to find the id, it is found; `message_invalid` for a missing or ill-typed field still carries the id. Nil only when no id can be read.
|
||||
4. **Batches.** There is no batch frame; a batch is N writes, each with its own `messageId`, each answered under rules 1 to 3. A failed batch names its member by that id. A server may not collapse a batch into one answer.
|
||||
5. **Identity and idempotent resend.** A `messageId` is unique per authenticated actor and session: the client mints it, never reuses it for different content in that session, and a server never accepts the id of one actor as the id of another. The server's dedupe key is `(actor, messageId)`, where *actor* is the transport-authenticated identity, never a name the hello or the frame claims. Alongside the key it keeps the **content hash** of the write and the answer it gave. The content hash is SHA-256 of the MessagePack array `[operation, schemaId, recordKey, payload]`, where `payload` is the raw document payload as a MessagePack `bin` for a put and nil for a delete (the vectors give worked hashes). **Scope: at least the session.** The key lives for the life of the session it was made in, and a server may bound how many writes it remembers per session (see Remembered-write limits; a server never forgets an id it promised to answer). A server MAY keep the key longer for the same actor, up to `DEDUPE_RETENTION_MS` (10 minutes), but a client MUST NOT rely on it: **a reconnect is a new session, and a resend on the new session is a new write.**
|
||||
- Same key, same content hash, answer was `write_admitted`: answer `write_admitted` again with the same body. The write is not applied twice.
|
||||
- Same key, same content hash, answer was a refusal: the same refusal again.
|
||||
- **Same key, different content hash: refuse `message_invalid` (details `field: "messageId"`) and never re-send the old receipt.** Old receipts are for the old content; showing one for new content would report an unapplied write as admitted. The original write's state is unchanged.
|
||||
- **Id size.** A write's `messageId` is at most 256 bytes of UTF-8. A longer id is refused `message_invalid` (`details.field: "messageId"`, the refusal's `messageId` the id as received, text fixed per Fixed texts) BEFORE anything is remembered: no table entry, no digest, no budget charge. Such a refusal is therefore not replayed from the table; a resend is refused afresh, identically.
|
||||
- **What is remembered.** Per entry a server keeps only fixed-size digests (SHA-256) of the `messageId` and of the content hash, plus the answer (`admitted`, or the refusal's code and details). Memory per entry is bounded independent of id length and payload size. Lookup compares digests.
|
||||
- **Remembered-write limits.** The per-session table holds at most 1024 entries. A server MAY also enforce a server-wide memory budget across all sessions (reference: 32 MiB of remembered entries). A NEW write (a key not already in the table) that would exceed either bound is refused `limit_reached` for that write alone, `messageId` the write's id, `details` all null; the write is not applied and the session continues. A resend of a remembered key is still answered from the table.
|
||||
- **Limit refusals are remembered.** A `limit_reached` refusal is remembered like any other: a resend of the same id and content hash replays `limit_reached`. No slot is freed mid-session, so an id refused at a bound never becomes admitted later in that session (a server at the cap keeps the refused digest pair in a bounded refusal set of at most 1024 per session, outside the entry budget; past it, a further new write is refused `limit_reached` without being remembered, and the session refuses every id it has not seen for the rest of its life, even if a server-wide budget has since freed, so a refusal that was not remembered is never followed by an admission of the same id). The client mints a new id on a new session.
|
||||
- **Required fields.** A put or delete whose document or `schemaId` is null or missing is refused `message_invalid` with `details.field` `"document"` or `"schemaId"` (the first missing in that order) and fixed text; the write is not applied. A put or delete that is present but names nothing is not "missing": the write is refused `message_invalid` exactly as a frame that does not read, with `details.field` `"message"`, the fixed unreadable text and the write's id (vector `error_v1_empty_schema_id_is_unreadable_and_names_the_write`), and is never applied; a server must not hand it to its store. Names nothing means, on a put or delete, a `schemaId` or `recordKey` that is blank; on a put's document, also a `storedAt` that is blank, a `payload` of zero bytes (a MessagePack value is at least one byte, so an empty payload is no document), a `sourceRuntimeId`, `sourceAgentId` or `sourceRole` that is present and blank, and a `tags` entry that is blank. **Blank** means empty or made only of Unicode White_Space code points (the PropList property) and nothing else, in every runtime, whatever its platform's own whitespace test says. The set is exactly U+0009 to U+000D, U+0020, U+0085, U+00A0, U+1680, U+2000 to U+200A, U+2028, U+2029, U+202F, U+205F and U+3000. U+200B, U+200C, U+200D, U+2060, U+FEFF, U+180E and U+001C to U+001F are not White_Space (some platforms' whitespace tests accept U+001C to U+001F or U+180E, for example Java's `Character.isWhitespace` and older .NET, so a runtime must check the list, not its platform test): a string of them names something. The vectors list both sets (`whiteSpaceCodePoints`, `notWhiteSpaceCodePoints`) and a runtime checks every code point in every covered field. A put's `storedAt` is the exception to "present and not blank is a name": it must be a stamp, so a non-blank `storedAt` that is no stamp (`tests/vectors/stored-at-stamp`) is refused `message_invalid` with `details.field` `"document"`, after the write authority has decided (an ungranted peer is told `write_not_authorized` first), and nothing is stored or minted; only a blank `storedAt` is refused as unreadable with field `"message"`, before the authority. The non-White_Space code point rows therefore name something in every covered field except `storedAt`. Absent or nil source ids and tags, and an empty `tags` list, are valid. The rule holds on every connection, receipt-capable or not (a legacy connection is refused with the `error.v0` of the same code, details and text); the vectors' `blankFields` section lists each case.
|
||||
- **Fixed texts.** The `error` string of these refusals is fixed, so vectors can compare it: `message_invalid: messageId exceeds 256 bytes`, `message_invalid: document is required`, `message_invalid: schemaId is required`, `message_invalid: the message could not be read` (a frame that does not decode, or a write that names nothing; the text is the same for both and never carries a decoder's own wording), `message_invalid: receipt sessions require the reliable channel`, `limit_reached: the session's remembered-write limit is full`.
|
||||
- **Reliable channel only.** A write is accepted on a receipt session only on a channel that is reliable and not sequenced (reliable ordered and reliable unordered both qualify; a sequenced channel drops superseded packets, so a write on it can vanish without trace). A write arriving on any other channel is refused `message_invalid` with `details.field: "channel"` (the transport profile's word for it) and fixed text. Receipts and refusals travel the reliable channel; a write that could be lost without trace cannot be answered once. The server refuses a sequenced write whenever it can read the write's id: from the delivered frame, and from a superseded packet that carries its whole frame. A write sent as several fragments whose frame is superseded is dropped whole and may go unanswered; the client's unconfirmed outcome covers it. A repeat of a packet the server already took, or a packet too far ahead to be taken, draws no further answer (rule 1).
|
||||
- Past the session (or a server's longer retention, if it keeps one) a resend is a new write.
|
||||
6. **Forwarded writes.** A server that forwards a non-primary write answers the original peer only with what the primary answered: the primary's receipt becomes `write_admitted` with the original id, its refusal becomes `error.v1` with the original id. If the forward gets no answer the server relays nothing: no receipt, no error, no synthesized refusal. The client's own rule below then reports the write as unconfirmed. A forwarder never turns an absent or ambiguous primary answer into an admission.
|
||||
7. **Looks alike.** An admitted and a refused write differ in `schemaVersion`; a receipt has no `error`, an `error.v1` has no admission. A transport ack is neither.
|
||||
|
||||
## Client rules: three outcomes
|
||||
|
||||
A write settles as exactly one of:
|
||||
|
||||
- **admitted**: a `write_admitted` whose `messageId` is the write's.
|
||||
- **refused**: an `error.v1` whose `messageId` is the write's, carrying its `code` and `details` as the typed error.
|
||||
- **unconfirmed**: nothing settled it. Reasons: `window_elapsed` (the result window ran from the *send* and passed with no answer; see Result window), `session_ended` (the peer closed the session, or it ended, before the write was answered; a write registered after the session ended settles this way when it is sent) and `local_send_failed` (the client's own send of this write failed). A local send failure is never reported as refused: no server answer exists, and the write may or may not have left the machine. Unconfirmed is not success and not refusal. APIs that return a value return the tri-state; APIs that throw throw a distinct refused error and a distinct unconfirmed error and return normally only for admitted. A caller that needs admission treats unconfirmed as not admitted. Resend with the same `messageId` and unchanged content, **on the same session**, is safe against a receipt-capable server (rule 5). After a reconnect the resend is a new write, and a legacy server may apply a resend twice: the caller resends only writes that are idempotent by record key (a put of the same content to the same key, a delete of a key), and reads the record back before resending any other.
|
||||
|
||||
**Result window.** Two named constants (also in the vectors): `RECEIPT_RESULT_WINDOW_MS = 5000`, the default against a receipt-capable server (its hello lists both frames); `LEGACY_RESULT_WINDOW_MS = 500`, used only as the fallback against a server whose hello does not list them (or that sent none). The window runs from the send. It ends when the write's age reaches it: an answer arriving at exactly that instant is late. A receipt-capable server that has not answered within its window is reported as unconfirmed like any other; clients log it as a server that missed its window.
|
||||
|
||||
**Late answers.** An answer for a write that already settled `unconfirmed` does not change what the caller was told, but the client records it on the write: a late `write_admitted` makes the write's recorded state `admitted_late`, a late refusal makes it `refused_late`. The write handle exposes that state, and a caller that got `unconfirmed` MUST consult it (and the record) before resending: it must not blind-resend a write that was admitted late. A resend on the same session with the same id and content is harmless on a receipt-capable server (rule 5); across a reconnect the caller follows the idempotence rule above.
|
||||
|
||||
**Legacy answers.** An `error.v0`, or an `error.v1` with nil `messageId`, names no write. It is attributed to a write only when exactly one write on the connection is unanswered; it then refuses that write. With two or more unanswered writes it settles none of them and each ends unconfirmed at its window. A frame naming a `messageId` that is not in flight settles nothing.
|
||||
|
||||
**Batches can commit partially.** A batch is N independent writes with no atomicity: some members may be admitted while others are refused or unanswered, and nothing is rolled back. The client reports each member's outcome and a batch result is only their set: admitted if every member is admitted, refused if any member is refused (naming the members), otherwise unconfirmed (naming the unanswered members). The caller owns retry: it resends exactly the members that are not admitted, with their original ids.
|
||||
|
||||
## Changes to what #55 to #58 shipped
|
||||
|
||||
Those clients complete *successfully* when the window ends with no refusal. Under this spec that case is `unconfirmed`. The TypeScript one-shot writer (#62) already reports it so: it resolves `admitted` only on a `write_admitted` carrying the put's id, and no other frame, a put echoed under the same id included, ever counts as admission. A caller whose server cannot answer a write yet (Odin, until it is receipt-capable) opts into the explicit send-only mode per call (`sendOnly: true`), which resolves the distinct outcome `sent` once the transport has acknowledged the put and never `admitted`. The Idunn presence publisher is send-only by its own function (`sendPresenceDocument`, not the `sendOnly` option): the same `sent` result, plus a rejection if a refusal naming the put (or naming nothing) arrives by the transport ack. Receipts and send-only are both opt-in, neither is the default. The C# and Rust clients of #55 to #58 keep the window-success until their conformance work lands, and callers of those must not read it as admission.
|
||||
|
||||
## Vectors
|
||||
|
||||
`write-receipt-vectors.json`: `constants` (the named windows and retention), `contentHash` (worked dedupe hashes), `dedupe` (server replay cases for rule 5), `wire` (MessagePack hex plus the decoded message for each new frame; the bytes are spec-authored with msgpack-python and every runtime's first conformance PR re-captures them with its own encoder and must match), `schemaInvalid` (frames that must be refused by a validator, each with why), and `blankFields` (server input cases for the Required fields rule: which document fields make a put unreadable, which are accepted), `admittedMessageId` (the `write_admitted` id rule above: code-point lists, each marked refuse or accept; a lone surrogate, and a frame that repeats the key, are carried as whole frames in `wireHex`, because a lone surrogate is not valid UTF-8 and only some runtimes' strings can hold it; `write-admitted-message-id-ranges.json` lists every range of the embedded tables, and each runtime probes the first and last point of each range and the points either side), `scenarios` (event replays with the outcome each write must settle as; the clock is abstract; each case names its window constant). A conformant client passes every scenario; a conformant server's answers for the same inputs satisfy server rules 1 to 7.
|
||||
|
||||
## Conformance status
|
||||
|
||||
| Server class | Advertises both frames | Server-wide memory budget (MAY, Remembered-write limits) |
|
||||
|---|---|---|
|
||||
| `CultNetDatabaseServer` | yes | not implemented: only the per-session limit of 1024 applies |
|
||||
| Shard write forwarder | yes | not implemented: only the per-session limit of 1024 applies |
|
||||
| Rust RUDP document server | yes | implemented (32 MiB default, `max_remembered_write_bytes`) |
|
||||
| C# RUDP schema server (`CultNetRudpSchemaServer`, `src/GameCult.Networking/CultNetRudpSchemaServer.cs`) | no | n/a |
|
||||
|
||||
Advertising is per server class, not per transport. A class advertises both frames in its hello only if it implements the receipt rules end to end; the C# RUDP schema server stays "no" until it answers writes with receipts.
|
||||
|
||||
Cross-runtime check: `packages/cultmesh-ts/test/interop/write-receipt-interop.test.ts` (`npm run test:interop` in `packages/cultmesh-ts`) runs the TypeScript client (`WriteTracker`, the decoder, the one-shot writer) against the real Rust RUDP document server and the real `CultNetDatabaseServer` over loopback, one scenario set against both. Known gap it records as a todo: the Rust RUDP document server refuses every delete (`write_not_authorized: the server does not take deletes`), where this spec has an admitted delete receipted like a put.
|
||||
|
||||
## Conformance follow-ups (not in this PR)
|
||||
|
||||
C# server and client, Rust, TypeScript, Python, Kotlin: emit and parse the two frames; hello capability; tri-state client outcome; replace the #55 to #58 window-success; re-capture the wire vectors in each runtime. Server write paths include the shard write forwarder (rule 6) and the Odin catalog.
|
||||
2
crates/cultcache-rs/.gitignore
vendored
Normal file
2
crates/cultcache-rs/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
/target
|
||||
Cargo.lock
|
||||
|
|
@ -1,13 +1,9 @@
|
|||
[package]
|
||||
name = "cultcache-rs"
|
||||
version = "0.3.1"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
publish = false
|
||||
|
||||
[workspace]
|
||||
members = ["cultcache-rs-derive"]
|
||||
|
||||
[lib]
|
||||
name = "cultcache_rs"
|
||||
path = "src/lib.rs"
|
||||
|
|
@ -18,18 +14,11 @@ chrono = { version = "0.4", features = ["serde"] }
|
|||
cultcache-rs-derive = { path = "cultcache-rs-derive" }
|
||||
fs2 = "0.4"
|
||||
rmp-serde = "1.3"
|
||||
redb = "4.1.0"
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_bytes = "0.11"
|
||||
serde_json = "1"
|
||||
serde_stacker = "0.1.14"
|
||||
sha2 = "0.10"
|
||||
stacker = "0.1.25"
|
||||
uuid = { version = "1", features = ["v4"] }
|
||||
|
||||
[dev-dependencies]
|
||||
pretty_assertions = "1.4"
|
||||
tempfile = "3"
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
windows-sys = { version = "0.59", features = ["Win32_Foundation", "Win32_Storage_FileSystem", "Win32_Security", "Win32_System_WindowsProgramming"] }
|
||||
332
crates/cultcache-rs/README.md
Normal file
332
crates/cultcache-rs/README.md
Normal file
|
|
@ -0,0 +1,332 @@
|
|||
# CultCache Rust
|
||||
|
||||
`cultcache-rs` is the Rust port of the useful part of GameCult's CultCache:
|
||||
a polymorphism-aware in-memory cache that remembers through pluggable backing
|
||||
stores.
|
||||
|
||||
Consumer code should think in domain types:
|
||||
|
||||
```rust
|
||||
let player = cache.get_required::<PlayerData>("player:meta")?;
|
||||
cache.put("player:meta", &player)?;
|
||||
```
|
||||
|
||||
The persistence layer should deal with envelopes, routing, MessagePack payload
|
||||
bytes, and schema identity. Application code should not paw at loose JSON files
|
||||
like a sad little bureaucrat with a clipboard.
|
||||
|
||||
## What It Is
|
||||
|
||||
CultCache is a domain cache with persistence adapters.
|
||||
|
||||
- `CultCache` is the query and mutation surface.
|
||||
- Domain structs implement `DatabaseEntry`.
|
||||
- Entries are stored behind a `type::key` identity, so multiple entry types
|
||||
can share a logical key without colliding.
|
||||
- Each payload is encoded directly from the known `DatabaseEntry` type into
|
||||
MessagePack bytes.
|
||||
- Backing stores are adapters, not the public data model.
|
||||
- Writes persist to the resolved backing store before the in-memory cache is
|
||||
updated.
|
||||
- Type-specific backing stores beat generic backing stores.
|
||||
- `SingleFileMessagePackBackingStore` is the first concrete store and guards
|
||||
file access with a sidecar lock file.
|
||||
|
||||
This is not an ORM, not a database, and not distributed consensus in a novelty
|
||||
hat. If multiple processes write the same backing file, use an external lock or
|
||||
a coordinator.
|
||||
|
||||
## Current API
|
||||
|
||||
```rust
|
||||
use cultcache_rs::{CultCache, DatabaseEntry, SingleFileMessagePackBackingStore};
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, DatabaseEntry)]
|
||||
#[cultcache(type = "settings")]
|
||||
struct Settings {
|
||||
#[cultcache(key = 0)]
|
||||
theme: String,
|
||||
|
||||
#[cultcache(key = 1, default)]
|
||||
retries: u32,
|
||||
}
|
||||
|
||||
let mut cache = CultCache::new();
|
||||
cache.register_entry_type::<Settings>()?;
|
||||
cache.add_generic_backing_store(SingleFileMessagePackBackingStore::new("cache.msgpack"));
|
||||
cache.pull_all_backing_stores()?;
|
||||
|
||||
cache.put("app", &Settings {
|
||||
theme: "ash".to_string(),
|
||||
retries: 3,
|
||||
})?;
|
||||
|
||||
let settings = cache.get_required::<Settings>("app")?;
|
||||
# Ok::<(), anyhow::Error>(())
|
||||
```
|
||||
|
||||
For a closed set of entries, generate a registry instead of repeating yourself:
|
||||
|
||||
```rust
|
||||
use cultcache_rs::cultcache_registry;
|
||||
|
||||
cultcache_registry!(GameCultEntries {
|
||||
Settings,
|
||||
PlayerData,
|
||||
});
|
||||
|
||||
let mut cache = CultCache::new();
|
||||
cache.register_registry(GameCultEntries)?;
|
||||
```
|
||||
|
||||
The important part is that callers retrieve domain values directly:
|
||||
|
||||
```rust
|
||||
let settings: Settings = cache.get_required("app")?;
|
||||
let all_settings: Vec<Settings> = cache.get_all()?;
|
||||
```
|
||||
|
||||
The cache is the ergonomic surface. The backing store is the memory prosthetic.
|
||||
|
||||
## How This Maps From Original CultCache
|
||||
|
||||
The original C# CultCache relies on runtime reflection:
|
||||
|
||||
- cacheable models inherit from `DatabaseEntry`
|
||||
- the cache scans child classes at startup
|
||||
- `Get<T>(id)` returns a `T`
|
||||
- optional `INamedEntry` enables name lookup
|
||||
- optional field/property indexes are registered by member name
|
||||
- backing stores pull/push/delete `DatabaseEntry` values
|
||||
|
||||
Rust does not have C#-style assembly scanning or runtime subclass discovery.
|
||||
The closest honest Rust translation is:
|
||||
|
||||
- domain structs implement a marker trait, `DatabaseEntry`
|
||||
- the derive macro generates a positional array formatter from explicit integer
|
||||
field slots
|
||||
- the envelope carries the polymorphic type discriminator
|
||||
- unknown persisted type ids fail closed instead of constructing arbitrary
|
||||
runtime types
|
||||
- a generated registry should eventually replace repetitive manual
|
||||
registration
|
||||
|
||||
Manual `register_entry_type::<T>()` is still accepted, but entry identity no
|
||||
longer needs a hand-written impl: `#[derive(DatabaseEntry)]` declares it beside
|
||||
the domain type. `cultcache_registry!` provides the current generated resolver
|
||||
surface for a closed entry set.
|
||||
|
||||
## Intended Rust Ergonomics
|
||||
|
||||
The target user-facing shape should be:
|
||||
|
||||
```rust
|
||||
#[derive(Clone, DatabaseEntry)]
|
||||
#[cultcache(type = "player")]
|
||||
pub struct PlayerData {
|
||||
#[cultcache(key = 0)]
|
||||
pub id: String,
|
||||
|
||||
#[cultcache(key = 1)]
|
||||
pub name: String,
|
||||
|
||||
#[cultcache(key = 2)]
|
||||
pub faction: String,
|
||||
}
|
||||
|
||||
let mut cache = CultCache::builder()
|
||||
.with_generated_entries(game_entries())
|
||||
.with_generic_store(SingleFileMessagePackBackingStore::new("cache.msgpack"))
|
||||
.build()?;
|
||||
|
||||
cache.pull_all_backing_stores()?;
|
||||
let player = cache.get_required::<PlayerData>("player:ari")?;
|
||||
```
|
||||
|
||||
The current `cultcache_registry!` macro is deliberately simple. The remaining
|
||||
ergonomic endpoint is automatic inventory or build-script generation so users
|
||||
do not have to maintain the registry list by hand.
|
||||
|
||||
The registry is the Rust equivalent of C# reflection and MessagePack resolver
|
||||
setup. It should know:
|
||||
|
||||
- entry type id
|
||||
- generated MessagePack/serde formatter path
|
||||
- Rust type name / schema name
|
||||
- optional store domain route
|
||||
- optional name key extractor
|
||||
- optional secondary indexes
|
||||
- optional global singleton marker
|
||||
|
||||
In other words: code generation should restore the original CultCache feeling
|
||||
without pretending Rust has runtime reflection hiding under the floorboards.
|
||||
|
||||
## Current Surface
|
||||
|
||||
- `CultCache::new`
|
||||
- `register_entry_type::<T>`
|
||||
- `add_generic_backing_store`
|
||||
- `add_backing_store`
|
||||
- `pull_all_backing_stores`
|
||||
- `get::<T>`
|
||||
- `get_required::<T>`
|
||||
- `get_envelope::<T>`
|
||||
- `get_required_envelope::<T>`
|
||||
- `get_all::<T>`
|
||||
- `put::<T>`
|
||||
- `put_envelope::<T>`
|
||||
- `update::<T>`
|
||||
- `delete::<T>`
|
||||
- `snapshot`
|
||||
- `SingleFileMessagePackBackingStore`
|
||||
|
||||
## Backing Store Routing
|
||||
|
||||
Generic store:
|
||||
|
||||
```rust
|
||||
cache.add_generic_backing_store(SingleFileMessagePackBackingStore::new("cache.msgpack"));
|
||||
```
|
||||
|
||||
Type-specific store:
|
||||
|
||||
```rust
|
||||
cache.add_backing_store(
|
||||
SingleFileMessagePackBackingStore::new("players.msgpack"),
|
||||
["player"],
|
||||
);
|
||||
```
|
||||
|
||||
When writing a `PlayerData`, the cache checks type-specific stores first. If none
|
||||
match, it writes to the first generic store. Later matching stores are mirrors.
|
||||
|
||||
This mirrors the C# behavior:
|
||||
|
||||
- specific domain stores own their domain
|
||||
- the first generic store is the primary generic write target
|
||||
- later generic stores mirror writes
|
||||
- this is not multi-master
|
||||
|
||||
## Persistence Semantics
|
||||
|
||||
`put` persists before mutating the in-memory cache. If persistence fails, the
|
||||
cache does not pretend the write succeeded.
|
||||
|
||||
The envelope is MessagePack, and the payload inside each envelope is also raw
|
||||
MessagePack bytes encoded from the registered concrete `DatabaseEntry` type.
|
||||
That avoids the old bootstrap path where payloads were normalized through
|
||||
`serde_json::Value`.
|
||||
|
||||
For bit-compatible neighbors, that also enables a real fast lane:
|
||||
|
||||
- `get_envelope::<T>()` exports the canonical persisted bytes for a typed entry
|
||||
- `put_envelope::<T>()` ingests the same envelope into another cache instance
|
||||
without re-encoding the payload first
|
||||
|
||||
It still decodes once for validation and typed reads. We are not pretending one
|
||||
`Vec<u8>` became metaphysically zero-copy because we believed in it harder. But
|
||||
the stupid decode/re-encode loop is gone.
|
||||
|
||||
The `DatabaseEntry` derive does not trust Rust source field order as the durable
|
||||
schema. Every persisted member must declare a stable integer slot:
|
||||
|
||||
```rust
|
||||
#[derive(Clone, DatabaseEntry)]
|
||||
#[cultcache(type = "player")]
|
||||
pub struct PlayerData {
|
||||
#[cultcache(key = 0)]
|
||||
pub id: String,
|
||||
|
||||
#[cultcache(key = 1)]
|
||||
pub name: String,
|
||||
|
||||
#[cultcache(key = 2, default)]
|
||||
pub level: u32,
|
||||
}
|
||||
```
|
||||
|
||||
The derive emits a tuple/array formatter. Gaps serialize as nil. Missing fields
|
||||
marked `default` use `Default::default()` when older payloads are read. Deleted
|
||||
field slots should stay reserved until an explicit store migration rewrites the
|
||||
data.
|
||||
|
||||
The single-file MessagePack store rewrites an atomic snapshot. That is a sane
|
||||
starting point for small typed state surfaces, settings, Epiphany agent memory,
|
||||
heartbeat state, and other compact control-plane data. Large corpora should use
|
||||
a sharded store or a real database instead of asking one file to become a
|
||||
warehouse and then acting wounded when physics invoices us.
|
||||
|
||||
The single-file store uses a sidecar lock file for shared reads and exclusive
|
||||
writes. That protects ordinary multi-process access to the same file. It is
|
||||
still not a multi-master replication protocol, and it is not a substitute for a
|
||||
coordinator when higher-level write ordering matters.
|
||||
|
||||
## Near-Term Ergonomic Improvements
|
||||
|
||||
1. **Derive macro**
|
||||
- `#[derive(DatabaseEntry)]`
|
||||
- `#[cultcache(type = "...")]`
|
||||
- `#[cultcache(key = N)]` on every persisted field
|
||||
- tuple/array formatter generation landed
|
||||
- optional `#[cultcache(name)]`, `#[cultcache(index)]`, and
|
||||
`#[cultcache(global)]` are still future work
|
||||
|
||||
2. **Generated registry**
|
||||
- a `CultCacheRegistry` trait
|
||||
- `cache.register_registry(GameCultEntries)`
|
||||
- basic macro registry landed
|
||||
- automatic inventory/build-script generation and store routes are future work
|
||||
|
||||
3. **Name and index lookups**
|
||||
- `cache.get_by_name::<T>("Potion")`
|
||||
- `cache.get_by_index::<T>("faction", "Lucent")`
|
||||
- generated extractors instead of reflection strings
|
||||
|
||||
4. **Schema/version metadata**
|
||||
- schema version in the envelope or payload metadata
|
||||
- explicit migration hooks
|
||||
- refusal on unknown persisted entry types unless a migration/resolver is
|
||||
installed
|
||||
|
||||
5. **Projection helpers**
|
||||
- JSON projection for review and git diffs
|
||||
- vector stripping / large-field elision for agent memory surfaces
|
||||
|
||||
## Why Not Skip Registration Immediately?
|
||||
|
||||
Rust can only deserialize polymorphic data into concrete types if something
|
||||
maps the persisted `type` discriminator to the Rust type. In C#, reflection and
|
||||
MessagePack resolvers can discover a closed `DatabaseEntry` inheritance tree at
|
||||
runtime and route it through known formatters. In Rust, that map has to come from
|
||||
somewhere:
|
||||
|
||||
- explicit registration
|
||||
- a generated registry
|
||||
- a macro inventory crate
|
||||
- a hand-written resolver
|
||||
|
||||
Explicit registration is the simplest honest implementation. Generated registry
|
||||
is the ergonomic destination. Hand-written resolver tables are the punishment
|
||||
we give ourselves if we get lazy.
|
||||
|
||||
## Security Model
|
||||
|
||||
CultCache should never parse arbitrary structured data into arbitrary runtime
|
||||
types. It only accepts persisted envelopes whose `type` discriminator resolves
|
||||
to a known `DatabaseEntry` type registered in the cache or generated registry.
|
||||
|
||||
That is the Rust version of the original trick:
|
||||
|
||||
- C# refuses to store objects outside the `DatabaseEntry` root type.
|
||||
- Runtime-visible `DatabaseEntry` subclasses get dedicated formatters.
|
||||
- Unknown or unregistered types are rejected.
|
||||
- MessagePack payload bytes deserialize through known concrete formatters, not
|
||||
an open-world type loader or generic structured-value bridge.
|
||||
|
||||
The derive/registry work should preserve that shape. Its job is to remove
|
||||
manual registration ceremony, not to loosen the closed-world boundary.
|
||||
|
||||
## License
|
||||
|
||||
Private GameCult infrastructure for now. Public packaging can wait until the
|
||||
API grows enough teeth to deserve strangers.
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "cultcache-rs-derive"
|
||||
version = "0.2.0"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
publish = false
|
||||
|
||||
243
crates/cultcache-rs/cultcache-rs-derive/src/lib.rs
Normal file
243
crates/cultcache-rs/cultcache-rs-derive/src/lib.rs
Normal file
|
|
@ -0,0 +1,243 @@
|
|||
use proc_macro::TokenStream;
|
||||
use quote::format_ident;
|
||||
use quote::quote;
|
||||
use syn::Data;
|
||||
use syn::DeriveInput;
|
||||
use syn::Fields;
|
||||
use syn::LitInt;
|
||||
use syn::LitStr;
|
||||
use syn::Type;
|
||||
use syn::parse_macro_input;
|
||||
|
||||
#[proc_macro_derive(DatabaseEntry, attributes(cultcache))]
|
||||
pub fn derive_database_entry(input: TokenStream) -> TokenStream {
|
||||
let input = parse_macro_input!(input as DeriveInput);
|
||||
let ident = input.ident.clone();
|
||||
let mut entry_type: Option<LitStr> = None;
|
||||
let mut schema_name: Option<LitStr> = None;
|
||||
|
||||
for attribute in input
|
||||
.attrs
|
||||
.iter()
|
||||
.filter(|attr| attr.path().is_ident("cultcache"))
|
||||
{
|
||||
let parse_result = attribute.parse_nested_meta(|meta| {
|
||||
if meta.path.is_ident("type") {
|
||||
entry_type = Some(meta.value()?.parse()?);
|
||||
Ok(())
|
||||
} else if meta.path.is_ident("schema") {
|
||||
schema_name = Some(meta.value()?.parse()?);
|
||||
Ok(())
|
||||
} else {
|
||||
Err(meta.error("unsupported cultcache attribute"))
|
||||
}
|
||||
});
|
||||
if let Err(error) = parse_result {
|
||||
return error.to_compile_error().into();
|
||||
}
|
||||
}
|
||||
|
||||
let Some(entry_type) = entry_type else {
|
||||
return syn::Error::new_spanned(
|
||||
ident,
|
||||
"DatabaseEntry derive requires #[cultcache(type = \"...\")]",
|
||||
)
|
||||
.to_compile_error()
|
||||
.into();
|
||||
};
|
||||
let schema_name = schema_name.unwrap_or_else(|| LitStr::new(&ident.to_string(), ident.span()));
|
||||
|
||||
let fields = match input.data {
|
||||
Data::Struct(data) => match data.fields {
|
||||
Fields::Named(fields) => fields.named,
|
||||
_ => {
|
||||
return syn::Error::new_spanned(
|
||||
ident,
|
||||
"DatabaseEntry derive requires a named struct",
|
||||
)
|
||||
.to_compile_error()
|
||||
.into();
|
||||
}
|
||||
},
|
||||
_ => {
|
||||
return syn::Error::new_spanned(ident, "DatabaseEntry derive requires a struct")
|
||||
.to_compile_error()
|
||||
.into();
|
||||
}
|
||||
};
|
||||
|
||||
let mut slots: Vec<CultCacheSlot> = Vec::new();
|
||||
for field in fields {
|
||||
let Some(field_ident) = field.ident else {
|
||||
return syn::Error::new_spanned(field.ty, "DatabaseEntry derive requires named fields")
|
||||
.to_compile_error()
|
||||
.into();
|
||||
};
|
||||
let mut key: Option<usize> = None;
|
||||
let mut default = false;
|
||||
for attribute in field
|
||||
.attrs
|
||||
.iter()
|
||||
.filter(|attr| attr.path().is_ident("cultcache"))
|
||||
{
|
||||
let parse_result = attribute.parse_nested_meta(|meta| {
|
||||
if meta.path.is_ident("key") {
|
||||
let value: LitInt = meta.value()?.parse()?;
|
||||
key = Some(value.base10_parse()?);
|
||||
Ok(())
|
||||
} else if meta.path.is_ident("default") {
|
||||
default = true;
|
||||
Ok(())
|
||||
} else {
|
||||
Err(meta.error("unsupported field cultcache attribute"))
|
||||
}
|
||||
});
|
||||
if let Err(error) = parse_result {
|
||||
return error.to_compile_error().into();
|
||||
}
|
||||
}
|
||||
let Some(key) = key else {
|
||||
return syn::Error::new_spanned(
|
||||
field_ident,
|
||||
"DatabaseEntry fields require #[cultcache(key = N)]",
|
||||
)
|
||||
.to_compile_error()
|
||||
.into();
|
||||
};
|
||||
if slots.iter().any(|slot| slot.key == key) {
|
||||
return syn::Error::new_spanned(
|
||||
field_ident,
|
||||
format!("duplicate DatabaseEntry slot {key}"),
|
||||
)
|
||||
.to_compile_error()
|
||||
.into();
|
||||
}
|
||||
slots.push(CultCacheSlot {
|
||||
key,
|
||||
ident: field_ident,
|
||||
ty: field.ty,
|
||||
default,
|
||||
});
|
||||
}
|
||||
slots.sort_by_key(|slot| slot.key);
|
||||
let max_slot = slots.iter().map(|slot| slot.key).max().unwrap_or(0);
|
||||
|
||||
let serialize_elements = (0..=max_slot).map(|slot| {
|
||||
if let Some(field) = slots.iter().find(|field| field.key == slot) {
|
||||
let field_ident = &field.ident;
|
||||
quote! {
|
||||
tuple.serialize_element(&self.#field_ident)?;
|
||||
}
|
||||
} else {
|
||||
quote! {
|
||||
tuple.serialize_element(&())?;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
let option_declarations = slots.iter().map(|field| {
|
||||
let variable = format_ident!("slot_{}", field.key);
|
||||
let ty = &field.ty;
|
||||
quote! {
|
||||
let mut #variable: ::std::option::Option<#ty> = ::std::option::Option::None;
|
||||
}
|
||||
});
|
||||
|
||||
let deserialize_match_arms = (0..=max_slot).map(|slot| {
|
||||
if let Some(field) = slots.iter().find(|field| field.key == slot) {
|
||||
let variable = format_ident!("slot_{}", field.key);
|
||||
let ty = &field.ty;
|
||||
quote! {
|
||||
#slot => {
|
||||
#variable = seq.next_element::<#ty>()?;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
quote! {
|
||||
#slot => {
|
||||
let _ = seq.next_element::<::serde::de::IgnoredAny>()?;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
let build_fields = slots.iter().map(|field| {
|
||||
let field_ident = &field.ident;
|
||||
let variable = format_ident!("slot_{}", field.key);
|
||||
if field.default {
|
||||
quote! {
|
||||
#field_ident: #variable.unwrap_or_default()
|
||||
}
|
||||
} else {
|
||||
let field_name = field_ident.to_string();
|
||||
quote! {
|
||||
#field_ident: #variable.ok_or_else(|| ::serde::de::Error::missing_field(#field_name))?
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
quote! {
|
||||
impl ::cultcache_rs::DatabaseEntry for #ident {
|
||||
const TYPE: &'static str = #entry_type;
|
||||
const SCHEMA_NAME: &'static str = #schema_name;
|
||||
}
|
||||
|
||||
impl ::serde::Serialize for #ident {
|
||||
fn serialize<S>(&self, serializer: S) -> ::std::result::Result<S::Ok, S::Error>
|
||||
where
|
||||
S: ::serde::Serializer,
|
||||
{
|
||||
use ::serde::ser::SerializeTuple;
|
||||
let mut tuple = serializer.serialize_tuple(#max_slot + 1)?;
|
||||
#(#serialize_elements)*
|
||||
tuple.end()
|
||||
}
|
||||
}
|
||||
|
||||
impl<'de> ::serde::Deserialize<'de> for #ident {
|
||||
fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
|
||||
where
|
||||
D: ::serde::Deserializer<'de>,
|
||||
{
|
||||
struct CultCacheVisitor;
|
||||
|
||||
impl<'de> ::serde::de::Visitor<'de> for CultCacheVisitor {
|
||||
type Value = #ident;
|
||||
|
||||
fn expecting(&self, formatter: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||
formatter.write_str(concat!("a CultCache array for ", stringify!(#ident)))
|
||||
}
|
||||
|
||||
fn visit_seq<A>(self, mut seq: A) -> ::std::result::Result<Self::Value, A::Error>
|
||||
where
|
||||
A: ::serde::de::SeqAccess<'de>,
|
||||
{
|
||||
#(#option_declarations)*
|
||||
let mut index = 0usize;
|
||||
while index <= #max_slot {
|
||||
match index {
|
||||
#(#deserialize_match_arms)*
|
||||
_ => unreachable!(),
|
||||
}
|
||||
index += 1;
|
||||
}
|
||||
while let ::std::option::Option::Some(_) = seq.next_element::<::serde::de::IgnoredAny>()? {}
|
||||
Ok(#ident {
|
||||
#(#build_fields),*
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
deserializer.deserialize_tuple(#max_slot + 1, CultCacheVisitor)
|
||||
}
|
||||
}
|
||||
}
|
||||
.into()
|
||||
}
|
||||
|
||||
struct CultCacheSlot {
|
||||
key: usize,
|
||||
ident: syn::Ident,
|
||||
ty: Type,
|
||||
default: bool,
|
||||
}
|
||||
121
crates/cultcache-rs/examples/cultcache_interop.rs
Normal file
121
crates/cultcache-rs/examples/cultcache_interop.rs
Normal file
|
|
@ -0,0 +1,121 @@
|
|||
use anyhow::Result;
|
||||
use anyhow::anyhow;
|
||||
use cultcache_rs::CultCache;
|
||||
use cultcache_rs::DatabaseEntry;
|
||||
use cultcache_rs::SingleFileMessagePackBackingStore;
|
||||
use serde_json::json;
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
const INTEROP_TYPE: &str = "cultcache.interop-note";
|
||||
const INTEROP_SCHEMA_VERSION: &str = "cultcache.interop_note.v1";
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, DatabaseEntry)]
|
||||
#[cultcache(type = "cultcache.interop-note", schema = "CultCacheInteropNote")]
|
||||
struct CultCacheInteropNote {
|
||||
#[cultcache(key = 0)]
|
||||
schema_version: String,
|
||||
#[cultcache(key = 1)]
|
||||
document_id: String,
|
||||
#[cultcache(key = 2)]
|
||||
author_runtime_id: String,
|
||||
#[cultcache(key = 3)]
|
||||
title: String,
|
||||
#[cultcache(key = 4)]
|
||||
body: String,
|
||||
#[cultcache(key = 5, default)]
|
||||
tags: Vec<String>,
|
||||
}
|
||||
|
||||
fn main() -> Result<()> {
|
||||
let mut args = std::env::args().skip(1);
|
||||
let mode = args
|
||||
.next()
|
||||
.ok_or_else(|| anyhow!("expected mode: write | read"))?;
|
||||
let options = parse_args(args.collect());
|
||||
let file = require_arg(&options, "file")?;
|
||||
|
||||
match mode.as_str() {
|
||||
"write" => write_note(file, require_arg(&options, "runtime-id")?)?,
|
||||
"read" => read_note(file)?,
|
||||
_ => return Err(anyhow!("unknown mode {mode}")),
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn write_note(file: &str, runtime_id: &str) -> Result<()> {
|
||||
let mut cache = build_cache(file)?;
|
||||
cache.pull_all_backing_stores()?;
|
||||
let note = CultCacheInteropNote {
|
||||
schema_version: INTEROP_SCHEMA_VERSION.to_string(),
|
||||
document_id: format!("note:{runtime_id}"),
|
||||
author_runtime_id: runtime_id.to_string(),
|
||||
title: format!("{runtime_id} wrote a CultCache note"),
|
||||
body: "The v1 store format is the contract.".to_string(),
|
||||
tags: vec![
|
||||
runtime_id.to_string(),
|
||||
"rust".to_string(),
|
||||
"interop".to_string(),
|
||||
],
|
||||
};
|
||||
cache.put(¬e.document_id, ¬e)?;
|
||||
print_note(¬e)
|
||||
}
|
||||
|
||||
fn read_note(file: &str) -> Result<()> {
|
||||
let mut cache = build_cache(file)?;
|
||||
cache.pull_all_backing_stores()?;
|
||||
let notes = cache.get_all::<CultCacheInteropNote>()?;
|
||||
let note = notes
|
||||
.first()
|
||||
.ok_or_else(|| anyhow!("no {INTEROP_TYPE} records found"))?;
|
||||
print_note(note)
|
||||
}
|
||||
|
||||
fn build_cache(file: &str) -> Result<CultCache> {
|
||||
let mut cache = CultCache::new();
|
||||
cache.register_entry_type::<CultCacheInteropNote>()?;
|
||||
cache.add_generic_backing_store(SingleFileMessagePackBackingStore::new(file));
|
||||
Ok(cache)
|
||||
}
|
||||
|
||||
fn print_note(note: &CultCacheInteropNote) -> Result<()> {
|
||||
println!(
|
||||
"{}",
|
||||
serde_json::to_string(&json!({
|
||||
"schemaVersion": note.schema_version,
|
||||
"documentId": note.document_id,
|
||||
"authorRuntimeId": note.author_runtime_id,
|
||||
"title": note.title,
|
||||
"body": note.body,
|
||||
"tags": note.tags,
|
||||
}))?
|
||||
);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn parse_args(args: Vec<String>) -> BTreeMap<String, String> {
|
||||
let mut parsed = BTreeMap::new();
|
||||
let mut index = 0;
|
||||
while index < args.len() {
|
||||
let token = &args[index];
|
||||
if !token.starts_with("--") {
|
||||
index += 1;
|
||||
continue;
|
||||
}
|
||||
let name = token.trim_start_matches("--").to_string();
|
||||
let value = args
|
||||
.get(index + 1)
|
||||
.cloned()
|
||||
.unwrap_or_else(|| panic!("missing value for --{name}"));
|
||||
parsed.insert(name, value);
|
||||
index += 2;
|
||||
}
|
||||
parsed
|
||||
}
|
||||
|
||||
fn require_arg<'a>(options: &'a BTreeMap<String, String>, name: &str) -> Result<&'a str> {
|
||||
options
|
||||
.get(name)
|
||||
.map(String::as_str)
|
||||
.ok_or_else(|| anyhow!("missing required argument --{name}"))
|
||||
}
|
||||
885
crates/cultcache-rs/src/lib.rs
Normal file
885
crates/cultcache-rs/src/lib.rs
Normal file
|
|
@ -0,0 +1,885 @@
|
|||
use anyhow::Context;
|
||||
use anyhow::Result;
|
||||
use anyhow::anyhow;
|
||||
use serde::Serialize;
|
||||
use serde::de::DeserializeOwned;
|
||||
use std::collections::BTreeMap;
|
||||
use std::collections::BTreeSet;
|
||||
use std::fs;
|
||||
use std::fs::File;
|
||||
use std::fs::OpenOptions;
|
||||
use std::path::Path;
|
||||
use std::path::PathBuf;
|
||||
|
||||
extern crate self as cultcache_rs;
|
||||
|
||||
pub use cultcache_rs_derive::DatabaseEntry;
|
||||
|
||||
pub trait DatabaseEntry: Serialize + DeserializeOwned + Clone + Send + 'static {
|
||||
const TYPE: &'static str;
|
||||
const SCHEMA_NAME: &'static str = "DatabaseEntry";
|
||||
}
|
||||
|
||||
pub trait CultCacheRegistry {
|
||||
fn register_entries(&self, cache: &mut CultCache) -> Result<()>;
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! cultcache_registry {
|
||||
($name:ident { $($entry:ty),* $(,)? }) => {
|
||||
#[derive(Clone, Copy, Debug, Default)]
|
||||
pub struct $name;
|
||||
|
||||
impl $crate::CultCacheRegistry for $name {
|
||||
fn register_entries(&self, cache: &mut $crate::CultCache) -> ::anyhow::Result<()> {
|
||||
$(
|
||||
cache.register_entry_type::<$entry>()?;
|
||||
)*
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, serde::Serialize, serde::Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct CultCacheEnvelope {
|
||||
pub key: String,
|
||||
#[serde(rename = "type")]
|
||||
pub r#type: String,
|
||||
#[serde(with = "serde_bytes")]
|
||||
pub payload: Vec<u8>,
|
||||
pub stored_at: String,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub schema_id: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
|
||||
struct PersistedStoreSnapshot(
|
||||
String,
|
||||
Vec<PersistedSchemaCatalogEntry>,
|
||||
Vec<PersistedRecord>,
|
||||
);
|
||||
|
||||
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
|
||||
struct PersistedSchemaCatalogEntry(
|
||||
String,
|
||||
String,
|
||||
String,
|
||||
String,
|
||||
String,
|
||||
Vec<String>,
|
||||
Vec<PersistedSchemaCatalogMember>,
|
||||
);
|
||||
|
||||
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
|
||||
struct PersistedSchemaCatalogMember(
|
||||
u32,
|
||||
String,
|
||||
String,
|
||||
bool,
|
||||
bool,
|
||||
Option<String>,
|
||||
bool,
|
||||
Option<String>,
|
||||
);
|
||||
|
||||
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
|
||||
struct PersistedRecord(
|
||||
String,
|
||||
String,
|
||||
String,
|
||||
#[serde(with = "serde_bytes")] Vec<u8>,
|
||||
);
|
||||
|
||||
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
|
||||
pub struct PushAllOptions {
|
||||
pub soft: bool,
|
||||
}
|
||||
|
||||
pub trait CacheBackingStore: Send {
|
||||
fn pull_all(&self) -> Result<Vec<CultCacheEnvelope>>;
|
||||
fn push(&mut self, entry: &CultCacheEnvelope) -> Result<()>;
|
||||
fn delete(&mut self, entry: &CultCacheEnvelope) -> Result<()>;
|
||||
|
||||
fn push_all(&mut self, entries: &[CultCacheEnvelope], _options: PushAllOptions) -> Result<()> {
|
||||
let existing = self.pull_all()?;
|
||||
for entry in existing {
|
||||
self.delete(&entry)?;
|
||||
}
|
||||
for entry in entries {
|
||||
self.push(entry)?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub struct SingleFileMessagePackBackingStore {
|
||||
path: PathBuf,
|
||||
}
|
||||
|
||||
impl SingleFileMessagePackBackingStore {
|
||||
pub fn new(path: impl Into<PathBuf>) -> Self {
|
||||
Self { path: path.into() }
|
||||
}
|
||||
|
||||
pub fn path(&self) -> &Path {
|
||||
&self.path
|
||||
}
|
||||
|
||||
fn read_all_unlocked(&self) -> Result<Vec<CultCacheEnvelope>> {
|
||||
if !self.path.exists() {
|
||||
return Ok(Vec::new());
|
||||
}
|
||||
let bytes = fs::read(&self.path)
|
||||
.with_context(|| format!("failed to read {}", self.path.display()))?;
|
||||
if bytes.is_empty() {
|
||||
return Ok(Vec::new());
|
||||
}
|
||||
decode_store_snapshot(&bytes).or_else(|_| {
|
||||
rmp_serde::from_slice(&bytes)
|
||||
.with_context(|| format!("failed to decode MessagePack {}", self.path.display()))
|
||||
})
|
||||
}
|
||||
|
||||
fn write_all_unlocked(&self, entries: &[CultCacheEnvelope]) -> Result<()> {
|
||||
if let Some(parent) = self.path.parent() {
|
||||
fs::create_dir_all(parent)
|
||||
.with_context(|| format!("failed to create {}", parent.display()))?;
|
||||
}
|
||||
let bytes = rmp_serde::to_vec(&encode_store_snapshot(entries))
|
||||
.context("failed to encode MessagePack")?;
|
||||
let tmp_path = temporary_path_for(&self.path);
|
||||
fs::write(&tmp_path, bytes)
|
||||
.with_context(|| format!("failed to write {}", tmp_path.display()))?;
|
||||
if self.path.exists() {
|
||||
fs::remove_file(&self.path)
|
||||
.with_context(|| format!("failed to replace {}", self.path.display()))?;
|
||||
}
|
||||
fs::rename(&tmp_path, &self.path).with_context(|| {
|
||||
format!(
|
||||
"failed to move {} to {}",
|
||||
tmp_path.display(),
|
||||
self.path.display()
|
||||
)
|
||||
})?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn with_shared_lock<T>(&self, action: impl FnOnce() -> Result<T>) -> Result<T> {
|
||||
let lock = self.open_lock_file()?;
|
||||
fs2::FileExt::lock_shared(&lock)
|
||||
.with_context(|| format!("failed to lock {}", self.lock_path().display()))?;
|
||||
let result = action();
|
||||
fs2::FileExt::unlock(&lock)
|
||||
.with_context(|| format!("failed to unlock {}", self.lock_path().display()))?;
|
||||
result
|
||||
}
|
||||
|
||||
fn with_exclusive_lock<T>(&self, action: impl FnOnce() -> Result<T>) -> Result<T> {
|
||||
let lock = self.open_lock_file()?;
|
||||
fs2::FileExt::lock_exclusive(&lock)
|
||||
.with_context(|| format!("failed to lock {}", self.lock_path().display()))?;
|
||||
let result = action();
|
||||
fs2::FileExt::unlock(&lock)
|
||||
.with_context(|| format!("failed to unlock {}", self.lock_path().display()))?;
|
||||
result
|
||||
}
|
||||
|
||||
fn open_lock_file(&self) -> Result<File> {
|
||||
let lock_path = self.lock_path();
|
||||
if let Some(parent) = lock_path.parent() {
|
||||
fs::create_dir_all(parent)
|
||||
.with_context(|| format!("failed to create {}", parent.display()))?;
|
||||
}
|
||||
OpenOptions::new()
|
||||
.create(true)
|
||||
.read(true)
|
||||
.truncate(false)
|
||||
.write(true)
|
||||
.open(&lock_path)
|
||||
.with_context(|| format!("failed to open {}", lock_path.display()))
|
||||
}
|
||||
|
||||
fn lock_path(&self) -> PathBuf {
|
||||
let mut lock_name = self
|
||||
.path
|
||||
.file_name()
|
||||
.map(|value| value.to_os_string())
|
||||
.unwrap_or_else(|| "cultcache.msgpack".into());
|
||||
lock_name.push(".lock");
|
||||
self.path.with_file_name(lock_name)
|
||||
}
|
||||
}
|
||||
|
||||
impl CacheBackingStore for SingleFileMessagePackBackingStore {
|
||||
fn pull_all(&self) -> Result<Vec<CultCacheEnvelope>> {
|
||||
self.with_shared_lock(|| self.read_all_unlocked())
|
||||
}
|
||||
|
||||
fn push(&mut self, entry: &CultCacheEnvelope) -> Result<()> {
|
||||
self.with_exclusive_lock(|| {
|
||||
let mut entries = self.read_all_unlocked()?;
|
||||
entries.retain(|candidate| entry_id(candidate) != entry_id(entry));
|
||||
entries.push(entry.clone());
|
||||
entries.sort_by_key(entry_id);
|
||||
self.write_all_unlocked(&entries)
|
||||
})
|
||||
}
|
||||
|
||||
fn delete(&mut self, entry: &CultCacheEnvelope) -> Result<()> {
|
||||
self.with_exclusive_lock(|| {
|
||||
let mut entries = self.read_all_unlocked()?;
|
||||
entries.retain(|candidate| entry_id(candidate) != entry_id(entry));
|
||||
self.write_all_unlocked(&entries)
|
||||
})
|
||||
}
|
||||
|
||||
fn push_all(&mut self, entries: &[CultCacheEnvelope], _options: PushAllOptions) -> Result<()> {
|
||||
self.with_exclusive_lock(|| {
|
||||
let mut entries = entries.to_vec();
|
||||
entries.sort_by_key(entry_id);
|
||||
self.write_all_unlocked(&entries)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
struct CultCacheStoreRegistration {
|
||||
store: Box<dyn CacheBackingStore>,
|
||||
types: BTreeSet<String>,
|
||||
}
|
||||
|
||||
pub struct CultCache {
|
||||
definitions: BTreeMap<String, &'static str>,
|
||||
entries: BTreeMap<String, CultCacheEnvelope>,
|
||||
stores: Vec<CultCacheStoreRegistration>,
|
||||
}
|
||||
|
||||
impl CultCache {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
definitions: BTreeMap::new(),
|
||||
entries: BTreeMap::new(),
|
||||
stores: Vec::new(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn register_entry_type<T: DatabaseEntry>(&mut self) -> Result<()> {
|
||||
if T::TYPE.trim().is_empty() {
|
||||
return Err(anyhow!(
|
||||
"CultCache entry types must declare a non-empty type"
|
||||
));
|
||||
}
|
||||
if let Some(existing_schema) = self.definitions.get(T::TYPE)
|
||||
&& *existing_schema != T::SCHEMA_NAME
|
||||
{
|
||||
return Err(anyhow!(
|
||||
"CultCache already has a different definition registered for type {:?}",
|
||||
T::TYPE
|
||||
));
|
||||
}
|
||||
self.definitions.insert(T::TYPE.to_string(), T::SCHEMA_NAME);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn register_document_type<T: DatabaseEntry>(&mut self) -> Result<()> {
|
||||
self.register_entry_type::<T>()
|
||||
}
|
||||
|
||||
pub fn register_registry<R: CultCacheRegistry>(&mut self, registry: R) -> Result<&mut Self> {
|
||||
registry.register_entries(self)?;
|
||||
Ok(self)
|
||||
}
|
||||
|
||||
pub fn add_backing_store(
|
||||
&mut self,
|
||||
store: impl CacheBackingStore + 'static,
|
||||
types: impl IntoIterator<Item = impl Into<String>>,
|
||||
) {
|
||||
self.stores.push(CultCacheStoreRegistration {
|
||||
store: Box::new(store),
|
||||
types: types.into_iter().map(Into::into).collect(),
|
||||
});
|
||||
}
|
||||
|
||||
pub fn add_generic_backing_store(&mut self, store: impl CacheBackingStore + 'static) {
|
||||
self.add_backing_store(store, Vec::<String>::new());
|
||||
}
|
||||
|
||||
pub fn pull_all_backing_stores(&mut self) -> Result<()> {
|
||||
self.entries.clear();
|
||||
let known_types: BTreeSet<String> = self.definitions.keys().cloned().collect();
|
||||
for registration in &mut self.stores {
|
||||
for entry in registration.store.pull_all()? {
|
||||
if !known_types.contains(&entry.r#type) {
|
||||
return Err(anyhow!(
|
||||
"No schema is registered for persisted entry type {:?}",
|
||||
entry.r#type
|
||||
));
|
||||
}
|
||||
self.entries.insert(entry_id(&entry), entry);
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn get<T: DatabaseEntry>(&self, key: &str) -> Result<Option<T>> {
|
||||
self.require_entry_type::<T>()?;
|
||||
let Some(entry) = self.entries.get(&entry_id_parts(T::TYPE, key)) else {
|
||||
return Ok(None);
|
||||
};
|
||||
let payload = rmp_serde::from_slice(&entry.payload).with_context(|| {
|
||||
format!(
|
||||
"failed to decode CultCache entry {:?} at key {:?} as {}",
|
||||
T::TYPE,
|
||||
key,
|
||||
T::SCHEMA_NAME
|
||||
)
|
||||
})?;
|
||||
Ok(Some(payload))
|
||||
}
|
||||
|
||||
pub fn get_required<T: DatabaseEntry>(&self, key: &str) -> Result<T> {
|
||||
self.get::<T>(key)?
|
||||
.ok_or_else(|| anyhow!("CultCache has no {:?} entry at key {:?}", T::TYPE, key))
|
||||
}
|
||||
|
||||
pub fn get_envelope<T: DatabaseEntry>(&self, key: &str) -> Result<Option<CultCacheEnvelope>> {
|
||||
self.require_entry_type::<T>()?;
|
||||
Ok(self.entries.get(&entry_id_parts(T::TYPE, key)).cloned())
|
||||
}
|
||||
|
||||
pub fn get_required_envelope<T: DatabaseEntry>(&self, key: &str) -> Result<CultCacheEnvelope> {
|
||||
self.get_envelope::<T>(key)?
|
||||
.ok_or_else(|| anyhow!("CultCache has no {:?} envelope at key {:?}", T::TYPE, key))
|
||||
}
|
||||
|
||||
pub fn get_all<T: DatabaseEntry>(&self) -> Result<Vec<T>> {
|
||||
self.require_entry_type::<T>()?;
|
||||
let mut values = Vec::new();
|
||||
for entry in self.entries.values() {
|
||||
if entry.r#type != T::TYPE {
|
||||
continue;
|
||||
}
|
||||
values.push(rmp_serde::from_slice(&entry.payload).with_context(|| {
|
||||
format!(
|
||||
"failed to decode CultCache entry {:?} at key {:?} as {}",
|
||||
T::TYPE,
|
||||
entry.key,
|
||||
T::SCHEMA_NAME
|
||||
)
|
||||
})?);
|
||||
}
|
||||
Ok(values)
|
||||
}
|
||||
|
||||
pub fn put<T: DatabaseEntry>(&mut self, key: impl Into<String>, value: &T) -> Result<T> {
|
||||
self.require_entry_type::<T>()?;
|
||||
let key = key.into();
|
||||
let payload = rmp_serde::to_vec(value).with_context(|| {
|
||||
format!(
|
||||
"failed to encode CultCache entry {:?} at key {:?} as {}",
|
||||
T::TYPE,
|
||||
key,
|
||||
T::SCHEMA_NAME
|
||||
)
|
||||
})?;
|
||||
let parsed: T = rmp_serde::from_slice(&payload).with_context(|| {
|
||||
format!(
|
||||
"failed to validate CultCache entry {:?} at key {:?} as {}",
|
||||
T::TYPE,
|
||||
key,
|
||||
T::SCHEMA_NAME
|
||||
)
|
||||
})?;
|
||||
let entry = CultCacheEnvelope {
|
||||
key: key.clone(),
|
||||
r#type: T::TYPE.to_string(),
|
||||
payload,
|
||||
stored_at: now_utc_second(),
|
||||
schema_id: Some(T::TYPE.to_string()),
|
||||
};
|
||||
let route = self.resolve_route_indices(T::TYPE);
|
||||
let Some(primary_index) = route.first().copied() else {
|
||||
return Err(anyhow!(
|
||||
"No backing store is registered for entry type {:?}",
|
||||
T::TYPE
|
||||
));
|
||||
};
|
||||
self.stores[primary_index].store.push(&entry)?;
|
||||
for mirror_index in route.iter().skip(1).copied() {
|
||||
self.stores[mirror_index].store.push(&entry)?;
|
||||
}
|
||||
self.entries.insert(entry_id(&entry), entry);
|
||||
Ok(parsed)
|
||||
}
|
||||
|
||||
pub fn put_envelope<T: DatabaseEntry>(&mut self, entry: CultCacheEnvelope) -> Result<T> {
|
||||
self.require_entry_type::<T>()?;
|
||||
if entry.r#type != T::TYPE {
|
||||
return Err(anyhow!(
|
||||
"CultCache envelope type {:?} does not match registered Rust type {:?}",
|
||||
entry.r#type,
|
||||
T::TYPE
|
||||
));
|
||||
}
|
||||
if entry.key.trim().is_empty() {
|
||||
return Err(anyhow!(
|
||||
"CultCache envelope keys for type {:?} must be non-empty",
|
||||
T::TYPE
|
||||
));
|
||||
}
|
||||
if entry.stored_at.trim().is_empty() {
|
||||
return Err(anyhow!(
|
||||
"CultCache envelope stored_at for type {:?} must be non-empty",
|
||||
T::TYPE
|
||||
));
|
||||
}
|
||||
|
||||
let parsed: T = rmp_serde::from_slice(&entry.payload).with_context(|| {
|
||||
format!(
|
||||
"failed to validate CultCache envelope {:?} at key {:?} as {}",
|
||||
T::TYPE,
|
||||
entry.key,
|
||||
T::SCHEMA_NAME
|
||||
)
|
||||
})?;
|
||||
let route = self.resolve_route_indices(T::TYPE);
|
||||
let Some(primary_index) = route.first().copied() else {
|
||||
return Err(anyhow!(
|
||||
"No backing store is registered for entry type {:?}",
|
||||
T::TYPE
|
||||
));
|
||||
};
|
||||
self.stores[primary_index].store.push(&entry)?;
|
||||
for mirror_index in route.iter().skip(1).copied() {
|
||||
self.stores[mirror_index].store.push(&entry)?;
|
||||
}
|
||||
self.entries.insert(entry_id(&entry), entry);
|
||||
Ok(parsed)
|
||||
}
|
||||
|
||||
pub fn update<T, F>(&mut self, key: &str, updater: F) -> Result<T>
|
||||
where
|
||||
T: DatabaseEntry,
|
||||
F: FnOnce(Option<T>) -> T,
|
||||
{
|
||||
let current = self.get::<T>(key)?;
|
||||
self.put::<T>(key.to_string(), &updater(current))
|
||||
}
|
||||
|
||||
pub fn delete<T: DatabaseEntry>(&mut self, key: &str) -> Result<bool> {
|
||||
self.require_entry_type::<T>()?;
|
||||
let id = entry_id_parts(T::TYPE, key);
|
||||
let Some(entry) = self.entries.get(&id).cloned() else {
|
||||
return Ok(false);
|
||||
};
|
||||
let route = self.resolve_route_indices(T::TYPE);
|
||||
let Some(primary_index) = route.first().copied() else {
|
||||
return Err(anyhow!(
|
||||
"No backing store is registered for entry type {:?}",
|
||||
T::TYPE
|
||||
));
|
||||
};
|
||||
self.stores[primary_index].store.delete(&entry)?;
|
||||
for mirror_index in route.iter().skip(1).copied() {
|
||||
self.stores[mirror_index].store.delete(&entry)?;
|
||||
}
|
||||
self.entries.remove(&id);
|
||||
Ok(true)
|
||||
}
|
||||
|
||||
pub fn snapshot(&self) -> Vec<CultCacheEnvelope> {
|
||||
self.entries.values().cloned().collect()
|
||||
}
|
||||
|
||||
fn require_entry_type<T: DatabaseEntry>(&self) -> Result<()> {
|
||||
match self.definitions.get(T::TYPE) {
|
||||
Some(schema_name) if *schema_name == T::SCHEMA_NAME => Ok(()),
|
||||
_ => Err(anyhow!(
|
||||
"CultCache entry type {:?} is not registered on this cache instance",
|
||||
T::TYPE
|
||||
)),
|
||||
}
|
||||
}
|
||||
|
||||
fn resolve_route_indices(&self, type_id: &str) -> Vec<usize> {
|
||||
let type_specific: Vec<usize> = self
|
||||
.stores
|
||||
.iter()
|
||||
.enumerate()
|
||||
.filter_map(|(index, registration)| {
|
||||
registration.types.contains(type_id).then_some(index)
|
||||
})
|
||||
.collect();
|
||||
if !type_specific.is_empty() {
|
||||
return type_specific;
|
||||
}
|
||||
self.stores
|
||||
.iter()
|
||||
.enumerate()
|
||||
.filter_map(|(index, registration)| registration.types.is_empty().then_some(index))
|
||||
.collect()
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for CultCache {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
fn entry_id(entry: &CultCacheEnvelope) -> String {
|
||||
entry_id_parts(&entry.r#type, &entry.key)
|
||||
}
|
||||
|
||||
fn entry_id_parts(r#type: &str, key: &str) -> String {
|
||||
format!("{type}::{key}", type = r#type)
|
||||
}
|
||||
|
||||
fn now_utc_second() -> String {
|
||||
chrono::Utc::now().to_rfc3339_opts(chrono::SecondsFormat::Secs, true)
|
||||
}
|
||||
|
||||
fn encode_store_snapshot(entries: &[CultCacheEnvelope]) -> PersistedStoreSnapshot {
|
||||
let mut schema_names = BTreeSet::<String>::new();
|
||||
for entry in entries {
|
||||
schema_names.insert(
|
||||
entry
|
||||
.schema_id
|
||||
.clone()
|
||||
.unwrap_or_else(|| entry.r#type.clone()),
|
||||
);
|
||||
}
|
||||
|
||||
let catalog = schema_names
|
||||
.into_iter()
|
||||
.map(|schema_id| {
|
||||
PersistedSchemaCatalogEntry(
|
||||
schema_id.clone(),
|
||||
schema_id.clone(),
|
||||
format!("{schema_id}.v1"),
|
||||
schema_id.clone(),
|
||||
format!(
|
||||
"{{\"schemaName\":\"{}\",\"schemaVersion\":\"{}.v1\",\"members\":[]}}",
|
||||
escape_json_string(&schema_id),
|
||||
escape_json_string(&schema_id)
|
||||
),
|
||||
vec![schema_id],
|
||||
Vec::new(),
|
||||
)
|
||||
})
|
||||
.collect();
|
||||
let records = entries
|
||||
.iter()
|
||||
.map(|entry| {
|
||||
PersistedRecord(
|
||||
entry.key.clone(),
|
||||
entry
|
||||
.schema_id
|
||||
.clone()
|
||||
.unwrap_or_else(|| entry.r#type.clone()),
|
||||
entry.stored_at.clone(),
|
||||
entry.payload.clone(),
|
||||
)
|
||||
})
|
||||
.collect();
|
||||
|
||||
PersistedStoreSnapshot("cultcache.store.v1".to_string(), catalog, records)
|
||||
}
|
||||
|
||||
fn decode_store_snapshot(bytes: &[u8]) -> Result<Vec<CultCacheEnvelope>> {
|
||||
let snapshot: PersistedStoreSnapshot =
|
||||
rmp_serde::from_slice(bytes).context("failed to decode CultCache v1 snapshot")?;
|
||||
if snapshot.0 != "cultcache.store.v1" {
|
||||
return Err(anyhow!("unsupported CultCache snapshot {}", snapshot.0));
|
||||
}
|
||||
|
||||
let catalog = snapshot
|
||||
.1
|
||||
.into_iter()
|
||||
.map(|entry| (entry.0, entry.1))
|
||||
.collect::<BTreeMap<_, _>>();
|
||||
snapshot
|
||||
.2
|
||||
.into_iter()
|
||||
.map(|record| {
|
||||
let r#type = catalog.get(&record.1).cloned().ok_or_else(|| {
|
||||
anyhow!(
|
||||
"CultCache record {:?} references missing schema {:?}",
|
||||
record.0,
|
||||
record.1
|
||||
)
|
||||
})?;
|
||||
Ok(CultCacheEnvelope {
|
||||
key: record.0,
|
||||
r#type,
|
||||
stored_at: record.2,
|
||||
payload: record.3,
|
||||
schema_id: Some(record.1),
|
||||
})
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
fn escape_json_string(value: &str) -> String {
|
||||
value.replace('\\', "\\\\").replace('"', "\\\"")
|
||||
}
|
||||
|
||||
fn temporary_path_for(path: &Path) -> PathBuf {
|
||||
let mut file_name = path
|
||||
.file_name()
|
||||
.map(|value| value.to_os_string())
|
||||
.unwrap_or_else(|| "cultcache.msgpack".into());
|
||||
file_name.push(format!(".{}.tmp", uuid::Uuid::new_v4()));
|
||||
path.with_file_name(file_name)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, DatabaseEntry)]
|
||||
#[cultcache(type = "settings")]
|
||||
struct Settings {
|
||||
#[cultcache(key = 0)]
|
||||
theme: String,
|
||||
#[cultcache(key = 1, default)]
|
||||
retries: u32,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, DatabaseEntry)]
|
||||
#[cultcache(type = "note")]
|
||||
struct Note {
|
||||
#[cultcache(key = 0)]
|
||||
title: String,
|
||||
#[cultcache(key = 1)]
|
||||
body: String,
|
||||
}
|
||||
|
||||
cultcache_registry!(TestEntries { Settings, Note });
|
||||
|
||||
#[test]
|
||||
fn familiar_cultcache_flow_persists_and_reloads_typed_documents() -> Result<()> {
|
||||
let temp = tempfile::tempdir()?;
|
||||
let store_path = temp.path().join("cache.msgpack");
|
||||
let settings = Settings {
|
||||
theme: "ash".to_string(),
|
||||
retries: 3,
|
||||
};
|
||||
|
||||
let mut cache = CultCache::new();
|
||||
cache.register_entry_type::<Settings>()?;
|
||||
cache.add_generic_backing_store(SingleFileMessagePackBackingStore::new(&store_path));
|
||||
cache.pull_all_backing_stores()?;
|
||||
cache.put("app", &settings)?;
|
||||
assert_eq!(cache.get_required::<Settings>("app")?, settings);
|
||||
|
||||
let mut reloaded = CultCache::new();
|
||||
reloaded.register_entry_type::<Settings>()?;
|
||||
reloaded.add_generic_backing_store(SingleFileMessagePackBackingStore::new(&store_path));
|
||||
reloaded.pull_all_backing_stores()?;
|
||||
assert_eq!(reloaded.get_required::<Settings>("app")?, settings);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn entry_identity_is_polymorphic_by_type_and_key() -> Result<()> {
|
||||
let temp = tempfile::tempdir()?;
|
||||
let store_path = temp.path().join("cache.msgpack");
|
||||
let mut cache = CultCache::new();
|
||||
cache.register_registry(TestEntries)?;
|
||||
cache.add_generic_backing_store(SingleFileMessagePackBackingStore::new(&store_path));
|
||||
|
||||
cache.put(
|
||||
"shared",
|
||||
&Settings {
|
||||
theme: "green".to_string(),
|
||||
retries: 1,
|
||||
},
|
||||
)?;
|
||||
cache.put(
|
||||
"shared",
|
||||
&Note {
|
||||
title: "same key".to_string(),
|
||||
body: "different type".to_string(),
|
||||
},
|
||||
)?;
|
||||
|
||||
assert_eq!(cache.snapshot().len(), 2);
|
||||
assert_eq!(cache.get_required::<Note>("shared")?.title, "same key");
|
||||
assert_eq!(cache.get_required::<Settings>("shared")?.theme, "green");
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn type_specific_store_routes_before_generic_store() -> Result<()> {
|
||||
let temp = tempfile::tempdir()?;
|
||||
let generic_path = temp.path().join("generic.msgpack");
|
||||
let settings_path = temp.path().join("settings.msgpack");
|
||||
let mut cache = CultCache::new();
|
||||
cache.register_entry_type::<Settings>()?;
|
||||
cache.register_entry_type::<Note>()?;
|
||||
cache.add_generic_backing_store(SingleFileMessagePackBackingStore::new(&generic_path));
|
||||
cache.add_backing_store(
|
||||
SingleFileMessagePackBackingStore::new(&settings_path),
|
||||
["settings"],
|
||||
);
|
||||
|
||||
cache.put(
|
||||
"app",
|
||||
&Settings {
|
||||
theme: "ash".to_string(),
|
||||
retries: 3,
|
||||
},
|
||||
)?;
|
||||
cache.put(
|
||||
"memo",
|
||||
&Note {
|
||||
title: "hello".to_string(),
|
||||
body: "world".to_string(),
|
||||
},
|
||||
)?;
|
||||
|
||||
let generic_entries = SingleFileMessagePackBackingStore::new(&generic_path).pull_all()?;
|
||||
let settings_entries = SingleFileMessagePackBackingStore::new(&settings_path).pull_all()?;
|
||||
assert_eq!(generic_entries[0].r#type, "note");
|
||||
assert_eq!(settings_entries[0].r#type, "settings");
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn update_and_delete_follow_the_cache_api() -> Result<()> {
|
||||
let temp = tempfile::tempdir()?;
|
||||
let store_path = temp.path().join("cache.msgpack");
|
||||
let mut cache = CultCache::new();
|
||||
cache.register_entry_type::<Settings>()?;
|
||||
cache.add_generic_backing_store(SingleFileMessagePackBackingStore::new(&store_path));
|
||||
|
||||
let updated = cache.update::<Settings, _>("app", |current| {
|
||||
let mut current = current.unwrap_or(Settings {
|
||||
theme: "ash".to_string(),
|
||||
retries: 0,
|
||||
});
|
||||
current.retries += 1;
|
||||
current
|
||||
})?;
|
||||
assert_eq!(updated.retries, 1);
|
||||
assert!(cache.delete::<Settings>("app")?);
|
||||
assert!(cache.get::<Settings>("app")?.is_none());
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn pull_rejects_unregistered_persisted_entry_type() -> Result<()> {
|
||||
let temp = tempfile::tempdir()?;
|
||||
let store_path = temp.path().join("cache.msgpack");
|
||||
let mut store = SingleFileMessagePackBackingStore::new(&store_path);
|
||||
store.push(&CultCacheEnvelope {
|
||||
key: "unknown".to_string(),
|
||||
r#type: "unregistered".to_string(),
|
||||
payload: rmp_serde::to_vec(&1_u8)?,
|
||||
stored_at: now_utc_second(),
|
||||
schema_id: Some("unregistered".to_string()),
|
||||
})?;
|
||||
|
||||
let mut cache = CultCache::new();
|
||||
cache.add_generic_backing_store(SingleFileMessagePackBackingStore::new(&store_path));
|
||||
let error = cache.pull_all_backing_stores().unwrap_err();
|
||||
assert!(
|
||||
error
|
||||
.to_string()
|
||||
.contains("No schema is registered for persisted entry type")
|
||||
);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn payload_is_binary_messagepack_not_json_value() -> Result<()> {
|
||||
let temp = tempfile::tempdir()?;
|
||||
let store_path = temp.path().join("cache.msgpack");
|
||||
let mut cache = CultCache::new();
|
||||
cache.register_entry_type::<Settings>()?;
|
||||
cache.add_generic_backing_store(SingleFileMessagePackBackingStore::new(&store_path));
|
||||
cache.put(
|
||||
"app",
|
||||
&Settings {
|
||||
theme: "ash".to_string(),
|
||||
retries: 3,
|
||||
},
|
||||
)?;
|
||||
|
||||
let entry = cache.snapshot().remove(0);
|
||||
let decoded: Settings = rmp_serde::from_slice(&entry.payload)?;
|
||||
assert_eq!(decoded.theme, "ash");
|
||||
assert!(!entry.payload.is_empty());
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn corrupted_payload_fails_during_typed_retrieval() -> Result<()> {
|
||||
let temp = tempfile::tempdir()?;
|
||||
let store_path = temp.path().join("cache.msgpack");
|
||||
let mut store = SingleFileMessagePackBackingStore::new(&store_path);
|
||||
store.push(&CultCacheEnvelope {
|
||||
key: "app".to_string(),
|
||||
r#type: "settings".to_string(),
|
||||
payload: vec![0xc1],
|
||||
stored_at: now_utc_second(),
|
||||
schema_id: Some("settings".to_string()),
|
||||
})?;
|
||||
|
||||
let mut cache = CultCache::new();
|
||||
cache.register_entry_type::<Settings>()?;
|
||||
cache.add_generic_backing_store(SingleFileMessagePackBackingStore::new(&store_path));
|
||||
cache.pull_all_backing_stores()?;
|
||||
let error = cache.get_required::<Settings>("app").unwrap_err();
|
||||
assert!(
|
||||
error
|
||||
.to_string()
|
||||
.contains("failed to decode CultCache entry")
|
||||
);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn put_envelope_reuses_existing_messagepack_payload() -> Result<()> {
|
||||
let temp = tempfile::tempdir()?;
|
||||
let origin_store = temp.path().join("origin.msgpack");
|
||||
let target_store = temp.path().join("target.msgpack");
|
||||
|
||||
let mut origin = CultCache::new();
|
||||
origin.register_entry_type::<Settings>()?;
|
||||
origin.add_generic_backing_store(SingleFileMessagePackBackingStore::new(&origin_store));
|
||||
origin.put(
|
||||
"app",
|
||||
&Settings {
|
||||
theme: "ash".to_string(),
|
||||
retries: 3,
|
||||
},
|
||||
)?;
|
||||
|
||||
let envelope = origin.get_required_envelope::<Settings>("app")?;
|
||||
|
||||
let mut target = CultCache::new();
|
||||
target.register_entry_type::<Settings>()?;
|
||||
target.add_generic_backing_store(SingleFileMessagePackBackingStore::new(&target_store));
|
||||
let applied = target.put_envelope::<Settings>(envelope.clone())?;
|
||||
|
||||
assert_eq!(
|
||||
applied,
|
||||
Settings {
|
||||
theme: "ash".to_string(),
|
||||
retries: 3,
|
||||
}
|
||||
);
|
||||
assert_eq!(target.get_required::<Settings>("app")?, applied);
|
||||
assert_eq!(
|
||||
target.get_required_envelope::<Settings>("app")?.payload,
|
||||
envelope.payload
|
||||
);
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
@ -1,18 +1,22 @@
|
|||
[package]
|
||||
name = "heimdall-consent"
|
||||
name = "cultmesh-rs"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
publish = false
|
||||
license = "MIT"
|
||||
description = "CultMesh ergonomic node/database surface over CultCache and CultNet for Rust runtimes."
|
||||
|
||||
[lib]
|
||||
name = "heimdall_consent"
|
||||
name = "cultmesh_rs"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[dependencies]
|
||||
anyhow = "1"
|
||||
cultcache-rs = { path = "../cultcache-rs" }
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
cultnet-rs = { path = "../cultnet-rs" }
|
||||
|
||||
[dev-dependencies]
|
||||
pretty_assertions = "1.4"
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
tempfile = "3"
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue