Files
Dune/docs/JUICE_OF_SAPHO_RUNTIME.md
T
Quintine 6c83148ead Connect Sapho first and last to Extortion payer choices
Apply the printed ordered-action alternative provisionally to the unanswered native Extortion suffix. Preserve collected bank5, completed declines, payer membership, one payment3 and placement-first policy. Replay a public local-order receipt and retain it through ledger answers; expire the old payer event even when the same player remains next. Permit only the exact current Extortion decision as a clean Sapho window. Add persistent remaining-order/card controls and existing minimal policy participation. The typed Semuta suffix parks one updated payer decision and restores it without paying, advancing or recollecting.

Validation:9-file115/115, types/lint/build and six original public Basic/Advanced host/setup/paid-cache1/placed-Terror/paid-entry1/reveal/Mentat-placement-before-bank5 programmes. An actual earlier decline stays finished; first/payment3 and last/payment3 or all-decline preserve native retirement/recovery. Four profiles make eight legal holder/payer proposals and complete. Public order and private payer affordability render in actual GameTable plus enabled/busy controls. Pure replay/no-op/recovered reuse cases are separate. Bounded source/continuation review found no concrete defect.

Extortion/Sapho boundary is provisional. Direct combined Semuta claim/capture, broader combinations, complete modes, final assurance and browser/deployed acceptance remain open. No saved-room/database/reset/restart/deployment operation.
2026-10-18 14:07:08 +11:00

21 KiB
Raw Blame History

Juice of Sapho: finite ordering implementation

Updated 18 October 2026. Partial card implementation; full modes and publication acceptance remain gated. The earlier source audit remains the printed-evidence baseline. The current-lot prototype below selects an explicit provisional cyclic convention under the 14 October choose-recommended direction; it is not a newly located publisher answer. Other timing questions remain open.

The Battle-phase ordering prototype adds first/last remaining battle choices. Its separate chooser, phase priority and saved-boundary contract supersede the earlier absence of that mode below. The aggressor prototype now includes clean late intervention and a fixed public final opportunity in fresh Richese battles; old battles keep their early protocol.

Extortion payer order — 18 October 2026

First/last now has a provisional adapter for native Moritani Extortion's unanswered payer suffix. Earlier declines, collected bank5 and the one-payment3 limit remain; every use expires the previous native payer event even when the next player does not change. The canonical source, controls and continuation contract records original order replay, payment/recovery and the unchanged placement-first policy. Other pending decisions are not general Sapho interruption windows.

First while the Advanced Guild remains — 18 October 2026

Prototyped / Partial. The physical face changes ordered turns and explicitly supersedes Guild only for last. The source review and Guild audit distinguish ordinary reordering from a competing first declaration. No publisher answer settles that conflict. Under the standing recommended-choice instruction, the new composition provisionally admits a nonconflicting first after Guild waits, while preserving its native next-boundary timing. This is an implementation interpretation, not a retrieved official ruling or unconditional first priority.

At a clean boundary before any remaining combined turn starts, the holder may move first in the native remaining queue even while Guild has an unspent turn. The existing native timing choice then opens before that reordered turn. Guild may take its own turn first or wait, retaining the relative order of every non-Guild participant. Existing guildTimingGranted permission stays recorded; waiting does not consume it or create another Karama response. An ungranted out-of-order timing attempt retains its original response. A granted current Guild turn remains unavailable for displacement. A Karama-locked timing privilege stays locked: Sapho changes order independently without restoring that advantage.

The queue still includes only unfinished turns. Earlier completed turns, paid shipments, movement allowances and physical storm order do not reset. Existing pending decisions/responses, partly completed turns, reserved cards, no-op checks and Sapho-last protection remain. No new game marker or signature format is introduced. Reorder and discard before entering native timing; the existing Semuta suffix does the same only after original disposal finishes.

The hand panel explains that Guild can still go ahead, and existing minimal policies consume the authoritative options. Frozen 7 files97/97, types/lint/ build and six original-action/rendered-table programmes pass. Actual public host/setup, original dealt Atreides Karama, cache1 and native wait use49 source actions. A real paid Richese1 Polar Sink prefix costing2 and explicit end uses55. TAKE/WAIT with and without that prefix use12–14 continuation actions; Emperor2 and Guild1 shipments pay once, non-Guild order remains and every turn ends. Granted-current and canceled-TAKE branches fork from48 source actions before that wait, use3/2 native choice actions and11/7 continuations to finish the phase. The canceled privilege remains locked with its real Karama discarded once. Four profiles make eight legal holder/Guild proposals without strategy tuning.

