fix(bvm): gate BVM_DELETEABILITY + BVM_DELETEQUEST behind privilege check#563
Merged
Conversation
…heck Both functions take an actor/target handle and destroy persistent player state (a learned ability, a quest-log entry) but lacked the privilege gate their equivalent-effect siblings already carry (BVM_SETABILITYLEVEL and the quest/progression mutators). A non-privileged clicker-driven script (Examine/Trade/RightClick/ItemScript) sets SI\AI = Handle(clicker), so a self-or-priv gate would let DeleteAbility(clicker, ...) / DeleteQuest(clicker, ...) through. Use the full BVM_RequirePrivileged() gate. No shipped content scripts in data/ call either function (verified), so the gate breaks nothing. Adds regression cases to BVMPrivilegeGateTest.bb and regenerates docs/bvm-reference.md (CI staleness gate). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes an equivalent-effect privilege-gate bypass (CLAUDE.md §privilege gating, category 4): two state-mutating BVM commands lacked the gate their documented siblings already carry.
BVM_DELETEABILITY— strips an ability/spell from any actor handle (siblingBVM_SETABILITYLEVELis gated)BVM_DELETEQUEST— wipes a target's quest-log entryBoth now begin with
If Not BVM_RequirePrivileged() Then Return(full-priv; both have zero shipped callers, so the strict gate breaks nothing). Adds 6BVMPrivilegeGateTest.bbcases and regeneratesdocs/bvm-reference.md.Test plan