Blender add-on: pass CultMeshGrantAllWrites() to its served node #4

Merged
libby merged 2 commits from libby/blender-grant-peer-writes into main 2026-11-07 19:19:41 +00:00
Member

CultLib PR GameCult/CultLib#33 makes cultmesh_py refuse peer puts/deletes unless a write_authority grants them. This add-on's clients put command intents to its served node, so start_server now passes write_authority=CultMeshGrantAllWrites() when the loaded cultmesh_py has it (older cultmesh_py already accepts all writes and gets no argument).

Access rules (for the reviewer): this preserves current behaviour and adds no new access. Peer writes remain open to any connected peer when require_token is off (loopback-only unless the non-loopback box is ticked); with require_token on, server_guard still refuses any put/delete without the session token before the base class sees it, so the grant never widens what the token guard admits. Not merging unreviewed.

Tests (headless, no Blender): CULTLIB_PACKAGES=<CultLib>/packages python -m unittest discover -s surfaces/blender/tests. New test_a_peer_put_is_accepted_over_tcp_because_the_target_grants_peer_writes. With the CultLib #33 packages: 67 OK (3/3). Without this change against #33: 4 tests fail (this one plus the three token/shard-log tests), proving the reliance. Against CultLib main (no gate): OK (2/2), so the change is compatible both ways. Blender itself is not installed on this host, so tests/live/headless_smoke.py was not run.

Merge order: CultLib#33, then this.

🤖 Generated with Claude Code

CultLib PR GameCult/CultLib#33 makes `cultmesh_py` refuse peer puts/deletes unless a `write_authority` grants them. This add-on's clients put command intents to its served node, so `start_server` now passes `write_authority=CultMeshGrantAllWrites()` when the loaded `cultmesh_py` has it (older cultmesh_py already accepts all writes and gets no argument). **Access rules (for the reviewer):** this preserves current behaviour and adds no new access. Peer writes remain open to any connected peer when `require_token` is off (loopback-only unless the non-loopback box is ticked); with `require_token` on, `server_guard` still refuses any put/delete without the session token before the base class sees it, so the grant never widens what the token guard admits. Not merging unreviewed. Tests (headless, no Blender): `CULTLIB_PACKAGES=<CultLib>/packages python -m unittest discover -s surfaces/blender/tests`. New `test_a_peer_put_is_accepted_over_tcp_because_the_target_grants_peer_writes`. With the CultLib #33 packages: 67 OK (3/3). Without this change against #33: 4 tests fail (this one plus the three token/shard-log tests), proving the reliance. Against CultLib main (no gate): OK (2/2), so the change is compatible both ways. Blender itself is not installed on this host, so `tests/live/headless_smoke.py` was not run. Merge order: CultLib#33, then this. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
cultmesh_py (CultLib GameCult/CultLib#33) refuses peer puts and deletes unless a
write authority grants them. The add-on's clients put command intents, and the
session token guard already authenticates them, so the target passes
CultMeshGrantAllWrites() when cultmesh_py has it. Older cultmesh_py already
accepts every write and is left alone.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
libby merged commit acd9a583cd into main 2026-11-07 19:19:41 +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/Brokkr!4
No description provided.