feat(rust): the leases and their option sources (phase 12, protocol 8) #14

Merged
whitlocktech merged 1 commits from feat/phase-12-leases into edge 2026-09-24 04:03:25 +00:00
Member

Phase 12 (docs/modules/rust/PLAN.md §27, decisions D73–D79).

  • registerEventLeases: rust.decay.scale, rust.population, rust.spawn.scalar and rust.group.permission. Every lease is targeted and the target names the server (D73), so core.lease needs no scope and core no change. maxDurationMs is seven days (D77).
  • registerEventOptionSources: rust.options.servers, .populations, .spawnscalars and .grouppermissions (searchable). No budgets (D79).
  • sidecarClient: protocol 8, leaseList/leaseApply/leaseRelease with a 4.5 s lease timeout so that read + apply fit in core.lease's default 10 s budget. A test asserts the arithmetic.
  • The callables:
    • a key already held reads as its baseline;
    • lease.drifted becomes { ok:false, drifted:true, current };
    • inForce reads the plugin's holds and never compares values;
    • a timed-out apply is followed by a release.

Tests: 259 pass (24 new in leases.test.js, plus entry.test.js updated). check:imports, check:bundle (with eventLeases.js added to ci/bundle.json), check:swagger and check:engagement are clean. No route or swagger change.

Walked through real core on both rigs; see §27.5.

  • AI-assisted: Claude Code (Claude Opus 5.5)

🤖 Generated with Claude Code

https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY

Phase 12 (`docs/modules/rust/PLAN.md` §27, decisions D73–D79). - `registerEventLeases`: `rust.decay.scale`, `rust.population`, `rust.spawn.scalar` and `rust.group.permission`. **Every lease is targeted and the target names the server** (D73), so `core.lease` needs no scope and core no change. `maxDurationMs` is seven days (D77). - `registerEventOptionSources`: `rust.options.servers`, `.populations`, `.spawnscalars` and `.grouppermissions` (searchable). **No budgets** (D79). - `sidecarClient`: protocol 8, `leaseList`/`leaseApply`/`leaseRelease` with a **4.5 s lease timeout** so that `read` + `apply` fit in `core.lease`'s default 10 s budget. A test asserts the arithmetic. - The callables: - a key already held reads as its **baseline**; - `lease.drifted` becomes `{ ok:false, drifted:true, current }`; - `inForce` reads the plugin's holds and never compares values; - a timed-out apply is followed by a release. Tests: 259 pass (24 new in `leases.test.js`, plus `entry.test.js` updated). `check:imports`, `check:bundle` (with `eventLeases.js` added to `ci/bundle.json`), `check:swagger` and `check:engagement` are clean. No route or swagger change. Walked through real core on both rigs; see §27.5. - [x] AI-assisted: Claude Code (Claude Opus 5.5) 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
wtclaude added 1 commit 2026-09-24 02:14:55 +00:00
feat(rust): the leases and their option sources (phase 12, protocol 8)
All checks were successful
PR Checks / client-build (pull_request) Successful in 19s
PR Checks / server-tests (pull_request) Successful in 22s
PR Checks / frozen-manifest (pull_request) Successful in 40s
d973db7a43
Four leases on core.lease: rust.decay.scale, rust.population, rust.spawn.scalar and rust.group.permission. Every lease is targeted and the target names the server (D73). Also the three target option sources plus rust.options.servers, with no budgets (D79). Held for up to seven days (D77).

A key that is already held reads as its baseline. Drift is an answer, not a failure. inForce reads the plugin's holds and never compares values. Lease calls get a 4.5s timeout so that two of them fit in core.lease's 10s budget, and a timed-out apply is followed by a release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
whitlocktech merged commit 36a5cb975a into edge 2026-09-24 04:03:25 +00:00
whitlocktech deleted branch feat/phase-12-leases 2026-09-24 04:03:26 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: RunicGateway/Module-Rust#14
No description provided.