feat(thressgame-100): Wave 6 \u2014 preset cross-refs + WONT_FIX manifest
Wave 6 of thressgame-100 epic complete \u2014 closing wave. 70 total recipes.
8 NEW PRESET-STUB RECIPES (W6.0):
For ThressGame rules that are architecturally PRESET-shaped (not modifier-shaped),
shipped as discoverable but inert recipe stubs. Loading them shows a docs panel
pointing at the canonical preset implementation.
- tpl-preset-dual-king \u2192 preset 'dual-king'
- tpl-preset-coregal \u2192 preset 'coregal'
- tpl-preset-god-kings \u2192 preset-hook shape (closest: knightmate-rules)
- tpl-preset-early-promotion \u2192 preset-hook shape (not yet a named preset)
- tpl-preset-proletariat \u2192 preset-hook shape (not yet a named preset)
- tpl-preset-short-stop \u2192 preset-hook shape (not yet a named preset)
- tpl-preset-trains-rights \u2192 preset-hook shape (not yet a named preset)
- tpl-preset-pacman \u2192 preset 'wrap-board'
All 8 use empty primitives: [] (validator allows it \u2014 no MIN_PRIMITIVE constraint).
RULES.md CROSS-REFERENCE SECTION (W6.1):
New section 'Cross-References \u2014 ThressGame Rules as Chess Presets' at lines
498\u2013545 of RULES.md. Format: preamble + 8-row mapping table + 'Why these are
preset-shaped' rationale + pointer to WONT_FIX manifest.
UI DISTINGUISHER (W6.2):
CustomModifierEditor.tsx adds visual marker for stub recipes (id startsWith
'tpl-preset-'):
- data-recipe-kind='preset-stub' attribute (vs 'modifier')
- Amber left border (border-l-4 border-l-amber-400)
- 'preset \u2192' badge (amber bg) instead of 'Load' badge (blue bg)
~25 lines added; signals that loading is essentially a no-op \u2014 canonical action
is enabling the preset elsewhere.
WONT_FIX MANIFEST (W6.3):
packages/chess/docs/THRESSGAME_WONT_FIX.md \u2014 151 lines documenting 6 rules
that cannot be implemented because upstream behavior is undefined or out of
scope:
- pawns_with_viagra (line 1626 of ruleHooks.js: empty {} stub)
- estrogen (line 1638: empty {} stub)
- knee_surgery (line 1698: empty {} stub)
- pawns_learned_strength (line 1699: empty {} stub)
- parry (RPS handler) (lines 1599\u20131601: comment routes to moveHandler.js \u2014
parry parity recipe ALREADY ships; this entry just
documents the upstream code-location split)
- pacman_style (modifier) (line 1670: body is {}; topology in getWrapMoves
outside hook system. Routed to chess preset
wrap-board; tpl-preset-pacman cross-references it)
Closing summary table ties back to coverage accounting:
65 raw rules = 51 modifier-coverable + 8 preset-shaped + 6 WONT_FIX
bun run check: 3270 tests pass (no new tests; 0 regressions).
recipes.test.ts: 5 \u00d7 70 = 545 expect calls (was 513 for 62 recipes).
FINAL EPIC COVERAGE STATE:
- 50 unique ThressGame rules covered as modifier recipes (50/51 = 98 %)
- 8 ThressGame rules cross-referenced via preset stubs
- 6 ThressGame rules in WONT_FIX manifest (upstream stubs)
- 65 raw rules accounted for (50 + 8 + 6 + 1 ice_physics already shipped W2)
= 65/65 = 100 % accounted
- 70 total recipes in CUSTOM_MODIFIER_RECIPES
- 3270 tests passing across 265 test files
- 5 e2e specs (wave1\u2013wave5) all green via docker compose dev stack
Plan: .sisyphus/plans/thressgame-100.md
Notepads: .sisyphus/notepads/thressgame-100/
Evidence files: .sisyphus/evidence/thressgame-100-wave{1,2,3,4,5}.txt (gitignored)
This commit is contained in:
parent
a2c38a9ad2
commit
ff049ea5eb
6 changed files with 412 additions and 21 deletions
|
|
@ -147,7 +147,8 @@
|
|||
"ses_22ed7ead4ffe0ku37F9Y6qIO9s",
|
||||
"ses_22ed735fdffeyscON4NRPNOrz5",
|
||||
"ses_22ec6f8a8ffeaZwK7e1GUo035a",
|
||||
"ses_22ec791c3ffeMYLw6bTdYIxPNm"
|
||||
"ses_22ec791c3ffeMYLw6bTdYIxPNm",
|
||||
"ses_22ebd2f4fffe5gTdsn3wPb0u6D"
|
||||
],
|
||||
"plan_name": "thressgame-coverage",
|
||||
"agent": "atlas"
|
||||
|
|
|
|||
|
|
@ -464,3 +464,61 @@ Final recipe count: **54**. None of the 8 W3 recipes was skipped.
|
|||
- **Walker double-fire behaviour for spend-resource**: `spend-resource` has `selfRecurse: true` (apply.ts:196 — walker stops descending once spend-resource is reached). But `fireOnRuleActivatedHooks` runs the on-rule-activated arm SEPARATELY post-walk, which walks into spend-resource AGAIN. Net: spend-resource is invoked twice from a single `applyCustomDescriptor` call. The 15→5 (rather than 15→10 with a single fire) is the locked observable.
|
||||
- **`Browser` type from @playwright/test** is the right import for shared helper signatures that take the test fixture's `browser` parameter. The brittle `Parameters<Parameters<typeof test>[1]>[0]['browser']` form fails LSP's `never` inference and forces inline guest-page setup.
|
||||
- **Test count delta (e2e only)**: wave5-economy.spec.ts ships 5 tests. All green on first invocation post-targetSquare fix.
|
||||
|
||||
## [2026-04-26] W6.0-W6.4 — closing wave: preset-stub recipes + WONT_FIX manifest
|
||||
|
||||
### Recipes shipped (62 → 70)
|
||||
|
||||
**Preset cross-reference stubs (8 recipes, all empty `primitives: []`)**:
|
||||
|
||||
- `tpl-preset-dual-king` → preset `dual-king` (RULES.md § Dual King)
|
||||
- `tpl-preset-coregal` → preset `coregal` (RULES.md § Coregal)
|
||||
- `tpl-preset-god-kings` → preset-hook shape (closest preset: `knightmate-rules`)
|
||||
- `tpl-preset-early-promotion` → preset-hook shape (override-promotion + row config; not yet a named preset)
|
||||
- `tpl-preset-proletariat` → preset-hook shape (`getLegalMoveModifiers` — pawns-only; not yet a named preset)
|
||||
- `tpl-preset-short-stop` → preset-hook shape (sliders limited to 1 sq; not yet a named preset)
|
||||
- `tpl-preset-trains-rights` → preset-hook shape (queens move like kings; not yet a named preset)
|
||||
- `tpl-preset-pacman` → preset `wrap-board` (RULES.md § Cylindrical Board); modifier sibling `tpl-pacman-style-cross-ref` (W4)
|
||||
|
||||
### Validator finding — empty `primitives: []` is legal
|
||||
|
||||
- `validate.ts` checks `MAX_PRIMITIVE_COUNT = 50` (upper bound only), and `recipes.test.ts § registered primitive kinds` iterates the array trivially for length=0. **No non-empty constraint exists.** This means stub recipes can ship with `primitives: []` (the simpler choice) without a sentinel passive primitive. All 5 invariants pass cleanly: 545 expect calls (was 513 at W5 close).
|
||||
- The `descriptorForRecipe()` helper accepts `primitives: []` as-is (it's typed `readonly EffectPrimitiveNode[]`).
|
||||
|
||||
### Preset cross-ref outcome — only 4 of 8 ThressGame rules have shipped named presets
|
||||
|
||||
- **Shipped named presets**: `dual-king`, `coregal`, `wrap-board`, and `knightmate-rules` (the closest analog to `god_kings`).
|
||||
- **Preset-hook-shaped but NOT yet shipped as named presets**: `early_promotion`, `proletariat`, `short_stop`, `trains_rights`, and a strict "kings immune" variant of `god_kings`. The cross-ref table acknowledges this — these stub recipes point at "preset-hook shape, not yet shipped as a named preset" rather than at a specific preset ID. Authors who need the rule today can implement it as a preset-hook-style preset; the modifier surface lacks the primitives (`filter-legal-moves`, royalty toggle, per-rank promotion override) to express it.
|
||||
- **Naming note**: `trans_rights` is a renaming of upstream `trains_rights` — the recipe ID is `tpl-preset-trains-rights` (matches upstream spelling) but the title and RULES.md table use `trans_rights` (the player-facing name).
|
||||
|
||||
### UI badge shipped (W6.4)
|
||||
|
||||
- **`CustomModifierEditor.tsx` Templates modal** now distinguishes preset-stub recipes from regular templates via two markers:
|
||||
1. `data-recipe-kind="preset-stub" | "modifier"` data attribute on every template card — usable from Playwright assertions.
|
||||
2. **Visual distinguisher**: stub cards get an amber left-border (`border-l-4 border-l-amber-400`) and a `preset →` badge (amber background) in place of the regular `Load` badge (blue background). The badge wording communicates that loading is essentially a no-op (empty primitives) — the canonical action is enabling the preset elsewhere.
|
||||
- Net diff: ~25 lines (the original `.map` callback wrapped in a `({...} => { const isPresetStub = ...; return (<div ...>) })` form). LSP clean, no behavioural change to the existing 62 recipes' rendering.
|
||||
|
||||
### `RULES.md` cross-ref section
|
||||
|
||||
- Inserted at lines 496-545 (50 lines), between the "New Starting Layouts" H2 and the "Trigger Primitives" H2. Format: section preamble + 8-row table + "Why these are preset-shaped" rationale + "See also" pointer to `THRESSGAME_WONT_FIX.md`.
|
||||
- Heading: `## Cross-References — ThressGame Rules as Chess Presets`. The H2 level matches the surrounding "Rule Variants Gallery (v2, 2026)" / "New Starting Layouts" siblings.
|
||||
|
||||
### `THRESSGAME_WONT_FIX.md` manifest
|
||||
|
||||
- New file at `packages/chess/docs/THRESSGAME_WONT_FIX.md` — 130 lines, markdown.
|
||||
- 6 entries: 4 strict empty-stubs (`pawns_with_viagra`, `estrogen`, `knee_surgery`, `pawns_learned_strength`) + 2 documented split-implementation cases (`parry` — RPS logic in `moveHandler.js`; `pacman_style` — topology in `getWrapMoves` + chess preset `wrap-board`).
|
||||
- Closing summary table tying back to the locked coverage accounting from `decisions.md` § K: 65 raw − 6 WONT_FIX − 8 preset-shaped = 51 effective (covered W1-W5).
|
||||
|
||||
### Test count delta (W6 — documentation + recipe stubs only)
|
||||
|
||||
- `recipes.test.ts`: 5 invariants now apply to 70 recipes — 513 → 545 expect calls (+32, from 8 new recipes × 4 invariants per recipe). Test count unchanged (5).
|
||||
- No new test files in W6 — the W6 deliverable is documentation + recipe stubs, not new behavioural tests. The stub recipes are inert (`primitives: []`) and cannot be runtime-tested in a meaningful sense; their contract is "valid descriptor that loads in the editor without error", which `recipes.test.ts § every recipe descriptor validates` already pins.
|
||||
- **No regression in any of the 3270 existing tests** — empty-primitives stubs add no behaviour to validate against.
|
||||
|
||||
### Files modified / created (W6)
|
||||
|
||||
- **MODIFIED** `packages/chess/src/modifiers/custom/recipes.ts` — appended 8 preset-stub recipes (lines ~3032+).
|
||||
- **MODIFIED** `packages/chess/RULES.md` — added "Cross-References — ThressGame Rules as Chess Presets" H2 section (lines ~496-545).
|
||||
- **MODIFIED** `packages/chess/src/ui/CustomModifierEditor.tsx` — Templates modal `.map()` now branches on `recipe.id.startsWith("tpl-preset-")` for badge + border styling.
|
||||
- **CREATED** `packages/chess/docs/THRESSGAME_WONT_FIX.md` — 130-line WONT_FIX manifest.
|
||||
- **MODIFIED** `.sisyphus/notepads/thressgame-100/learnings.md` — this section.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue