File Details
v0.12.0
- R
- Apr 14, 2026
- 5.88 MB
- 344
- 12.0.1+1
- Retail
File Name
Cerebro-v0.12.0.zip
Supported Versions
- 12.0.1
- 11.2.7
Cerebro
v0.12.0 (2026-04-14)
- Merge pull request #47 from Shezzannn/release/v0.12.0
release: Core upgrade to 0.12.0 — Sync Test Harness - chore: Core upgrade to 0.12.0 — Sync Test Harness
First Cerebro release to ship the SPEC §8 Support API contract
(Modules/SupportAPI.lua) that enables the new Cerebro-Support
companion addon for automated raid-wide sync health checks.
Headline features
─────────────────- Modules/SupportAPI.lua — stable public contract Cerebro.SupportAPI
with nine load-bearing safety invariants (SA-1..SA-9):
SA-1 EnterTestMode fails closed for non-officers
SA-2 ApplyPlayerMutation drops all writes during test mode
SA-3 Test mode auto-exits after a bounded deadline (max 120s)
SA-4 No SavedVariables persistence (drops on /reload)
SA-5 Observers run AFTER production V2 dispatch completes
SA-6 Observer errors are isolated via pcall, auto-unregistered
SA-7 No mutation paths in the public api surface
SA-8 Combat gating remains in effect during test mode
SA-9 Contract version handshake refuses incompatible versions - /cb supportapi diagnostic command for verifying contract handshake,
observer state, and test-mode status - Two single-line hooks in existing Cerebro code:
Utilities.lua:822 — SA-2 write-gate predicate
Modules/Sync/RPCDispatch.lua:608 — SA-5 observer notification
Both nil-guarded; behave as no-ops if SupportAPI isn't loaded. - AceComm prefix CBST reserved exclusively for the companion addon
(wire-disjoint from CerebroV2 production sync traffic)
Companion addon
───────────────
Cerebro-Support v1.0.2 is now available and functional against this
Cerebro release. It provides:- Solo and multi-officer sync health checks via /cbs run
- HELLO/echo participation measurement
- S8 Whisper Reachability scenario (per-target PING/PONG)
- S9 Thundering Herd Baseline scenario (Sync Leader gating check)
- Scrollable Validate-style in-game report frame
- JSON export to SavedVariables for out-of-game tooling
- Contract version handshake refuses incompatible Cerebro versions
Cleanup bundled in this release
───────────────────────────────
- Dead Database.lua stub removed (decomposition tombstone from v0.11.4)
- Package Guard CI allowlist fixed — added Database/ directory after
the v0.11.4 3-way decomposition, removed the stale Database.lua
reference - Doc Freshness CI green — Modules/SupportAPI.lua registered in
CEREBRO.md and docs/AGENT_CONTEXT.md module inventory tables - Three stale docstring references to Database.lua updated to point
at the Database/ subdirectory in Core.lua, Modules/MythicPlus.lua,
and Modules/Session.lua - Scope-override popup editBox field access updated from
classic-era self.editBox to modern self.EditBox (preserving legacy
fallback). Fixes the guild-switch / wipe flow crash on retail. - /cb supportapi slash alias wired into Core.lua cmdMap (missed in
the initial SupportAPI PR)
Zero production behavior change for existing users
──────────────────────────────────────────────────
Players who do not install Cerebro-Support see exactly the same
runtime behavior as v0.11.4. The SupportAPI write gate only activates
when a companion addon explicitly calls EnterTestMode — which no
production code path does — so the gate is a permanent no-op without
the companion addon.
Requires: No changes. Still runs on WoW 12.0.1 and 11.2.7.
Full release history summarized at:
https://github.com/Shezzannn/Cerebro/blob/main/CEREBRO.md#changelog
Companion addon repository:
https://github.com/Shezzannn/Cerebro-Support
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com
- Modules/SupportAPI.lua — stable public contract Cerebro.SupportAPI
- Merge pull request #46 from Shezzannn/chore/remove-dead-database-lua
chore: remove dead Database.lua stub left from Phase 2a decomposition - chore: remove dead Database.lua stub left from Phase 2a decomposition
Database.lua was reduced to a 17-line comment-only stub in Phase 2a
(commit e17b439) when the file was decomposed into three focused
modules under Database/: Schema.lua, Migrations.lua, Accessors.lua.
The stub was kept for "git history continuity" but served no runtime
purpose — it contained zero executable code and was never loaded by
Cerebro.toc (only the Database/* files are listed).
Verified nothing requires, dofiles, or loadfiles it:
$ grep -rn "require.*Database|dofile.*Database|loadfile.*Database" *.lua
No matches found
The remaining Lua references to "Database.lua" were all in docstring
comments describing module dependencies. Three active modules had
stale "Depends on: Database.lua" comments — updated to point at the
actual Database/ subdirectory files so readers get accurate info:
Core.lua:9 → Database/ (Schema, Migrations, Accessors)
Modules/MythicPlus.lua:71 → Database/Schema.lua
Modules/Session.lua:101 → Database/Accessors.lua
Also removed the "Database.lua" entry from the Package Guard
allowlist in .github/workflows/pkgmeta-check.yml — with the file
gone, the allowlist shouldn't reference it. Package Guard continues
to allow the Database/ directory via its existing entry (added in
PR #42).
Out of scope (follow-up doc sweep, not blocking):- Historical mentions of Database.lua in docs/SPEC.md, CONTRIBUTING.md,
docs/FILE_MANIFEST.yaml, docs/USER_TEST_BLUEPRINT.md, proposals/*
These are documentation drift, not active dependencies. Can be
cleaned up in a dedicated doc-freshness sweep later.
Validated locally:
luacheck Core.lua Modules/Session.lua Modules/MythicPlus.lua → OK
python3 tools/validate_docs.py → all pass
python3 tools/validate_commands.py → 65/65 pass
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com
- Historical mentions of Database.lua in docs/SPEC.md, CONTRIBUTING.md,
- Merge pull request #45 from Shezzannn/fix/doc-freshness-supportapi
docs: register SupportAPI in module inventory tables (fix Doc Freshness CI) - docs: register Modules/SupportAPI.lua in module inventory tables
PR #41 added Modules/SupportAPI.lua to Cerebro.toc but missed the
two module inventory tables that the Doc Freshness CI check
(tools/validate_docs.py) validates against:
- CEREBRO.md — Module Inventory table
- docs/AGENT_CONTEXT.md — Module Inventory table
validate_docs.py has been failing on every PR to main since PR #41
landed because of this. It's a required status check but was not in
branch protection's required list, so the CI red flag was cosmetic
only — never actually blocked merges.
Fix: add one row to each table. Both follow the same compact style
as every other module row (no special alignment required).
Validated locally:
$ python3 tools/validate_docs.py
RESULT: All checks passed. Docs are fresh.
$ python3 tools/validate_commands.py
OK: All 65 cmdMap entries validated.
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com - Merge pull request #44 from Shezzannn/fix/supportapi-slash-alias
fix(slash): wire /cb supportapi alias in cmdMap - Merge pull request #43 from Shezzannn/fix/scope-override-editbox-case
fix(core): StaticPopup scope-override uses modern EditBox casing - Merge pull request #42 from Shezzannn/fix/pkgmeta-check-database-allowlist
ci: add Database/ to Package Guard allowlist - fix(slash): wire /cb supportapi alias in cmdMap
The /cb supportapi command def landed in PR #41 (UI/Commands/Diagnostic.lua)
with id='support_api' and slash='/cb supportapi', but Core.lua's SlashCommand
dispatcher uses a hardcoded cmdMap (built in the Phase 2a decomposition)
that doesn't consult the registry's 'slash' field — it only dispatches
based on explicit alias entries in cmdMap.
Typing /cb supportapi therefore printed "Unknown command" because the
'supportapi' key was never added to cmdMap when PR #41 landed.
This is a one-line fix: add ["supportapi"] = "support_api" alongside
the existing aliases. Matches the pattern used by /cb validate, /cb
selftest, /cb status, etc.
Discovered during in-game smoke test of v0.12.0 + Cerebro-Support v1.0.0.
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com - fix(core): StaticPopup scope-override uses modern EditBox casing
The CEREBRO_CONFIRM_SCOPE_OVERRIDE popup (guild switch / wipe dialog)
crashed with "attempt to index field 'editBox' (a nil value)" on
modern retail WoW because it used the Classic-era lowercase
self.editBox field. Retail exposes the popup's edit box as
self.EditBox (capital) — the convention already used in
UI/UISandbox.lua and UI/StandingsFrame.lua for their PURGE popups.
Both affected sites (OnAccept confirmation check and OnShow reset)
now try self.EditBox first and fall back to self.editBox for
backwards compatibility with older clients. Both are nil-guarded so
a future Blizzard rename won't crash the popup again.
Reproduced by: switching characters to a non-authorized guild,
typing /cb, and clicking "Switch Guild (Wipes All Data)".
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com - ci: add Database/ to Package Guard allowlist
The Database/ directory was created in the v0.11.4 sustainability
framework refactor (commit e17b439, Phase 2a — 3-way split of
Database.lua into Database/Schema.lua, Migrations.lua, Accessors.lua).
It was added to Cerebro.toc and ARCHITECTURE.md but never added to
the Package Guard allowlist, causing a CI failure on every PR to main
since v0.11.4.
The old Database.lua stub file is still tracked (it contains a
decomposition notice pointing to the new files). Its allowlist entry
is left in place — removing it would cause Package Guard to fail until
the file is actually deleted, which is a separate cleanup.
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com - Merge pull request #41 from Shezzannn/feature/v0.12.0-supportapi-phase1
v0.12.0 Phase 1: Cerebro SupportAPI module + SA-1..SA-9 enforcement - Merge pull request #40 from Shezzannn/feature/v0.12.0-sync-test-harness
v0.12.0: SPEC §8 Support API Contract + sync test harness proposal - feat(supportapi): Phase 1 — Cerebro Support API contract per SPEC §8
Implements the Cerebro-side surface needed by the forthcoming Cerebro-Support
companion addon. This is the smallest possible patch: ~80 new lines of Lua plus
two single-line hooks. Zero production behavior change for existing users.
What lands in this PR
─────────────────────- Modules/SupportAPI.lua (new, ~250 lines incl docstrings)
- Public namespace: Cerebro.SupportAPI
- Read-only accessors: GetContractVersion, GetAddonVersion, GetCurrentHash,
GetPlayerCount, IsOfficer, IsInTestMode, GetActiveTestRun - Bounded write-gate: EnterTestMode(runID, deadline) / ExitTestMode(runID)
with officer gate (SA-1), deadline cap of 120s, auto-exit timer (SA-3) - Observer registry: RegisterObserver / UnregisterObserver
- Internal: ShouldDropMutation, NotifyObservers, GetDiagnosticState
- Module-local state only — no SavedVariables persistence (SA-4)
- Utilities.lua: ApplyPlayerMutation write-gate (one new branch)
- Drops mutation when SupportAPI:ShouldDropMutation() returns true (SA-2)
- Inserted BEFORE field changes, ledger appends, audit writes
- Modules/Sync/RPCDispatch.lua: OnCommReceivedV2 observer hook (one new branch)
- Calls SupportAPI:NotifyObservers AFTER production dispatch completes (SA-5)
- Errors isolated via pcall in NotifyObservers (SA-6)
- UI/Commands/Diagnostic.lua: /cb supportapi diagnostic command
- Reports contract version, test-mode state, observer count, max deadline
- Cerebro.toc: registers Modules/SupportAPI.lua after Sync/V2Handlers.lua
(must load after CommunicationV2 since GetCurrentHash delegates to it) - docs/INTERFACES.md: new §5 documenting all 11 public functions + invariants
- docs/ARCHITECTURE.md: new row in Business Modules table
Test coverage
───────────── - tests/scenarios/test_support_api.lua (new, 32 tests)
- Loads the production Modules/SupportAPI.lua source via loadfile + chunk
args, so tests exercise the actual shipping code (no inline duplication) - Covers all 9 invariants SA-1..SA-9 explicitly:
SA-1 officer gate fail-closed ✓
SA-2 ShouldDropMutation true/false ✓
SA-3 deadline validation + boundary ✓
SA-4 db.global untouched after run ✓
SA-5 observer post-dispatch order ✓
SA-6 throwing observer auto-purge ✓
SA-7 no setter functions in api ✓
SA-8 InCombatLockdown tripwire ✓
SA-9 contract version handshake ✓ - Plus input validation (empty runID, non-string, re-entry, mismatched exit)
and the diagnostic snapshot used by /cb supportapi
- Loads the production Modules/SupportAPI.lua source via loadfile + chunk
- tests/harness/wow_api_stubs.lua: extended C_Timer with NewTimer stub
Returns a controllable timer object so tests can deterministically exercise
SA-3 auto-exit without sleeping. Existing C_Timer.After behavior unchanged. - tests/run_all.lua: registers test_support_api.lua in the harness sequence
Test results: 87/87 passing (was 55/55), luacheck clean across all 4 modified
Lua files. No production behavior change confirmed by existing 55 tests still
passing identically.
What does NOT land here
─────────────────────── - Cerebro-Support companion addon — Phase 2, separate repo, separate PR
- Scenario playbooks (S1-S9), shadow DB, CBST AceComm prefix, report UI —
all live in the companion addon, not here
Stacked on PR #40 (SPEC §8 governance approval).
🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com
- Modules/SupportAPI.lua (new, ~250 lines incl docstrings)
- docs(spec): add §8 Support API Contract for v0.12.0 sync test harness
Introduces a new canonical contract (SPEC.md §8) for an automated
end-to-end synchronization health check, exposed via Cerebro.SupportAPI
and consumed by a forthcoming companion addon (Cerebro-Support).
The contract defines:- Read-only accessors (version, hash, officer status, test-mode state)
- A bounded-lifetime write-gate that DROPS production mutations during
test runs (never redirects) - A passive observer hook for V2 dispatch
- Reservation of the AceComm prefix CBST for the companion addon
- Nine invariants (SA-1..SA-9) covering officer gating, auto-exit,
no SavedVariables persistence, pcall isolation, combat gating, and
contract version handshaking
Companion proposal at docs/proposals/SYNC_TEST_HARNESS_V0120.md details
the two-tier participant model (officers active, raiders passive),
9-scenario catalogue, KPI set, orchestration flow, and phased plan.
Supersedes the manual procedure in docs/ep_sync_test_plan.md
(staleness-flagged 2026-04-02).
This commit is governance-only — no implementation code lands until
SPEC §8 is approved per CLAUDE.md §4.
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com
- chore: archive sustainability framework tasks to v0.11.4
Moved 4 completed task files to .agent/tasks/archive/v0.11.4/:- sustainability-framework.md (tracker)
- sustainability-framework-plan.md (implementation plan v3)
- sustainability-framework-changelog.md (full change log)
- sustainability-framework-staleness-report.md (Phase 0 artifact)
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com
- chore: finalize sustainability framework — all phases complete, tasks archived
Updated task tracker: Status → Complete, all checklist items <input disabled="disabled" type="checkbox" checked="checked" />,
phase gate log for all 5 phases, archive notes with lessons learned.
Updated changelog: added Phase 3-5 entries with full detail.
Updated active_project_state memory: initiative marked complete with
key outcomes summary.
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com - feat: Phase 5 complete — pre-deploy gate, invariant manifest, architecture docs
Pre-deploy integrity gate (tools/deploy.py):- Runs test harness (55/55) automatically before every deploy
- Aborts deploy if any test fails
- Auto-detects Lua 5.1 on Windows/Linux/macOS
Invariant manifest (tools/extract_invariants.py): - Scans all @invariant annotations across the codebase
- Generates docs/INVARIANTS_MANIFEST.md (56 invariants, 15 files)
- --check mode for CI (exit 1 if stale)
Architecture docs updated: - ARCHITECTURE.md v2.3: V2-only protocol, Sync/ decomposition, ADR-001 write gate
- CEREBRO.md + AGENT_CONTEXT.md: Communication.lua removed, V2Handlers added
All gates passing: validate_docs OK, invariants up-to-date, harness 55/55.
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com
- feat: Phase 4 — 55 harness tests, CI pipeline, extended /cb validate (41 tests)
4 new convergence scenarios (22 tests):- test_receipt_pipeline: transaction fields, UUID dedup, signed amounts, replay
- test_purge_propagation: purge ledger, sync survival, announce rejection, blocked
- test_session_lifecycle: session state, boss tracking, hash divergence, attendance
- test_lww_invariants: all 6 LWW invariants from cerebro-lww skill
GitHub Actions CI pipeline (.github/workflows/test-harness.yml): - Runs lua5.1 tests/run_all.lua on every push/PR touching .lua files
- Runs luacheck on addon code (excludes tests/Libs/backup)
Extended /cb validate (38 → 41 tests): - V1 protocol retirement verification (Communication module NOT loaded)
- IsQuarantined + IsPlayerReachable migration check
- 6 migrated V1 handler existence checks (HandleEPGPUpdate, HandleReset, etc.)
Total test coverage: 55 out-of-game + 41 in-game = 96 tests.
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com
- fix: resolve all 8 V1 TODO references in V2Handlers.lua
Replaced all remaining Communication.lua dependencies:- VERSION_CHECK whisper → SendRPC("VERSION_CHECK", ..., "WHISPER")
- Snapshot whisper reachability → Cerebro:IsGuildMemberOnline
- Post-receipt SyncToRaid → self:SyncToRaid()
- RCPT_ACK whisper → SendRPC("SYNC_ACK", ..., "WHISPER")
- AnnounceSelf → self:AnnounceSelf() (V2 native)
- ComputeSyncChecksum → self:ComputeRosterHash()
- Receipt cursor sync → deferred (no-op + debug log, V2 receipt system TBD)
Zero V1 Communication.lua references remain in active code paths.
Validated: /cb validate 38/38, luacheck clean.
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com
- refactor: Phase 3 — V1 protocol killed, Communication.lua removed from TOC
V1 Communication protocol retired. All sync now runs through V2 only.
Handler migration:- 22 V1 handlers moved to Modules/Sync/V2Handlers.lua as CommunicationV2 methods
- RPCDispatch.lua rewired: all
Communication:HandleXxx→self:HandleXxx - BATCH_EPGP_UPDATE inline delegation updated to use V2 handlers
Utility migration: - IsQuarantined, IsPlayerReachable, IsGuildMemberOnline moved to Utilities.lua
- All callers updated (Core, SyncScheduler, V2Protocol, RPCDispatch, Commands, UI)
V1 cleanup: - Communication.lua removed from Cerebro.toc (file preserved for reference)
- Core.lua OnCommReceived now drops V1 messages with debug log
- All
modules.Communicationguard checks →modules.CommunicationV2 - /cb synccheck rewired to V2 heartbeat + GetStalePeers + StartRepairCycle
- /cb versioncheck rewired to V2 RPC broadcast
- /cb syncaudit rewired to V2 RPC
Remaining TODO items in V2Handlers.lua: - SendMessage calls need V2 equivalents (receipt cursor sync, announce-self)
- These are edge-case paths that error only when exercised
Validated: /cb validate 38/38, selftest 5/5, synccheck + versioncheck working.
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com
- chore: share Claude memories via git for cross-device sessions
Copied 9 memory files to .claude/shared-context/ so iOS/web sessions
have access to project context without local ~/.claude/ paths.
Includes: sync architectural decisions, WoW API constraints, active
project state, Supabase architecture, governance rules, skill map,
project overview, Antigravity KB reference, and MEMORY.md index.
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com - feat: Phase 2b test harness complete — 33/33 tests, 3 convergence scenarios
Ace3 stubs (ace3_stubs.lua):- LibStub, AceAddon (NewAddon/GetAddon/NewModule/GetModule)
- AceDB (in-memory SavedVariables), AceEvent, AceTimer, AceComm, AceSerializer
- AceGUI minimal stub for Validate.lua compat
Multi-client infrastructure: - message_bus.lua: Channel routing (GUILD/RAID/WHISPER), C3 burst drop simulation
- client_factory.lua: Isolated client instances with own DB, identity, ApplyPlayerMutation
3 baseline convergence scenarios: - test_basic_merge (5 tests): Officer→Raider sync, LWW merge, stale rejection, bulk merge
- test_concurrent_officers (5 tests): 3-officer convergence, timestamp-wins, merge-order
independence, hash determinism, ghost Pending exclusion (LWW Invariant 2) - test_epoch_upgrade (6 tests): Factory reset, epoch guard, fresh-install suppression
(Invariant 6), auto-discovery lastUpdate=0 (Invariant 3), epoch mismatch detection
run_all.lua: Aggregate runner, exits 0/1 for CI integration.
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com
- feat: Phase 2b test harness foundation — runner + WoW API stubs (10/10)
Lightweight Lua 5.1 test runner (no Busted dependency):- describe/it/assert pattern with colored ANSI output
- tests/harness/runner.lua — test registration, execution, reporting
WoW API stubs modeling all 6 constraint categories: - C1: Combat lockdown (SendChatMessage fails in combat)
- C2: Guild API false-GM trap (GetGuildInfo(name) returns rankIndex=0)
- C3: Network (AceComm burst tracking placeholder)
- C4: Clock sync (GetServerTime nil during login, time() divergence)
- C5: Blocked instance APIs (death tracking returns nil)
- C6: UI reactivity (RefreshAllUI call tracking)
Stub sanity test: 10/10 passing via lua.exe.
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com
- chore: Opus/Sonnet orchestration skill — 5 rules, pre-spawn checklist, anti-patterns
Updated .agent/skills/claude-subagents/SKILL.md with:- Model selection matrix (Opus=architect/reviewer, Sonnet=worker/scanner)
- Five rules: pattern-first validation, no Sonnet architecture decisions,
heavy reads to Sonnet, parallel for independent work, Opus always reviews - Pre-spawn checklist (decision vs execution, domain knowledge, context size)
- Anti-pattern table with corrections
- Efficiency tracking via changelog delegation rationale
- 4 Cerebro-specific patterns (feature, bug, audit, governance)
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com
- feat: /cb validate — in-game test suite with UI frame (38 tests, 9 phases)
New module Modules/Validate.lua provides a comprehensive validation suite
displayed in a scrollable AceGUI frame (similar to /cb support).
9 test phases:- Schema Integrity — required fields, NaN detection
- Hash Determinism — roster + config hash consistency
- Mutation Write Gate — ApplyPlayerMutation round-trip with scratch player
- Config Integrity — EPGP settings, decay rate validation
- RBAC Smoke Test — IsOfficer fails-closed verification
- Purge Ledger — no resurrected players
- Command Registry — 65 commands loaded, critical IDs present
- Sync Path — 19 V2 functions available, BuildSnapshot/GetSyncStatus
- Ledger Consistency — UUID uniqueness across 1244 transactions
Also fixed: ApplyPlayerMutation PR cache now computes directly from data
reference instead of routing through GetPlayerData (which could return
GUEST_STUB for synthetic players during guild scope checks).
Governance updates:
- .agent/rules/cerebro.md: validation gate is now mandatory for all changes
- cerebro-governance SKILL.md: coverage table mapping change types to phases
- implement-feature.md: Step 4.7 requires /cb validate + extend-when-needed
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com
- refactor: Phase 2a — CommunicationV2 3-way split into Sync/ modules
CommunicationV2.lua (126KB, 62 functions) decomposed into:- Modules/Sync/HashEngine.lua (4 functions: ComputeRosterHash, ComputeConfigHash, SimpleHash, InvalidateHashCache)
- Modules/Sync/V2Protocol.lua (22 functions: lifecycle, heartbeat, fetch/snapshot, merge)
- Modules/Sync/RPCDispatch.lua (32 functions: SendRPC, HandleRPC, all Broadcast*, convergence, repair)
CommunicationV2.lua reduced to module creation stub (NewModule + module ref).
Split files attach via GetModule("CommunicationV2"). All file-scoped
constants (V2_PREFIX, MSG_V2, etc.) correctly duplicated in consuming files.
Phase 2a decomposition status: - HashEngine: DONE (dev104)
- Database 3-way: DONE (dev105)
- CommandRegistry 8-domain: DONE (dev106)
- CommunicationV2 3-way: DONE (dev107)
- UISandbox: SKIPPED (experimental)
- Communication V1: DEFERRED (temporary, needed only for Phase 3 audit)
Validated: selftest 5/5, status OK, sync active, 43 raiders + 1244 transactions.
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com
- refactor: Phase 2a — Database 3-way split + CommandRegistry 8-domain split
Database.lua decomposed into:- Database/Schema.lua (defaults, AceDB init, GUEST_STUB)
- Database/Migrations.lua (MigrateDatabase, InferGuildFromPlayers)
- Database/Accessors.lua (GetPlayerData, GetAllPlayers, RepairDatabase, etc.)
All 15 functions verified, no duplicates, GUEST_STUB upvalue correctly
exposed via Cerebro.GUEST_STUB for cross-file access.
CommandRegistry.lua decomposed into 8 domain files: - UI/Commands/UICommands.lua (8 cmds), Diagnostic.lua (7), Session.lua (5)
- UI/Commands/Sync.lua (8), Import.lua (3), EPGP.lua (3)
- UI/Commands/Testing.lua (11), Admin.lua (19)
All 64 commands verified via /cb help. WoW-compatible aggregation via
Cerebro._commandDefs shared table (no require()). Domain files load
before CommandRegistry.lua in TOC.
Validated: selftest 5/5, status OK, all commands visible in /cb help.
UISandbox split skipped (experimental, not production).
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com
- refactor(wip): Phase 2a decomposed files created — pending source edits
Created 20 new decomposed files, all passing luacheck:
Sync extraction (COMPLETE + VALIDATED in-game):- Modules/Sync/HashEngine.lua — 4 hash functions extracted from CommunicationV2
UISandbox tab extraction (files created, source edit pending): - UI/Tabs/Progress.lua, LootHistory.lua, History.lua, Standings.lua
- UI/Tabs/Session.lua, GuildMPlusHistory.lua, EPGPSettings.lua
- UI/Tabs/SystemLogs.lua, Help.lua
Database split (files created, source edit pending): - Database/Schema.lua, Migrations.lua, Accessors.lua
CommandRegistry domain split (files created, WoW compat fix pending): - UI/Commands/Admin.lua, Diagnostic.lua, EPGP.lua, Import.lua
- UI/Commands/Session.lua, Sync.lua, Testing.lua, UICommands.lua
Next steps: - Remove duplicated code from UISandbox.lua, Database.lua, CommandRegistry.lua
- Fix CommandRegistry domain files for WoW module pattern (no require())
- Update TOC with all new files
- Split CommunicationV2 → V2Protocol + RPCDispatch
- Split Communication V1 (temporary migration aid)
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com
- Modules/Sync/HashEngine.lua — 4 hash functions extracted from CommunicationV2
- refactor: Phase 1 complete — ApplyPlayerMutation write gate (ADR-001)
Centralized all player data mutations through a single write gate
in Utilities.lua. This eliminates scattered lastUpdate/dirty-marking/
PR cache logic across 10 mutation paths.
ApplyPlayerMutation(name, changes, options):- Always sets lastUpdate = GetServerTime() or time()
- Always updates cached PR when ep/gp change
- Always marks dirty for Delta Sync v2
- Escape hatches: preserveTimestamp (ReplayHistory, RecordBossKill),
skipDirtyMark (ReplayHistory)
Refactored paths: - Player:AddEP, Player:AddGP, Player:Decay (Models/Player.lua)
- ResetStandings (Core.lua)
- RecordBossKill bossKillsPresent + eligibleBossKills (Session.lua)
- HandleEPGPUpdate (Communication.lua)
- Admit to Core, Delete/Reset Player (CommandRegistry.lua)
- ReplayHistory reset + replay (Ledger.lua)
Also in this commit: - ADR-001 (mutation consolidation), ADR-002 (V1 kill), ADR-003 (test harness)
- Module contract headers + @invariant annotations on 10 core files
- tools/analyze_dependencies.py for Phase 2 decomposition
- Phase 1 gate: selftest 5/5 PASS, luacheck clean, validate_docs clean
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com
- chore: sustainability framework Phase 0 complete + Phase 1 setup
Phase 0 — Documentation Staleness Audit:- Audited 23 active docs, 200+ function refs, all 5 locked invariants
- Fixed: ABOUT.md version (v0.10.20→v0.11.4), USER_TEST_BLUEPRINT
version (0.0.35→0.11.4), SECURITY_MODEL.md phantom OfficerFrame.lua
ref, CommandRegistry --json→--debug flag, INDEX.md phantom YAML refs - Added 9 uncatalogued docs to INDEX.md Tier 2
- Removed stale EP_Import OneDrive conflict file
- validate_docs.py passes clean
New skills (7): - cerebro-lww: LWW merge invariants (6 rules)
- cerebro-sync-debug: Sync divergence triage (5-layer tree)
- cerebro-comm-protocol: CommunicationV2 message type checklist
- cerebro-schema-migration: DB field change checklist
- cerebro-rbac: RBAC enforcement patterns
- claude-subagents: Parallel agent navigation patterns
- cerebro-initiative-tracker: Multi-phase initiative tracking
New workflows: - phase-gate: Validation gate procedure for phase completion
Phase 1 setup: - ADR-001 mutation consolidation design (proposed)
- Sustainability framework plan v3, tracker, changelog
- Staleness report artifact
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com
- docs: add operator checklist, version 1.0 roadmap, and architecture documentation

