cultmesh-kotlin: write receipt frames, hash, tracker, vector replay #65

Merged
libby merged 4 commits from libby/write-receipt-kt-interop into main 2026-11-09 14:15:59 +00:00
Member

Stacked on the blankFields vectors branch (#64); do not merge before it.

Kotlin runtime decodes cultnet.write_admitted.v0 and cultnet.error.v1 and replays contracts/cultnet/interop/write-receipt-vectors.json.

  • WriteReceipt.kt: strict decode (closed key sets, non-empty ids, operation and code enums, v0 without limit_reached, v1 messageId required), writeContentHash, helloAdvertisesWriteReceipts, result windows, and WriteTracker (port of the TS tracker; the TS replay drives scenarios through it, so the scenarios are a decoder-side obligation there).
  • WriteReceiptVectors.kt: replay runner with a small JSON reader; mode write-receipt-vectors <path>, run from build.ps1.
  • Replayed: constants, contentHash (4), wire (7, decode to fields and re-encode to bytes), schemaInvalid (7), scenarios (18), plus a v0 limit_reached refusal: 38/38. Not run: dedupe and blankFields (server inputs).
  • Mutants killed (6): unknown-key tolerance, window boundary, late record, v0 accepting limit_reached, hash payload as string, id-less error attribution.
  • Built with kotlinc 2.2.21 / JDK 21 on Linux (jvm-target 1.8), under prlimit --as=4294967296 --cpu=300 with a trimmed JVM heap/class-space; build.ps1 itself (Windows) was not run.
  • No Kotlin write client exists, so nothing sends a put and waits on the tracker yet.

🤖 Generated with Claude Code

Stacked on the blankFields vectors branch (#64); do not merge before it. Kotlin runtime decodes `cultnet.write_admitted.v0` and `cultnet.error.v1` and replays `contracts/cultnet/interop/write-receipt-vectors.json`. - `WriteReceipt.kt`: strict decode (closed key sets, non-empty ids, operation and code enums, v0 without `limit_reached`, v1 `messageId` required), `writeContentHash`, `helloAdvertisesWriteReceipts`, result windows, and `WriteTracker` (port of the TS tracker; the TS replay drives scenarios through it, so the scenarios are a decoder-side obligation there). - `WriteReceiptVectors.kt`: replay runner with a small JSON reader; mode `write-receipt-vectors <path>`, run from `build.ps1`. - Replayed: constants, contentHash (4), wire (7, decode to fields and re-encode to bytes), schemaInvalid (7), scenarios (18), plus a v0 `limit_reached` refusal: 38/38. Not run: `dedupe` and `blankFields` (server inputs). - Mutants killed (6): unknown-key tolerance, window boundary, late record, v0 accepting `limit_reached`, hash payload as string, id-less error attribution. - Built with kotlinc 2.2.21 / JDK 21 on Linux (jvm-target 1.8), under `prlimit --as=4294967296 --cpu=300` with a trimmed JVM heap/class-space; `build.ps1` itself (Windows) was not run. - No Kotlin write client exists, so nothing sends a put and waits on the tracker yet. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
cultmesh-kotlin: decode write_admitted.v0 and error.v1, content hash, WriteTracker, vector replay
Some checks failed
CultMesh QUIC native / Build win32-x64 (pull_request) Has been skipped
CultMesh QUIC native / Build linux-x64 (pull_request) Has been skipped
CultMesh QUIC native / Release native binaries (pull_request) Has been skipped
CultMesh portability and performance / ubuntu-latest reactive semantics and leases (pull_request) Failing after 6m5s
CultMesh QUIC native / Verify committed binaries match SHA256SUMS (pull_request) Successful in 26s
cbb336f501
Strict decode of the two receipt frames (and error.v0), hello capability test,
the dedupe content hash and the client settle rules, ported from cultnet-ts.
write-receipt-vectors.json replays 38/38 (constants, contentHash, wire,
schemaInvalid, scenarios, v0 limit_reached); dedupe and blankFields are server
inputs and not run.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Merge write-receipt-text-blank-rules (3b1b7697) into libby/write-receipt-kt-interop
Some checks failed
CultMesh QUIC native / Build win32-x64 (pull_request) Has been skipped
CultMesh QUIC native / Build linux-x64 (pull_request) Has been skipped
CultMesh QUIC native / Release native binaries (pull_request) Has been skipped
CultMesh portability and performance / ubuntu-latest reactive semantics and leases (pull_request) Failing after 7m5s
CultMesh QUIC native / Verify committed binaries match SHA256SUMS (pull_request) Successful in 26s
80f1cfa385
cultmesh-kotlin: sendFailed vectors, a tracker that ends with its session, White_Space blank
Some checks failed
CultMesh QUIC native / Build win32-x64 (pull_request) Has been skipped
CultMesh QUIC native / Build linux-x64 (pull_request) Has been skipped
CultMesh QUIC native / Release native binaries (pull_request) Has been skipped
CultMesh portability and performance / ubuntu-latest reactive semantics and leases (pull_request) Failing after 6m53s
CultMesh QUIC native / Verify committed binaries match SHA256SUMS (pull_request) Successful in 1m12s
6ca9c455b7
The replay runner handles the sendFailed event, fails on an event key it does
not know and on a vector count the file did not declare. WriteTracker settles a
write sent after sessionEnd as session_ended. Source ids on a raw document
record are dropped when blank by Unicode White_Space (isBlankText), not Kotlin's
isNullOrBlank, which keeps U+0085 and drops U+001C to U+001F; the vector file's
JSON reader skips JSON whitespace only.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
libby changed target branch from libby/write-receipt-text-blank-rules to main 2026-11-09 14:15:58 +00:00
libby merged commit 59365cea35 into main 2026-11-09 14:15:59 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
GameCult/CultLib!65
No description provided.