Files
Dune/docs/MIRROR_WEAPON_ENGINE_AUDIT.md
T
Quintine 19e554666e Admit Mirror and Stone in Basic native E3 battles
Reuse original copied-weapon and typed coalition accounting for bare Basic
Ecaz/Moritani and selected Ix. Preserve optional-module guards and physical
card identity, actual force-owner commitments and native continuations.
2026-10-24 16:34:19 +11:00

30 KiB
Raw Blame History

Mirror Weapon: source and engine integration audit

The 24 October Basic native follow-up is the current bare-profile boundary. Older September audits, blocker descriptions and start restrictions below are dated evidence. Complete expansion rules and publication acceptance remain gated.

28 September ruling and runtime: the user selected ordinary winner retention for the physical Mirror even when its copy activates Tooth or Artillery. This is an explicit product interpretation, not a located GF9 clarification. game/effective-weapons.ts keeps physical identity apart from copied attacks; the engine now connects copied Tooth/Stone choices, Stone comparison, custody, battle controls and legal AI in the bounded configuration.

Basic native E3 admission — 24 October 2026

Prototyped / Partial. Bare Basic CHOAM/Richese plus Ecaz/Moritani now uses the same canonical physical Mirror and original Stone handling as supported Advanced tables. Selected Ix can remain present with its real Cyborg/Suboid pools. This supersedes the older Advanced-only native-E3 boundary below. The public profile admits the configured families without inspecting hands or sealed plans. Homeworlds, Nexus, Leader Skills, Discoveries and active Sandtrout remain guarded. Basic E3 with Tech Tokens or Stronghold Cards also stays outside this slice; existing Advanced E3 without Ix retains its prior phase-module permission. Mixed Advanced E3/Ix phase modules keep their existing guard.

The actual battle actors, native fixed Ecaz commitment and variable allied forces remain separate. Copied Tooth and Stone choose before their originals, with original physical IDs in sealed/revealed plans. An ambiguous Stone total is committed by the original physical force owner, even when Ecaz selected its own leader and plan. Keep Basic zero support, actual typed casualties, later Ix substitution and native cleanup. No new numerical or timing ruling is made: printed copy-first, the existing provisional allocation procedure and the user-selected physical-Mirror winner retention stay in force.

New fixtures start through genuine public Basic native setup, original cards, a real Nexus alliance and actual battle admission. They explicitly inherit a conserved controlled battle board, thirty-spice budget and original-card transfers; they are not unstaged acquisition or complete-game evidence. Both coalition leads and an actual Moritani combatant receive their own Mirror. Native controls remain explicit and persistent; minimal profiles use the current public profile and own legal plan/decision views.

Basic native source and verification

The original six-faction Basic setup retains Ecaz, Ixians, CHOAM, Richese, Moritani and Tleilaxu, original native components and the actual Ecaz/Ix alliance. Before real admission, the source explicitly conserves five Ecaz and eight allied Ixian counters (including two Cyborgs), or replaces the opposing CHOAM army with five conserved Moritani counters. It inherits the labelled thirty-spice controlled budget and moves original physical cards between their actual cache/deck/hand locations. Neither the phase, alliance, battle, plan nor finished outcome is installed. This is genuine setup plus controlled rule-case staging, not an unstaged full game or a naturally played Mirror acquisition.

Both coalition leads copy Tooth before the original, keep physical Mirror after winning and pay no Basic support. Real leader deaths supply their printed bounty. Copied Stone independently chooses before its original; fixed Ecaz3 and undialed2 remain separate from the allied pool. Two real physical-count alternatives6/9 belong to Ix regardless of the selected plan actor; each extreme settles its actual winner, typed losses, native substitution and cleanup. Moritani's five undialed counters defeat the coalition's four despite its total dial9. Original card inventory and physical pools remain conserved.

The final frozen batch passes 17 files130/130, npm run check:quick, production build and six actual-state gameplay/GameTable SSR programmes. Two native Stone-allocation component callbacks retain busy no-submit and submit the original event/count. Copied Tooth/Stone inline GameTable controls are rendered persistently with busy choices and exercised through actual event-bound engine actions; their inline callbacks are not directly invoked. Twelve existing-profile continuations accept36 proposals plus256 separate native controls. No strategy change or strength calibration is performed.

