coder / coder/balatrobot

fix!(lua.endpoints): skip-opened tag packs are a dead zone — no-op picks, missing dealt hand, hangs that break the session

Open
#233 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
72
Forks
18
PR merge metrics
No merged PRs in 30d

Description

## Description

Packs opened from skip tags at `BLIND_SELECT` misbehave over RPC in three ways.
All three are fine in the vanilla UI; all three were reproduced with a
differential harness replaying identical traces on a vanilla-faithful simulator.

1. **Silent no-op pick.** `pack` returned success for a pick from a skip-opened
Celestial pack, but nothing happened on live: the pack still had all its
cards, the planet was unused, no hand was leveled (seed `LS5HXL62`, step 28).
2. **No dealt hand for Arcana/Spectral tag packs.** Vanilla deals a targeting
hand when these packs open; over RPC at blind select, both sides sit in
`SMODS_BOOSTER_OPENED` but live's hand stays empty with an untouched deck
(seeds `LSMWZ3M4` step 21, `LSDTVEW6` step 27). In our census across ~400
organic games, **every** skip-opened tag pack either diverged or had to be
truncated — the flow is a complete dead zone.
3. **Hang with lasting damage.** Stacked tag packs (Double Tag + a pack tag)
hang the `pack` endpoint — related to but distinct from the triggers in #198
and #199. Worse, after the hang the game's event processing stays broken for
the remainder of the run even though `gamestate` still reads consistent
(probed directly: a round-end mechanic that reliably fired in a fresh session
stopped firing after the hang, with all RNG streams still matching).

Suspected root cause: the SMODS booster flow at blind select diverges from the
shop pack flow the endpoints were built around (cf. #202, which covers use/sell
during `SMODS_BOOSTER_OPENED`).

## Impact

Skipping a blind for a pack tag is one of the stronger lines in the game.
Over RPC it currently either loses the pack contents silently (worst case for a
bot: the pick "succeeds") or kills the session. Our harness had to veto all
pack-tag skips to keep runs alive, which removes a real strategy from any bot
that wants to be faithful.

## Suggested Fix

- `pack` should verify the pick actually applied (pack card count / target area
changed) before reporting success, and return an error otherwise.
- Deal the targeting hand for Arcana/Spectral tag packs the way the shop flow
does, or reject the open with a clear error instead of hanging.

Repro bundles available for all seeds cited.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.