Only unopened original starting-deal/Spice positions and scalar lotteries are selected. No postdeal hand, force, wallet, queue, phase or timing receipt is installed. Actual GameTable and isolated Sapho controls render offered/busy, renewed native Guild choice, granted-current and locked states. Framework aliases and CSS stubs mean no browser clicks or visual/deployed acceptance.

Frozen feedback repaired two fixture assumptions: an old LAST regression also expected first to remain excluded, and a completed Richese could still allow another faction's later response without repeating its movement turn. The exact two failures pass, then all97/types/lint/build/runtime pass together. The bounded source/continuation review found no need for another saved field or continuation. No application rule repair followed frozen feedback.

Private proof: /home/quintine/.local/share/dune/checkpoints/20261018-sapho-guild-first/frozen-integrated-2/report.json, base 84200ebc7448bbefa788158408bb389b722ee8f0, tree 0f03e96546e48e9ae3a355b4935e72685c9b891dbde0fcdd15d31a03f63ef4ea. The report binds the unchanged implementation/control/test source. Final checkpoint prose/reference evidence is a separately reviewed overlay; private documentation-overlay.json and git-result.json bind it to the pushed revision.

Direct combined Semuta claim/capture, actual competing first, partly completed movement and other ordered actions remain open. Full-mode, browser/deployed and final assurance acceptance is separate. No saved-room/database, reset, restart or deployment operation is part of this checkpoint.

Cyclic ordinary and Black Market bidding — 18 October 2026

The physical face offers first/last in an ordered action; the publisher's Once Around FAQ does not determine duration in cyclic bidding. The source review identifies one upcoming circuit, the current lot and the whole phase as different possible readings. Provisionally choose the current lot, anchored at the actual next bidder when Sapho is played. This supersedes the old software exclusion within ordinary normal auctions and native Advanced normal Black Market. It does not alter Silent bidding, native Black Market eligibility or extend a choice across the phase.

A holder with a pending eligible bid can move first/last in the full local cycle. Keep other seats' relative cyclic order, including high-bid, passed and currently full placeholders that could become relevant later. The next actor is the first eligible unpassed seat other than the high bidder. A passed holder waits for a real raise; a high bidder has no current pending bid to reorder. These are explicit next-opportunity prototype boundaries, not extra printed restrictions. Compare full effective cycles for no-op rejection: a last pending bidder may still move behind a skipped seat that can reenter after a raise. A mere rotation with the same next actor and effective cycle cannot consume the card.

Discarding the real card frees a hand slot before determining holder capacity. A native full-hand Black Market seller retains its existing paid-retention eligibility through the shared quote. Sapho does not change the physical lot, standing bid, bidder, allied funding or passed list. Both native advancement loops skip passes until a genuine raise clears them. Every new bid must still strictly exceed the standing amount; Sapho supplies no standing-price purchase.

The ordinary auction retains a per-lot saphoOrder; the physical g.order and original opener stay unchanged, and the next lot removes the override. A normal Black Market retains saphoOriginalOpener before changing its local cycle, so both settlement consumers resume the following normal pool from the original physical source. Existing same-lot unfunded-payment recovery retains the new cycle without revising its separate provisional payment policy.

Owner controls expose scope:'cyclicAuction' with the server event and first/ last mode, explain this provisional duration and keep blocked reasons readable. The existing minimal bot adapter consumes the same options without new strategy or hidden hand inspection. The optional cyclic tag on the existing Sapho discard continuation binds its native lot and does not run a bid during disposal. Legacy Once Around signatures and their normal resume suffix stay unchanged.

The frozen batch passes 10 files134/134, types/lint/build and eight finite original-action/rendered-table continuations from four public setup sources. Actual cache1 purchase uses33 Basic/38 Advanced source actions; native next-turn Black Market uses81, including the accepted original Emperor circle5 choice; a full hand built through two further normal1 purchases uses44. First/last continuations use10–18 actions: prior1 stays funded, the actual holder raises2, rival raises3, holder wraps to4, and native purchase pays4 once. Black Market pays its seller4 and resumes the original next opener; ordinary lots rotate normally, while the full-hand final lot correctly enters Revival. Eight minimal policy proposals remain legal. Another original-action case keeps prior passes through Sapho, rejects the standing-price bid and reopens passes only on a real raise. Nine controlled pure tests cover full cycles, no-ops, strict funding/ termination and post-sale opener/override quotes.

