feat(rust): the kit weekend, linked rewards, reward messages and the kit warning (protocol 14) #38

Merged
whitlocktech merged 1 commits from feat/protocol-14-step-editor into edge 2026-10-12 04:51:59 -05:00
Member

What & why

Module-Rust's half of PLAN_REDESIGNS.md §2 (D164, D192, D332, D333), on core's MODULE_API 1.13.0 (website#212).

  • The kit weekend, rust.template.kit_weekend, through core's registerEventTemplates:
    • Inputs: kit, minutes (a duration), message and delivery.
    • It builds one phase with advance: { after: <minutes> } holding two steps: core.lease on rust.group.permission, giving <server>/default/<the kit's real permission> the value true, and rust.kit.entitle with recipients: linked.
    • A kit with no permission gets step 2 alone. A kit with no use limit gets step 1 alone.
  • rust.kit.entitle:
    • Recipients linked means every linked account that has played on the server. It reads no tally, and past the server's bound it is refused with the bound's name, never trimmed.
    • New optional message (with {kit}) and delivery, checked against the chat bound with the kit's name in place.
    • Both are stored on each grant row: rust_perm_run_grants.notice, notice_delivery and notice_told_at, added as ALTERs.
  • perm.sync notices: the untold set goes to the account the reward picked, keyed run:step:user and included in the sync digest. The report's noticesTold marks rows told.
  • The kit warning: rust.options.grouppermissions rows for a kit's permission carry a note, built from kits.uses with the server's linked players. It is cached a minute per server, and a failure means no note.
  • duration: 'minutes' on rust.zone.open and rust.participation.open. The group-permission lease's value example is true.
  • Protocol 13 → 14 and coreApi → ^1.13.0. ci/bundle.json now includes eventTemplates.js. engagement-triggers.json is regenerated (only the coreApi line changes).
  • ci/core-ref.json is pinned to website#212's head (e58857c) while that PR is open, as during website#209. Re-pin it to #212's merge sha after it merges.

Spec: PROTOCOL.md §20 and PLAN_REDESIGNS §2.9 (docs PR docs/rust-protocol-14-step-editor). Companions: Rust-Plugins and Rust-Link feat/protocol-14-step-editor.

How it was tested

  • Server suite: 521/521 (npm test), including the new test/stepEditor.test.js with 16 tests:
    • linked: picking, its bound, and its price;
    • the message check, with the kit's name in place;
    • notices in the sync payload: untold only, the picked and still-linked account, the right server, and in the digest;
    • told keys read back to their rows;
    • the kit note's wording, its cache, and a failure meaning no note;
    • the kit weekend: both steps, one step each way, and every refusal;
    • the durations.
  • check:imports, check:bundle (81 files), check:swagger (75 paths) and check:engagement all pass.
  • Against the real core (website#212): the frozen-manifest job passes (routes.manifest.json is current — 84 routes, all documented). Through core's own loader, the module registers and the template is listed with its duration input.
  • The kit weekend built and validated by the real core: core's buildFromTemplate, with only the server row and the kit list stubbed, returns a draft that passes spec.validate (core normalises 2880m to 2d). A 99999-minute weekend is refused in the author's words, and a missing kit gives "kit" is required.
  • Not walked: D331 defers every walk to one pass at the end of the plan (§2.7).

Checklist

  • I have read CONTRIBUTING.md.
  • The change builds and existing tests/checks pass locally.
  • I have added or updated tests/docs where it makes sense.
  • My commits are reasonably scoped with clear messages.

AI-assisted contributions (required)

  • No AI tools were used to produce this contribution.
  • AI tools were used. Tool(s): Claude Code (Claude Opus 5.5). I have reviewed and understand
    every change, and take responsibility for it. AI-authored commits are
    marked with a Co-Authored-By / Assisted-By trailer.

License

  • I agree that my contribution is licensed under this project's license
    (GNU GPL v3.0 or later), and I have the right to contribute it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY

## What & why Module-Rust's half of `PLAN_REDESIGNS.md` §2 (D164, D192, D332, D333), on core's MODULE_API 1.13.0 (website#212). - **The kit weekend**, `rust.template.kit_weekend`, through core's `registerEventTemplates`: - Inputs: kit, minutes (a duration), message and delivery. - It builds one phase with `advance: { after: <minutes> }` holding two steps: `core.lease` on `rust.group.permission`, giving `<server>/default/<the kit's real permission>` the value `true`, and `rust.kit.entitle` with `recipients: linked`. - A kit with no permission gets step 2 alone. A kit with no use limit gets step 1 alone. - **`rust.kit.entitle`**: - Recipients `linked` means every linked account that has played on the server. It reads no tally, and past the server's bound it is refused with the bound's name, never trimmed. - New optional `message` (with `{kit}`) and `delivery`, checked against the chat bound with the kit's name in place. - Both are stored on each grant row: `rust_perm_run_grants.notice`, `notice_delivery` and `notice_told_at`, added as ALTERs. - **`perm.sync` `notices`**: the untold set goes to the account the reward picked, keyed `run:step:user` and included in the sync digest. The report's `noticesTold` marks rows told. - **The kit warning**: `rust.options.grouppermissions` rows for a kit's permission carry a `note`, built from `kits.uses` with the server's linked players. It is cached a minute per server, and a failure means no note. - `duration: 'minutes'` on `rust.zone.open` and `rust.participation.open`. The group-permission lease's value example is `true`. - Protocol 13 → 14 and `coreApi` → `^1.13.0`. `ci/bundle.json` now includes `eventTemplates.js`. `engagement-triggers.json` is regenerated (only the `coreApi` line changes). - **`ci/core-ref.json` is pinned to website#212's head (`e58857c`)** while that PR is open, as during website#209. **Re-pin it to #212's merge sha after it merges.** Spec: PROTOCOL.md §20 and PLAN_REDESIGNS §2.9 (docs PR `docs/rust-protocol-14-step-editor`). Companions: Rust-Plugins and Rust-Link `feat/protocol-14-step-editor`. ## How it was tested - **Server suite:** 521/521 (`npm test`), including the new `test/stepEditor.test.js` with 16 tests: - `linked`: picking, its bound, and its price; - the message check, with the kit's name in place; - notices in the sync payload: untold only, the picked and still-linked account, the right server, and in the digest; - told keys read back to their rows; - the kit note's wording, its cache, and a failure meaning no note; - the kit weekend: both steps, one step each way, and every refusal; - the durations. - `check:imports`, `check:bundle` (81 files), `check:swagger` (75 paths) and `check:engagement` all pass. - **Against the real core (website#212):** the frozen-manifest job passes (`routes.manifest.json is current — 84 routes, all documented`). Through core's own loader, the module registers and the template is listed with its duration input. - **The kit weekend built and validated by the real core:** core's `buildFromTemplate`, with only the server row and the kit list stubbed, returns a draft that passes `spec.validate` (core normalises `2880m` to `2d`). A 99999-minute weekend is refused in the author's words, and a missing kit gives `"kit" is required`. - **Not walked:** D331 defers every walk to one pass at the end of the plan (§2.7). ## Checklist - [x] I have read [CONTRIBUTING.md](CONTRIBUTING.md). - [x] The change builds and existing tests/checks pass locally. - [x] I have added or updated tests/docs where it makes sense. - [x] My commits are reasonably scoped with clear messages. ## AI-assisted contributions (required) - [ ] No AI tools were used to produce this contribution. - [x] AI tools were used. Tool(s): `Claude Code (Claude Opus 5.5)`. I have reviewed and understand every change, and take responsibility for it. AI-authored commits are marked with a `Co-Authored-By` / `Assisted-By` trailer. ## License - [x] I agree that my contribution is licensed under this project's license (**GNU GPL v3.0 or later**), and I have the right to contribute it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
wtclaude added 1 commit 2026-10-12 02:49:49 -05:00
feat(rust): the kit weekend, linked rewards, reward messages and the kit warning (protocol 14)
All checks were successful
PR Checks / client-build (pull_request) Successful in 3m46s
PR Checks / frozen-manifest (pull_request) Successful in 6m12s
PR Checks / server-tests (pull_request) Successful in 7m30s
d21a9e2c0d
PLAN_REDESIGNS §2, the Rust half (D164, D192, D332, D333):
- rust.template.kit_weekend (core registerEventTemplates, MODULE_API 1.13.0):
  inputs kit/minutes/message/delivery; one phase advance after the weekend,
  core.lease rust.group.permission default/<kit permission> + rust.kit.entitle
  linked. Steps only where the kit can use them; validated by the real core.
- rust.kit.entitle: recipients 'linked' (every linked player who has played
  on the server, no tally, refused past the bound), optional message ({kit})
  and delivery, stored per row (rust_perm_run_grants.notice*).
- perm.sync notices: the untold set to the picked account, keyed
  run:step:user, in the digest; the report's noticesTold marks them told.
- rust.options.grouppermissions notes a kit's permission rows via kits.uses
  (cached a minute per server; a failure is no note).
- duration: 'minutes' on rust.zone.open and rust.participation.open; the
  group-permission lease's value example is true.
- protocol 13 -> 14, coreApi ^1.13.0; ci/core-ref.json pinned to website#212's
  head while it is open; engagement-triggers.json regenerated (coreApi line).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
whitlocktech merged commit 21e40053ab into edge 2026-10-12 04:51:59 -05:00
whitlocktech deleted branch feat/protocol-14-step-editor 2026-10-12 04:52:00 -05: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#38
No description provided.