Branching zones G9a: remove GOGOBEE_BRANCHING_ZONES gate

All 9 zones have hand-authored graphs (G8a–G8i), so the POC gate has
served its purpose. Make graph mode the only runtime path:

- Drop branchingZonesEnabled() and the os import in zone_graph_nav.go.
- Inline the gate-on branches in zoneCmdMap, zoneCmdAdvance,
  CurrentRoomType, startZoneRun, and the expedition map renderer.
- Keep the legacy linear functions (markRoomCleared, renderZoneMap,
  generateRoomSequence) standing — their tests still exercise them and
  they'll retire alongside current_room / room_seq_json in G9b.
- Strip gate test (TestBranchingZonesGate, TestCurrentRoomType_GateOff)
  and t.Setenv calls from the surviving graph tests.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
prosolis
2026-05-09 17:17:19 -07:00
parent 304ad27c0f
commit 103cf30987
8 changed files with 72 additions and 151 deletions

View File

@@ -8,28 +8,19 @@ package plugin
// consumes the choice, validates the chosen edge is unlocked, and
// advances the run state to the chosen node.
//
// Behavior is gated by GOGOBEE_BRANCHING_ZONES=1 during the POC week
// (plan §G5 / §9.5). With the gate off, !zone advance still uses the
// linear markRoomCleared path and forks never fire — even on zones
// that have a hand-authored graph registered.
// G9a retired the GOGOBEE_BRANCHING_ZONES POC gate: graph mode is the
// only runtime path now that all 9 zones have hand-authored graphs.
import (
"crypto/sha1"
"encoding/binary"
"encoding/json"
"fmt"
"os"
"strings"
"gogobee/internal/db"
)
// branchingZonesEnabled — POC gate. Default off. Operator flips it for
// the POC soak week, then it's removed in G9.
func branchingZonesEnabled() bool {
return os.Getenv("GOGOBEE_BRANCHING_ZONES") == "1"
}
// pendingFork is the typed shape of dnd_zone_run.node_choices when the
// player is paused at a fork. Persisted as JSON inside the
// map[string]any NodeChoices column; helpers below round-trip via JSON