Files
Dune/docs/TRUTHTRANCE_MIXED_BATTLE.md
T

9.9 KiB

Truthtrance current facts and current battle plans

Mixed aggregate prototype — 26 October 2026

Prototyped / Partial. The packet is {kind:'mixedBattlePlan',target,battle,territory,mixed}. Generic fact/action/AND/OR clauses use scalar native PlanClaim leaves: dial, support, weapon, defense, leader/hero and Kwisatz. No action embeds its own group. All groups share one raw logical budget. The current battle/territory and another actual combatant are mandatory; original pure questions and game-start gates remain unchanged.

Authority and meaning

Reuse recorded publisher November2020 FAQp8 AND/OR/current-turn authority, supplied Advanced physical39/printed37 compliance/release/unknown and existing native battle-plan authoring. The shared snapshot/unknown and online owned-witness interpretation remain provisional under standing14October priority. No dedicated publisher solver, correlated unknown inference or complete current-turn action language is claimed.

All current facts freeze at the actual answer, before future payments, preparations and card changes. A real later bribe can change spice without changing the original fact. No negates the entire mixed expression. Unknown uses false for definite Yes and true for No, then the native plan obligation must guarantee the aggregate. If neither guaranteed completion is known, unknown/save/change-question remains available.

True fact OR plan can settle Yes immediately; false fact AND plan No immediately. Constants need no native binding. Otherwise the remaining tree enters the existing BattlePromise ledger. Native numeric/half-dial, support, empty slots, card names, leader/Cheap Hero and Kwisatz conditions retain original meanings. The claim concerns selected plans, not whether a weapon effect later succeeds.

The original pure question allows an already submitted or revealed respondent. Those choices are fixed; mixed answers against them are terminal immediately and add no new residual. A newly binding open aggregate stays pending during solver/preparation/Fill previews and after only its own seal. It fulfills at the sole actual native global plan reveal, before counterdecisions or synchronous battle cleanup. Later native residual release or an ended/replaced unrevealed source releases the pending aggregate. Facts are never reevaluated at reveal.

Shared parser and original solver

game/mixed-battle-question.ts strictly checks one native leaf with exact keys through parsePlanClaim; it cannot hide an action group or source metadata. game/mixed-action-question.ts adds optional maxNodes/maxTerms and one shared logical size helper. The full raw battle tree counts16 clauses including all outer and nested fact groups,8 children per group and depth4. Fact wrappers count their actual logical subtree once. Other mixed families retain their original 16-leaf/depth4 limits and broader group arity when no new cap is selected. These are software input limits, not extra printed game restrictions.

Every fact is snapshotted before compiler folding. Only an action residual uses native battleTruthAnswers/bindBattleTruth, findReachableBattlePlan and validatePlan. Voice, ordinary/full Prescience, inspections, actual owned card/ Ghola/Karama/income preparation, prior promises and financial rules stay there. No second battle or payment solver is added. A new optional BattlePromise event links only mixed residuals; old pure record shapes stay.

Raw mixedBattleQuestions retains the original question, public battle source, answer and terminal status. Every viewer's public battle.truthPromises filters mixed event IDs, even after reveal; native completion and authoritative plan validation retain the full private ledger. Own mixed projection exposes raw question/aggregate flags without binding metadata, compiled claims or frozen fact answers. Persistent status survives battle cleanup. Minimal bots prioritize the existing private compliant fallback for a live mixed question; they never reconstruct hidden clauses or gain strategic/private information.

New native battles already have a public UUID. Older eventless current battles accept a null source only while that exact source is still missing; a successful explicit Ask atomically assigns one identity and stores the canonical question. Passive projection does not initialize it. Failed actions remain detached; no clock, purse, card, force, plan or existing answer is reset or converted. New mixed discard signatures include raw metadata and the already signed native battle/residual; old capture branches/signatures remain unchanged.

Human controls

The full shared editor supports add/wrap/nest/switch/remove/collapse, nested facts and repairable native scalar drafts with unique IDs. Public leader/card choices do not inspect private hands or affordability. Raw preview/Ask and respondent-only answer choices connect through Truthtrance and the table.

