Stamp hardening: refuse a peer raw put with no stamp in C#, TypeScript and Rust; Python replication #175

Open
libby wants to merge 12 commits from golden-write/stamp-hardening into main
Member

Brings C#, TypeScript and Rust to variants:ruling:raw-put-without-stamp-refused (Python is #174): a peer's document_put_raw whose storedAt is not a stamp is refused message_invalid (field document) after the authority is asked, and nothing is minted or stored. A blank or missing storedAt keeps its existing refusal (field message, before the authority), as write-receipt.md pins. Also closes variants:follow_up:py-snapshot-stampless-record-poisons-store: Python's snapshot, shard-log and client replay refuse a record with no stamp where it becomes an envelope (a snapshot or shard log is refused whole).

  • One stamp shape, pinned in tests/vectors/stored-at-stamp (47 rows, the Python parse_stored_at from #172 as reference); C# CultNetStoredAtStamp.IsStamp, TS isStoredAtStamp, Rust is_stored_at_stamp and Python each decode it.
  • Spec amendment (contracts/cultnet/interop/write-receipt.md and its vectors): the rows that used storedAt to prove "a non-White_Space code point names something" moved to recordKey, since a non-stamp storedAt is now refused. Ruled by Self, flagged for the Persona.
  • Server gate and node/store check are separate owners in each runtime, each with a test that goes red when it alone is reverted (mutation results in the Soul passes); size-limited and RUDP paths covered where the runtime has them; authority-first and aliased-put ordering kept.
  • Removed TS server clock fallback storedAt ?? now; TS parseCultNetMessage now admits any storedAt on a put and leaves refusal to the server and registry.

Soul passes (two, by runtime pair) found: C# stamp accepted out-of-range instants, Rust accepted a year-0 local date, Python shard-log partial apply, unpinned calendar rules in the vector; all fixed here. Admitted instead as follow-ups: ts-snapshot-sync-garbage-stamp, rust-legacy-sink-stamp-before-accept, stamp-refusal-texts-unfixed, signed-daemon-health-observedat-stamp.

Follow-ups: variants:follow_up:raw-put-garbage-stamp-cs-ts-rs, variants:follow_up:py-snapshot-stampless-record-poisons-store.

🤖 Generated with Claude Code

Brings C#, TypeScript and Rust to `variants:ruling:raw-put-without-stamp-refused` (Python is #174): a peer's `document_put_raw` whose `storedAt` is not a stamp is refused `message_invalid` (field `document`) after the authority is asked, and nothing is minted or stored. A blank or missing `storedAt` keeps its existing refusal (field `message`, before the authority), as `write-receipt.md` pins. Also closes `variants:follow_up:py-snapshot-stampless-record-poisons-store`: Python's snapshot, shard-log and client replay refuse a record with no stamp where it becomes an envelope (a snapshot or shard log is refused whole). - One stamp shape, pinned in `tests/vectors/stored-at-stamp` (47 rows, the Python `parse_stored_at` from #172 as reference); C# `CultNetStoredAtStamp.IsStamp`, TS `isStoredAtStamp`, Rust `is_stored_at_stamp` and Python each decode it. - Spec amendment (`contracts/cultnet/interop/write-receipt.md` and its vectors): the rows that used `storedAt` to prove "a non-White_Space code point names something" moved to `recordKey`, since a non-stamp `storedAt` is now refused. Ruled by Self, flagged for the Persona. - Server gate and node/store check are separate owners in each runtime, each with a test that goes red when it alone is reverted (mutation results in the Soul passes); size-limited and RUDP paths covered where the runtime has them; authority-first and aliased-put ordering kept. - Removed TS server clock fallback `storedAt ?? now`; TS `parseCultNetMessage` now admits any `storedAt` on a put and leaves refusal to the server and registry. Soul passes (two, by runtime pair) found: C# stamp accepted out-of-range instants, Rust accepted a year-0 local date, Python shard-log partial apply, unpinned calendar rules in the vector; all fixed here. Admitted instead as follow-ups: `ts-snapshot-sync-garbage-stamp`, `rust-legacy-sink-stamp-before-accept`, `stamp-refusal-texts-unfixed`, `signed-daemon-health-observedat-stamp`. Follow-ups: `variants:follow_up:raw-put-garbage-stamp-cs-ts-rs`, `variants:follow_up:py-snapshot-stampless-record-poisons-store`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
One judgment, isStoredAtStamp (cultcache-ts, the stored-at-stamp vector's shape), used by the RUDP document server (message_invalid, field document,
after the authority, before sizing) and by the registry that stores a put (throws, nothing stored). The put parser leaves storedAt to them.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
bom_stored_at_is_a_name becomes bom_record_key_is_a_name; the non-White_Space
code point rows skip storedAt (C# and cultmesh-rs consumers).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Exact-shape stamp check (stored-at-stamp vector); judged after the write authority
and before any shard or forward; message_invalid field document, nothing stored or minted.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
is_stored_at_stamp is the hand-written exact shape of tests/vectors/stored-at-stamp;
put_raw_envelope and put_prepared_batch refuse anything else, nothing minted.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
cultnet-py: own-package test of raw_record_to_envelope's stamp refusal, vector rows included
Some checks are pending
CultMesh portability and performance / ubuntu-latest reactive semantics and leases (pull_request) Has started running
4123baa4e8
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Some checks are pending
CultMesh portability and performance / ubuntu-latest reactive semantics and leases (pull_request) Has started running
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin golden-write/stamp-hardening:golden-write/stamp-hardening
git switch golden-write/stamp-hardening

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff golden-write/stamp-hardening
git switch golden-write/stamp-hardening
git rebase main
git switch main
git merge --ff-only golden-write/stamp-hardening
git switch golden-write/stamp-hardening
git rebase main
git switch main
git merge --no-ff golden-write/stamp-hardening
git switch main
git merge --squash golden-write/stamp-hardening
git switch main
git merge --ff-only golden-write/stamp-hardening
git switch main
git merge golden-write/stamp-hardening
git push origin main
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!175
No description provided.