Skip to content

Latest commit

 

History

History
229 lines (214 loc) · 8.95 KB

File metadata and controls

229 lines (214 loc) · 8.95 KB

QUI Remediation Backlog (100k-user hardening)

Usage

  • Scope: retail WoW addon stability, taint safety, scalability, and performance.
  • Ticket order is execution priority (P0 first).
  • Definition of done for each ticket:
    • All acceptance criteria pass.
    • Taint test cases pass in a clean UI and in a realistic addon stack.
    • No Lua errors in /console scriptErrors 1 sessions.

P0-1: Remove unsafe Blizzard monkey-patching

  • Priority: P0
  • Goal:
    • Eliminate direct replacement of Blizzard mixin/instance functions and move to hook/wrapper patterns that survive patch churn.
  • Files:
    • core/main.lua
    • modules/frames/unitframe_blizzard.lua
  • Key changes:
    • Replace direct assignments like EncounterWarningsTextElementMixin.Init = ... with safe guarded interception strategy.
    • Isolate expansion-specific compatibility logic behind version-gated adapters.
    • Add hard fail-safe: if target API shape changes, skip patch and log debug message instead of overriding unknown behavior.
  • Acceptance criteria:
    • No direct reassignment of Blizzard frame/mixin methods remains in these files.
    • Addon loads without Lua errors on login/reload/zone change.
    • Edit Mode entry/exit works with boss frames and encounter warnings enabled.
  • Taint test cases:
    • Enter/exit Edit Mode repeatedly in city and in instance.
    • Open EncounterWarnings-producing content, then toggle Edit Mode.
    • Run with common UI packs and verify no ADDON_ACTION_BLOCKED from QUI.

P0-2: Eliminate accidental global functions

  • Priority: P0
  • Goal:
    • Prevent namespace collisions by converting unscoped Foo = function() helpers to local function Foo() unless intentionally exported.
  • Files:
    • modules/frames/raidbuffs.lua
    • modules/character/character.lua
    • modules/qol/consumablecheck.lua
    • modules/qol/reticle.lua
    • skinning/notifications/loot.lua
    • modules/utility/anchoring.lua
    • plus any remaining matches from rg "^[A-Za-z_][A-Za-z0-9_]*\\s*=\\s*function\\("
  • Key changes:
    • Convert helper assignments to local functions.
    • Keep only explicit public APIs on _G.QUI_* or ns.*.
    • Add a lightweight lint/check script to detect new accidental globals.
  • Acceptance criteria:
    • No unintentional globals in addon codebase.
    • Public API surface is documented in one section in this file or a dedicated API file.
  • Taint test cases:
    • Load with 20+ addons; ensure no behavior changes from symbol collisions.
    • Validate /reload, options panel open/close, and key features still work.

P0-3: Unify SavedVariables to one DB root

  • Priority: P0
  • Goal:
    • Remove split state between QUI_DB and QUIDB; keep one canonical DB.
  • Files:
    • QUI.toc
    • init.lua
    • core/main.lua
    • core/compatibility.lua (if migration helpers are placed there)
  • Key changes:
    • Choose canonical DB (QUIDB recommended for continuity with core usage).
    • Implement one-time migration from legacy DB key.
    • Stop writing to legacy key after migration and remove dead-path reads.
  • Acceptance criteria:
    • Single SavedVariables key in TOC.
    • Existing users keep settings after upgrade.
    • New installs create only canonical DB.
  • Taint test cases:
    • Upgrade path test with old SV file.
    • Fresh install test.
    • Profile switch/import/export still works after migration.

P0-4: Remove global /reload override

  • Priority: P0
  • Goal:
    • Avoid overriding Blizzard/global reload command behavior.
  • Files:
    • core/main.lua
    • init.lua (slash command handling)
  • Key changes:
    • Remove SlashCmdList["RELOAD"] reassignment.
    • Keep safe reload on addon-specific command(s), e.g. /qui rl.
  • Acceptance criteria:
    • /reload remains Blizzard/default behavior.
    • QUI safe reload still available and combat-safe.
  • Taint test cases:
    • Execute /reload and /qui rl in and out of combat.
    • Ensure queued reload popup still works after combat.

P1-1: Replace unnecessary polling with event-first architecture

  • Priority: P1
  • Goal:
    • Reduce baseline CPU use by replacing frame OnUpdate polling where events are sufficient.
  • Files:
    • modules/frames/buffbar.lua
    • modules/frames/unitframes.lua
    • core/main.lua
    • core/viewer_skinning.lua
  • Key changes:
    • Document where polling is truly required (API gap only).
    • Drop polling frequency and auto-disable pollers when hidden/inactive.
    • Use debounced event triggers for layout refresh.
  • Acceptance criteria:
    • Measured reduced CPU in idle and combat compared to baseline.
    • Feature parity preserved for buff/cooldown updates.
  • Taint test cases:
    • Raid combat pull with many auras.
    • Target swapping stress test.
    • Enter/leave combat rapidly.

