Skip to content

fix(generate): fail fast on excess progression, keep tracebacks off the streams - #192

Merged
lallaria merged 1 commit into
mainfrom
didi/dialog-generation-error-handling-5f5fed
Oct 19, 2026
Merged

lallaria merged 1 commit into
mainfrom
didi/dialog-generation-error-handling-5f5fed

Conversation

@lallaria

@lallaria lallaria commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Scope

Generation failures: an impossible fill fails immediately, and Generate no longer writes tracebacks to its output streams.

Description

  • distribute_items_restrictive raises FillError before any placement when progression items outnumber priority + default locations (except with the start_inventory panic method), naming each player over their count. A Manual world with 1000 progression items and 1 location previously left the swap search running indefinitely after the "Could not remove enough non-progression items" warning.
  • Generate.py reports main() failures (e.g. invalid player YAMLs) through _report_generation_failure: the traceback goes to the log file and the stream gets one Generation failed: ... line, instead of an uncaught traceback on stderr that the launcher showed verbatim in its dialog.
  • Companion to fix(dialog): cap MessageBox text and drop tracebacks from Generate failures mwgg-gui#79, which shows only that summary line and caps dialog text.

…he streams

Fill.py: raise FillError before any placement when progression items outnumber priority and default locations, naming the players over their count.
Generate.py: report main() failures through _report_generation_failure so the traceback stays in the log file.
test/general/test_fill.py: cover the early failure and the start_inventory exemption.
test/programs/test_generate.py: run Generate on a broken player file and check stderr carries no traceback.
@lallaria
lallaria merged commit 1dcaa93 into main Oct 19, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant