mirror of
https://github.com/prosolis/gogobee.git
synced 2026-09-14 10:51:09 +00:00
adventure: give the web the three doors it kept pointing at
The web's own refusals named commands it had no button for: "!expedition abandon first", "!expedition leave to walk out alone", "no refund if you cancel early". Three verbs, no arguments, no money. Each Matrix handler becomes framing over a headless twin the order path shares, so the web runs the game's real path: an abandon still disbands the roster, still retires the region runs, still DMs the party, still rolls the emergence pet. The lock asymmetry is per verb and is the thing to be careful about. performExpeditionAbandon and performExpeditionLeave cannot take advUserLock — their Matrix caller holds it across the whole !expedition switch — so their web wrappers do. performBabysitCancel takes it itself, because its caller does not, so its wrapper must not. Both directions are pinned by tests that hang rather than fail on regression. Also flips the two W5a extract tests off setupZoneRunTestDB: it copies data/gogobee.db and skips when it is missing, so they have been green-by-skipping since they were written.
This commit is contained in:
@@ -47,7 +47,11 @@ func TestAdvOrderLedgerShortCircuitsAReoffer(t *testing.T) {
|
||||
// A retried refusal never reaches a verdict, so the order sits pending forever
|
||||
// and Pete's strip never stops saying "asked for…".
|
||||
func TestExtractOrderRefusalsAreTerminal(t *testing.T) {
|
||||
setupZoneRunTestDB(t)
|
||||
// W9: was setupZoneRunTestDB, which copies data/gogobee.db and t.Skip()s when
|
||||
// it is missing — and that file is deleted after every local run, so this and
|
||||
// the extraction test below have been green-by-skipping since W5a. Neither
|
||||
// needs a prod row; startExpedition builds everything they touch.
|
||||
setupEmptyTestDB(t)
|
||||
uid := id.UserID("@web-extract-none:example.org")
|
||||
defer cleanupExpeditions(uid)
|
||||
p := &AdventurePlugin{}
|
||||
@@ -68,7 +72,7 @@ func TestExtractOrderRefusalsAreTerminal(t *testing.T) {
|
||||
// 'extracting' (a resumable limbo) rather than 'abandoned' — plus the day burn
|
||||
// and the log line the DM path writes.
|
||||
func TestExtractOrderIsTheSameExtraction(t *testing.T) {
|
||||
setupZoneRunTestDB(t)
|
||||
setupEmptyTestDB(t)
|
||||
uid := id.UserID("@web-extract-live:example.org")
|
||||
defer cleanupExpeditions(uid)
|
||||
p := &AdventurePlugin{}
|
||||
|
||||
Reference in New Issue
Block a user