Files
Dune/docs/HARASS_ALLOCATION.md
Quintine 62e87d2b96 Connect revealed Harass force allocation and exact casualties
Harass & Withdraw now admits legal Basic/Advanced mixed ordinary/elite commitments and multi-sector returns. A shared physical quote validates every returned counter against one exact legal dial/support complement. After both plans are revealed, the owner selects an ambiguous allocation; unique returns remain automatic. Selected counters become public before Traitor declarations, while physical transfer waits for atomic settlement and opposing-Traitor cancellation. This information is never added to a sealed Battle Plan or complete-plan inspection. Existing optional-module and Richese/Ecaz-allied gates remain.

The player panel, four AI profiles and saved event use the same quote. A versioned receipt binds the revealed plans, current typed location pools, battle and owner. Missing or altered receipts fail before reads, normalization and writes; concurrent choices select once. Previously valid legacy unique plans continue without reopening. Winner casualties now equal the selected dialed group, preventing a second smaller physical commitment after its undialed complement has returned.

Independent source and implementation review passed. Pure, engine, control and SQLite regressions cover typed/sector legality, exact complement, private pre-reveal views, public selected views, stale/malformed state, cross-owner actions, raced allocations, selected restoration, automatic exact casualties, opposing-Traitor cancellation and mandatory disposal. Types, lint and 4850 offline tests, production build and 43 HTTP/session tests pass. The first broad check caught the exhaustive decision registry and test union-narrowing omissions; those were fixed before the final stable checks. Browser testing corrected the incomplete-allocation selector label before verification.

Eight genuine card-variant Basic/Advanced games across all four homogeneous AI profiles completed with 9956 accepted actions, 266 periodic JSON restores and zero rejected candidates. Three Harass plans/returns and two Recruits plays occurred; no ambiguous allocation arose in these seeds. The new choice is exercised by targeted engine, authenticated recovery and browser cases, not inferred from those full-game samples. Full variant and combined-expansion acceptance remains incomplete.

A fresh isolated browser room used genuine Advanced card-variant setup followed by a conserved two-sector battle fixture. Actual controls rejected a partial return, selected two ordinary counters from sector nine, and preserved the selected state after refresh. Following actual owner and engine-driven opponent Traitor declines, two counters returned, the exact remaining ordinary/elite pair went to the Tanks, support cost one, and Harass discarded once. Final refresh restored 18 reserves, two Tanks, 29 spice and the same private Traitor. This is targeted browser evidence, not a complete human game.

All 1038 opening games and original seat/recovery/entry/handover records are unchanged; 1072 rooms remain including new QA. SQLite integrity and foreign keys pass. The healthy development server was reused without restart or reset. No mode/publication gate was opened.

Verified source tree: 61ee78f6e2bce47cb322b04f896db27fef28c56ba2097571a1d85bad5c121156
2026-09-14 06:37:23 +10:00

3.0 KiB

Harass & Withdraw physical allocation

14 September 2026. A connected prototype now supports the ordinary/elite and multi-sector choices previously rejected as ambiguous. The existing card, mode and combination restrictions remain in force.

Timing and information

The source contract and Harass runtime place withdrawal when Battle Plans are revealed. Counter identity and sector allocation are not printed Battle Plan elements. Before sealing, the engine therefore checks that a legal physical allocation exists. It does not ask for or reveal a future allocation through Prescience or complete-plan inspection.

After both plans are public, a uniquely determined return proceeds automatically. When multiple physical commitments or sector allocations are legal, the owner chooses every undialed ordinary and elite counter before Traitor declarations. There is no decline or partial-return alternative. The selected allocation then becomes public. Physical transfer still waits for the existing atomic Traitor settlement, so an opposing successful call cancels the return without rollback. This applies the printed reveal timing to a digital choice; it does not establish an order among currently excluded optional-module effects.

Connected behavior

The shared quote validates an exact complement of one legal physical dial/support commitment, each location's typed supply, integer counters and complete return. The revealed panel selects a physical commitment and permits editing each sector. All four AI profiles use the same deterministic legal allocation. Their pre-plan estimate is not a binding early choice and is not added to the sealed plan.

New battles carry a version marker. A saved choice binds its battle, owner, event, revealed plans and force locations. Missing or inconsistent state rejects before views, normalization or action writes. Refresh restores a pending choice; concurrent submissions select once through the existing room version check. Previously valid unversioned battles keep their unique automatic derivation.

After an executed withdrawal, winner casualties must equal the already chosen dialed counters. Recalculating a smaller physical commitment could incorrectly leave an ordinary or elite force behind. The resolution quote now restricts its casualty options to that exact remaining group. Traitor cancellation retains ordinary original-force losses. Card disposal and subsequent Face Dancer cleanup reuse the existing continuation.

Evidence and limits

Pure, real-engine, all-profile, controls and in-memory SQLite cases cover typed and sector choices, no early disclosure, exact losses, traitor cancellation, legacy continuation, malformed saves, concurrent selection and restoration. The final check/build, sample and browser results are recorded in the private source-bound checkpoint and Git message. Samples are evidence only for their observed configurations and actions. This is not complete Ecaz card-variant or combined-expansion certification.