# Wiring Audit #12 — dungeons cluster — Archive Tombstone

**Date:** 2026-05-28
**Convening:** `_council/2026-05-28-wiring-dungeons/`
**Origin:** Wiring Audit #12 (dual-purpose wiring + dead-code for `bosses/`, `tomb/`, `night_terrors/`, `spirit_raid/`; carry-over headline for `dungeon/` from Council #9 CLOSED 2026-05-27).
**Cross-ref:** `_council/2026-05-27-dead-code-dungeon/CLOSED.md` (Council #9 — followup #1 closed by this audit's W1).

---

## Archived files (4)

| Archive path | Origin path | Reason |
|---|---|---|
| `data/.archive/2026-05-28-wiring-dungeons/dungeon-ready_confirm.mcfunction` | `data/evercraft/function/dungeon/ready_confirm.mcfunction` | §11 multi-party `ec.ready` race bomb — Path A (full retirement) |
| `data/.archive/2026-05-28-wiring-dungeons/dungeon-ready_progress.mcfunction` | `data/evercraft/function/dungeon/ready_progress.mcfunction` | dependent consumer of the retired ready-check |
| `data/.archive/2026-05-28-wiring-dungeons/dungeon-instance-anger_deep_one.mcfunction` | `data/evercraft/function/dungeon/instance/anger_deep_one.mcfunction` | `# DEPRECATED` no-op stub (Joseph: D2 ARCHIVE; header self-authorizes) |
| `data/.archive/2026-05-28-wiring-dungeons/loot_table-dungeon-village_horn.json` | `data/evercraft/loot_table/dungeon/village_horn.json` | orphan loot table; superseded by `dungeon/village/give_horn_macro` (Joseph: D3 ARCHIVE) |

---

## Evidence A — §11 `ready_confirm` multi-party race bomb (FULL RETIREMENT)

**Live bomb body** (verbatim, `dungeon/ready_confirm.mcfunction:1-20`):

```
# Dungeon Ready-Check — Player confirms ready
# Run as the confirming player

scoreboard players set @s ec.dg_ready 1

# Announce to nearby party
tellraw @a[tag=dg.player,distance=..32] [...]
playsound minecraft:entity.experience_orb.pickup master @a[tag=dg.player,distance=..32] ...

# Check if all ready
execute store result score #dg_ready_total ec.temp if entity @a[tag=dg.player,distance=..32]
execute store result score #dg_ready_count ec.temp if entity @a[tag=dg.player,distance=..32,scores={ec.dg_ready=1..}]

# Display progress
function evercraft:dungeon/ready_progress

# If all ready, announce and clear ready state
execute if score #dg_ready_count ec.temp = #dg_ready_total ec.temp run tellraw @a[tag=dg.player,distance=..32] [...]
execute if score #dg_ready_count ec.temp = #dg_ready_total ec.temp run playsound ... @a[tag=dg.player,distance=..32] ...
execute if score #dg_ready_count ec.temp = #dg_ready_total ec.temp run scoreboard players set @a[tag=dg.player,distance=..32] ec.dg_ready 0
```

**Walk-through (multi-party):**
Two adjacent parties A and B each have `dg.player`-tagged players. Player Pa (party A) and player Pb (party B) are within ~32 blocks of each other (the structures or village dungeons may be nearby, or two adjacent dungeon instances loaded in the same chunk batch). Pa types `/trigger ec.ready set 1`. The trigger dispatcher at `util/trigger_dispatch:53-55` calls `dungeon/ready_confirm` as Pa.

The selector `@a[tag=dg.player,distance=..32]` at lines 7, 8, 11, 12, 18, 19, 20 **does not filter by party**. It hits both Pa's party AND Pb's party. The global scratch keys `#dg_ready_total` and `#dg_ready_count` on `ec.temp` count BOTH parties' totals together.

Net effects:
1. **Cross-party tellraw bleed** — party B sees `[Ready] Pa is ready!` even though Pa is in a different party.
2. **Cross-party count corruption** — if party A is ready (3/3) but B is not (1/3), the global scratch reports 4/6 — neither party is ever "all ready."
3. **Cross-party state wipe** — when party A's count equals total *across both parties* (impossible without B also being ready), the final wipe at line 20 sets `ec.dg_ready 0` on EVERY `dg.player,distance=..32` — silently wiping party B's confirmation state.
4. **Reachability:** ANY player typing `/trigger ec.ready set 1` re-enters this chain. Trigger declaration was at `init:540-542`. Dispatcher at `util/trigger_dispatch:53-55`.

**0 downstream consumers** beyond `ready_confirm` itself. Race + reachability seats independently `grep`'d `ec.dg_ready` and found only:
- `init.mcfunction:541` — objective declaration (now stripped)
- `ready_confirm.mcfunction:4,12,20` — the bomb itself
- `admin/strip_player_zero.mcfunction:109` — admin reset (now stripped)

Nothing else reads or writes the score. The ready-check feature is **unshipped UX** — `/trigger ec.ready` is a player-typed command that no advertised UI invokes. There is no Joseph-shipped tellraw click_event for it. Path A (full retirement) has **zero player-visible regression**.

**Companion strips (this audit):**
- `data/evercraft/function/init.mcfunction` lines 540-542 — `scoreboard objectives add ec.ready trigger`, `scoreboard objectives add ec.dg_ready dummy`, `scoreboard players enable @a ec.ready` — REPLACED with a one-line retired marker comment.
- `data/evercraft/function/util/trigger_dispatch.mcfunction` lines 53-55 — 3-line `ec.ready=1..` dispatcher block — REPLACED with a one-line retired marker comment.
- `data/evercraft/function/admin/strip_player_zero.mcfunction:109` — `scoreboard players set @s ec.dg_ready 0` — STRIPPED (objective no longer declared).
- `data/evercraft/function/admin/strip_player_zero.mcfunction:164` — `scoreboard players set @s ec.ready 0` — STRIPPED.
- `data/evercraft/function/dreams/on_join.mcfunction:59` — `scoreboard players enable @s ec.ready` — STRIPPED.

**Post-strip verification:** `grep -rn "ec.ready\|ec.dg_ready\|dg_ready_total\|dg_ready_count\|ready_confirm\|ready_progress" data/evercraft/function/` returns **0 hits**.

**Net effect of retirement:** any in-the-wild player typing `/trigger ec.ready set 1` gets vanilla MC's "Unknown scoreboard objective" message and the command silently no-ops. Any future multi-party redesign needs a fresh design pass using **party-scoped scratch keys** (e.g., a per-party UUID-keyed objective) — see `BIG_BRAIN/30-systems/dungeon.md` Wiring Audit section for the design constraint.

---

## Evidence B — `dungeon/instance/anger_deep_one.mcfunction` DEPRECATED no-op

Header self-authorizes (4-line file body):

```
# DEPRECATED — Dungeon i16 wave 5 boss is no longer a warden ("The Deep One").
# Replaced by The Void Sovereign (vindicator), which doesn't need anger management.
# Kept as a no-op so any in-flight `schedule function .../anger_deep_one` from
# before the swap doesn't error on resolve. Safe to delete after one server cycle.
```

3-seat convergence (reachability + correctness + RECON): 0 callers verified across `data/`. Joseph's locked decision D2 = ARCHIVE.

---

## Evidence C — `dungeon/village_horn.json` orphan

0 callers. The canonical Village Defense Horn grant path is the macro at `evercraft:dungeon/village/give_horn_macro`, called from:
- `evercraft:quests/reputation/rank_hero:24` (Hero of the Village reputation reward)
- `evercraft:admin/give/village_horn_here:4` (admin grant)

Obtainability seat F2 verified the loot table at `data/evercraft/loot_table/dungeon/village_horn.json` had no `loot replace` / `loot give` callers anywhere. Joseph's locked decision D3 = ARCHIVE.

---

## Revert instructions

```bash
# Restore §11 ready-check (NOT RECOMMENDED — re-introduces the race bomb)
git mv data/.archive/2026-05-28-wiring-dungeons/dungeon-ready_confirm.mcfunction \
       data/evercraft/function/dungeon/ready_confirm.mcfunction
git mv data/.archive/2026-05-28-wiring-dungeons/dungeon-ready_progress.mcfunction \
       data/evercraft/function/dungeon/ready_progress.mcfunction
# THEN: manually re-add 3 lines to init.mcfunction (ec.ready + ec.dg_ready + enable)
# THEN: manually re-add 3 lines to util/trigger_dispatch.mcfunction (dispatcher block)
# THEN: manually re-add ec.dg_ready + ec.ready resets to admin/strip_player_zero.mcfunction
# THEN: manually re-add `scoreboard players enable @s ec.ready` to dreams/on_join.mcfunction
# Note: the race bomb will be ARMED AGAIN on revert. Use Path B/C redesign instead.

# Restore anger_deep_one (use only if a stale `schedule … anger_deep_one` is firing in prod)
git mv data/.archive/2026-05-28-wiring-dungeons/dungeon-instance-anger_deep_one.mcfunction \
       data/evercraft/function/dungeon/instance/anger_deep_one.mcfunction

# Restore village_horn.json (use only if a future caller is re-wired to it)
git mv data/.archive/2026-05-28-wiring-dungeons/loot_table-dungeon-village_horn.json \
       data/evercraft/loot_table/dungeon/village_horn.json
```

---

## Cross-references

- `_council/2026-05-27-dead-code-dungeon/CLOSED.md` — Council #9 followup #1 (the bomb) → CLOSED by W1 of this audit.
- `_council/2026-05-27-dead-code-dungeon/CLOSED.md` — Council #9 followup #4 (dg.lo_15/16 lockout bypass) → RETRACTED by this audit's RECON re-read as FALSE ALARM (see `chat/SYNTHESIS.md` cross-seat contradiction resolution).
- `_council/2026-05-28-wiring-dungeons/chat/race.md` F1 — 7-step retirement plan.
- `_council/2026-05-28-wiring-dungeons/chat/reachability.md` — 0 downstream consumers grep.
- `_council/2026-05-28-wiring-dungeons/chat/correctness.md` F10 — anger_deep_one DEPRECATED header confirmation.
- `_council/2026-05-28-wiring-dungeons/chat/obtainability.md` F2 — village_horn.json orphan confirmation.
- `_council/2026-05-28-wiring-dungeons/CLOSED.md` — full audit closure document.
