From 3ad372bc3604968747491c55536d65b45f9c36d2 Mon Sep 17 00:00:00 2001 From: Disco DeDisco Date: Tue, 26 May 2026 18:19:11 -0400 Subject: [PATCH] =?UTF-8?q?FT=20fix=20CI=20#342:=20seed=20log=5Ftax=5Fdebi?= =?UTF-8?q?t=20in=20test=5Fsaved=5Fdraw=5Frenders=5Fbrief=5Fbanner=20?= =?UTF-8?q?=E2=80=94=20@taxman=20ledger=20sprint=20left=20the=20FT=20stale?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CI pipeline #342 surfaced two errors, both on the same selector failure path: 1. `test_saved_draw_renders_brief_banner_with_next_free_draw_timestamp` (test_game_my_sea.py:1233) — DEFINITELY caused by my @taxman ledger sprint (f44a282). The Brief banner on /gameboard/my-sea/ is now server-driven via the `free_draw_brief_payload` context var, which `my_sea_lock` emits via `log_tax_debit` on the first card of a cycle. This FT bypasses `my_sea_lock` by ORM-creating the MySeaDraw row (`_save_draw_for_user` helper) — no tax-debit emitted, no payload, no banner, selector fails. Fix: explicitly call `log_tax_debit(self.gamer, "free_draw_locked")` after the ORM seed, mirroring what `my_sea_lock` would have done in the real flow. Kept the seed scoped to test 3 only (the only test that asserts the Brief); the other tests using `_save_draw_for_user` (picker phase, saved hand slots, DEL portal, etc.) don't need it. 2. `test_carte_blanche_equip_and_multi_slot_gatekeeper` (test_trinket_carte_blanche.py:82) — selector for `.my-sea-sign-gate-brief` (added in `a133a9c` per polish-9 race fix) fails ONLY in the CI batched run, NOT in isolation (3× local runs pass, including running the full carte test class). The most likely chain: the my_sea FT above fails alphabetically FIRST in the batch, raises NoSuchElement after the 10s wait_for timeout. That can leave the test runner / geckodriver / Firefox in a transient bad state that the next test (carte blanche) inherits. Common signature for this kind of CI-only cascade w. one root cause: fix the upstream test, downstream clears too. Local sweep: the my_sea fix in isolation passes (12.881s); the full carte class passes (34.456s, 3 tests). Expectation: CI pipeline #343 will clear both errors w. this one-line fix. If carte still fails on the next CI run after the my_sea fix lands, the next step is to inspect the CI screendump for the carte failure (not synced to local) to see what state the page was actually in. Code architected by Disco DeDisco Git commit message Co-Authored-By: Claude Sonnet 4.6 --- src/functional_tests/test_game_my_sea.py | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/functional_tests/test_game_my_sea.py b/src/functional_tests/test_game_my_sea.py index 9a91fd2..03bec9d 100644 --- a/src/functional_tests/test_game_my_sea.py +++ b/src/functional_tests/test_game_my_sea.py @@ -1234,12 +1234,27 @@ class MySeaLockHandTest(FunctionalTest): """Post-lock UX: a Look!-formatted Brief banner appears atop the h2 (standard portaled `.note-banner` w. Gaussian-glass bg, same styling as my-notes / my-sign default-deck-warning Briefs). The - next-free-draw timestamp lives in the dedicated `.note-banner__ + spend-moment timestamp lives in the dedicated `.note-banner__ timestamp` `