The first batch's legacy Mirror/Stone tests asserted results before the existing final outcome window closed. One committed-profile probe reproduces the old Mirror failure. Shared fixture continuations now submit the actual two final Ready controls; two old ambiguity guards are explicitly limited to legacy unstamped battles. Fresh v1 cases keep their physical commitments. Later narrow feedback fixes one such old guard and a reserved lint identifier. The final frozen source, including these repairs, passes all required checks.

Private artifacts: /home/quintine/.local/share/dune/checkpoints/20261024-basic-native-mirror/, final frozen-integrated-4/report.json, runtime-smoke.json, private HTML/logs, committed-profile-baseline.log, verified-files.json and documentation-overlay.json. Before final prose: base49992d322f543726ad858e0bed60226711f1c32d, source tree512bef259fadc063d64325dfac227144b202d746d0cff8d19d4d3753ec24db06, 2661 tracked/nonignored files unchanged throughout verification. Only four checkpoint-prose/reference overlays follow proof; links/evidence and reference syntax/keys are reviewed separately. Framework aliases/CSS stubs do not prove browser/visual/deployed acceptance. Full modes, optional combinations and comprehensive assurance remain open. No saved-room/D1/reset/restart/deployment operation occurs.

Original phase-module composition — 16 October 2026

Selected Ix/CHOAM now preserves original Tech3+ and/or Advanced Strongholds2+ for original Stone and physical Mirror, in ordinary47 or independently selected 50-card setups with the separate ten-card cache. Reuse the existing public physical-allocation guard, provisional original Stone-before-Tooth, printed copy-first and user-selected winning physical retention. This closes a profile gap, not a new publisher priority or a reason to inspect a hidden plan.

Keep Homeworlds, Nexus, Skills, Discovery, Sandtrout and mixed E3 with these phase modules guarded. Existing non-Ix bands and public/played-save gates stay. Original setup, first-Storm Tech, delayed income and actual end-Mentat custody remain; no module owner, force, wallet, phase or history is assigned.

The genuine programme acquires Stone through its original unbid-cache producer, pays a concealed marker shipment, earns Habbanya at end-Mentat, then receives a real next-turn typed Ixian attack. Legal opening dials3+3 keep Ix before Richese; the later native Storm Deck remains original. Tooth/Mirror/Reinforcements and the acquired Stone transfer for the Mirror case are explicit conserved physical staging, not a claimed natural card trade.

Normal Node/UI outcomes compare4 versus3 in Basic and an earned3-versus3 Advanced tie. Without the held Habbanya in a separate genuine Tech-only game, the same tie loses despite +2 Reinforcements. The original fee still pays once: Richese reserves12/Tanks4 or5 with R, versus15/Tanks1 or2 in original47. Ix loses three actual counters including one cyborg; original HMS6/elite3 stays. Winning Stone/Mirror stays physical, both selected leaders die once in kill programmes, and original Tech reward/Collection continue. Strongholds-only original47 Mirror also reaches Collection without creating Tech.

Two actual390px journeys/20 actions complete ordinary Stone-before-Tooth and earned-Habbanya copied Stone, independent choices, Traitor declines and owner retention into Collection. No horizontal overflow or browser app error observed. Four policies complete32 programmes/870 validated candidates/256 continuations across original47/independent50 and both modes. All naturally use a held Traitor; normal physical results are separate human/Node evidence. No Tleilaxu/Face Dance, new elite-revival, complete mode, strategy/calibration or deployed proof is claimed. Frozen related18-file union passes115/115; final three cases pass after fixture decision narrowing. Types/lint, build and actual prototype help pass, with existing Node deprecation, chunk-size and dynamic-route classification warnings.

Clean selected Ix composition — 16 October 2026

Clean CHOAM/Ix profiles now admit original Stone and physical Mirror with native Ixians/Tleilaxu and classics in Basic or Advanced. Existing native Ecaz/Moritani combinations remain Advanced-only. This preserves the original selected47-card deck plus separate Richese10; choosing the independent Ecaz cards instead adds its genuine three cards for50, never a trimmed substitute. Fresh/public start gates and actual physical card ownership remain unchanged.

Existing policy, not a newly invented queue: CHOAM's ordinary deck already contains Tooth without Ix. Before this cutover, an actual original CHOAM setup proved uncopied Stone chooses first, then Tooth. The standing 14 October choose-recommended instruction extends that existing prototype policy to clean Ix. The earlier priority question remains unanswered; Stone-before-Tooth is visibly provisional, not a new publisher ruling or a user answer. Mirror copy-first is separately printed on its physical face and remains unchanged.

