fix(dungeo): melee blank-output + MDL-canonical Low Room carousel; add Phrase Algebra primer#173
Merged
Merged
Conversation
…d Phrase Algebra primer Two root fixes: 1. Empty-template shadowing: npc-messages.ts was registering empty-string templates for melee message IDs, causing the lang-en-us inline-text fallback to be silently bypassed and producing blank combat output. Removed the empty registrations so the fallback now fires correctly. 2. Low Room carousel direction: the FLIP flag in robot-entity.ts drives Round Room and Low Room oppositely. Added MDL-canonical comment to document this intentional asymmetry; wt-10-tea-room.transcript updated with WHILE-loop retry to handle the randomized room sequence reliably. Full walkthrough chain now passes 885/885. Also adds docs/reference/phrase-algebra-primer.md — as-built reference for the Phrase Algebra pattern used in melee-messages.ts. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Summary
Two root fixes for dungeo walkthrough failures introduced by the Phrase Algebra text-emission change (ADRs 192–206), plus a durable reference doc. Story-level only — no platform changes.
Walkthrough chain: 402/648 → clean 885/885 pass.
1. Melee combat blank output
stories/dungeo/src/messages/npc-messages.ts: removed empty-string template registrations for the dynamic melee IDs. Under Phrase Algebra an''template makesgetTemplatereturn''(notundefined), sorenderViaPhrasereturns a blank non-null block and shadows the inline-textfallback the melee interceptor relies on → blank combat output. Unregistered IDs now fall through to the inline-text path.stories/dungeo/src/combat/melee-messages.ts:getHeroAttackMessagenow substitutes{the villain}as well as{villain}(the old regex left{the villain}literal).2. Low Room carousel (MDL-canonical)
act1.254CAROUSEL-EXIT,act3.199MAGNET-ROOM-EXIT+TRBUT): the singleCAROUSEL-FLIP!-FLAGdrives the two rooms oppositely — the triangular button toggles it TRUE, which fixes the Round Room but randomizes the Low Room (<PROB 50>). Sorobot-entity.tssettingcarousel.active=trueis correct; the bug was that wt-10's return path crosses the Low Room after the button push with no retry loop.stories/dungeo/walkthroughs/wt-10-tea-room.transcript: wrapped the Low Room return in a WHILE-loop retry to Tea Room, exactly like the existing Round Room loop.stories/dungeo/CLAUDE.md: corrected the backwards Low Room note.$restore).3. Phrase Algebra primer
docs/reference/phrase-algebra-primer.md(new): as-built reference for the text-rendering system (ADRs 192–206) — Phrase model, template grammar, atom catalog, Assembler, emission pipeline, Structural Realization Mandate, failure modes, melee case study.Acceptance
Per the project rule "one good run is acceptable" (thief + carousel RNG make some chain runs flaky by design), the chain reaches clean full-green runs (885/885). Residual per-run flakiness is inherent thief (wt-13) / carousel (wt-10/wt-17) randomness.
🤖 Generated with Claude Code