[PR #6914] [MERGED] test(rulesets): two ruleset lanes that failed now and then #7380

Closed
opened 2026-10-23 04:19:11 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/6914
Author: @kolacheee
Created: 9/30/2026
Status: ✅ Merged
Merged: 9/30/2026
Merged by: @kolacheee

Base: staging ← Head: fix/ruleset-items-director-lane-flake


📝 Commits (3)

  • 1dd7d6a test(rulesets): the classic-items lane's directed battle cannot end before its items are used (#6913)
  • 9096e0c test(rulesets): the loot lane counts a dropped hand axe past the axes the party carried in (#6913)
  • 3a7c3a0 Merge remote-tracking branch 'origin/staging' into fix/ruleset-items-director-lane-flake

📊 Changes

3 files changed (+15 additions, -16 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 scripts/regressions/game-ruleset-classic-items.regression.ts (+4 -2)
📝 scripts/regressions/game-ruleset-loot.regression.ts (+10 -14)

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #6913

Why this change

  • game-ruleset-classic-items.regression.ts (added by #6908 and #6910) can fail now and then with "Battle already finished." Its directed battle put Ada (30 HP) against a Rat (30 HP, attack 8). Initiative is rolled again every round, so the rat can act twice between Ada's turns, and the dawn bell can hit hard, so the battle could end on the dice before the test used its second item. It failed once in a full pnpm regression run on the merged #6910 code.
  • game-ruleset-loot.regression.ts (added by #6900) failed in this PR's own CI with "Hand axe is in the bags" (3 !== 1). It asserted that the bags hold exactly what the moth's table dropped, but the party starts with two hand axes, so whenever the table's weapon line picked a hand axe the count came out 3.

What changed

  • The classic-items lane's directed battle gives both sides 300 HP and the rat no attack, so neither side can end it before the test's items are used.
  • The loot lane counts each drop past what the party carried in. Nothing either test proves changes.
  • A CHANGELOG entry.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • pnpm check and prettier: clean.
  • The classic-items lane passed six runs in a row with the fix.
  • The loot fix is proven by forcing the moth's table to drop a hand axe: the old assertion fails ("Hand axe is in the bags"), the new one passes; the lane also passes as written.
  • The full gate on the merged #6910 code otherwise passed: pnpm regression 479 of 480 (this lane the one failure), pnpm smoke:ui 7, desktop e2e 53, mobile e2e 28.
  • Local CodeRabbit: no findings.
  • Test-only change: nothing to click through.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

CHANGELOG only; no user-facing docs.

UI evidence (if applicable)

Not applicable.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed an issue in the classic-items lane where a directed battle could end before the second item was used, allowing the encounter to proceed as expected.
    • Corrected loot counts so axes already carried by the party are not counted as newly dropped loot. This makes reported drops reflect only items obtained during the fight.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/6914 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 9/30/2026 **Status:** ✅ Merged **Merged:** 9/30/2026 **Merged by:** [@kolacheee](https://github.com/kolacheee) **Base:** `staging` ← **Head:** `fix/ruleset-items-director-lane-flake` --- ### 📝 Commits (3) - [`1dd7d6a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1dd7d6a66d92af1336f898fd3e9251239ee0e246) test(rulesets): the classic-items lane's directed battle cannot end before its items are used (#6913) - [`9096e0c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9096e0cb3c3cbb0b8514c9f50c422a6ca7840879) test(rulesets): the loot lane counts a dropped hand axe past the axes the party carried in (#6913) - [`3a7c3a0`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3a7c3a032f7cbdc55c95b8ede8947079e033e68b) Merge remote-tracking branch 'origin/staging' into fix/ruleset-items-director-lane-flake ### 📊 Changes **3 files changed** (+15 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `scripts/regressions/game-ruleset-classic-items.regression.ts` (+4 -2) 📝 `scripts/regressions/game-ruleset-loot.regression.ts` (+10 -14) </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. <!-- See CONTRIBUTING.md § Branches. --> ## Linked issue Closes #6913 ## Why this change - `game-ruleset-classic-items.regression.ts` (added by #6908 and #6910) can fail now and then with "Battle already finished." Its directed battle put Ada (30 HP) against a Rat (30 HP, attack 8). Initiative is rolled again every round, so the rat can act twice between Ada's turns, and the dawn bell can hit hard, so the battle could end on the dice before the test used its second item. It failed once in a full `pnpm regression` run on the merged #6910 code. - `game-ruleset-loot.regression.ts` (added by #6900) failed in this PR's own CI with "Hand axe is in the bags" (3 !== 1). It asserted that the bags hold exactly what the moth's table dropped, but the party starts with two hand axes, so whenever the table's weapon line picked a hand axe the count came out 3. ## What changed - The classic-items lane's directed battle gives both sides 300 HP and the rat no attack, so neither side can end it before the test's items are used. - The loot lane counts each drop past what the party carried in. Nothing either test proves changes. - A CHANGELOG entry. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes - `pnpm check` and prettier: clean. - The classic-items lane passed six runs in a row with the fix. - The loot fix is proven by forcing the moth's table to drop a hand axe: the old assertion fails ("Hand axe is in the bags"), the new one passes; the lane also passes as written. - The full gate on the merged #6910 code otherwise passed: `pnpm regression` 479 of 480 (this lane the one failure), `pnpm smoke:ui` 7, desktop e2e 53, mobile e2e 28. - Local CodeRabbit: no findings. - Test-only change: nothing to click through. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) CHANGELOG only; no user-facing docs. ## UI evidence (if applicable) Not applicable. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Fixed an issue in the classic-items lane where a directed battle could end before the second item was used, allowing the encounter to proceed as expected. - Corrected loot counts so axes already carried by the party are not counted as newly dropped loot. This makes reported drops reflect only items obtained during the fight. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:19:11 +07:00
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
Pasta-Devs/Marinara-Engine#7380
No description provided.