The first batch exposed an original fixture assumption: turn2's native Storm made the holder already first after its initial raiser. A real pre-start circle choice supplies the intended independent pending opportunity. Its completion predicate also had to follow the actual intervening cache-first lot before asserting the following normal pool. No live order/card/fund/clock injection or engine repair followed this feedback. Original unopened Spice positions/scalar lotteries and the explicit lobby circle choice are selected source conditions.

The external rendered smoke initially assumed default history showed the full new log and that every completed lot had a next lot. It now checks the actual accepted event separately, renders offered/busy/passed controls, and permits the full-hand final lot's native phase close. Only that smoke was rerun after those external-only repairs; all application source stayed identical to the passing 134/134/types/lint/build checkpoint. The aggregate report records exact child report provenance rather than claiming those checks were repeated. A bounded read-only source/consumer review found no concrete implementation defect.

Actual GameTable and isolated offered controls render with enabled and busy states. No browser click, visual or deployed acceptance is claimed. Direct combined Semuta claim/capture, other ordered phases, first-versus-Guild, partly completed movement, later aggressor intervention, full modes and final assurance remain open. No saved-room/database/reset/restart/deployment operation.

Private artifacts: /home/quintine/.local/share/dune/checkpoints/20261018-sapho-cyclic/. frozen-integrated-final/report.json combines passing tests/types/lint/build from frozen-integrated-2 with runtime-repaired-2, all at base 561152d and tree 506a6b698ff5c791a1f05a0700450dc6d13837516ecdef6a8f9d3d5eee752bd3. runtime-smoke.json and private rendered HTML retain actual source/continuation counts and controls. Final checkpoint prose/reference evidence is a documented post-proof overlay; documentation-overlay.json and git-result.json bind that reviewed overlay and pushed revision. Relevant helpers, engine, controls and tests stay identical to the frozen proof.

Implemented contract

{type:'card',card:'richese-juice-of-sapho',scope,event,mode} accepts one of these current opportunities and discards the actual held card once:

  • scope:'onceAround': first or last while the holder has not acted and the change reorders a still-unacted bidder. Earlier bids remain committed. The intervention applies to this lot only. Prior bids, funding, completed participants, physical lot, event and storm tie order remain intact. Richese is not restored to last after Sapho. A holder excluded initially by a full hand gains a slot and eligibility by discarding Sapho, provided this lot is still open. Completed passes never reopen. Every purchase still requires a strict outbid.
  • scope:'movement': reorder entire remaining combined shipment/movement turns at a clean boundary. First requires every remaining turn to be unstarted; previously completed turns may retain their spent shipment/movement counters. In Advanced, Guild retains its native next-boundary timing even while unspent; it may still take its turn before the reordered holder. An already granted current Guild turn is protected. A Karama-locked privilege stays locked. Last remains after Guild, including later Guild deferrals. No movement counters, Hajr, transport pricing, concealed tokens, resources or completed turns reset. Existing shipment/movement/preparation, reaction, Truthtrance, paid Box and gift commitments block the intervention. The next actor retains an already settled Guild timing choice when their identity is unchanged. An already granted, unstarted early Guild turn is lifted to the front of the local remaining queue before applying last, without changing physical order; this also permits Guild itself to declare last. A player now actually last cannot spend the card on a no-op.

The reusable immutable ordered-opportunity helper checks unique IDs, exact remaining/completed partition, stable event and locked current/protected-last positions. It never defines card scope or cyclic timing. Movement protection persists as saphoMovementLast:{event,turn,player}, checked on action, normalization and projection, and cleared when its owner finishes. Normal storm order is never rewritten. Invalid records are rejected, not repaired by replaying turns.

Owner-only saphoOptions supplies permitted actions to the hand panel and every AI level. It inspects only that owner's custody and public scope/timing. Other player views contain no possession-derived reaction flag. Played protection is public. A no-op does not consume the card. Unreserved canonical custody and exact allowed fields are checked server-side, and room version CAS prevents duplicate play and stale continuation.

All four AI levels consume the same legal owner projection. They prefer last in Once Around; movement first is preferred with own shipment resources and a visible spice opportunity, otherwise last. This is a bounded legal timing policy, not evidence of relative strength calibration.

Remaining scope

The battle-order follow-up connects first/last at a clean boundary between actual battles. It does not implement the separate aggressor mode discussed below.

Later battle aggressor intervention, other ordered actions and partly completed movement remain unfinished. The current-lot cyclic prototype above supersedes the earlier normal/Black Market absence claim. First/Guild competing priority is guarded. Reacquiring and replaying Sapho while an existing movement protection remains is also guarded. Silent submission is simultaneous and receives no fabricated order or tie change.

