fix(engine): the map gates a research/discussion birth; the d/r doors refuse a mapped name - #1089
Merged
Merged
Conversation
…and the d/r doors refuse a mapped name The epic menu derives every topic's next action from the discovery map, so a research-routed topic never offers a discussion until its research completes. The menu's d/r command options bypassed that: they take a free-typed name, the discovery-item ensure no-ops on an existing item whatever its routing, and topic start read only the phase item's own status. Typing a research-routed topic's name at d started a discussion on it with the research untouched. - topic start (epic, research|discussion): refuses a birth the map's next action does not name — the same join the menu renders from. An in-progress item always resumes; a parked research stub always drains (research is downstream of nothing, and a discussing topic's parked research has no menu row). - render direct-entry-gate <wu>.<phase>.<topic>: the d/r doors' gate — empty for a name not on the map, the entry-blocker pair naming where the topic stands otherwise; the research drain passes. - both entry skills fetch the gate after kebab-casing and stop terminal on a blocker, before deriving a summary or ensuring a map item. - lifecyclePhrase moves to derivations (one home, three consumers) and gains the fresh case. - tests: transactions (the guard's every arm), render surfaces, the simulation; a new prose case walks the d door into the refusal; the dead-peer sweep case's recipe reroutes its topic before discussing it (a world the engine could no longer produce). Co-Authored-By: Claude Fable 5.1 <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.
What
Closes the one door that bypassed the discovery map's ordering: the epic menu's
d/rcommand options take a free-typed topic name, and a name already on the map slipped through.Why
The epic menu derives each topic's next action from the map — a research-routed topic never offers a discussion until its research completes. But at the
ddoor the entry skill read only the discussion item's own status, the shared discovery-item ensure no-ops on an existing item whatever its routing, andtopic startchecked nothing beyond the item itself. Typing a research-routed topic's name atdstarted a discussion on it with the research untouched. Same hole atr.Changes
topic starton an epic, for research and discussion, refuses a birth the map's next action does not name (the same lifecycle join the menu and the map ops already use, so the engine is never the permissive path around the prose). Two deliberate passes: an in-progress item always resumes, and a parked research stub always drains — research is downstream of nothing, and a discussing topic's parked research has no menu row (a research-side concern lands research-side regardless of routing, pertriage-landing.md). A parked discussion stub on a research-routed topic waits for the research, as the menu already has it.render direct-entry-gate <wu>.<phase>.<topic>— thed/rdoors' gate. Empty for a name not on the map (or a work unit without one); the entry-blocker pair otherwise, naming where the topic stands ("already on the map — it is routed to research and nothing has started") and pointing back to the epic menu. The research drain passes here too.lifecyclePhrasemoves fromdiscovery-map.cjstoderivations.cjs(one home, three consumers) and gains thefreshcase.commands.md, and the engine usage banner updated.Tests
test-engine-transactions: every arm of the guard — both refusals, the discussion-stub wait, the research-stub drain beneath a live discussion, the map's own next action passing, resume regardless, off-map and non-epic ungated, the terminal-status refusals keeping their own words.test-engine-render-surfaces: the surface's blocker text per lifecycle, the drain pass, empty for new names and features, the phase refusal.discussion-direct-entry-refuses-a-mapped-topic: workflow-start → the epic →d→ a research-routed name → the blocker, world unchanged.discussion-sweeps-a-dead-peers-leavings: its recipe birthed a discussion on a research-routed topic — a world the engine can no longer produce — so it reroutes the topic first, as the epic mainline already does. Snapshot diff is that oneroutingfield.Verification
npm test— 2746 pass.npm run typecheckclean.node tests/prose/run.cjs select --diff mainintersects every discussion-entry case; the two worth walking first arediscussion-direct-entry-refuses-a-mapped-topic(new) andstart-continues-an-epic-into-discussion.Standalone, not stacked on #1088 — the two touch different lines of the simulation and merge independently.
🤖 Generated with Claude Code