Cover all 14 handler functions in handlers_house.go with 25 new tests:
- 7 unit tests for guard paths (payload size limits, box index
bounds, no-op handlers) that run without a database
- 18 integration tests against real PostgreSQL covering interior
updates, house state/password, house enumeration by char ID and
name, house loading with access control, mission data CRUD,
title acquisition with dedup, warehouse operations (box names,
usage limits, rename guards), item storage round-trips, and
deco myset defaults
Introduces readAck() helper to parse MsgSysAck wire format from
the sendPackets channel, and setupHouseTest() for DB + session
scaffolding with user_binary row initialization.
Replace the mutable global `_config.ErupeConfig` with dependency
injection across 79 files. Config is now threaded through existing
paths: `ClientContext.RealClientMode` for packet encoding, `s.server.
erupeConfig` for channel handlers, and explicit parameters for utility
functions. This removes hidden coupling, enables test parallelism
without global save/restore, and prevents low-level packages from
reaching up to the config layer.
Key changes:
- Enrich ClientContext with RealClientMode for packet files
- Add mode parameter to CryptConn, mhfitem, mhfcourse functions
- Convert handlers_commands init() to lazy sync.Once initialization
- Delete global var, init(), and helper functions from config.go
- Update all tests to pass config explicitly