The battle audit in the battle review found a real Stone Burner counterexample: a plan admitted with original aggressor tie priority can become allocation-ambiguous after late Sapho. A complete implementation needs the actual allocation continuation (and a usable, possession-independent late intervention boundary), not rejection based on an opponent's hidden plan. No aggressor handler has been enabled around that defect.

Verification

New source contribution review covers the pure helper and all four new rules test files (33 test cases including 960 helper reorder cases), plus four real room/SQLite recovery cases. Recovery exercises simultaneous duplicate Sapho requests with one successful CAS and one failed CAS, old/new-version replay, strict outbid sale, exact physical inventory, private projections, actual phase entry and Guild deferral through phase completion.

Browser and final regression outcomes from 7 September are recorded in the historical checkpoint below. The hourly maintenance automation remains removed. Reuse the server; restart only when an observed condition or change requires it, preserving saved games and verifying restoration.

13 September: first at a later clean movement boundary

The existing source contract already permits reordering the remaining unstarted participants between complete combined turns. The old global completed/shipped guard was narrower than that contract. That checkpoint checked only remaining participants but retained the Advanced Guild-first guard while Guild was among them; the 18 October section above supersedes that blanket exclusion. No new timing ruling, saved field, player action shape or separate AI legality calculation is added.

Four new engine tests cover a real completed shipment before first, a genuine Advanced Guild turn that fully finishes, rejected partly started/queued turns, and all four private AI profiles. The existing Advanced engine fixtures now use the shared Advanced initializer instead of flipping a Basic game. A separate production-room SQLite test races duplicate first requests after a real completed shipment and proves one discard, private projections and intact completed-player custody. Focused checks pass; broad results are recorded in the checkpoint commit and private source-bound report. This is a bounded connected prototype.

Final checkpoint

1,631 rules/client/component tests and 152 multiplayer tests pass (1,783 total). Final rules run: /tmp/dune-sapho-full-tests3.log (59.50 s). Multiplayer run: /tmp/dune-sapho-multiplayer.log (18.70 s), with /tmp/dune-sapho-final-recovery2.log rechecking all four Sapho recovery cases after the early-Guild adapter correction. Typecheck, lint and production build pass in /tmp/dune-sapho-final-type2.log, /tmp/dune-sapho-final-lint2.log and /tmp/dune-sapho-final-build2.log. Earlier runs identified stale documentation assertions; those assertions and the generated guides now identify eight bounded handlers and two inactive faces. All five new test files and both fresh source/architecture reviews were read by the coordinating agent.

Twenty Basic games using ordinary production AI completed across 2–6 players and all four homogeneous profiles: 12,052 accepted actions, zero rejected candidates/stalls/exceptions/invariant failures, 94 setup actions and 537 actual JSON continuations. No test card-use policy or inventory/resource injection was used. Public Basic starts contain no Sapho, so this is a regression sample, not full-game Sapho or expansion verification or relative difficulty calibration. The runner /tmp/dune-sapho-base-fullgames.ts and its complete result, summary, diff and source fingerprints were reviewed; all 58 source/runner fingerprints were independently unchanged at completion. Combined hash b83fb0197e9f3fb0b0fab31cc360d88a9562459e97a0fd9bac7911ebd13cb141; result hash 06b9fdf1cedfb4341cb0868432946618b813602f842f603981458d51b8cdbea3. Later changes were the explicit Advanced Guild queue correction (covered by full regression and new direct tests), reference text and presentation. These games predate that final correction.

Desktop and 390×844 phone inspection verified the new panel, full readable Sapho inspector and last-bid action. In isolated room 8S3MRDEK, the human used Sapho-last, Hard Richese bid 1, and the human won Ornithopter for 2; version 38 had 18 human spice, one acquired card, one Sapho discard and one play log. A separate staged movement test used Sapho-last, the Hard opponent shipped four and finished, then the human completed its unchanged full turn; version 47 reached Spice Collection with an empty remaining queue, cleared protection and exactly one discard/play log. Both are staged component tests, not full expansion games. Before each staging the prior room JSON was backed up. Refresh restored the saved seat and state; the viewport was reset. The phone inspection also exposed a pre-existing masthead overflow: wrapping its controls removed document horizontal overflow (375 px viewport / 375 px content).

At 02:46 UTC, all 1,746 existing rooms were backed up, the idle human room checked, and the server restarted. Every saved version and SHA-256 state hash restored unchanged; HTTP health was 200 and the browser resumed the same room. The restart backup is /tmp/dune-maintenance-20260907T0246. This is manual authorized maintenance; no automation was recreated.