The public profile and physical allocation guards never inspect an opposing hand or sealed plan. Winner-changing typed allocation remains blocked, even when the actual hidden plan would happen to make it finishable. New clean-Ix admission excludes Homeworlds, Nexus, Leader Skills, Discoveries and active Sandtrout. Original Tech/Advanced Strongholds use the phase-module composition above; mixed E3 with those modules remains guarded. Other bands stay separate.

Physical Mirror retention still follows the user's28 September interpretation; the original Tooth/Artillery retain their actual mandatory-discard rules. Original fixed Ecaz commitment, native variable counters and same-plan reserve fees stay separate in Advanced Occupy.

Scoped clean-Ix proof

The affected thirteen-file offline union passes 99/99. TypeScript, lint and production build pass; build retains module-register, large-chunk and Unknown-route warnings. Six new behavioral cases cover both natives/modes/ physical slots, independent copied answers, original priority, retention, public allocation ambiguity and native fixed/variable Occupy reserve cost. Natural Storm tie priority required a public-safe original Stone fixture plan; the allocation guard was preserved, not bypassed using the sealed zero dial.

Eight fresh Node programs/all four profiles use genuine native setup with explicit conserved rule staging and42 accepted continuation actions. Two additional fresh original47-card/10-cache programs, without the independent Ecaz variant, complete copied Stone in Basic and Advanced. These are native setup plus staged battle evidence, not unstaged complete-game certification.

Two actual390px journeys start before commitment with legal hands:

  • Advanced Mirror activates copied Tooth first; original Tooth independently stays unused. Both leaders die once, Ix loses four actual counters including two cyborgs, ordinary dial5/support5 wins, bounty9 leaves spice34, and the physical Mirror is retained.
  • Basic mixed Ix Stone compares four undialed counters with zero, chooses kill before the original unused Tooth, keeps its four-counter army and physical Stone, and receives bounty9/spice39. Neither typed strength nor leader value replaces the physical comparison.

Both original battles/decisions clear into the unchanged Ix Spice Collection opening. Provisional priority is visible to Stone, Mirror and original Tooth before commitment and in revealed controls. No root overflow or browser/ application error; all hands remain within capacity. Actual generated Mirror and Stone guidance imports, the policy anchor and23 evidence paths resolve; all ten facets stay Partial. No human server, saved room, D1, deployment, public start or new broad/HTTP/recovery/privacy/custody assurance campaign changed. Owned hosts/scripts are removed; private artifacts stay outside Git.

Primary evidence and a retention correction

The actual face was visually reread at /tmp/dune-rules/choam-mirror-reading.png, alongside Stone Burner at choam-stone-reading.png. Both derive from the physical-component photograph recorded with its hash and limitations in RICHESE_COMPONENTS.md. This is publisher text visible on a physical component; the photographer, publication date and complete printing history remain unverified. No photograph is imported into the application.

Mirror Weapon is one physical Weapon / Special, canonical ID richese-mirror-weapon. Its instruction is to commit it in a Battle Plan, copy the opposing revealed weapon only when that card actually counts as a weapon, and use the copy first when order matters. Its final instruction is “Discard after use.” It does not supply a target selector, a selection of arbitrary weapons, or another player's physical card.

The CHOAM & Richese rulebook, pp4–6, establishes replacement Tooth/Artillery cards, one separate ten-card cache, and normal Treachery discard routing. Local publisher-text mirror: /tmp/dune-rules/choam-lelekan-mirror.pdf and .txt. Direct GF9 retrieval returned 403; fresh official indexed excerpts corroborated p4. Bounded official-domain Mirror searches yielded no card-specific clarification.

Winner disposal interpretation. The November 2020 FAQ, p8, gives winning battle cards a general keep option even without printed retention wording. Page1 names used Tooth and Artillery as exceptions, including when their player wins; an unactivated winning Tooth can be kept. The printed Mirror face says “Discard after use” without a winner exception. The user chose to treat the copied attack as an effect, not a change of the physical Mirror’s identity: a victorious Mirror may be retained even after copying activated Tooth or Artillery. This is a product interpretation, not a GF9 erratum. Losing and mutual-loss cleanup still discard the physical Mirror.

Weapon matrix

Here “copy” means an effective attack belonging to the Mirror player, evaluated against the relevant defenses. It never changes ownership or identity of the opposing card. Descriptions of already supported attacks below map to game/battle-cards.ts; their base/Ix behavior is reused rather than replaced.