The own aggregate panel is status-only. Existing BattlePromises supplies one native private preparation/Fill surface, including mixed-only immediate plans. Fill changes a reviewable draft and never seals automatically. Mixed callbacks retain actor/turn/battle/participants/raw-question/guide identity and quiet/busy/ room guards without reading residuals. Already sealed/revealed/terminal mixed contexts offer no Fill. Ordinary private preparation without any Truthtrance records keeps its existing behavior. Other legal native plans remain available.

Evidence and remaining gates

Helpers: tests/mixed-battle-question.test.ts, tests/mixed-action-question.test.ts. Original source/journeys: tests/fixture-truth-mixed-battle.ts, tests/truth-mixed-battle-runtime.test.ts, tests/truth-mixed-battle-funding.test.ts. Controlled editing/assistance: tests/truth-mixed-battle-controls.test.tsx. Six strict mixed-battle helper and three new shared-budget cases supplement the existing generic compiler. Fifteen native/controlled runtime,two original funding and nine controlled cases cover the new path and ordinary private-preparation compatibility. The frozen 18-file,173/173 union, types/lint, production build and nine native paths pass on the same unchanged source. Actual GameTable SSR renders27 times; five actual Fill callbacks and one editor callback run before native Ask/sealing. Four minimal profiles actually answer and seal their native compliant fallback. Fill/solver/own seal never fulfill an open aggregate; actual reveal does, with status persisting through cleanup.

Original Basic base33 source Prefix actions Further actions Actual result
Native held projectile AND plan 24 8 Actual Fill then own seal remains pending; other seal/reveal completes
Frozen spice and real bribe 24 9 E9→6 debit; reveal completes, native killed-leader1 award ends E7
Edited true OR 24 8 Actual AND→OR editor/Ask; no binding, later unarmed plan legal
False fact AND No 24 8 Immediate No, no binding, later actual projectile legal
Unknown OR Yes 24 8 Unknown forecast requires actual projectile plan and reveal
Unknown AND No 24 8 Native compliant unarmed plan, own seal pending, actual reveal completes
Already sealed fixed 24 8 Truthful fixed plan terminal immediately; no extra residual
Already revealed fixed 24 8 Same original pure scope retained during actual counterdecisions
Ordinary Prescience preparation 23 10 Real weapon inspection rejects contradictory answer and keeps original projectile

Other native cases validate all six scalar plan kinds, both nested whole-No alternatives, exact owner/source/territory/wire packets, filtering residuals from every seat and a controlled eventless metadata clone. Original Atreides owns one physical Truth; all33 original cards remain physical. Existing mixed movement/ payment/revival/bid/alliance controls retain their original defaults and IDs. A new controlled regression preserves private native preparation when neither pure nor mixed Truthtrance records exist.

An early narrow check catches a helper-name integration error. V1 type feedback repairs scalar-union narrowing and controlled fixture/action types. V2 passes quick but catches one funding expectation that omitted the existing one-spice award for killing original Dr. Yueh. The test now proves his actual native death and strength1; game reward mechanics are unchanged. The new question's phrasing is corrected. The complete v3 batch passes. Verified source tree: a79a23b20761d962e2248097d87d47e8d061e80cea253600ce3551d7e734affb (3203 files). Final evidence prose is a separate three-document overlay. Proof/report/manifest: /home/quintine/.local/share/dune/checkpoints/20261026-truth-mixed-battle-proof-v3/; journeys/HTML: /home/quintine/.local/share/dune/checkpoints/20261026-truth-mixed-battle-runtime/. SSR/Fill/editor callbacks are local engine/control evidence, not DOM, hydration, browser/mobile or deployed acceptance.

The source inherits the actual Basic Atreides/Emperor base33 beforePlans prefix from fixture-truth-plan-expression.ts; optional preparation uses its earned beforePreparation prefix. Atreides owns one original Truth, Emperor its original projectile and actually paid reserve. No second Truth, Ghola or Advanced history is invented. Only original unopened deck/lot/Spice choices and scalar lotteries are selected. No played hand/purse/clock/plan/answer/promise is installed. The legacy test omits only event metadata in a clearly controlled detached clone; controlled controls keep their own labels.

Mixed Traitor decisions, other action families, correlated unknowns, wider Advanced/faction/card/Voice/Ghola/preparation and cross-action composition remain required, followed by final rules/recovery/privacy/custody/browser/mobile/ deployed acceptance. No complete mode is certified. No saved-game/database/ server/reset/restart/deployment operation is performed by this batch.