feat(bridge): protocol 7 — a raid frame that names who lives there #7

Merged
whitlocktech merged 3 commits from feat/phase-10-engagement into edge 2026-09-23 13:43:32 -05:00
Member

What & why

Protocol 7 for phase 10's raid alert (docs/modules/rust/PLAN.md §25, docs/rust-link/PROTOCOL.md §13).

  • entity.destroyed now covers doors, external walls and gates, and the tool cupboard. A door is an AnimatedBuildingBlock, a sibling of BuildingBlock, so until now a door-only raid reached nobody. The frame gains:

    • structure;
    • the cupboard's buildingId;
    • authorized ([{steamId, online}], bounded at 64).

    Both new fields are absent when there's no cupboard. recentGroupMembers is deliberately not read: it's upkeep accounting, not authorisation. The structures tally still counts building blocks only.

  • attackerId is derived from userID. UserIDString is unset for a player another plugin spawned, and the website's self-demolish exclusion depends on this field.

  • clan.disbanded carries members. The board that follows the event can remove the roster before the website reads the disband.

  • overlay.toml protocol → 7.

How it was tested

  • node scripts/checkPlugin.js: protocol 7, 29 hooks, all void and listed.
  • Oxide rig: compiled and loaded. A real door and cupboard were destroyed via a rig-only helper, and the frames arrived with the fields above; see PLAN.md §25.5.
  • Carbon 2.0.259: the same file compiled and loaded at protocol 7, and OnEntityDeath dispatched to the bridge with no exception. That rig has no sidecar, so the frame wasn't read back.

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)

  • AI tools were used. Tool(s): Claude Code (Claude Opus 5.5). AI-authored commits carry a Co-Authored-By trailer.

License

  • I agree that my contribution is licensed under this project's license (GNU GPL v3.0 or later).

🤖 Generated with Claude Code

https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY

## What & why Protocol 7 for phase 10's raid alert (`docs/modules/rust/PLAN.md` §25, `docs/rust-link/PROTOCOL.md` §13). - **`entity.destroyed` now covers doors, external walls and gates, and the tool cupboard.** A door is an `AnimatedBuildingBlock`, a *sibling* of `BuildingBlock`, so until now a door-only raid reached nobody. The frame gains: - `structure`; - the cupboard's `buildingId`; - `authorized` (`[{steamId, online}]`, bounded at 64). Both new fields are absent when there's no cupboard. `recentGroupMembers` is deliberately not read: it's upkeep accounting, not authorisation. The `structures` tally still counts building blocks only. - **`attackerId` is derived from `userID`.** `UserIDString` is unset for a player another plugin spawned, and the website's self-demolish exclusion depends on this field. - **`clan.disbanded` carries `members`.** The board that follows the event can remove the roster before the website reads the disband. - `overlay.toml` protocol → 7. ## How it was tested - `node scripts/checkPlugin.js`: protocol 7, 29 hooks, all void and listed. - **Oxide rig:** compiled and loaded. A real door and cupboard were destroyed via a rig-only helper, and the frames arrived with the fields above; see PLAN.md §25.5. - **Carbon 2.0.259:** the same file compiled and loaded at protocol 7, and `OnEntityDeath` dispatched to the bridge with no exception. That rig has no sidecar, so the frame wasn't read back. ## 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) - [x] AI tools were used. Tool(s): `Claude Code (Claude Opus 5.5)`. AI-authored commits carry a `Co-Authored-By` trailer. ## License - [x] I agree that my contribution is licensed under this project's license (**GNU GPL v3.0 or later**). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
wtclaude added 3 commits 2026-09-23 13:42:18 -05:00
entity.destroyed now covers doors, external walls and gates, and the
tool cupboard itself as well as building blocks. A door was never a
BuildingBlock, so a door-only raid reached nobody. The frame gains
`structure`, the cupboard's `buildingId`, and `authorized`: each Steam
id on the cupboard with whether they are online now, bounded at 64.
Both fields are absent when there is no cupboard. The structures tally
still counts building blocks only, so the leaderboard column keeps its
meaning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
The website tells a disbanded clan's members, but the clan board that
follows the event (and, after an outage, precedes the backlog) has
already removed that roster from its store. The game walks Members to
drop each membership and never empties the list, so it is still whole
when OnClanDisbanded fires. Part of protocol 7.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
fix(bridge): the raid frame's attackerId comes from userID
All checks were successful
PR Checks / plugin-checks (pull_request) Successful in 9s
77e9863e9b
UserIDString is filled in only when a player connects, loads as a
sleeper, or is an engine bot. A player another plugin spawned has none,
and the phase-10 walk's raid arrived with attackerId null. The website
skips the raid alert when the attacker is authorised on the cupboard,
so a null would quietly defeat that exclusion.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
whitlocktech merged commit 0be9113d5b into edge 2026-09-23 13:43:32 -05:00
whitlocktech deleted branch feat/phase-10-engagement 2026-09-23 13:43:33 -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/Rust-Plugins#7
No description provided.