P1-2: Remove hot-path temporary allocations

  • Priority: P1
  • Goal:
    • Reduce GC churn from repeated temporary table creation.
  • Files:
    • core/viewer_skinning.lua
    • core/main.lua
    • any other hot paths using { frame:GetChildren() } repeatedly
  • Key changes:
    • Replace temporary child arrays with reusable scratch buffers or direct iteration utilities.
    • Avoid repeated creation of small tables in per-frame/per-second paths.
  • Acceptance criteria:
    • Lower GC spikes in /fstack + profiler sessions.
    • No layout regressions in CDM and unit frame updates.
  • Taint test cases:
    • Prolonged 10+ minute dungeon run with combat logging.
    • Rapid UI toggles and options edits while in city and instance.

P1-3: Build central refresh scheduler (debounced transaction model)

  • Priority: P1
  • Goal:
    • Replace many independent C_Timer.After chains with one orchestrated refresh queue.
  • Files:
    • core/main.lua
    • core/utils.lua (new scheduler helper)
    • modules using profile-change delayed refresh hooks
  • Key changes:
    • Add scheduler API: QueueRefresh("unitframes"), QueueRefresh("ncdm"), etc.
    • Coalesce duplicate refresh requests in one short window.
    • Run refresh sequence deterministically.
  • Acceptance criteria:
    • Profile changes produce one stable refresh transaction.
    • No race-driven visual glitches or stale frame positions.
  • Taint test cases:
    • Rapid profile switching.
    • Import profile followed by immediate Edit Mode toggle.
    • Zone transition during queued refresh.

P1-4: Centralize secure-operation deferral

  • Priority: P1
  • Goal:
    • Ensure all secure frame mutations (attributes/position/state drivers) are combat-safe and consistently deferred.
  • Files:
    • modules/frames/unitframes.lua
    • modules/qol/quicksalvage.lua
    • modules/qol/consumablecheck.lua
    • core/utils.lua (new deferral helper)
  • Key changes:
    • Introduce shared helper: RunOrDeferSecure(key, fn) on PLAYER_REGEN_ENABLED.
    • Replace scattered ad-hoc checks with centralized deferral and logging.
  • Acceptance criteria:
    • No protected-action errors from QUI during combat-heavy scenarios.
    • Deferred actions execute once and clear correctly.
  • Taint test cases:
    • Start combat while opening options/changing settings.
    • Trigger quicksalvage/consumable picker interactions during combat transitions.

P2-1: Optional lib dependency hardening

  • Priority: P2
  • Goal:
    • Make optional libs behavior explicit and deterministic.
  • Files:
    • core/main.lua
    • libs/libs.xml
    • README.md
  • Key changes:
    • Either vendor required optional libs or clearly gate feature with user-facing status.
    • Add startup diagnostics line in debug mode showing optional feature availability.
  • Acceptance criteria:
    • No silent feature failure.
    • Minimap button behavior predictable on clean install.
  • Taint test cases:
    • Run without any other addons (clean dependency environment).
    • Run with other addons that embed different lib versions.

P2-2: Split core/main.lua into maintainable components

  • Priority: P2
  • Goal:
    • Reduce coupling and improve patch agility by decomposing the large core file.
  • Files:
    • core/main.lua (split)
    • new files: core/lifecycle.lua, core/profile_events.lua, core/editmode_manager.lua, core/compat_patches.lua (names can vary)
    • core/core.xml (load order update)
  • Key changes:
    • Move lifecycle hooks, profile handling, edit mode, and compatibility patches into isolated modules.
    • Keep one thin main.lua entrypoint.
  • Acceptance criteria:
    • No behavior regressions after split.
    • Improved readability and smaller diff surface for future fixes.
  • Taint test cases:
    • Full smoke run of login, reload, profile switch, edit mode, dungeon entry.

Cross-ticket QA Matrix

  • Environments:
    • Clean UI (WTF/Interface minimal)
    • Real addon stack (common raider setup)
    • High-combat (M+, raid)
  • Core scenarios:
    • Login, reload, zone change, dungeon start/end
    • Profile switch/import/export/reset
    • Edit Mode enter/exit while frames are visible
    • Combat lockdown transitions during UI updates
  • Pass criteria:
    • No new Lua errors
    • No ADDON_ACTION_BLOCKED attributable to QUI
    • No major FPS regression at idle or in combat

Suggested Sprinting

  • Sprint 1: P0-1 to P0-4
  • Sprint 2: P1-1 and P1-2
  • Sprint 3: P1-3 and P1-4
  • Sprint 4: P2-1 and P2-2