Repository navigation
feat(antibot): a ban is told, with its end and a link to the rules - #445
Merged
Merged
Conversation
A banned caller's clicks were answered OK and dropped. Most of the callers the rules banned in October 2026 were people, and for them a click that did nothing read as a bug, with no way to ask. Click, DropBomb and PlaceShield now refuse a banned caller with PermissionDenied and a planet.v1.BanRefusal detail: when the ban ends. No reason goes out. ban_click sits outside the throttle, so a refused click spends no token and feeds no watchdog, and the end the player is told does not move. The bomb or the shield stays in hand. The client shows "Clicks paused" until that time, with a link to the terms' Play fair section, which now names switching accounts. The shadowban package, config block and metrics are renamed to bans, antiBot.bans and banned_clicks / banned_callers / ban_flags. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…back-messaging-62ce4e
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.
Why
The shadow ban answered a banned caller's clicks
OKand dropped them. Most of the callers the rules banned in October 2026 were people (stamina Oct 7, cadence Oct 9, roam Oct 10, rotator Oct 18). For them, a click that did nothing looked like a bug, and they could not ask to be unbanned because they did not know they were banned.What changed
Backend
Click,DropBombandPlaceShieldrefuse a banned caller withPermissionDeniedand a newplanet.v1.BanRefusaldetail (banned_until_unix_ms). No reason goes out.ban_clickdecorator, outside the throttle: a refused click spends no token (otherwise the client would show a 429) and reaches no watchdog.antibot_clickonly judges now. The click that earns a ban goes through; the next one is refused.Dudflag is gone from both use cases.bonus_bombs_dropped_total{outcome}now saysbannedinstead ofshadowbanned.Guard.Banned→Guard.EnforcedSentence(scope, account) (Sentence, bool).Guard.Inspectreturns nothing.Frontend
BannedError. Apermission_deniedwith the detail is a ban; without the detail it is still the VPN block.describeEnd, now shared with the chat mute) and a "Read the game rules" link to/terms#play-fair.fakeBackend.ban(minutes)reproduces it in fake mode.Terms (please review the wording)
id="play-fair"on the "Play fair" heading.BannedModal.test.tsxpins it.Rename
antibot/internal/shadowban→antibot/internal/bans, and itsBanstype →bans.Book.antiBot.shadowBan.*→antiBot.bans.*, indeploy/vps/backend.yamlandexample.yaml.shadowbanned_clicks/shadowban_flagged/shadowban_flags→banned_clicks/banned_callers/ban_flags. The poller filter indocker-compose.yamlis updated.For the reviewer
TestTheProductionConfigEnforcesBansfails if production stops readingbans.enforce; I checked it against the old key.backend.yamldoes not readbans, so bans stop being enforced, with nothing in the logs, until you redeploy.BannedModal,reportClickFailure,reportClaimFailureand theplanetBackendmapping.Tests
make test(including e2e),lint,deadcode,check-format(pre-push hook passed after mergingmain). New:ban_click,planetban, the bomb and shield gates,TestABannedCallerIsToldUntilWhenAndSpendsNoTokenover HTTP,TestTheProductionConfigEnforcesBans.🤖 Generated with Claude Code