Files
gogobee/internal/plugin/zone_graph_underforge_test.go
prosolis dd97a00332 Branching zones G8e: Underforge pre-boss gauntlet (late triple fork)
T3 zone, fifth authored graph. Shape: five-node linear preamble
(sealed_gate → forge_descent → cooling_river → magma_chamber elite)
followed by a single 3-way antechamber fork before the boss.

Bends the plan §G8 "two forks for T2+" guideline to a single late
fork-with-three-options because the gauntlet shape is the design
intent — Kharak Dûn is a one-way descent. Triple-option antechamber
(direct / DEX-checked catwalks / Perception-found forge_vault secret)
preserves agency at the commitment moment.

Map renders as a long horizontal stem with a 3-leaf fan at the right
edge — visually distinct from any earlier zone.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 16:56:07 -07:00

51 lines
1.4 KiB
Go

package plugin
import "testing"
func TestUnderforgeGraph_Registered(t *testing.T) {
g, ok := zoneGraphRegistry[ZoneUnderforge]
if !ok {
t.Fatal("zoneUnderforgeGraph not registered")
}
if len(g.Nodes) != 10 {
t.Errorf("nodes = %d, want 10", len(g.Nodes))
}
}
// TestUnderforgeGraph_LinearPreamble locks in the gauntlet shape:
// the first five nodes after entry must each have exactly one outgoing
// edge (linear chain). If a future edit splits the preamble, this test
// catches it — that change should re-author the shape comment too.
func TestUnderforgeGraph_LinearPreamble(t *testing.T) {
g := zoneUnderforgeGraph()
for _, id := range []string{
"underforge.entry",
"underforge.sealed_gate",
"underforge.forge_descent",
"underforge.cooling_river",
"underforge.magma_chamber",
} {
outs := g.outgoingEdges(id)
if len(outs) != 1 {
t.Errorf("preamble node %s outgoing = %d, want 1 (gauntlet)", id, len(outs))
}
}
}
func TestUnderforgeGraph_AntechamberThreeWay(t *testing.T) {
g := zoneUnderforgeGraph()
outs := g.outgoingEdges("underforge.antechamber")
if len(outs) != 3 {
t.Fatalf("antechamber outgoing = %d, want 3", len(outs))
}
for _, leaf := range []string{
"underforge.direct_assault",
"underforge.catwalks",
"underforge.forge_vault",
} {
if !reachable(g, leaf, "underforge.boss") {
t.Errorf("%s unreachable to boss", leaf)
}
}
}