[P0] STS2 update removed Hook.AfterTurnEnd — full compatibility verification pass #249

Closed
opened 2026-07-03 02:30:48 -07:00 by nelsong6 · 1 comment
nelsong6 commented 2026-07-03 02:30:48 -07:00 (Migrated from github.com)

Priority: P0. Discovered during a codebase audit on 2026-07-02.

Problem

Steam shipped a Slay the Spire 2 update (game DLL data_sts2_windows_x86_64/sts2.dll dated 2026-07-02 20:32) that removed Hook.AfterTurnEnd. This broke the mod's build against the live game (CS0117: 'Hook' does not contain a definition for 'AfterTurnEnd').

PR #248 unblocked the build (runtime TargetMethods() lookup for the two block-window cleanup patches + per-class Harmony install isolation so one broken patch can't take down all tracking). But it did NOT verify runtime behaviour against the new game version — that needs an in-game launch, which the audit could not perform headless.

What this issue covers

A full compatibility pass against the current STS2 version:

  1. Re-decompile the current sts2.dll (see docs/surviving-sts2-updates.md) and diff the hook/relic/command surface against the prior decompile.
  2. Confirm every one of the ~57 patch classes still binds — check the Patch install: N classes patched, M failed/skipped log line added in PR #248 (CoreMain.Initialize) after a launch, and investigate every failed/skipped.
  3. Determine what replaced Hook.AfterTurnEnd (renamed? folded into AfterSideTurnEnd*?) and re-home the Orichalcum / Cloak Clasp block-window disarm so the cleanup fires again — or, better, fold it into the consuming-one-shot rework (see the attribution-window registry issue) so the disarm hook is no longer needed at all.
  4. Verify turn-end block attribution (Orichalcum, Cloak Clasp, The Abacus, Bone Flute) still works in-game.
  5. Refresh the checked-in lib/sts2.dll reference stub to the new version so CI/pod builds match the live game.

Guardrail to add

A CI step (or the harness prepare phase) that fails loudly when the mod does not compile against the live game DLL, so a game update surfaces immediately instead of at deploy time.

**Priority: P0.** Discovered during a codebase audit on 2026-07-02. ## Problem Steam shipped a Slay the Spire 2 update (game DLL `data_sts2_windows_x86_64/sts2.dll` dated 2026-07-02 20:32) that **removed `Hook.AfterTurnEnd`**. This broke the mod's build against the live game (`CS0117: 'Hook' does not contain a definition for 'AfterTurnEnd'`). PR #248 unblocked the *build* (runtime `TargetMethods()` lookup for the two block-window cleanup patches + per-class Harmony install isolation so one broken patch can't take down all tracking). **But it did NOT verify runtime behaviour against the new game version** — that needs an in-game launch, which the audit could not perform headless. ## What this issue covers A full compatibility pass against the current STS2 version: 1. Re-decompile the current `sts2.dll` (see `docs/surviving-sts2-updates.md`) and diff the hook/relic/command surface against the prior decompile. 2. Confirm every one of the ~57 patch classes still binds — check the `Patch install: N classes patched, M failed/skipped` log line added in PR #248 (`CoreMain.Initialize`) after a launch, and investigate every `failed/skipped`. 3. Determine what replaced `Hook.AfterTurnEnd` (renamed? folded into `AfterSideTurnEnd*`?) and re-home the Orichalcum / Cloak Clasp block-window **disarm** so the cleanup fires again — or, better, fold it into the consuming-one-shot rework (see the attribution-window registry issue) so the disarm hook is no longer needed at all. 4. Verify turn-end block attribution (Orichalcum, Cloak Clasp, The Abacus, Bone Flute) still works in-game. 5. Refresh the checked-in `lib/sts2.dll` reference stub to the new version so CI/pod builds match the live game. ## Guardrail to add A CI step (or the harness prepare phase) that fails loudly when the mod does not compile against the live game DLL, so a game update surfaces immediately instead of at deploy time.
nelsong6 commented 2026-07-05 15:45:16 -07:00 (Migrated from github.com)

Closing during repository issue cleanup. If this becomes active work again, we can reopen or recreate it as a fresh, specific task.

Closing during repository issue cleanup. If this becomes active work again, we can reopen or recreate it as a fresh, specific task.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
romaine-life/spirelens#249
No description provided.