Opposing revealed selection Mirror behavior and integration consequence
Ordinary projectile, including Ix Hunter Seeker Effective projectile attack. Resolve against the other player's projectile defense. Both original and copied attacks apply; using the copy first does not make ordinary combat an alternating combat system.
Ordinary poison, including Ix Basilia Effective poison attack. Apply existing poison-defense behavior, including supported Portable Snooper.
Lasgun Effective Lasgun. Feed the effective weapon into explosion detection, not merely ordinary leader lethality. Any actual Shield/Shield Snooper involved still produces the existing territory-wide explosion unless traitors preempt it.
Poison Blade Copy both projectile and poison attack properties together. Do not ask the Mirror owner to select one.
Weirding Way in the weapon slot Copy its projectile weapon role.
Chemistry in the weapon slot Copy its poison weapon role. The opponent's pair must already be legal. Do not retroactively require the Mirror holder to possess the other defense that made the original Chemistry legal: Mirror is the committed weapon, and copies a card which already counts as a weapon.
Weirding Way or Chemistry in the defense slot Do not copy that defense. Inspect the opponent's actual weapon slot instead, which may contain another valid weapon or nothing.
Poison Tooth Copy the optional post-reveal attack, not the original owner's eventual answer. The Mirror owner chooses activation first, then the original owner chooses. Persist two separate choices. Reuse the established self-and-opponent attack evaluation; do not apply deaths between these declarations or count a leader death twice. An activated copy does not make the physical Mirror a Tooth for winner disposal.
Artillery Strike Copy the attack on both leaders, suppression of surviving leader strength, and no-bounty battle effect. Apply battle-wide suppression once, not twice. No extra mode choice is created. The physical Mirror retains the ordinary winner option.
Stone Burner The copied effect needs its own post-reveal choice before the original user's choice. Both effects use the existing undialed physical-token comparison. Either kill choice kills both leaders; one ignore choice cannot reverse that. Share the existing Stone casualty-feasibility and mode logic rather than substituting ordinary weapon kills.
No weapon, or Worthless in place of a weapon No effective attack. Mirror remains its physical committed Weapon / Special; an occupied slot alone is insufficient evidence of an opposing weapon.
Reinforcements or Harass & Withdraw in place of a weapon No effective attack from those cards. The Ecaz/Moritani rulebook p11 explicitly says they do not count as a weapon or defense. Their other effects are independent.
A second Mirror Not a reachable legal physical inventory: the verified collection has exactly one. Reject duplicated physical custody. A future variant adding another copy needs a cycle rule; do not invent an infinite recursion or pretend two copies become an ordinary attack.

The existing FAQ-backed defense distinctions must survive copying: Chemistry defense protects against Tooth; Snooper-style protection does not. Shield Snooper is a shield, while defensive Weirding Way is not; the latter does not protect against Lasgun or Artillery. Generic versus named Voice applies to actual declared roles. These distinctions are confirmed by November FAQ pp4–5,8–9 and Ixian/Tleilaxu rules p11. Mirror should have a named Special-weapon Voice identity before revelation, not be classified using the opposing hidden weapon.

Preserve declarations, transform only effective resolution

  1. Admit only the strict canonical Mirror as a weapon. Do not admit every kind: 'special' card. Mirror can support Weirding Way's alternate defense role because it is a real weapon even if it ultimately copies no attack.
  2. Keep the original committed weapon ID in plans, ordinary Atreides prescience, whole-plan insight and Truthtrance promises. Revealing Mirror to Atreides is revealing Mirror, not revealing a future synthesized opposing weapon. Do not perform a hidden two-plan lookup in a public or owner-only projection.
  3. After both plans actually reveal, derive an effective descriptor from those revealed physical faces and selected slots. A suitable pure helper is resolveBattleWeapons({attacker:{weapon,defense},defender:{weapon,defense}}). Each descriptor should retain physicalId, copiedFrom or null, effective attack kind, any post-reveal choice, and ordering dependencies. Do not overwrite a Card's name/kind/ID to make existing helpers accidentally work.
  4. Bind any new choice queue to the battle event. With a copied Tooth or Stone Burner, order the Mirror choice before the corresponding original choice, irrespective of storm order. Use ordinary existing order where no copy dependency exists. Exact repeated submissions must not repeat a choice, random effect, casualty or payment.
  5. Resolve traitors and explosion precedence, then calculate ordinary or special battle effects. Copy-first is not permission to skip the second ordinary weapon because its leader would die. Existing ordinary battle rules allow both leaders to die.
  6. Derive retention from physical card identity plus actual effect use, separately from attack descriptors. Used-card lists, discard, Moritani retention, winner optional disposal, private hand custody and public inspectors must continue to refer to the physical Mirror, never to a second copy of the opponent's card.

Concrete current hook map

Location Required change before activation
game/battle-cards.ts: kind arrays, pair/Voice helpers Introduce strict identity-aware weapon admission and declared-role matching. Existing WEAPON_KINDS.includes(card.kind) cannot recognize a canonical Mirror transported as special. Avoid changing every Special's role.
engine.ts: validatePlan, findReachableBattlePlan, feasiblePrescience Use the same legal weapon admission. Preserve physical IDs and promised slots in all plan searches; a selector-only change would leave authoritative plans impossible.
nextRevealedDecision Currently detects physical poisonTooth and iterates storm order. It misses a copy entirely and orders it incorrectly. Replace or extend with a persisted effective-choice queue.
resolveBattle: explosion and battleCardEffects The existing effective descriptor already feeds explosion and ordinary attacks. Extend Stone comparison, copied mode ownership and full outcome through that same descriptor; never substitute a physical copied card.
canRetainBattleCard and Moritani cleanup Keep a shared physical cleanup policy. Do not turn the Mirror into a disposable physical Tooth: the user selected ordinary winner retention even for an activated Tooth or Artillery copy.
game/bots.ts: plan candidates, weaponKills, battleCardEffects, Tooth decision Use legal physical candidates and effective attacks only from legitimately known plans. A hidden opposing hand is not an AI input. Handle ordered post-reveal copy decisions with the same effect evaluator.
Battle plan, revealed components and Rules presentation Name and inspect the original Mirror. An additional public description can name the copied revealed weapon after both plans reveal. No extra acknowledgement is needed for a deterministic copy.

Portable Snooper is concurrently being integrated by the parent. Consume its final shared effective-defense helper and supplemental public defense state; do not duplicate or replace that work.

20 September admission review: the ordinary-copy arithmetic remains useful, but cannot alone open a genuine setup. CHOAM's Treachery deck supplies Poison Tooth and Artillery even without Ix, while the full Richese cache supplies Stone Burner. A public configuration gate therefore cannot isolate ordinary copies. Do not remove physical cards or manufacture a restricted deck to claim complete-game support. The user's copied-disposal interpretation removes that specific blocker. The bounded engine now admits Mirror with physical-card custody, public Stone feasibility and copied-choice event checks; it does not certify combined expansion modes or complete Richese starts.

  • Copied compulsory disposal: the physical Mirror follows ordinary winner retention even if it copies activated Tooth or Artillery, by the user's selected product interpretation. Keep physical identity separate from the effective attack and do not present this as a publisher ruling.
  • Stone Burner composition: the original Stone effect has a runtime foundation with a public precommit casualty-feasibility guard and one saved choice. A copied Stone needs the same feasibility for the Mirror holder without inspecting the opposing sealed plan, plus separate copy-first choice ownership. This is an outcome-integration problem, not uncertainty over whether Mirror copies a valid weapon.
  • Higher modules: inactive leader skills may modify attacks, defenses or card roles. No combined leader-skill certification follows from the matrix. Two physical Mirrors are outside the verified inventory rather than a normal supported interaction.

Required verification before claiming the slice

Tests should cover every matrix row in both attacker/defender positions; paired defenses; no-attack copies; Mirror plus defensive Weirding Way; named Voice and physical prescience/Truth commitments; Lasgun explosion including advisors/spice and traitor preemption; copied Tooth choice order independent of storm order; once-only global Artillery suppression; exact physical retention/discard policy after its ruling; Moritani eligible-card filtering; JSON restoration between reveal and choices; stale event rejection; and identical unauthorized projections with different opposing hands. Run all four AI profiles through a complete supported battle, including a Mirror with no useful copy, without an acknowledgement or deadlock.

The earlier five-facet audit is superseded only for the bounded CHOAM/Richese-deck battle path. Combined expansion modules, leader-skill role changes, every historical save and full Richese-game acceptance remain outside this checkpoint.

User-selected cleanup interpretation (28 September 2026)

After a bounded source search, no GF9 passage was found that expressly applies Tooth/Artillery's named winner-discard exception to the physical Mirror. The user selected retention of a victorious Mirror regardless of those copied attacks. The original Tooth/Artillery cards retain their own mandatory-discard rules. The bounded runtime implements this physical-card distinction; it is not a publisher clarification or complete combined-mode acceptance.