diff --git a/.github/workflows/forever-release.yml b/.github/workflows/forever-release.yml new file mode 100644 index 0000000..7537344 --- /dev/null +++ b/.github/workflows/forever-release.yml @@ -0,0 +1,94 @@ +name: Forever alpha + +on: + pull_request: + workflow_dispatch: + push: + tags: + - 'forever-v*' + +permissions: + contents: read + +concurrency: + group: forever-${{ github.ref }} + cancel-in-progress: false + +jobs: + build: + runs-on: ubuntu-24.04 + timeout-minutes: 15 + outputs: + version: ${{ steps.package.outputs.version }} + archive_name: ${{ steps.package.outputs.archive_name }} + steps: + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false + - name: Install offline test dependencies + run: | + sudo apt-get update + sudo apt-get install --yes --no-install-recommends lua5.1 python3-yaml + - name: Validate standalone package, runtime and distribution gates + run: /usr/bin/python3 -B -m unittest discover -s tests -p 'test_forever*.py' -v + - name: Check preserved Retail localization behavior + run: lua5.1 tests/test_localization.lua + - name: Prepare explicit Forever assets + id: package + env: + RELEASE_EVENT: ${{ github.event_name }} + RELEASE_TAG: ${{ github.ref_name }} + run: | + if [[ "$RELEASE_EVENT" == push ]]; then + /usr/bin/python3 -B tools/forever_release.py dist --tag "$RELEASE_TAG" --github-output "$GITHUB_OUTPUT" + else + /usr/bin/python3 -B tools/forever_release.py dist --github-output "$GITHUB_OUTPUT" + fi + - name: Retain reviewable build assets + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + with: + name: forever-alpha-assets + if-no-files-found: error + retention-days: 14 + path: | + dist/*.zip + dist/release.json + dist/release-notes.md + dist/source-evidence.json + dist/coverage.json + dist/SHA256SUMS + + publish: + needs: build + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/forever-v') + runs-on: ubuntu-24.04 + timeout-minutes: 5 + permissions: + contents: write + steps: + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false + - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 + with: + name: forever-alpha-assets + path: dist + - name: Verify exact build outputs + working-directory: dist + run: sha256sum --check SHA256SUMS + - name: Upload Forever files to existing CurseForge and Wago pages + env: + CF_API_KEY: ${{ secrets.CF_API_KEY }} + WAGO_API_TOKEN: ${{ secrets.WAGO_API_TOKEN }} + TAG: ${{ github.ref_name }} + run: /usr/bin/python3 -B tools/forever_marketplaces.py dist --tag "$TAG" --publish + - name: Publish distinct Forever prerelease + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TAG: ${{ github.ref_name }} + VERSION: ${{ needs.build.outputs.version }} + ARCHIVE_NAME: ${{ needs.build.outputs.archive_name }} + run: | + gh release create "$TAG" "dist/$ARCHIVE_NAME" dist/release.json dist/SHA256SUMS dist/source-evidence.json dist/coverage.json dist/release-notes.md \ + --repo "$GITHUB_REPOSITORY" --verify-tag --prerelease --latest=false \ + --title "KwikTip Forever $VERSION" --notes-file dist/release-notes.md diff --git a/.pkgmeta b/.pkgmeta index 980c49e..4596df1 100644 --- a/.pkgmeta +++ b/.pkgmeta @@ -5,6 +5,13 @@ wowi-id: 27074 ignore: - CLAUDE.md + # Forever is packaged independently; keep its new files out of Retail ZIPs. + - Forever + - docs/FOREVER* + - tools/package_forever.py + - tools/forever_release.py + - tools/forever_marketplaces.py + - tests/test_forever* localizations: - localization-id: 1478824 diff --git a/DECISIONS.md b/DECISIONS.md new file mode 100644 index 0000000..8e5471d --- /dev/null +++ b/DECISIONS.md @@ -0,0 +1,44 @@ +# KwikTip — Decision Log + +This is the concise record of **durable decisions**: choices that affect addon architecture, data identity, content sourcing, localization, or user-facing behavior. It is not a feature wish list or a session diary. + +## How to use this log + +Add an entry only for settled decisions or explicit supersessions. Describe the choice, the reason, and the operational consequence. Link to implementation or source data rather than copying it here. + +## Current decisions + +### 2026-09-27 — Forever release scope is full dungeon coverage + +- **Decision:** The Forever-specific KwikTip release targets all Vanilla-era dungeon content units/wings plus all nine new Forever dungeons; it is not a two-dungeon preview or a nine-new-dungeon-only flavor. The current matrix has 26 Classic units (including Upper Blackrock Spire) plus nine new dungeons, but the exact total stays provisional until the client resolves the 34-vs-35 roster discrepancy. +- **Why:** Forever retains the Classic dungeon progression while adding nine dungeons. Owner reports the returning dungeons so far behave like Classic/Vanilla; their strategies are promising reuse candidates, but Forever identity, encounter coverage, and changes still need verification. +- **Consequence:** Keep Forever data/package isolated from Retail. Inventory wings/sides separately where independently runnable; verify Forever IDs/modes and all encounter/tip triggers. KwikTip remains a strategy-tip addon, not a loot-table browser; new itemization does not silently expand its data model. Raid coverage is separate; keep Upper Blackrock Spire in the candidate set pending its Forever dungeon/raid classification. +- **Source:** Owner direction; `docs/FOREVER_COVERAGE_MATRIX.md`. + +### 2026-09-09 — Identity is ID-based; display is locale-aware + +- **Decision:** Detect instances, encounters, NPCs, and maps from canonical game IDs. Use Blizzard APIs for localized display names and locale files only for authored tip prose. +- **Why:** Names vary by locale and game patch; IDs preserve the stable data contract. +- **Consequence:** Resolve missing IDs from DB2 first; use runtime/in-game checks only for genuinely dynamic subzone names or positions. +- **Source:** `AGENTS.md`. + +### 2026-09-09 — Game data and strategy content remain separate + +- **Decision:** Static client data provides IDs and names; tips come from ranked guide sources, led by Tactyks/method.gg for Mythic+. +- **Why:** It keeps data correctness independent from mutable strategy advice. +- **Consequence:** Review `tools/.monitor/updates.md` before any tip-content work; source monitoring may trigger prose updates without changing IDs. +- **Source:** `AGENTS.md`. + +### 2026-09-09 — The HUD is contextual and deliberately quiet + +- **Decision:** The HUD surfaces area-relevant information inside supported instances and stays hidden elsewhere unless move mode is active. +- **Why:** A pull-time aid should reduce cognitive load rather than become another UI panel to manage. +- **Consequence:** HUD mouse passthrough is disabled by default and only enabled in move mode. +- **Source:** `AGENTS.md`. + +### 2026-09-17 — Forever content targets the modern client API + +- **Decision:** Any KwikTip coverage for **Forever** uses the modern client API; do not constrain its design to legacy/Classic API compatibility. +- **Why:** Forever's supported client contract is modern, so a compatibility layer for older API behavior would add complexity without serving its target environment. +- **Consequence:** Keep Forever data/content isolated from Midnight and other game branches, but prefer current client APIs and events when adding it. Treat the exact interface version, API surface, instance IDs, and runtime behavior as a release/build verification gate rather than assuming they match Midnight. +- **Source:** Owner direction, 2026-09-17. diff --git a/Forever/Coverage.json b/Forever/Coverage.json new file mode 100644 index 0000000..81842e6 --- /dev/null +++ b/Forever/Coverage.json @@ -0,0 +1,70 @@ +{ + "version": "0.1.0-alpha.1", + "data_build": "1.60.1.70707", + "interface": 16001, + "client_tested": false, + "complete_dungeons": 0, + "full_scope": "All Classic dungeon units/wings plus nine new Forever dungeons; 34/35 total pending UBRS classification", + "included_dungeons": [ + { + "instanceID": 3065, + "name": "The Hall of Thanes", + "encounterIDs": [ + 3493, + 3495, + 3494, + 3496 + ], + "status": "source-backed encounter alpha with optional instance-wide overview", + "provisional": "Infurnus/Magmatus guide association", + "evidence": "docs/FOREVER_HALL_OF_THANES_IDS_70707.json", + "difficultyIDs": [ + 1 + ] + }, + { + "instanceID": 389, + "name": "Ragefire Chasm", + "encounterIDs": [ + 2732, + 2733, + 2734, + 2735 + ], + "status": "source-backed encounter alpha with optional instance-wide overview; no assumed next-boss routing", + "evidence": "docs/FOREVER_RAGEFIRE_IDS_70707.json", + "difficultyIDs": [ + 1 + ] + }, + { + "instanceID": 34, + "name": "Stormwind Stockade", + "encounterIDs": [ + 2756, + 2757, + 2758, + 2759, + 2760 + ], + "status": "five regular encounter records and optional instance-wide overview; no assumed wing route", + "evidence": "docs/FOREVER_STOCKADE_IDS_70707.json", + "difficultyIDs": [ + 1 + ], + "excluded_encounters": [ + { + "name": "Bruegal Ironknuckle", + "reason": "rare spawn has no verified DungeonEncounter mapping; no automatic tip or name/NPC fallback" + } + ] + } + ], + "not_included": [ + "All other dungeons", + "Raids", + "Per-room or per-pull routing", + "NPC target detection" + ], + "live_acceptance": "Pending November 4: actual load, event IDs/names, HUD, success/wipe/exit behavior and settings persistence" +} diff --git a/Forever/DungeonData.lua b/Forever/DungeonData.lua new file mode 100644 index 0000000..3155d32 --- /dev/null +++ b/Forever/DungeonData.lua @@ -0,0 +1,118 @@ +-- Forever-only local test data. No Retail or Timewalking data is loaded. +local ADDON_NAME, KwikTip = ... + +-- IDs: Wago Map/DungeonEncounter CSVs for build 1.60.1.70707. +-- Strategy: current Forever Method/Icy Veins guides. See the per-dungeon +-- readiness/provenance documents listed in Forever/Coverage.json. +-- These static IDs do not establish an in-game pass. UiMap/NPC/subzone +-- identifiers remain unverified and are deliberately omitted, not set to 0. +KwikTip.DUNGEONS = { + { + instanceID = 3065, + name = "The Hall of Thanes", + season = "forever", + type = "dungeon", + difficultyIDs = { 1 }, -- source-backed normal-mode alpha only + -- Dungeon-wide preparation only. No claim to detect the current pack, + -- room, subzone or NPC. Shown by the existing opt-in persistent setting. + overview = "Engineers: move away from the bomb's target spot.\n" + .. "Summoners: interrupt casts; use line of sight to bring them closer.\n" + .. "Looters and Golems hit hard: keep pulls small and control extra enemies.", + bosses = { + { + encounterID = 3493, + name = "Faldrim Anvilmar", + tip = "Clear space along the patrol before pulling. Interrupt Mind Blast.", + }, + { + encounterID = 3495, + -- DungeonEncounter uses Infurnus; guides call him Magmatus. + -- The HUD prefers the actual localized ENCOUNTER_START name. + name = "Infurnus", + tip = "Provisional Magmatus guide match: kill the Dark Iron Summoner first. Keep the boss away from the party to limit fire damage.", + }, + { + encounterID = 3494, + name = "Plunder", + tip = "Clear nearby packs and fight with your back toward a safe wall so Knock Away cannot push you into another group.", + }, + { + encounterID = 3496, + name = "Durgen Dirgehammer", + tip = "Clear the surrounding room before pulling. Prepare for two Lesser Stone Golems and heavy tank damage from Rend; Fear can send players toward uncleared enemies.", + }, + }, + }, + { + instanceID = 389, + name = "Ragefire Chasm", + season = "forever", + type = "dungeon", + difficultyIDs = { 1 }, + -- DB2 order is an encounter roster, not observed player progression. + -- Surface actual encounter events; do not guess the next pull after a kill. + previewNextBoss = false, + overview = "Shaman: interrupt Healing Wave; use line of sight to bring casters closer.\n" + .. "Avoid large Enforcer pulls that can chain-stun the tank. Keep fights away from lava edges.", + bosses = { + { + encounterID = 2732, + name = "Oggleflint", + tip = "Clear nearby troggs before pulling. Face the boss away from the party so his cleave does not hit other melee players.", + }, + { + encounterID = 2733, + name = "Taragaman the Hungerer", + tip = "Tank near the center of the platform so Uppercut cannot knock you into lava. Stay out of melee range when possible to avoid Fire Nova.", + }, + { + encounterID = 2734, + name = "Jergosh the Invoker", + tip = "Control the two accompanying enemies. Remove Immolate and Curse of Weakness when your group has the appropriate dispels.", + }, + { + encounterID = 2735, + name = "Bazzalan", + tip = "Control the two adds and focus the boss. Healers watch tank damage from poison and Sinister Strike.", + }, + }, + }, + { + instanceID = 34, + name = "Stormwind Stockade", + season = "forever", + type = "dungeon", + difficultyIDs = { 1 }, + previewNextBoss = false, -- wing order is not assumed from DB2 OrderIndex + -- Rare Bruegal has no verified DungeonEncounter mapping and is excluded. + overview = "Clear nearby cells before boss pulls and control accompanying prisoners.\n" + .. "Keep pulls small: prisoner stuns and bleeds can compound tank damage.", + bosses = { + { + encounterID = 2756, + name = "Targorr the Dread", + tip = "Control or kill the accompanying prisoners. Healers prepare for fast tank hits and an enrage late in the fight.", + }, + { + encounterID = 2757, + name = "Kam Deepfury", + tip = "Control or kill nearby prisoners first. Watch the tank during Shield Slam's stun.", + }, + { + encounterID = 2758, + name = "Hamhock", + tip = "Control the two accompanying prisoners. Spread out to reduce Chain Lightning jumps.", + }, + { + encounterID = 2759, + name = "Dextren Ward", + tip = "Clear nearby cells before pulling so Intimidating Shout cannot fear players into additional packs.", + }, + { + encounterID = 2760, + name = "Bazil Thredd", + tip = "Ranged players stay away from Smoke Bomb. Keep the tank healthy before its nearby stun and watch for heavy melee damage.", + }, + }, + }, +} diff --git a/Forever/Flavor.lua b/Forever/Flavor.lua new file mode 100644 index 0000000..d961a1c --- /dev/null +++ b/Forever/Flavor.lua @@ -0,0 +1,92 @@ +-- Forever-specific detection guards; the shared Retail engine is unchanged. +local ADDON_NAME, KwikTip = ... + +local function inDungeon(dungeon) + local inInstance, instanceType = IsInInstance() + local _, _, difficultyID, _, _, _, _, instanceID = GetInstanceInfo() + if not inInstance or instanceType ~= "party" or instanceID ~= dungeon.instanceID then return false end + if dungeon.difficultyIDs then + for _, id in ipairs(dungeon.difficultyIDs) do + if id == difficultyID then return true end + end + return false + end + return true +end + +local function clearBoss(self) + self._activeBossEntry = nil + self._activeEncounterID = nil + self._activeEncounterName = nil + self._activeDifficultyID = nil + self.bossActive = false +end + +local OnEncounterStart = KwikTip.OnEncounterStart +function KwikTip:OnEncounterStart(encounterID, encounterName, difficultyID, groupSize) + local entry = self.BOSS_BY_ENCOUNTERID[encounterID] + local _, _, instanceDifficulty = GetInstanceInfo() + if entry and (not inDungeon(entry.dungeon) or difficultyID ~= instanceDifficulty) then + -- A contradictory mode on this dungeon's event invalidates the old + -- fight lock too. A foreign dungeon's ordinary event does not replace + -- a valid fight in the current instance. + if difficultyID ~= instanceDifficulty and self._activeBossEntry + and self._activeBossEntry.dungeon == entry.dungeon then clearBoss(self) end + self:UpdateContent() + self:UpdateVisibility() + return + end + OnEncounterStart(self, encounterID, encounterName, difficultyID, groupSize) + -- The shared handler logs an unknown encounter and clears its entry, but + -- can leave bossActive from a previous fight. Fail closed instead of + -- retaining that previous fight's tip indefinitely. + if not entry and self.bossActive then + self.bossActive = false + self:UpdateContent() + self:UpdateVisibility() + end +end + +local OnEncounterEnd = KwikTip.OnEncounterEnd +function KwikTip:OnEncounterEnd(success) + local entry = self._activeBossEntry + OnEncounterEnd(self, success) + if success == 1 and entry + and (entry.dungeon.previewNextBoss == false or not inDungeon(entry.dungeon)) then + -- Preserve normal encounter cleanup, then restore the overview/quiet + -- state for dungeons whose actual route has not been verified. + self:UpdateContent() + self:UpdateVisibility() + end +end + +local UpdateContent = KwikTip.UpdateContent +function KwikTip:UpdateContent() + -- A zone change can arrive without ENCOUNTER_END (teleport/disconnect). + -- Clear a stale fight before the shared engine's bossActive early return. + if self._activeBossEntry and not inDungeon(self._activeBossEntry.dungeon) then + clearBoss(self) + end + UpdateContent(self) + if self.previewActive then return end + local _, _, _, _, _, _, _, instanceID = GetInstanceInfo() + local dungeon = self.DUNGEON_BY_INSTANCEID[instanceID] + if dungeon and not inDungeon(dungeon) then + self.areaActive, self.dungeonActive = false, false + self:SetContent("") + self:UpdateVisibility() + return + end + if self.bossActive or self.areaActive or not KwikTipDB or not KwikTipDB.showInDungeon + or not dungeon or not dungeon.overview then return end + local displayName = GetInstanceInfo() + if not displayName or displayName == "" then displayName = dungeon.name end + local content = "|cffffcc00" .. displayName .. "|r\n" + .. "|cffffffffDungeon overview|r\n|cffbbbbbb" .. dungeon.overview .. "|r" + local key = self:GetNoteKey() + local note = key and KwikTipDB.notes and KwikTipDB.notes[key] + if note and note ~= "" then content = content .. "\n|cffffdd88" .. note .. "|r" end + self.dungeonActive = true + self:SetContent(content) + self:UpdateVisibility() +end diff --git a/Forever/KwikTip_Forever.toc b/Forever/KwikTip_Forever.toc new file mode 100644 index 0000000..e0a13c1 --- /dev/null +++ b/Forever/KwikTip_Forever.toc @@ -0,0 +1,24 @@ +## Interface: 16001 +## Title: KwikTip: Forever (Alpha) +## Notes: Hall, Ragefire and Stockade encounter alpha; in-game validation pending. Not full dungeon coverage. +## Author: Lucas Boyles +## Version: 0.1.0-alpha.1 +## DefaultState: enabled +## OptionalDeps: LibSharedMedia-3.0 + +## SavedVariables: KwikTipDB + +Locale\enUS.lua +Locale\Locales.lua +Locale\deDE.lua + +Init.lua +DungeonData.lua +RuntimeIndexes.lua + +Locale\tips.lua + +Core.lua +Flavor.lua +Frames.lua +UI_Config.lua diff --git a/Forever/Locale/tips.lua b/Forever/Locale/tips.lua new file mode 100644 index 0000000..ecfcc4c --- /dev/null +++ b/Forever/Locale/tips.lua @@ -0,0 +1,9 @@ +-- Forever-only tip overlays. UI translations are shared; Retail area aliases +-- and tip overrides are never copied into the Forever package. +-- Until Forever translations are authored, all locales use English tip prose. +local ADDON_NAME, KwikTip = ... + +KwikTip.TIP_OVERRIDE_BY_ENCOUNTERID = {} +KwikTip.TIP_OVERRIDE_BY_NPCID = {} +KwikTip.AREA_OVERRIDE_BY_ID = {} +KwikTip.SUBZONE_LOCALE_BY_AREA_ID = {} diff --git a/Forever/README.txt b/Forever/README.txt new file mode 100644 index 0000000..a98e223 --- /dev/null +++ b/Forever/README.txt @@ -0,0 +1,74 @@ +KwikTip Forever 0.1.0-alpha.1 -- early alpha candidate + +Included: Hall of Thanes (four encounters), Ragefire Chasm (four), and Stormwind +Stockade (five regular encounters), plus optional dungeon-wide preparation +overviews. Normal difficulty 1 only. Rare Bruegal automatic tips are excluded. +This is not full dungeon coverage. The roadmap remains all Classic dungeon +units/wings plus nine new Forever dungeons. No target-client test has passed. + +Target: Forever product wowf, build 1.60.1.70707, interface 16001. +The current install is World of Warcraft/_forever_/Wow.exe; the older +_classic_beta_/WowB.exe path in historical notes is no longer the target. + +No automatic installation is performed by the builder. For a controlled manual +test, close the game, copy only the KwikTip_Forever folder into the Forever +client's Interface/AddOns directory, and enable it. Do not enable the Retail +KwikTip addon in the same client. Removing this folder reverses the install; +it does not erase SavedVariables. Disable the addon if you encounter Lua errors. + +Expected behavior: +- /kwik opens settings; the minimap icon and settings logo should appear. +- /kwik move and /kwik preview test the HUD without entering a dungeon. +- Outside supported content, ordinary tips remain hidden. +- In Hall of Thanes, ENCOUNTER_START locks the relevant boss tip. With Persistent + Tip Window enabled, a successful kill may preview the next ordered encounter. + The expected IDs in route order are 3493, 3495, 3494, 3496 on instance 3065. +- Enable the existing Persistent Tip Window setting for an optional dungeon-wide + preparation/trash overview in each included dungeon. It is not a current-pull detector. Boss and + explicit demo previews take priority; the default remains quiet between fights. +- Ragefire uses instance 389 and encounters 2732/2733/2734/2735. It does not guess + the next boss after a kill; it returns to the overview or quiet state. Skipped + or reordered bosses are identified only by their actual encounter event. +- Stockade uses instance 34 and encounters 2756/2757/2758/2759/2760. Its wing + order is not assumed. Bruegal Ironknuckle is present in current guides, but + has no verified encounter mapping and does not get an automatic/name-based tip. +- Alternate difficulties 201/214 and other unsupported modes do not activate these tips. +- Area/trash triggers, NPC targeting, and pre-pull room routing are not implemented. + There is no guessed city-map fallback. A quiet HUD before a boss is expected. + +Important test caveat: raw DungeonEncounter calls the second boss Infurnus; +guides call the second fight Magmatus. That association is provisional. Its +tip is visibly labelled provisional until the actual event/name/mechanics +are checked. The HUD uses the localized encounter name from the event. +Durgen add-versus-boss kill order is omitted because current guides disagree. + +In-game acceptance: +1. Record /run print(GetBuildInfo()) and confirm clean login with no Lua errors. +2. Check settings, icon/logo, move mode, preview, mouse passthrough when locked. +3. In Hall (3065), Ragefire (389) and Stockade (34), use /kwik debug and observe all 13 + events, displayed names and tips, success/wipe handling, and zone exits. + Check the provisional second-boss association before relying on that tip. + Check Ragefire/Stockade with skipped/reordered bosses; no guessed next-boss tip is expected. + If rare Bruegal appears, record whether an encounter event fires; do not assume coverage. +4. Confirm no tip leaks into another dungeon or after leaving the instance. + Check the opt-in overview and its personal note; disable Persistent Tip Window + and confirm ordinary entry is quiet again. Record actual difficulty IDs; + this alpha targets normal difficulty 1 and does not claim alternate-mode support. +5. Change a setting, /reload, then log out/in and confirm it persists. Memory-only + automated preference checks do not establish client persistence. +6. Report the tested build, locale, encounter IDs/names, and any Lua error. + /kwik debug stores a snapshot; existing encounter logging records event IDs. + Do not post an entire account/SavedVariables folder or credentials. + +Sources (checked 2026-10-31): +https://wago.tools/db2/Map/csv?build=1.60.1.70707 +https://wago.tools/db2/DungeonEncounter/csv?build=1.60.1.70707 +https://www.method.gg/wow-forever/dungeons/hall-of-thanes +https://www.icy-veins.com/wow-forever/hall-of-thanes-guide +https://www.method.gg/wow-forever/dungeons/ragefire-chasm +https://www.icy-veins.com/wow-forever/ragefire-chasm-guide +https://www.method.gg/wow-forever/dungeons/the-stockade +https://www.icy-veins.com/wow-forever/the-stockade-guide + +The release assets include coverage.json and source-evidence.json for the exact +candidate scope and static-data provenance. These are not client test results. diff --git a/Forever/RELEASE_NOTES.txt b/Forever/RELEASE_NOTES.txt new file mode 100644 index 0000000..f218e31 --- /dev/null +++ b/Forever/RELEASE_NOTES.txt @@ -0,0 +1,25 @@ +KwikTip Forever @VERSION@ + +Early alpha scope: Hall of Thanes (four encounters), Ragefire Chasm (four), and +Stormwind Stockade (five regular encounters), with optional overviews through Persistent Tip +Window. Normal difficulty 1 only. The default stays quiet between encounters. +This does not detect individual packs, NPCs, rooms or subzones. Ragefire/Stockade +do not assume a next-boss route after kills; reordered fights remain event-driven. +Rare Bruegal Ironknuckle has no verified encounter mapping and no automatic tip. + +Client validation: pending. The owner cannot perform live testing before +November 4. Offline Lua/frame tests do not establish game compatibility. +Static IDs target build 1.60.1.70707, interface 16001. Check the current build. +The Infurnus/Magmatus guide association is visibly provisional. Conflicting +Durgen/add kill priorities are omitted. Report exact build, locale, encounter +ID/name and Lua errors; preserve account data and unrelated SavedVariables. + +Static MapDifficulty data also contains alternate modes 201/214, which are excluded +from this candidate. The full roadmap remains all Classic dungeon units/wings plus the nine new +Forever dungeons; this alpha does not promise that coverage. No dungeon currently +meets the full client-tested coverage definition. See the packaged README for +manual acceptance and installation details. Disable the addon if it errors. +coverage.json and source-evidence.json list the exact included scope and provenance. + +Install only the KwikTip_Forever folder from the ZIP under the Forever client's +Interface/AddOns directory. Keep Retail KwikTip disabled in that client. diff --git a/Forever/RuntimeIndexes.lua b/Forever/RuntimeIndexes.lua new file mode 100644 index 0000000..d3c08ab --- /dev/null +++ b/Forever/RuntimeIndexes.lua @@ -0,0 +1,45 @@ +-- Build Forever lookups without loading Retail/Timewalking data. +local ADDON_NAME, KwikTip = ... + +local function add(index, id, entry, label) + if id == nil then return end + assert(type(id) == "number" and id > 0 and id % 1 == 0, + "Unverified or invalid Forever " .. label) + assert(index[id] == nil or index[id] == entry, + "Duplicate Forever " .. label .. ": " .. tostring(id)) + index[id] = entry +end + +function KwikTip:BuildRuntimeIndexes() + local instances, maps, encounters, bossNPCs, trashNPCs = {}, {}, {}, {}, {} + for _, dungeon in ipairs(self.DUNGEONS) do + assert(dungeon.instanceID ~= nil, "Forever dungeon needs a verified instanceID") + add(instances, dungeon.instanceID, dungeon, "instanceID") + add(maps, dungeon.uiMapID, dungeon, "uiMapID") + for _, id in ipairs(dungeon.altMapIDs or {}) do + add(maps, id, dungeon, "alternate uiMapID") + end + for _, boss in ipairs(dungeon.bosses or {}) do + local entry = { dungeon = dungeon, boss = boss } + assert(boss.encounterID ~= nil, "Forever boss needs a verified encounterID") + add(encounters, boss.encounterID, entry, "encounterID") + for _, id in ipairs(boss.altEncounterIDs or {}) do + add(encounters, id, entry, "alternate encounterID") + end + add(bossNPCs, boss.npcID, entry, "boss npcID") + for _, id in ipairs(boss.altNpcIDs or {}) do + add(bossNPCs, id, entry, "alternate boss npcID") + end + end + for _, mob in ipairs(dungeon.trash or {}) do + add(trashNPCs, mob.npcID, { dungeon = dungeon, mob = mob }, "trash npcID") + end + end + self.DUNGEON_BY_INSTANCEID = instances + self.DUNGEON_BY_UIMAPID = maps + self.BOSS_BY_ENCOUNTERID = encounters + self.BOSS_BY_NPCID = bossNPCs + self.TRASH_BY_NPCID = trashNPCs +end + +KwikTip:BuildRuntimeIndexes() diff --git a/docs/FOREVER_ALPHA_COVERAGE.md b/docs/FOREVER_ALPHA_COVERAGE.md new file mode 100644 index 0000000..3d8b85a --- /dev/null +++ b/docs/FOREVER_ALPHA_COVERAGE.md @@ -0,0 +1,34 @@ +# Forever 0.1.0-alpha.1 candidate coverage + +Prepared for review and build-only CI. No publishing tag or release is approved +by this document. Installed `0.1.0-test` is unchanged; this candidate is separate. + +| Included alpha entry | Static identity | Tips/overview | Mode | Actual client test | +|---|---|---|---|---| +| Hall of Thanes | 3065; 3493/3495/3494/3496 | Four boss records and opt-in dungeon overview; Infurnus/Magmatus association provisional | Normal 1 only | Pending November 4 | +| Ragefire Chasm | 389; 2732/2733/2734/2735 | Four boss records and opt-in dungeon overview; no assumed next-boss route | Normal 1 only | Pending November 4 | +| Stormwind Stockade | 34; 2756/2757/2758/2759/2760 | Five regular boss records and opt-in overview; rare Bruegal automatic tips excluded; no wing-order assumption | Normal 1 only | Pending November 4 | + +This means **three implemented alpha entries, 13 encounter records, zero +complete/client-tested dungeons**. No NPC/subzone/current-pull routing or raid +coverage is included. Tips are English; UI locale fallback is exercised offline. +The release's `coverage.json` and bundled `source-evidence.json` state the same +scope and provenance. Exported IDs and mocked events do not establish an in-game pass. + +The full target remains all Classic dungeon units/wings plus nine new Forever +dungeons. In the provisional 26+9 matrix, 24 other Classic candidates and eight +other new dungeons remain unimplemented; UBRS classification may reduce the final +inventory by one. The first alpha must not be described as full support. + +Before a publishing decision, inspect this candidate's PR/checks and artifact, +confirm build/version/coverage notes, and choose whether a clearly untested +launch alpha is acceptable or to wait for the first November 4 client smoke. +Merge and publishing-tag decisions are separate; no tag is created automatically. + +First live loop: record GetBuildInfo and actual difficulty, clean login/HUD/settings, +one fight in either included dungeon, success/wipe/exit cleanup, and persistence. +Then exercise the remaining encounter records and explicitly confirm the Hall +alias; Bruegal remains excluded unless his identity is verified. Disable the +addon on an error; preserve the old ZIP and SavedVariables. +For hotfixes, capture exact build/instance/event/error, reproduce offline where +possible, rerun the gates, and issue a distinct reviewed alpha version. diff --git a/docs/FOREVER_COVERAGE_MATRIX.md b/docs/FOREVER_COVERAGE_MATRIX.md new file mode 100644 index 0000000..ccd7f88 --- /dev/null +++ b/docs/FOREVER_COVERAGE_MATRIX.md @@ -0,0 +1,107 @@ +# KwikTip Forever — full dungeon coverage matrix + +Status (2026-10-31): **Alpha candidate `0.1.0-alpha.1` includes Hall, Ragefire and Stockade: 13 registered encounter records and opt-in dungeon overviews, normal difficulty 1 only. Zero dungeons meet complete coverage below.** Rare Bruegal automatic tips are excluded. Static IDs are verified from exact-build exports; runtime, area/NPC triggers and Hall's name association remain pending. Installed `0.1.0-test` stays unchanged. No release approval. See `FOREVER_ALPHA_COVERAGE.md` and `Forever/Coverage.json`; full scope is preserved. + +## Release scope + +The Forever-specific KwikTip release is intended to cover **all Vanilla-era dungeon content units/wings plus all nine new Forever dungeons**. The working inventory has 26 Classic units and nine new dungeons (35 total) if Upper Blackrock Spire is included; however, Forever community rosters disagree, with one counting 34 and omitting UBRS while another includes it. Keep UBRS in the candidate matrix and resolve the final inventory against the exact Forever client before calling the count authoritative.[12][13][15] + +The owner reports that the returning dungeons so far play like Classic/Vanilla. Use existing Vanilla encounter strategy as a **reuse candidate**, not as proof that every Forever encounter and trigger is unchanged. Forever-specific instance/map/encounter identifiers, modes, and any mechanic differences still need to be checked against the Forever client. New loot is a separate itemization concern: KwikTip currently provides contextual encounter/trash advice, not loot tables or item recommendations, so this coverage goal does not add a loot database. + +Raids are not silently included in this dungeon scope. Upper Blackrock Spire is included because it is part of the Classic dungeon roster; verify its Forever party/instance mode rather than dropping it based on its historical group size. Any other raid coverage is a separate decision. + +## Repository baseline + +- `DungeonData.lua` is the Midnight dataset. Its six `season = "legacy"` entries are Algeth'ar Academy, Pit of Saron, Seat of the Triumvirate, Skyreach, Kings' Rest, and Temple of Sethraliss—not Vanilla dungeons. +- `DungeonData_Timewalking.lua` has 33 entries, beginning with the Burning Crusade pool and continuing through Legion. It has no Vanilla/Classic pool. Some of its boss tips are still empty; it is not a source of complete Forever coverage. +- `Forever/DungeonData.lua` contains three normal-mode alpha entries: Hall (four), Ragefire (four) and Stockade (five registered encounters), with optional overviews. **Complete, client-tested coverage remains 0/26 Classic units and 0/9 new dungeons**; two Classic and one new dungeon are in implementation, not complete. +- Forever data, indexes, guards and tip overlays are separate from Retail. The current install manifest identifies `wowf` build `1.60.1.70707` at `_forever_/Wow.exe`; interface `16001` is the package target, corroborated by installed addon TOCs. No target-client load is established. + +## Classic dungeon inventory — 26 units + +Classic boss/route/trash guides exist as a research baseline for the old instances; Forever-specific identifiers and any changes remain unverified. Wowhead's Classic overview is the primary starting index for the Vanilla-era roster and strategy pages.[12] + +| # | Forever coverage unit | Current KwikTip data | Forever validation | +|---:|---|---|---| +| 1 | Ragefire Chasm | Four encounter records and optional overview; exact-build provenance recorded | Normal 1 candidate; live test pending; alternate 201 and per-area routing excluded | +| 2 | Wailing Caverns | Missing | Pending | +| 3 | The Deadmines | Missing | Pending | +| 4 | Shadowfang Keep | Missing | Pending | +| 5 | Blackfathom Deeps | Missing | Pending | +| 6 | The Stockade | Five registered encounter tips and optional overview; rare Bruegal automatic tips excluded | Normal 1 candidate; live events/routing/persistence pending; modes 201/214 excluded | +| 7 | Gnomeregan | Missing | Pending | +| 8 | Razorfen Kraul | Missing | Pending | +| 9 | Scarlet Monastery — Graveyard | Missing | Pending | +| 10 | Scarlet Monastery — Library | Missing | Pending | +| 11 | Scarlet Monastery — Armory | Missing | Pending | +| 12 | Scarlet Monastery — Cathedral | Missing | Pending | +| 13 | Razorfen Downs | Missing | Pending | +| 14 | Uldaman | Missing | Pending | +| 15 | Zul'Farrak | Missing | Pending | +| 16 | Maraudon | Missing | Pending | +| 17 | Temple of Atal'Hakkar (Sunken Temple) | Missing | Pending | +| 18 | Blackrock Depths | Missing | Pending | +| 19 | Lower Blackrock Spire | Missing | Pending | +| 20 | Upper Blackrock Spire | Missing | Pending; verify Forever mode/party size | +| 21 | Dire Maul — East | Missing | Pending | +| 22 | Dire Maul — West | Missing | Pending | +| 23 | Dire Maul — North | Missing | Pending | +| 24 | Scholomance | Missing | Pending | +| 25 | Stratholme — Living | Missing | Pending | +| 26 | Stratholme — Undead | Missing | Pending | + +## New Forever dungeons — 9 units + +The nine names below are confirmed by Blizzard; the published launch brackets are recorded in the readiness document.[8][14] + +Current beta availability is not the same as full-release scope: the Week 1 announcement names Hall of Thanes and Ruins of Lordaeron, and the September 24 notes do not announce a phase expansion.[1][2] + +| # | Dungeon | Bracket | Evidence / status | +|---:|---|---:|---| +| 27 | The Hall of Thanes | 13–18 | Four boss records and candidate opt-in instance-wide overview. Wago 70707 verifies instance 3065 and order 3493/3495/3494/3496. Client runtime, Infurnus/Magmatus equivalence, and per-area/NPC routing pending. | +| 28 | Ruins of Lordaeron | 15–20 | Partial strategy coverage; reconcile the seven-entry roster, alias/name conflicts, mechanics, and IDs before marking complete.[5][6][9] | +| 29 | Excavation Site: Wetlands | 24–29 | Build-labelled encounter roster found; strategy coverage was not established by the checked page.[10] | +| 30 | City of Dalaran | 28–33 | Build-labelled encounter roster found; strategy coverage was not established by the checked page.[11] | +| 31 | The Drowned City | 35–40 | Demo/report material is not a complete beta-played strategy source.[7] | +| 32 | Krol'dok Stronghold | 40–45 | Official bracket known; encounter mechanics/strategy inventory still required.[8] | +| 33 | Alcaz Prison | 48–53 | Official bracket known; encounter mechanics/strategy inventory still required.[8] | +| 34 | Blackmaw Hold | 55–60 | Official bracket known; encounter mechanics/strategy inventory still required.[8] | +| 35 | Shaper's Terrace | 58–60 | Official bracket known; encounter mechanics/strategy inventory still required.[8] | + +## Definition of complete coverage + +A dungeon counts as covered only when its Forever package has: + +1. A verified instance identity and map/area routing for the Forever client; wings or sides that run independently are distinct units. +2. A verified encounter roster and ID for every boss/encounter that KwikTip intends to surface. Any optional, summoned, or alternate encounters are explicitly handled or explicitly excluded. +3. A short, actionable tip for each covered boss, based on Classic guides for unchanged mechanics or current Forever beta play/guides for new or changed mechanics. +4. The important route/area triggers and notable high-risk trash advice supported by the relevant source; no unverified NPC names or guessed IDs. +5. A passing target-client test that the package loads and the right tip appears in the right instance/encounter without false positives. + +“Full” does not mean reproducing every enemy's loot table or documenting every ordinary trash NPC. New loot is not part of KwikTip's current data model. If loot recommendations are desired, add that as a distinct product/data requirement rather than hiding it inside dungeon-tip coverage. + +## Work order and gates + +1. **Resolve the inventory.** Confirm the target client's instance modes and independently runnable wings. Keep UBRS in the candidate set until its Forever dungeon/raid classification and party mode settle the 34-vs-35 count. +2. **Build the Classic baseline.** For each of the 26 units, map existing Vanilla guide encounters and notable mechanics to Forever's current IDs. Reuse text only after checking that it remains correct for Forever; record confirmed invariants and differences. +3. **Complete the nine new dungeons.** Maintain separate states for roster/ID-known, strategy-sourced, drafted, and client-tested. Do not promote an encounter list or loot table to mechanics evidence. +4. **Implement the isolated Forever flavor** only after confirming the current TOC/API contract and a small load/detection spike. Do not alter the Retail manifest, version, or release workflow as part of Forever work. +5. **Release gate:** all rows in the final client-confirmed inventory meet the definition above (including UBRS if Forever classifies it as a dungeon); the complete data set passes validation, the package contains no Retail-only identifiers/metadata, and the target Forever client smoke test passes. A two-dungeon preview is not a substitute for this full-support promise. + +## Sources + +[1] https://news.blizzard.com/en-us/article/24304160/the-world-of-warcraft-forever-beta-now-live +[2] https://us.forums.blizzard.com/en/wow/t/wow-forever-beta-development-notes-%E2%80%93-updated-september-24/2360696 +[3] https://www.wowhead.com/forever/guide/hall-of-thanes-dungeon-overview-location-rewards +[4] https://www.wowhead.com/forever/news/the-hall-of-thanes-new-dungeon-walkthrough-for-wow-forever-382991 +[5] https://mobalytics.gg/wow-forever/dungeons/ruins-of-lordaeron-dungeon-guide +[6] https://wowforevertalents.com/dungeons/ruins-of-lordaeron +[7] https://www.warcrafttavern.com/forever/news/the-drowned-city-dungeon-preview-in-wow-forever +[8] https://us.forums.blizzard.com/en/wow/t/krol%E2%80%99dok-stronghold/2349672 — Krol’dok Stronghold — official nine-dungeon level brackets +[9] https://wow-forever.gg/dungeons/ruins-of-lordaeron +[10] https://wow-forever.gg/dungeons/excavation-site-wetlands +[11] https://wow-forever.gg/dungeons/city-of-dalaran +[12] https://www.wowhead.com/classic/guide/classic-dungeons-overview — Wowhead Classic Dungeons Overview +[13] https://www.warcrafttavern.com/forever/guides/dungeons — Warcraft Tavern WoW Forever Dungeons +[14] https://worldofwarcraft.blizzard.com/en-us/news/24303862 — Blizzard World of Warcraft Forever What’s Next Panel Recap +[15] https://wowforeverbuilds.com/dungeons — WoW Forever Dungeons: Level Ranges for Every Dungeon diff --git a/docs/FOREVER_DISTRIBUTION.md b/docs/FOREVER_DISTRIBUTION.md new file mode 100644 index 0000000..5e9e620 --- /dev/null +++ b/docs/FOREVER_DISTRIBUTION.md @@ -0,0 +1,119 @@ +# Forever distribution through GitHub Actions + +Status (2026-10-31): implemented for review with offline validation. Review-branch +and GitHub build results are recorded in the PR/checks; no publishing tag is +approved. No addon release has been published. The installed local addon +remains the separately verified `0.1.0-test`; source candidate `0.1.0-alpha.1` +is not installed. No client load or in-game test is established before November 4. + +## Existing Retail flow + +Repository origin is `github.com/postblink/KwikTip`. `.github/workflows/release.yml` +listens for `v*` tags, checks out the repository, then invokes pinned +BigWigsMods/packager. Root `.pkgmeta` supplies Retail package name `KwikTip`, +CurseForge `1478824`, Wago `QN53W7KB`, WoWInterface `27074`, and CurseForge +localization `1478824`. The upload step references `GITHUB_TOKEN`, `CF_API_KEY`, +`WAGO_API_TOKEN`, and `WOWI_API_TOKEN`. These are referenced secret names, not a +verification that each is configured or authorized; no values were read. + +Retail's workflow, IDs, localization and runtime are unchanged. Root `.pkgmeta` +now narrowly excludes Forever source/docs/tools/tests so committing the new +flavor will not put it into a Retail archive. + +## Forever flow + +`.github/workflows/forever-release.yml` runs the real package/runtime tests, +distribution gates and existing Retail localization checks. PR and manual runs +create reviewable workflow artifacts only. A `forever-v*` tag runs the same +build, then the publication job only if the tag passes strict validation: + +- Only `forever-vX.Y.Z-alpha.N` is accepted for publishing; it must equal the + Forever TOC version. Stable, beta, Retail, mismatched and local-test tags fail. +- The packaged README must identify the same version as the Forever TOC. +- The builder uses only the explicit Forever package file list, not root pkgmeta, + Retail data or Retail tip overlays. It produces the standalone ZIP, SHA256SUMS, + source evidence for all included dungeons, `coverage.json`, authored notes and BigWigs-compatible `release.json`. +- The release metadata maps interface `16001` to flavor `forever`, not `wowf` + (the latter is the local Blizzard product identifier). +- Build jobs have read permission. Only the publication job has contents write, + and only its final release step receives the built-in `GITHUB_TOKEN`. +- GitHub CLI verifies the tag already exists and creates an explicit prerelease, + with `--latest=false`. Existing releases/assets are not silently overwritten. +- The separately scoped marketplace step reuses existing CurseForge/Wago pages + with alpha-only Forever metadata. It uploads the same verified ZIP bytes; + provider preflight must find exact patch `1.60.1`, with no flavor/patch fallback. + +This preserves the tested package layout while matching the Retail packager's +GitHub release-asset metadata contract. The existing BigWigs pin itself supports +Forever (`-g forever`, alias `camelot`, or version `1.60.1`); isolation is the +reason for the separate builder, not a lack of packager support. Actual addon +manager acceptance and GitHub-hosted execution remain untested. + +## Destinations and missing configuration + +GitHub prereleases and the existing CurseForge/Wago pages are implemented behind +the same approved alpha-tag trigger. GitHub uses the built-in token; the two +marketplaces reference the existing `CF_API_KEY` and `WAGO_API_TOKEN` secret +names. No credential values were read and no new grant or setting was created. + +New CurseForge or Wago pages are not required. Their per-file game metadata can +route Forever separately on the existing addon page. Existing BigWigs pages demonstrate +Forever alongside other game versions on [CurseForge](https://www.curseforge.com/wow/addons/bigwigs) +and [Wago](https://addons.wago.io/addons/bigwigs/versions?stability=stable). +`tools/forever_marketplaces.py` retains CurseForge `1478824` and Wago `QN53W7KB`. +Its multipart payloads follow the exact pinned packager implementation: CF +`releaseType=alpha` plus a patch ID resolved only from Forever game version type +`88568`; Wago `stability=alpha` plus `supported_forever_patches=["1.60.1"]`. +All checksums/tag/flavor/patch validations and both token-presence checks complete +before the first upload. No credentials are given to PR/manual builds. + +Actual project token permissions and provider acceptance remain untested until +an approved publication. WoWInterface Forever is disabled pending provider +support; no `WOWI_API_TOKEN` is used in this workflow. The standalone folder stays +`KwikTip_Forever`; no speculative rename was made. Addon-manager acceptance still +needs testing. No marketplace project, token, permission or paid service was created. + +Uploads across providers are not atomic. The uploader does not retry POSTs and +reports each completed provider. If a later step fails, inspect the existing +files before rerunning; do not blindly duplicate a successful upload. + +## Review and first alpha + +Local commands, using a new output path: + +```sh +python3 -B -m unittest discover -s tests -p 'test_forever*.py' -v +lua5.1 tests/test_localization.lua +actionlint .github/workflows/forever-release.yml +python3 -B tools/forever_release.py /tmp/kwiktip-forever-review-build +``` + +The focused review branch includes the workflow, Forever source, builder, +release helper, tests, notes and required provenance docs, preserving unrelated +working-tree edits. Run a PR/manual workflow build and inspect its +artifact before a publishing tag. Workflow dispatch is available once the +workflow is on the repository's default branch. + +For a proposed first public `0.1.0-alpha.1`, review actual coverage/client status, +set the Forever TOC and README version together, update the authored notes, and +rerun the gates. The reviewed candidate now has `0.1.0-alpha.1` metadata prepared; +this does not authorize publication. Obtain approval before pushing `forever-v0.1.0-alpha.1`: that tag is +the concrete publication trigger. Do not use `v0.1.0-alpha.1`, which belongs to +the Retail workflow's tag space. No tag or push was performed here. + +That publishing tag will upload to the existing CF/Wago pages and create the +GitHub prerelease. A review-branch push and draft PR run build checks only. + +Alpha notes must say Hall, Ragefire and Stockade: 13 registered encounters and optional +overviews, normal only; rare Bruegal excluded; no per-pull/NPC/subzone/full coverage. The +Infurnus/Magmatus guide association remains provisional. In-game results stay +pending until actually observed; offline tests are not a client pass. + +## Official implementation references + +- [Pinned BigWigs implementation](https://github.com/BigWigsMods/packager/blob/e50a250f8705041e40f2fa1ddcb280a686d65aa0/release.sh), flavor table and `release.json` construction. +- [GitHub release creation options](https://cli.github.com/manual/gh_release_create). +- [CurseForge upload API](https://support.curseforge.com/support/solutions/articles/9000197321) and [Forever client selection](https://blog.curseforge.com/wow-forever-migrate-addons-beta-to-live/). +- [Wago game data](https://addons.wago.io/api/data/game), exact supported Forever patches. +- [Actions workflow syntax](https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax), tag triggers and permissions. +- [Upload artifact v7.0.2](https://github.com/actions/upload-artifact/releases/tag/v7.0.2) and [download artifact v8.0.2](https://github.com/actions/download-artifact/releases/tag/v8.0.2), pinned in the workflow. diff --git a/docs/FOREVER_HALL_OF_THANES_IDS_70707.json b/docs/FOREVER_HALL_OF_THANES_IDS_70707.json new file mode 100644 index 0000000..c9478ec --- /dev/null +++ b/docs/FOREVER_HALL_OF_THANES_IDS_70707.json @@ -0,0 +1,170 @@ +{ + "fetched_at_utc": "2026-10-31T20:26:48.044959+00:00", + "notes": [ + "Wago-hosted raw DB2 export for explicit exact build; not direct extraction from installed local client and not in-game evidence.", + "No Hall UiMap name or assignment returned; no dungeon uiMap fallback inferred.", + "Encounter display Magmatus appears in guides, while raw client record is Infurnus.", + "Spell text names Magmatus, but these tables contain no direct DungeonEncounter3495 or NPC link. Infurnus/Magmatus alias remains unverified.", + "Normal difficulty1 is the alpha target; alternate201 is present in static data but excluded and untested." + ], + "sources": [ + { + "table": "Map", + "build": "1.60.1.70707", + "requested_url": "https://wago.tools/db2/Map/csv?build=1.60.1.70707", + "final_url": "https://wago.tools/db2/Map/csv?build=1.60.1.70707", + "status": 200, + "content_type": "text/csv; charset=UTF-8", + "sha256": "63e3681e1d37c2860ed4744511201121dd1391b8351ecb97d41ece33dc7b4f24", + "bytes": 11744, + "rows": 73, + "hall_rows": [ + { + "ID": "3065", + "MapName_lang": "The Hall of Thanes", + "InstanceType": "1" + } + ] + }, + { + "table": "DungeonEncounter", + "build": "1.60.1.70707", + "requested_url": "https://wago.tools/db2/DungeonEncounter/csv?build=1.60.1.70707", + "final_url": "https://wago.tools/db2/DungeonEncounter/csv?build=1.60.1.70707", + "status": 200, + "content_type": "text/csv; charset=UTF-8", + "sha256": "626223c1a6c021f81ed36ed374d796522730be777eb9233ec848788e916758ff", + "bytes": 17624, + "rows": 342, + "hall_rows": [ + { + "Name_lang": "Faldrim Anvilmar", + "ID": "3493", + "MapID": "3065", + "OrderIndex": "0" + }, + { + "Name_lang": "Infurnus", + "ID": "3495", + "MapID": "3065", + "OrderIndex": "2000" + }, + { + "Name_lang": "Plunder", + "ID": "3494", + "MapID": "3065", + "OrderIndex": "2500" + }, + { + "Name_lang": "Durgen Dirgehammer", + "ID": "3496", + "MapID": "3065", + "OrderIndex": "3000" + } + ] + }, + { + "table": "UiMap", + "build": "1.60.1.70707", + "requested_url": "https://wago.tools/db2/UiMap/csv?build=1.60.1.70707", + "final_url": "https://wago.tools/db2/UiMap/csv?build=1.60.1.70707", + "status": 200, + "content_type": "text/csv; charset=UTF-8", + "sha256": "1f4aac70eaac015b1d2d0ea0faf6e3d7fb2cf7afdf45e5bb6772d9b80a72346b", + "bytes": 3097, + "rows": 60, + "hall_rows": [] + }, + { + "table": "UiMapAssignment", + "build": "1.60.1.70707", + "requested_url": "https://wago.tools/db2/UiMapAssignment/csv?build=1.60.1.70707", + "final_url": "https://wago.tools/db2/UiMapAssignment/csv?build=1.60.1.70707", + "status": 200, + "content_type": "text/csv; charset=UTF-8", + "sha256": "79267e8be8034e47daab14350411b3acc0b1f64e86efc9d821a217497254ca0a", + "bytes": 6778, + "rows": 61, + "hall_rows": [] + }, + { + "table": "AreaTable", + "build": "1.60.1.70707", + "requested_url": "https://wago.tools/db2/AreaTable/csv?build=1.60.1.70707", + "final_url": "https://wago.tools/db2/AreaTable/csv?build=1.60.1.70707", + "status": 200, + "content_type": "text/csv; charset=UTF-8", + "sha256": "e7ccbde2cd084329ff0cccaa5af7f33facc42079d410bb1d2569dc9bce10a379", + "bytes": 149095, + "rows": 1375, + "hall_rows": [ + { + "ID": "16919", + "AreaName_lang": "The Hall of Thanes", + "ContinentID": "3065" + } + ] + }, + { + "table": "Spell", + "build": "1.60.1.70707", + "requested_url": "https://wago.tools/db2/Spell/csv?build=1.60.1.70707", + "final_url": "https://wago.tools/db2/Spell/csv?build=1.60.1.70707", + "http_status": 200, + "content_type": "text/csv; charset=UTF-8", + "sha256": "b3a1c2a2e7129a78063f6f81dba6c209526aa6ffd78e2f585877eaf05bac9da0", + "bytes": 2215052, + "rows": 32030, + "selected_rows": [ + { + "ID": "1293228", + "NameSubtext_lang": "", + "Description_lang": "Magmatus ignites the target, inflicting $s1 Fire damage and additional Fire damage every $t2 sec for $d.", + "AuraDescription_lang": "$s2 Fire damage inflicted every $t2 sec." + } + ] + }, + { + "table": "SpellName", + "build": "1.60.1.70707", + "requested_url": "https://wago.tools/db2/SpellName/csv?build=1.60.1.70707", + "final_url": "https://wago.tools/db2/SpellName/csv?build=1.60.1.70707", + "http_status": 200, + "content_type": "text/csv; charset=UTF-8", + "sha256": "f716ca649c3716d33a814decbaa9ce9a1f78e5dd39463760c8731b34eaf48a14", + "bytes": 839852, + "rows": 32030, + "selected_rows": [ + { + "ID": "1293228", + "Name_lang": "Combust" + } + ] + }, + { + "table": "MapDifficulty", + "build": "1.60.1.70707", + "requested_url": "https://wago.tools/db2/MapDifficulty/csv?build=1.60.1.70707", + "final_url": "https://wago.tools/db2/MapDifficulty/csv?build=1.60.1.70707", + "status": 200, + "content_type": "text/csv; charset=UTF-8", + "sha256": "18efa9c5823859f0bc91a6650f987f97635f64b864d1c88b95364cbb3471a2cb", + "bytes": 5242, + "rows": 142, + "hall_rows": [ + { + "ID": "6226", + "DifficultyID": "1", + "MaxPlayers": "5", + "MapID": "3065" + }, + { + "ID": "6339", + "DifficultyID": "201", + "MaxPlayers": "5", + "MapID": "3065" + } + ] + } + ] +} diff --git a/docs/FOREVER_HALL_OF_THANES_RESEARCH.md b/docs/FOREVER_HALL_OF_THANES_RESEARCH.md new file mode 100644 index 0000000..d6117a8 --- /dev/null +++ b/docs/FOREVER_HALL_OF_THANES_RESEARCH.md @@ -0,0 +1,84 @@ +# Forever pilot: The Hall of Thanes + +## Current evidence and implementation — 2026-10-31 + +Status: **exact-build static IDs verified from Wago exports; encounter-only local test implemented; in-game behavior untested.** This supersedes the candidate-ID/build status in the preserved historical research below. It does not establish a direct extraction from the local client or an in-game pass. + +The active install manifest identifies `wowf` `1.60.1.70707`, using `_forever_/Wow.exe`. Wago's explicitly versioned exports verify: + +| Route order | DungeonEncounter ID | Raw client record name | OrderIndex | +|---:|---:|---|---:| +| 1 | 3493 | Faldrim Anvilmar | 0 | +| 2 | 3495 | Infurnus | 2000 | +| 3 | 3494 | Plunder | 2500 | +| 4 | 3496 | Durgen Dirgehammer | 3000 | + +`Map.ID = 3065` is The Hall of Thanes (`InstanceType = 1`); `AreaTable.ID = 16919` links to continent/map 3065. The latter is not a uiMapID. The retrieved `UiMap` and `UiMapAssignment` tables contain no Hall map/area assignment. JournalEncounter/JournalEncounterCreature exports returned HTTP 400 for this build. No guessed NPC ID, subzone string, coordinate or city-map fallback is shipped. + +Exact URLs, response hashes and relevant rows are recorded in `FOREVER_HALL_OF_THANES_IDS_70707.json`. Sources: [Map](https://wago.tools/db2/Map/csv?build=1.60.1.70707), [DungeonEncounter](https://wago.tools/db2/DungeonEncounter/csv?build=1.60.1.70707), [AreaTable](https://wago.tools/db2/AreaTable/csv?build=1.60.1.70707), [UiMap](https://wago.tools/db2/UiMap/csv?build=1.60.1.70707), [UiMapAssignment](https://wago.tools/db2/UiMapAssignment/csv?build=1.60.1.70707). + +The current strategy references are [Method/Jurdi, October 15](https://www.method.gg/wow-forever/dungeons/hall-of-thanes) and [Icy Veins/Neryssa, October 19](https://www.icy-veins.com/wow-forever/hall-of-thanes-guide). Tips summarize patrol-space preparation, the interrupt, add management, knockback positioning, and final-room hazards. They are source-backed test wording, not observed mechanics in this installation. Method and Icy Veins disagree on Durgen's boss-versus-add kill priority, so no such priority is included. + +**Unresolved alias:** both guides call the second fight Magmatus, while DB2 calls encounter 3495 Infurnus. Matching those by position is an inference, not verified NPC/event equivalence. The second HUD tip explicitly says its guide match is provisional; the runtime uses the event's localized display name. Confirm the event/name/mechanics in the actual client before considering that association settled. + +The isolated package uses `Forever/RuntimeIndexes.lua` and `Forever/Flavor.lua`, not Timewalking data. `Forever/README.txt` contains manual acceptance steps. All dungeon coverage gates in `FOREVER_COVERAGE_MATRIX.md` still apply. + +### Candidate readiness follow-up + +`0.1.0-test.2` adds an opt-in **dungeon-wide** overview through the existing +Persistent Tip Window setting, keyed only by verified instance 3065. Method's +Important Trash section supports the preparation advice. It is not a current +pack, room, NPC or subzone detector; default entry remains quiet. Boss/explicit +demo previews take priority. Unsupported modes and unknown-encounter replacement +clear stale state in the Forever guard. The installed `0.1.0-test` is unchanged. + +Further exact-build `Spell`/`SpellName` data identifies spell 1293228 as Combust +and names Magmatus in its description. This corroborates that guide name in +client-authored spell text, but provides no direct link to encounter 3495. +The alias remains provisional. No usable local creature-cache record or raw +Criteria linkage resolved it. Durgen's kill priority remains excluded because +sources disagree. These findings do not justify a new NPC/area trigger. + +## Historical draft — retained for provenance + +The following September/October beta research was preliminary. Candidate status and the old 70205 build statements below are superseded by the dated evidence above; its source text is not a current-client validation claim. + +Primary source: [The Hall of Thanes Dungeon Overview Guide](https://www.wowhead.com/forever/guide/hall-of-thanes-dungeon-overview-location-rewards). + +This is an editorial extraction for a future isolated Forever data file. IDs below are candidates supported by online Forever build data, not yet verified from the installed client. No Forever API behavior has been tested. Keep the short HUD lines below as candidate wording; verify against the actual client and revise if beta changes. + +## Candidate identifiers + +| Identifier | Candidate value | Evidence and limit | +|---|---:|---| +| Map ID | 3065 | [WoW Forever map page](https://wow-forever.gg/dungeons/the-hall-of-thanes) lists map 3065; [WoW Forever Guides](https://wowforeverguides.com/dungeons/hall-of-thanes) reports the map and encounter range for build 1.60.1.70205. The guide explicitly classifies the client-data claim as reported/datamined, not confirmed. | +| Area/zone ID | 16919 | [Wowhead Forever zone page](https://www.wowhead.com/forever/zone=16919/the-hall-of-thanes) and [WoW Forever zone page](https://wow-forever.gg/db/zones/16919-the-hall-of-thanes/) identify the zone as 16919. The latter labels its data build 1.60.1.70338. | +| Encounter IDs | 3493–3496, in client order: Faldrim Anvilmar; encounter-internal name Infurnus / reported in-game display Magmatus; Plunder; Durgen Dirgehammer | [WoW Forever Guides](https://wowforeverguides.com/dungeons/hall-of-thanes) reports `DungeonEncounter 3493 to 3496` on map 3065 for build 1.60.1.70205, but labels the claim reported/datamined, not confirmed. [Forever Codex corrections](https://forever-codex.com/corrections) says 3495 is the encounter's internal name Infurnus, while the boss's spell and loot say Magmatus; preserve this display-name mismatch rather than treating the names as interchangeable proof. | + +The build-specific report for [1.60.1.70205](https://wow-forever.gg/news/2026-10-03-build-1-60-1-70205-report) states zero maps or zones changed versus 1.60.1.70170. The third-party guide above reports the map/encounter IDs for 70205 directly, but labels that report unconfirmed. These sources make the IDs stronger candidates; neither substitutes for checking the actual local client tables or in-game runtime behavior. Do not put them in release data until a direct-client cross-check is possible. + +## Boss candidates + +| Order | Candidate name | HUD tip draft | Evidence / caveat | +|---:|---|---|---| +| 1 | Faldrim Anvilmar | Clear nearby trash and wait for his patrol to reach the cleared side before pulling. Tank: expect Mind Blast and Curse of Anvilmar. | Guide describes a central patrol, Mind Blast, and a 10-minute tank curse. NPC reference ID shown by Wowhead: 261306; must cross-check against this Forever build's client data. | +| 2 | Magmatus (encounter record candidate: Infurnus) | Pull Magmatus away from the party; focus the Dark Iron Summoner first, then return to the boss. Watch for Fire Nova-style group damage and Combust on a random player. | Guide names the add and strategy; calls the AoE “Fire Nova-like” without identifying an ability name. NPC reference ID: 261316; verify in client. Encounter-name/display-name discrepancy is documented above. | +| 3 | Plunder | Fight in a safe part of the hallway; position against a wall so Knock Away does not send anyone into another pack. | Guide reports a single knockback ability, Knock Away. NPC reference ID: 261311; verify in client. | +| 4 | Durgen Dirgehammer | Before engaging, clear the Dark Iron Looters around the room. Control the two Lesser Stone Golems one at a time; use stuns/fears and focus them rather than splitting damage. Watch for the boss's Fear and Rend. | The article body and quest reference use **Durgen**, and the linked NPC is 261319; two guide headings/loot-table labels spell the name **Dirgen**. Treat Durgen as provisional until the Forever client confirms canonical display text. | + +## Trash candidates + +- **Dark Iron Looter:** rapid dagger auto-attacks; avoid large pulls and prioritize killing it to reduce tank damage. Wowhead NPC reference 263396. +- **Dark Iron Engineer:** targeted bombs are avoidable once the target location is chosen. Wowhead NPC reference 263397. +- **Dark Iron Summoner:** Fireballs plus summons a Fiery Assistant. Line-of-sight around a pillar/wall to interrupt its cast sequence or force it to move. Wowhead NPC reference 263438. +- **Lesser Stone Golem:** high damage and increased movement speed; pull singly when possible, otherwise focus-fire. In the final mixed pack, crowd-control one threat, then kill the Golem before the Looter. Wowhead NPC reference 263466. + +NPC references above are research pointers from Wowhead, not confirmed Forever DB2/runtime identifiers. The guide's recommendations are written for low-level leveling groups; keep the content aimed at useful, brief leveling guidance rather than importing Midnight M+ conventions. + +## Data needed before coding this into the addon + +1. Verify map 3065, area 16919, relevant uiMapIDs, and encounter IDs 3493/3495/3494/3496 against the installed Forever client build. +2. Verify the four boss names and NPC IDs against client tables or direct beta observations. Resolve the Durgen/Dirgen discrepancy from the client, not by choosing whichever spelling looks likelier. +3. Check if boss encounter events are usable in this client and whether target/NPC identity is secret-protected. Do not design trash-by-target detection until tested. +4. Observe the dungeon's subzone strings and map transitions in-game if the HUD is to change by area. +5. Add this content only to a separate Forever data path/package after the selection/loading mechanism is proven; keep ID placeholders out of any candidate release archive. diff --git a/docs/FOREVER_RAGEFIRE_IDS_70707.json b/docs/FOREVER_RAGEFIRE_IDS_70707.json new file mode 100644 index 0000000..74327b6 --- /dev/null +++ b/docs/FOREVER_RAGEFIRE_IDS_70707.json @@ -0,0 +1,167 @@ +{ + "fetched_at_utc": "2026-10-31T21:38:14.643424+00:00", + "client_metadata": [ + { + "Active": "1", + "Version": "1.60.1.70707", + "Product": "wowf" + } + ], + "forever_executable_exists": true, + "scope": "Wago-hosted raw DB2 exact-build Ragefire Chasm static identity; no local-client extraction or game execution.", + "sources": [ + { + "table": "Map", + "build": "1.60.1.70707", + "requested_url": "https://wago.tools/db2/Map/csv?build=1.60.1.70707", + "final_url": "https://wago.tools/db2/Map/csv?build=1.60.1.70707", + "status": 200, + "content_type": "text/csv; charset=UTF-8", + "sha256": "63e3681e1d37c2860ed4744511201121dd1391b8351ecb97d41ece33dc7b4f24", + "bytes": 11744, + "rows": 73, + "ragefire_rows": [ + { + "ID": "389", + "MapName_lang": "Ragefire Chasm", + "InstanceType": "1", + "MaxPlayers": "10" + } + ] + }, + { + "table": "DungeonEncounter", + "build": "1.60.1.70707", + "requested_url": "https://wago.tools/db2/DungeonEncounter/csv?build=1.60.1.70707", + "final_url": "https://wago.tools/db2/DungeonEncounter/csv?build=1.60.1.70707", + "status": 200, + "content_type": "text/csv; charset=UTF-8", + "sha256": "626223c1a6c021f81ed36ed374d796522730be777eb9233ec848788e916758ff", + "bytes": 17624, + "rows": 342, + "ragefire_rows": [ + { + "Name_lang": "Oggleflint", + "ID": "2732", + "MapID": "389", + "DifficultyID": "0", + "OrderIndex": "0" + }, + { + "Name_lang": "Taragaman the Hungerer", + "ID": "2733", + "MapID": "389", + "DifficultyID": "0", + "OrderIndex": "1000" + }, + { + "Name_lang": "Jergosh the Invoker", + "ID": "2734", + "MapID": "389", + "DifficultyID": "0", + "OrderIndex": "2000" + }, + { + "Name_lang": "Bazzalan", + "ID": "2735", + "MapID": "389", + "DifficultyID": "0", + "OrderIndex": "3000" + } + ] + }, + { + "table": "AreaTable", + "build": "1.60.1.70707", + "requested_url": "https://wago.tools/db2/AreaTable/csv?build=1.60.1.70707", + "final_url": "https://wago.tools/db2/AreaTable/csv?build=1.60.1.70707", + "status": 200, + "content_type": "text/csv; charset=UTF-8", + "sha256": "e7ccbde2cd084329ff0cccaa5af7f33facc42079d410bb1d2569dc9bce10a379", + "bytes": 149095, + "rows": 1375, + "ragefire_rows": [ + { + "ID": "2437", + "AreaName_lang": "Ragefire Chasm", + "ContinentID": "389" + } + ] + }, + { + "table": "UiMap", + "build": "1.60.1.70707", + "requested_url": "https://wago.tools/db2/UiMap/csv?build=1.60.1.70707", + "final_url": "https://wago.tools/db2/UiMap/csv?build=1.60.1.70707", + "status": 200, + "content_type": "text/csv; charset=UTF-8", + "sha256": "1f4aac70eaac015b1d2d0ea0faf6e3d7fb2cf7afdf45e5bb6772d9b80a72346b", + "bytes": 3097, + "rows": 60, + "ragefire_rows": [] + }, + { + "table": "UiMapAssignment", + "build": "1.60.1.70707", + "requested_url": "https://wago.tools/db2/UiMapAssignment/csv?build=1.60.1.70707", + "final_url": "https://wago.tools/db2/UiMapAssignment/csv?build=1.60.1.70707", + "status": 200, + "content_type": "text/csv; charset=UTF-8", + "sha256": "79267e8be8034e47daab14350411b3acc0b1f64e86efc9d821a217497254ca0a", + "bytes": 6778, + "rows": 61, + "ragefire_rows": [] + }, + { + "table": "MapDifficulty", + "build": "1.60.1.70707", + "requested_url": "https://wago.tools/db2/MapDifficulty/csv?build=1.60.1.70707", + "final_url": "https://wago.tools/db2/MapDifficulty/csv?build=1.60.1.70707", + "status": 200, + "content_type": "text/csv; charset=UTF-8", + "sha256": "18efa9c5823859f0bc91a6650f987f97635f64b864d1c88b95364cbb3471a2cb", + "bytes": 5242, + "rows": 142, + "ragefire_rows": [ + { + "ID": "33", + "DifficultyID": "1", + "MaxPlayers": "5", + "MapID": "389" + }, + { + "ID": "5250", + "DifficultyID": "201", + "MaxPlayers": "10", + "MapID": "389" + } + ] + } + ], + "guide_sources": [ + { + "name": "method", + "requested_url": "https://www.method.gg/wow-forever/dungeons/ragefire-chasm", + "final_url": "https://www.method.gg/wow-forever/dungeons/ragefire-chasm", + "status": 200, + "content_type": "text/html; charset=UTF-8", + "sha256": "4e714d87349c2e643669faec7cb7fd4f4f54aaf8ab5cc8759acd19fd1a75fcf3", + "bytes": 244349 + }, + { + "name": "icy-veins", + "requested_url": "https://www.icy-veins.com/wow-forever/ragefire-chasm-guide", + "final_url": "https://www.icy-veins.com/wow-forever/ragefire-chasm-guide", + "status": 200, + "content_type": "text/html; charset=utf-8", + "sha256": "284df4e432784b3cbac1c83fb1ed9e1f93bdca377b906d05a254565bf7f58706", + "bytes": 182421 + } + ], + "limits": [ + "Static exported IDs and source-backed prose, not an in-game pass", + "Normal difficulty1 only; alternate201 excluded", + "No UiMap, NPC or subzone detector", + "Encounter order is not compulsory live route; next-boss preview disabled" + ] +} diff --git a/docs/FOREVER_RAGEFIRE_READINESS.md b/docs/FOREVER_RAGEFIRE_READINESS.md new file mode 100644 index 0000000..1ed8331 --- /dev/null +++ b/docs/FOREVER_RAGEFIRE_READINESS.md @@ -0,0 +1,40 @@ +# Ragefire Chasm — normal-mode alpha entry + +Status (2026-10-31): exact-build static identity and source-backed tips implemented +for `0.1.0-alpha.1`. No client load, encounter-event or gameplay pass is claimed. +The current installed product metadata remains `wowf 1.60.1.70707`. + +The refreshed Wago exports verify Map **389**, party instance, with four +DungeonEncounter records: **2732 Oggleflint**, **2733 Taragaman the Hungerer**, +**2734 Jergosh the Invoker**, **2735 Bazzalan**. Area 2437 links to Map 389; +this is not a runtime subzone trigger. No Ragefire UiMap/assignment was found. +Unknown NPC/map/subzone routing is omitted instead of guessed. + +MapDifficulty includes normal **1 / five players** and alternate **201 / ten +players**. This alpha explicitly targets normal difficulty 1 only. Alternate +availability/mechanics are unverified. The same exact-build table confirms +Hall normal 1 and alternate 201; its alpha is also restricted to normal 1. + +Provenance: `FOREVER_RAGEFIRE_IDS_70707.json` records URLs, hashes and selected +rows for six exact-build raw tables, plus fetched guide-response provenance. +These are hosted exports, not extraction from the installed client. Raw sources: +[Map](https://wago.tools/db2/Map/csv?build=1.60.1.70707), +[DungeonEncounter](https://wago.tools/db2/DungeonEncounter/csv?build=1.60.1.70707), +[MapDifficulty](https://wago.tools/db2/MapDifficulty/csv?build=1.60.1.70707). + +Current Forever guides by [Method/Jurdi, October 12](https://www.method.gg/wow-forever/dungeons/ragefire-chasm) +and [Icy Veins/Neryssa, October 19](https://www.icy-veins.com/wow-forever/ragefire-chasm-guide) +support the four concise boss tips and optional instance-wide preparation text. +No legacy Retail data is imported. Jergosh's kill priority is omitted because +the guides differ; the other included advice has no identified material conflict. + +The roster's OrderIndex is not proof of a compulsory live route. Players can +skip Oggleflint's detour or choose final-room order. All four encounters remain +included, but `previewNextBoss=false` returns to the overview/quiet state after +a kill instead of guessing which boss comes next. No extra optional encounter +was identified in the raw table or either guide. + +November 4 acceptance: normal-mode actual instance/difficulty/event IDs; each +boss's localized name/tip; skipped/reordered fights; wipe/kill transitions; +overview opt-in/quiet default; wrong-instance/mode rejection; exit cleanup and +settings persistence. Alternate modes and per-room/NPC triggers remain excluded. diff --git a/docs/FOREVER_READINESS.md b/docs/FOREVER_READINESS.md new file mode 100644 index 0000000..0d0a8c4 --- /dev/null +++ b/docs/FOREVER_READINESS.md @@ -0,0 +1,75 @@ +# World of Warcraft: Forever support — readiness and implementation gates + +Status (2026-10-31): alpha candidate **`0.1.0-alpha.1`** contains Hall, Ragefire and Stockade: 13 registered encounters, optional instance-wide preparation and normal difficulty 1 only. Stockade rare Bruegal automatic tips are excluded. Installed `0.1.0-test` is unchanged. Static IDs are from exact-build Wago exports. **No in-game pass or release approval.** Area/NPC triggers and Hall's guide-name association remain unverified. Full Classic-plus-nine scope is unchanged; see `FOREVER_ALPHA_COVERAGE.md` and per-dungeon readiness/provenance docs. + +The active install manifest identifies `wowf` version `1.60.1.70707`; the executable is `_forever_/Wow.exe`. The latest inspected graphics log recorded 1.60.1.70634 on October 27. The older `_classic_beta_` install no longer has an executable. Interface `16001` is the intended package target and is corroborated by installed Forever addon TOCs, not a new `GetBuildInfo()` observation. The test instructions are packaged in `Forever/README.txt`. + +## Current recommendation + +Forever's full-release target is **all Classic dungeon units/wings plus all nine new Forever dungeons**, kept in a separate Forever package and data set.[12][13][14] + +The working matrix counts 26 Classic units plus nine new dungeons if Upper Blackrock Spire is included; one Forever chart counts 34 and omits UBRS, while another includes it. Resolve that exact roster count against the client before treating 35 as authoritative.[13][15] + +The two-dungeon preview proposal is superseded. + +The Week 1 beta cap and availability constrain what can be tested now, not what the full release promises.[1][2] + +Use `FOREVER_COVERAGE_MATRIX.md` as the canonical inventory and full-coverage definition; some new-dungeon strategies and all target-client runtime behavior still need work. + +The durable decisions are in `DECISIONS.md`: Forever uses the modern client API, stays separate from Midnight/Retail, and its full dungeon scope is all Vanilla-era dungeons/wings plus all nine new dungeons. The exact row count, including UBRS's final classification, remains a target-client verification item. `FOREVER_COVERAGE_MATRIX.md` owns the candidate inventory and completion criteria; this document records evidence and release gates. + +## Confirmed launch roster + +Blizzard's September 15 forum post is the source of truth for this roster and the corrected ranges: [Krol'dok Stronghold and all nine ranges](https://us.forums.blizzard.com/en/wow/t/krol%E2%80%99dok-stronghold/2349672).[8] Blizzard's [Forever panel recap](https://worldofwarcraft.blizzard.com/en-us/news/24303862) confirms the new original-Azeroth content direction; the official forum post supplies the exact table. + +| Dungeon | Official bracket | Current evidence for KwikTip content | Status | +|---|---:|---|---| +| The Hall of Thanes | 13–18 | Exact-build Map/DungeonEncounter exports verify instance and four encounter IDs. Current Method (Oct 15) and Icy Veins (Oct 19) guides inform a local encounter-only test. | Implemented test data; client runtime pending. Infurnus/Magmatus guide match remains provisional; no area/trash coverage claim. | +| Ruins of Lordaeron | 15–20 | A community data page labelled build 1.60.1.70009 lists seven encounters and IDs, but no linked Journal/strategy. Mobalytics covers several mechanics and calls one encounter The Baron; the data page lists The Butcher while its loot data says The Baron. | Partial coverage; reconcile roster/name/mechanics and encounter IDs against the current client before marking complete.[5][6][9] | +| Excavation Site: Wetlands | 24–29 | A build-1.60.1.70009 data page exposes four encounter names/IDs; its page says strategies are coming soon and the dungeon is beyond the current cap. | Candidate for the next data inventory; no reliable tips yet.[10] | +| City of Dalaran | 28–33 | A build-1.60.1.70009 data page exposes nine encounter names/IDs; its page says strategies are coming soon and the dungeon is beyond the current cap. | Candidate for the next data inventory; no reliable tips yet.[11] | +| The Drowned City | 35–40 | A BlizzCon-floor preview reports seeing two bosses, but this is not public-beta play and is not a complete strategy guide. | Research lead only; do not turn demo impressions into shipped tips.[7][8] | +| Krol'dok Stronghold | 40–45 | Bracket confirmed by Blizzard; earlier third-party 40–55 claims are superseded. | Strategy coverage not confirmed. | +| Alcaz Prison | 48–53 | Bracket confirmed by Blizzard. | Strategy coverage not confirmed. | +| Blackmaw Hold | 55–60 | Bracket confirmed by Blizzard. | Strategy coverage not confirmed. | +| Shaper's Terrace | 58–60 | Bracket confirmed by Blizzard. | Strategy coverage not confirmed. | + +“Not confirmed” means this audit did not verify a current, dungeon-specific mechanics guide; it does not assert that no beta data or community coverage exists. + +## Repository facts and boundaries + +- Current retail manifest is `KwikTip.toc`, interface `120100`, version `3.5.0`; it loads `DungeonData.lua` and `DungeonData_Timewalking.lua`. +- The current data/ID puller, `python3 tools/pull_db2_ids.py --json`, reports zero fills for the existing dataset. That is not a Forever ID audit: the tool currently targets the present data files and its matching/version assumptions have not been validated against Forever's client tables. +- The release workflow is tag-triggered (`v*`) and packages/uploads to CurseForge, Wago, WoWInterface, and GitHub. A tag would be an external release; do not use it for the spike. +- The pre-existing `CONTEXT.md` modification and untracked `tests/smoke.lua` were preserved. `DECISIONS.md` was already untracked and is now updated with the owner's settled full-coverage scope; no Midnight runtime/data files or Retail manifest were changed. + +## Release gates + +1. **Flavor/package:** interface `16001`, standalone `KwikTip_Forever`. Installed `0.1.0-test` is preserved; source candidate is `0.1.0-alpha.1`. Builders never install/publish; the workflow requires a separately approved matching alpha tag. Coverage/version ledger, notes and provenance ship alongside the ZIP. Retail runtime remains unchanged. A candidate is not a supported release. +2. **IDs:** Wago's exact-build `Map` export verifies instance 3065 and `DungeonEncounter` verifies route order **3493, 3495, 3494, 3496**. `AreaTable` verifies area 16919, but this is not a uiMapID or runtime subzone trigger. No Hall `UiMap`/assignment was found; NPC identifiers remain unverified. These fields are omitted instead of guessed or zero-filled. See `FOREVER_HALL_OF_THANES_RESEARCH.md` and `FOREVER_HALL_OF_THANES_IDS_70707.json` for provenance. Exported static data is not direct local extraction or an in-game pass. +3. **Runtime compatibility:** manually test the current `_forever_` client; verify `GetInstanceInfo`, `IsInInstance`, encounter events, protected/secret-value behavior, settings persistence, and clean load with the actual TOC/interface. Confirm event 3495 really corresponds to the guide fight called Magmatus before treating that tip as settled. Subzone/area routing remains future work. +4. **Content:** satisfy every row in `FOREVER_COVERAGE_MATRIX.md`. Reuse Classic strategy only after checking it applies in Forever; finish the new-dungeon strategy audits and resolve named roster/mechanics conflicts. A beta roster, loot table, or general overview is not boss strategy evidence. +5. **Data isolation:** preserve the decided boundary between Forever and Midnight data. Reuse runtime consumers only after proving the runtime data shape is compatible; do not add speculative `type` branches. +6. **Release QA:** build the flavor-specific package, verify its archive has the right TOC/interface/data and no retail-only content leakage, run validators/tests, then obtain explicit release approval before tagging or uploading. + +## First implementation slice + +The first testable slice is Hall boss-event tips with an optional dungeon-wide overview, not a supported/full-coverage addon. The package includes manual acceptance steps. Default entry stays quiet; Persistent Tip Window opts into the overview keyed only by instance 3065. This does not detect a room, current pack or NPC. No unverified subzone/city-map fallback is shipped. Public sharing/tagging/uploading remains outside this work. Historical beta availability and later-dungeon research are not refreshed claims about current access. + +## Sources + +[1] https://news.blizzard.com/en-us/article/24304160/the-world-of-warcraft-forever-beta-now-live +[2] https://us.forums.blizzard.com/en/wow/t/wow-forever-beta-development-notes-%E2%80%93-updated-september-24/2360696 +[3] https://www.wowhead.com/forever/guide/hall-of-thanes-dungeon-overview-location-rewards +[4] https://www.wowhead.com/forever/news/the-hall-of-thanes-new-dungeon-walkthrough-for-wow-forever-382991 +[5] https://mobalytics.gg/wow-forever/dungeons/ruins-of-lordaeron-dungeon-guide +[6] https://wowforevertalents.com/dungeons/ruins-of-lordaeron +[7] https://www.warcrafttavern.com/forever/news/the-drowned-city-dungeon-preview-in-wow-forever +[8] https://us.forums.blizzard.com/en/wow/t/krol%E2%80%99dok-stronghold/2349672 — Krol’dok Stronghold — official nine-dungeon level brackets +[9] https://wow-forever.gg/dungeons/ruins-of-lordaeron +[10] https://wow-forever.gg/dungeons/excavation-site-wetlands +[11] https://wow-forever.gg/dungeons/city-of-dalaran +[12] https://www.wowhead.com/classic/guide/classic-dungeons-overview — Wowhead Classic Dungeons Overview +[13] https://www.warcrafttavern.com/forever/guides/dungeons — Warcraft Tavern WoW Forever Dungeons +[14] https://worldofwarcraft.blizzard.com/en-us/news/24303862 — Blizzard World of Warcraft Forever What’s Next Panel Recap +[15] https://wowforeverbuilds.com/dungeons — WoW Forever Dungeons: Level Ranges for Every Dungeon diff --git a/docs/FOREVER_STOCKADE_IDS_70707.json b/docs/FOREVER_STOCKADE_IDS_70707.json new file mode 100644 index 0000000..cdc5845 --- /dev/null +++ b/docs/FOREVER_STOCKADE_IDS_70707.json @@ -0,0 +1,182 @@ +{ + "fetched_at_utc": "2026-10-31T21:51:17.177482+00:00", + "client_metadata": [ + { + "Active": "1", + "Version": "1.60.1.70707", + "Product": "wowf" + } + ], + "scope": "Wago raw exact-build Stockade static identifiers; no direct local-client extraction or runtime observations.", + "sources": [ + { + "table": "Map", + "build": "1.60.1.70707", + "requested_url": "https://wago.tools/db2/Map/csv?build=1.60.1.70707", + "final_url": "https://wago.tools/db2/Map/csv?build=1.60.1.70707", + "status": 200, + "content_type": "text/csv; charset=UTF-8", + "sha256": "63e3681e1d37c2860ed4744511201121dd1391b8351ecb97d41ece33dc7b4f24", + "bytes": 11744, + "rows": 73, + "stockade_rows": [ + { + "ID": "34", + "MapName_lang": "Stormwind Stockade", + "InstanceType": "1", + "MaxPlayers": "10" + } + ] + }, + { + "table": "DungeonEncounter", + "build": "1.60.1.70707", + "requested_url": "https://wago.tools/db2/DungeonEncounter/csv?build=1.60.1.70707", + "final_url": "https://wago.tools/db2/DungeonEncounter/csv?build=1.60.1.70707", + "status": 200, + "content_type": "text/csv; charset=UTF-8", + "sha256": "626223c1a6c021f81ed36ed374d796522730be777eb9233ec848788e916758ff", + "bytes": 17624, + "rows": 342, + "stockade_rows": [ + { + "Name_lang": "Targorr the Dread", + "ID": "2756", + "MapID": "34", + "DifficultyID": "0", + "OrderIndex": "0" + }, + { + "Name_lang": "Kam Deepfury", + "ID": "2757", + "MapID": "34", + "DifficultyID": "0", + "OrderIndex": "1000" + }, + { + "Name_lang": "Hamhock", + "ID": "2758", + "MapID": "34", + "DifficultyID": "0", + "OrderIndex": "2000" + }, + { + "Name_lang": "Dextren Ward", + "ID": "2759", + "MapID": "34", + "DifficultyID": "0", + "OrderIndex": "3000" + }, + { + "Name_lang": "Bazil Thredd", + "ID": "2760", + "MapID": "34", + "DifficultyID": "0", + "OrderIndex": "4000" + } + ], + "bruegal_or_ironknuckle_name_matches": [] + }, + { + "table": "AreaTable", + "build": "1.60.1.70707", + "requested_url": "https://wago.tools/db2/AreaTable/csv?build=1.60.1.70707", + "final_url": "https://wago.tools/db2/AreaTable/csv?build=1.60.1.70707", + "status": 200, + "content_type": "text/csv; charset=UTF-8", + "sha256": "e7ccbde2cd084329ff0cccaa5af7f33facc42079d410bb1d2569dc9bce10a379", + "bytes": 149095, + "rows": 1375, + "stockade_rows": [ + { + "ID": "717", + "AreaName_lang": "The Stockade", + "ContinentID": "34" + } + ] + }, + { + "table": "UiMap", + "build": "1.60.1.70707", + "requested_url": "https://wago.tools/db2/UiMap/csv?build=1.60.1.70707", + "final_url": "https://wago.tools/db2/UiMap/csv?build=1.60.1.70707", + "status": 200, + "content_type": "text/csv; charset=UTF-8", + "sha256": "1f4aac70eaac015b1d2d0ea0faf6e3d7fb2cf7afdf45e5bb6772d9b80a72346b", + "bytes": 3097, + "rows": 60, + "stockade_rows": [] + }, + { + "table": "UiMapAssignment", + "build": "1.60.1.70707", + "requested_url": "https://wago.tools/db2/UiMapAssignment/csv?build=1.60.1.70707", + "final_url": "https://wago.tools/db2/UiMapAssignment/csv?build=1.60.1.70707", + "status": 200, + "content_type": "text/csv; charset=UTF-8", + "sha256": "79267e8be8034e47daab14350411b3acc0b1f64e86efc9d821a217497254ca0a", + "bytes": 6778, + "rows": 61, + "stockade_rows": [], + "selection": "MapID=34 OR AreaID=717" + }, + { + "table": "MapDifficulty", + "build": "1.60.1.70707", + "requested_url": "https://wago.tools/db2/MapDifficulty/csv?build=1.60.1.70707", + "final_url": "https://wago.tools/db2/MapDifficulty/csv?build=1.60.1.70707", + "status": 200, + "content_type": "text/csv; charset=UTF-8", + "sha256": "18efa9c5823859f0bc91a6650f987f97635f64b864d1c88b95364cbb3471a2cb", + "bytes": 5242, + "rows": 142, + "stockade_rows": [ + { + "ID": "8", + "DifficultyID": "1", + "MaxPlayers": "5", + "MapID": "34" + }, + { + "ID": "5238", + "DifficultyID": "201", + "MaxPlayers": "10", + "MapID": "34" + }, + { + "ID": "5477", + "DifficultyID": "214", + "MaxPlayers": "5", + "MapID": "34" + } + ] + } + ], + "guide_sources": [ + { + "name": "method", + "requested_url": "https://www.method.gg/wow-forever/dungeons/the-stockade", + "final_url": "https://www.method.gg/wow-forever/dungeons/the-stockade", + "status": 200, + "content_type": "text/html; charset=UTF-8", + "sha256": "c1334b7c33f538ceac7255162ca5bb1322e1fa1ac9b0ac987c0691039c1cf807", + "bytes": 251314 + }, + { + "name": "icy-veins", + "requested_url": "https://www.icy-veins.com/wow-forever/the-stockade-guide", + "final_url": "https://www.icy-veins.com/wow-forever/the-stockade-guide", + "status": 200, + "content_type": "text/html; charset=utf-8", + "sha256": "4f17ba731fd12278e5a5d7231612bb85f590f95a07761d88e8d86d2ff01f4904", + "bytes": 187182 + } + ], + "limits": [ + "Five verified DungeonEncounter records only; rare Bruegal automatic tips excluded", + "Normal1 only; modes201 and214 untested/excluded", + "No UiMap, NPC or subzone detector", + "Hosted export and source-backed prose, no in-game pass", + "Enrage thresholds, Bazil add claims and exact trash stun duration omitted due source uncertainty" + ] +} diff --git a/docs/FOREVER_STOCKADE_READINESS.md b/docs/FOREVER_STOCKADE_READINESS.md new file mode 100644 index 0000000..5bd349a --- /dev/null +++ b/docs/FOREVER_STOCKADE_READINESS.md @@ -0,0 +1,41 @@ +# Stormwind Stockade — five-encounter alpha slice + +Status (2026-10-31): exact-build static IDs and source-backed Normal-mode tips +implemented in the existing `0.1.0-alpha.1` review candidate. No game load or +client event pass is established. Installed `0.1.0-test` is unchanged. + +Wago's refreshed 1.60.1.70707 exports verify party Map **34**, with these records: + +| Encounter | ID | +|---|---:| +| Targorr the Dread | 2756 | +| Kam Deepfury | 2757 | +| Hamhock | 2758 | +| Dextren Ward | 2759 | +| Bazil Thredd | 2760 | + +Area **717** links to Map 34 but is not a runtime subzone trigger. No Stockade +UiMap or Map 34/Area 717 assignment was found. NPC/subzone/map-fallback fields +are omitted. MapDifficulty contains normal **1/five players**, **201/ten** and +**214/five**; only difficulty 1 is in the alpha scope. Source hashes and selected +rows are in `FOREVER_STOCKADE_IDS_70707.json`, including guide-response provenance. + +Current Forever [Method/Jurdi, October 15](https://www.method.gg/wow-forever/dungeons/the-stockade) +and [Icy Veins/Neryssa, October 19](https://www.icy-veins.com/wow-forever/the-stockade-guide) +support the cautious five boss tips and generic preparation overview. The text +omits Targorr's conflicting exact enrage threshold, Bazil add composition, and +the questionable precise trash-stun duration. No legacy data is imported. + +**Rare Bruegal Ironknuckle is explicitly excluded from automatic tips.** Both +guides describe him, but the complete exact-build DungeonEncounter export has +no Bruegal/ironknuckle name match. No guessed encounter ID or NPC/name fallback +is shipped. His presence is a known coverage gap, not evidence he was removed. + +The two wings and reordered fights do not imply a fixed route. With +`previewNextBoss=false`, a kill restores the optional overview/quiet state. +The overview is instance-wide advice, not current-pack or room detection. + +November 4 acceptance: verify actual instance/difficulty and all five event +IDs/names, reordered wings, success/wipe/exit cleanup, overview opt-in and +persistence. If Bruegal appears, record whether an event is logged and its exact +identity before considering a detector. No complete-dungeon claim is made. diff --git a/tests/test_forever_marketplaces.py b/tests/test_forever_marketplaces.py new file mode 100644 index 0000000..572eded --- /dev/null +++ b/tests/test_forever_marketplaces.py @@ -0,0 +1,90 @@ +from pathlib import Path +import json +import os +import unittest +from unittest.mock import patch + +from test_forever_release import alpha_source +import forever_release +import forever_marketplaces as markets + + +VERSIONS = [{"id": 999001, "name": "1.60.1", "gameVersionTypeID": 88568}, + {"id": 999002, "name": "12.1.0", "gameVersionTypeID": 517}] +WAGO = {"patches": {"forever": ["1.60.1"], "retail": ["12.1.0"]}} + + +class ForeverMarketplaceTests(unittest.TestCase): + def test_existing_project_ids_and_flavor_specific_payloads(self): + self.assertEqual(markets.CF_PROJECT, "1478824") + self.assertEqual(markets.WAGO_PROJECT, "QN53W7KB") + cf, wago = markets.payloads(VERSIONS, WAGO, "0.1.0-alpha.1", "coverage notes") + self.assertEqual(cf["gameVersions"], [999001]) + self.assertEqual(cf["releaseType"], "alpha") + self.assertEqual(wago["supported_forever_patches"], ["1.60.1"]) + self.assertEqual(wago["stability"], "alpha") + self.assertNotIn("supported_retail_patches", wago) + + def test_no_patch_or_game_flavor_fallback(self): + for versions, game in [ + (VERSIONS[1:], WAGO), (VERSIONS + VERSIONS[:1], WAGO), + ([{"id": 1, "name": "1.60.0", "gameVersionTypeID": 88568}], WAGO), + (VERSIONS, {"patches": {"retail": ["1.60.1"]}}), + (VERSIONS, {"patches": {"forever": "1.60.1"}}), + ]: + with self.subTest(versions=versions, game=game), self.assertRaises(ValueError): + markets.payloads(versions, game, "0.1.0-alpha.1", "notes") + + def test_publish_validates_everything_before_posting_same_verified_zip(self): + with alpha_source() as root, patch("builtins.print"): + directory = root.parent / "dist" + forever_release.prepare(directory, "forever-v0.1.0-alpha.1") + with patch.dict(os.environ, {"CF_API_KEY": "test-cf", "WAGO_API_TOKEN": "test-wago"}, clear=True), \ + patch.object(markets, "fetch_json", side_effect=[VERSIONS, WAGO]), \ + patch.object(markets, "upload") as upload: + markets.publish(directory, "forever-v0.1.0-alpha.1") + self.assertEqual(upload.call_count, 2) + first, second = upload.call_args_list + self.assertEqual(first.args[0], "https://wow.curseforge.com/api/projects/1478824/upload-file") + self.assertEqual(second.args[0], "https://addons.wago.io/api/projects/QN53W7KB/version") + self.assertEqual(first.args[3], second.args[3]) + with patch.dict(os.environ, {"CF_API_KEY": "test-cf", "WAGO_API_TOKEN": "test-wago"}, clear=True), \ + patch.object(markets, "fetch_json", side_effect=[VERSIONS, {"patches": {}}]), \ + patch.object(markets, "upload") as upload: + with self.assertRaises(ValueError): + markets.publish(directory, "forever-v0.1.0-alpha.1") + upload.assert_not_called() + with patch.dict(os.environ, {}, clear=True), patch.object(markets, "fetch_json") as fetch: + with self.assertRaises(ValueError): + markets.publish(directory, "forever-v0.1.0-alpha.1") + fetch.assert_not_called() + + def test_tampered_assets_and_retail_tags_cannot_upload(self): + with alpha_source() as root: + directory = root.parent / "dist" + forever_release.prepare(directory, "forever-v0.1.0-alpha.1") + with patch.object(markets, "fetch_json") as fetch: + with self.assertRaises(ValueError): + markets.publish(directory, "v3.5.0") + (directory / "release-notes.md").write_text("changed") + with self.assertRaises(ValueError): + markets.publish(directory, "forever-v0.1.0-alpha.1") + fetch.assert_not_called() + + def test_multipart_contract_and_redirects(self): + with alpha_source() as root: + archive = root / "sample.zip" + archive.write_bytes(b"verified zip bytes") + with patch.object(markets, "open_request") as request: + request.return_value.__enter__.return_value.status = 201 + markets.upload("https://addons.wago.io/api/projects/QN53W7KB/version", {}, {"stability": "alpha"}, archive) + sent = request.call_args.args[0] + self.assertEqual(sent.get_method(), "POST") + self.assertIn(b'name="metadata"', sent.data) + self.assertIn(b'name="file"; filename="sample.zip"', sent.data) + self.assertIn(archive.read_bytes(), sent.data) + self.assertIsNone(markets.NoRedirect().redirect_request(None, None, 302, "redirect", {}, "https://other.example")) + + +if __name__ == "__main__": + unittest.main() diff --git a/tests/test_forever_package.py b/tests/test_forever_package.py new file mode 100644 index 0000000..998a92c --- /dev/null +++ b/tests/test_forever_package.py @@ -0,0 +1,106 @@ +from __future__ import annotations + +import importlib.util +import shutil +import subprocess +import tempfile +import unittest +from pathlib import Path + +ROOT = Path(__file__).resolve().parents[1] +SPEC = importlib.util.spec_from_file_location("package_forever", ROOT / "tools/package_forever.py") +assert SPEC and SPEC.loader +PACKAGE_BUILDER = importlib.util.module_from_spec(SPEC) +SPEC.loader.exec_module(PACKAGE_BUILDER) + + +class ForeverPackageTests(unittest.TestCase): + def run_runtime(self, package: Path, locale: str = "enUS") -> subprocess.CompletedProcess[str]: + interpreter = shutil.which("lua5.1") or shutil.which("luajit") + self.assertIsNotNone(interpreter, "Install Lua 5.1 or LuaJIT to run the WoW-compatible runtime gate") + return subprocess.run( + [interpreter, str(ROOT / "tests/test_forever_runtime.lua"), str(package), locale], + text=True, capture_output=True, timeout=30, check=False, + ) + + def test_builds_interface_16001_package_with_isolated_data(self) -> None: + with tempfile.TemporaryDirectory() as temp_dir: + package = PACKAGE_BUILDER.build(Path(temp_dir) / "out") + toc = (package / "KwikTip_Forever.toc").read_text() + self.assertIn("## Interface: 16001", toc) + self.assertIn("## Title: KwikTip: Forever", toc) + self.assertIn("## SavedVariables: KwikTipDB", toc) + self.assertNotIn("DungeonData_Timewalking.lua", toc) + self.assertFalse((package / "DungeonData_Timewalking.lua").exists()) + self.assertFalse((package / "Locale/tips_deDE.lua").exists()) + self.assertNotIn("tips_deDE.lua", toc) + self.assertNotIn("2805:1", (package / "Locale/tips.lua").read_text()) + self.assertFalse((package / ".pkgmeta").exists()) + self.assertFalse((package / ".github").exists()) + self.assertTrue((package / "LICENSE").is_file()) + self.assertTrue((package / "README.txt").is_file()) + + loaded_files = [line for line in toc.splitlines() if line.endswith((".lua", ".xml"))] + self.assertLess(loaded_files.index("Init.lua"), loaded_files.index("DungeonData.lua")) + self.assertLess(loaded_files.index("DungeonData.lua"), loaded_files.index("Core.lua")) + self.assertLess(loaded_files.index("RuntimeIndexes.lua"), loaded_files.index("Core.lua")) + self.assertGreater(loaded_files.index("Flavor.lua"), loaded_files.index("Core.lua")) + missing = [ + name for name in loaded_files + if not (package.joinpath(*name.replace("\\", "/").split("/"))).is_file() + ] + if missing: + raise AssertionError(f"Missing manifest files: {missing}") + for relative in PACKAGE_BUILDER.SHARED_FILES: + self.assertTrue((package / relative).is_file(), relative) + + def test_assets_resolve_in_standalone_folder_and_retail_source_stays_unchanged(self) -> None: + original = (ROOT / "UI_Config.lua").read_bytes() + with tempfile.TemporaryDirectory() as temp_dir: + package = PACKAGE_BUILDER.build(Path(temp_dir) / "out") + config = (package / "UI_Config.lua").read_text() + self.assertNotIn(r"Interface\\AddOns\\KwikTip\\assets\\", config) + for asset in ("ktmini.tga", "ktlogo.tga"): + self.assertIn(rf"Interface\\AddOns\\KwikTip_Forever\\assets\\{asset}", config) + self.assertEqual((package / "assets" / asset).read_bytes(), (ROOT / "assets" / asset).read_bytes()) + self.assertEqual((ROOT / "UI_Config.lua").read_bytes(), original) + + def test_packaged_addon_loads_and_routes_real_core_for_all_locales(self) -> None: + with tempfile.TemporaryDirectory() as temp_dir: + package = PACKAGE_BUILDER.build(Path(temp_dir) / "out") + for locale in ("enUS", "deDE", "frFR"): + with self.subTest(locale=locale): + result = self.run_runtime(package, locale) + self.assertEqual(result.returncode, 0, result.stdout + result.stderr) + + def test_runtime_gate_catches_missing_namespace(self) -> None: + with tempfile.TemporaryDirectory() as temp_dir: + package = PACKAGE_BUILDER.build(Path(temp_dir) / "out") + data = package / "DungeonData.lua" + data.write_text(data.read_text().replace("local ADDON_NAME, KwikTip = ...", "")) + result = self.run_runtime(package) + self.assertNotEqual(result.returncode, 0) + self.assertIn("KwikTip", result.stderr) + + def test_runtime_gate_catches_missing_indexes(self) -> None: + with tempfile.TemporaryDirectory() as temp_dir: + package = PACKAGE_BUILDER.build(Path(temp_dir) / "out") + toc = package / "KwikTip_Forever.toc" + toc.write_text(toc.read_text().replace("RuntimeIndexes.lua\n", "")) + result = self.run_runtime(package) + self.assertNotEqual(result.returncode, 0) + self.assertIn("DUNGEON_BY_INSTANCEID", result.stdout + result.stderr) + + def test_refuses_to_overwrite_existing_output(self) -> None: + with tempfile.TemporaryDirectory() as temp_dir: + output = Path(temp_dir) / "existing" + output.mkdir() + sentinel = output / "keep.txt" + sentinel.write_text("keep") + with self.assertRaises(FileExistsError): + PACKAGE_BUILDER.build(output) + self.assertEqual(sentinel.read_text(), "keep") + + +if __name__ == "__main__": + unittest.main() diff --git a/tests/test_forever_release.py b/tests/test_forever_release.py new file mode 100644 index 0000000..19a68b0 --- /dev/null +++ b/tests/test_forever_release.py @@ -0,0 +1,159 @@ +from __future__ import annotations + +from contextlib import contextmanager +import fnmatch +import hashlib +import json +from pathlib import Path +import shutil +import sys +import tempfile +import unittest +from unittest.mock import patch +import zipfile + +import yaml + +ROOT = Path(__file__).resolve().parents[1] +sys.path.insert(0, str(ROOT / "tools")) +import forever_release + + +@contextmanager +def alpha_source(): + current_version, _ = forever_release.metadata() + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) / "source" + shutil.copytree(ROOT / "Forever", root / "Forever") + for path in root.joinpath("Forever").rglob("*"): + if path.is_file(): + text = path.read_text() + path.write_text(text.replace(current_version, "0.1.0-alpha.1")) + for relative in forever_release.package_forever.SHARED_FILES + ("LICENSE",): + destination = root / relative + destination.parent.mkdir(parents=True, exist_ok=True) + shutil.copy2(ROOT / relative, destination) + shutil.copytree(ROOT / "assets", root / "assets") + shutil.copytree(ROOT / "docs", root / "docs") + with patch.object(forever_release, "ROOT", root), patch.object(forever_release.package_forever, "ROOT", root): + yield root + + +class ForeverReleaseTests(unittest.TestCase): + def test_tag_validation_is_disjoint_alpha_only_and_matches_toc(self): + forever_release.validate_tag("forever-v0.1.0-alpha.1", "0.1.0-alpha.1") + for tag in ["v3.5.0", "forever-v0.1.0", "forever-v0.1.0-beta.1", + "forever-v0.1.0-test.2", "main", "forever-v0.1.0-alpha.1\nextra", + "forever-v0.1.0-alpha.2", "forever-v$(echo unsafe)"]: + with self.subTest(tag=tag), self.assertRaises(ValueError): + forever_release.validate_tag(tag, "0.1.0-alpha.1") + + def test_invalid_publication_tag_writes_nothing(self): + with tempfile.TemporaryDirectory() as directory: + output = Path(directory) / "dist" + with self.assertRaises(ValueError): + forever_release.prepare(output, "v3.5.0") + self.assertFalse(output.exists()) + + def test_alpha_build_has_standalone_zip_and_official_flavor_metadata(self): + with alpha_source() as root: + output = root.parent / "dist" + result = forever_release.prepare(output, "forever-v0.1.0-alpha.1") + self.assertEqual(result["archive_name"], "KwikTip_Forever-0.1.0-alpha.1.zip") + release = json.loads((output / "release.json").read_text())["releases"][0] + self.assertEqual(release["filename"], result["archive_name"]) + self.assertEqual(release["version"], result["version"]) + self.assertIs(release["nolib"], False) + self.assertEqual(release["metadata"], [{"flavor": "forever", "interface": 16001}]) + with zipfile.ZipFile(output / release["filename"]) as archive: + names = archive.namelist() + self.assertEqual(archive.testzip(), None) + self.assertTrue(all(name.startswith("KwikTip_Forever/") and ".." not in Path(name).parts for name in names)) + self.assertIn("KwikTip_Forever/KwikTip_Forever.toc", names) + self.assertFalse(any("Timewalking" in name or ".pkgmeta" in name or ".github" in name for name in names)) + self.assertNotIn("Murder Row", archive.read("KwikTip_Forever/DungeonData.lua").decode()) + for line in (output / "SHA256SUMS").read_text().splitlines(): + expected, name = line.split(" ", 1) + self.assertEqual(hashlib.sha256((output / name).read_bytes()).hexdigest(), expected) + notes = (output / "release-notes.md").read_text() + self.assertIn("0.1.0-alpha.1", notes) + self.assertIn("Client validation: pending", notes) + coverage = json.loads((output / "coverage.json").read_text()) + self.assertEqual(coverage["version"], result["version"]) + self.assertFalse(coverage["client_tested"]) + self.assertEqual(coverage["complete_dungeons"], 0) + self.assertEqual({d["instanceID"] for d in coverage["included_dungeons"]}, {3065, 389, 34}) + evidence = json.loads((output / "source-evidence.json").read_text()) + self.assertEqual({d["instanceID"] for d in evidence["dungeons"]}, {3065, 389, 34}) + stockade = next(d for d in coverage["included_dungeons"] if d["instanceID"] == 34) + self.assertEqual(stockade["encounterIDs"], [2756, 2757, 2758, 2759, 2760]) + self.assertIn("Bruegal Ironknuckle", str(stockade["excluded_encounters"])) + with self.assertRaises(FileExistsError): + forever_release.prepare(output) + + def test_version_disagreement_is_not_packaged(self): + with alpha_source() as root: + (root / "Forever/README.txt").write_text("Wrong version\n") + with self.assertRaises(ValueError): + forever_release.prepare(root.parent / "dist") + + def test_coverage_version_and_evidence_paths_fail_closed(self): + with alpha_source() as root: + path = root / "Forever/Coverage.json" + coverage = json.loads(path.read_text()) + coverage["version"] = "0.1.0-alpha.999" + path.write_text(json.dumps(coverage)) + with self.assertRaises(ValueError): + forever_release.prepare(root.parent / "version-mismatch") + coverage["version"] = "0.1.0-alpha.1" + coverage["included_dungeons"][0]["evidence"] = "../outside.json" + path.write_text(json.dumps(coverage)) + with self.assertRaises(ValueError): + forever_release.prepare(root.parent / "invalid-evidence") + + def test_workflow_publishes_only_forever_tag_builds_with_scoped_token(self): + workflow = yaml.load((ROOT / ".github/workflows/forever-release.yml").read_text(), Loader=yaml.BaseLoader) + retail = yaml.load((ROOT / ".github/workflows/release.yml").read_text(), Loader=yaml.BaseLoader) + self.assertEqual(retail["on"]["push"]["tags"], ["v*"]) + self.assertEqual(workflow["on"]["push"]["tags"], ["forever-v*"]) + self.assertIn("pull_request", workflow["on"]) + self.assertIn("workflow_dispatch", workflow["on"]) + self.assertEqual(workflow["permissions"], {"contents": "read"}) + publish = workflow["jobs"]["publish"] + self.assertEqual(publish["needs"], "build") + self.assertEqual(publish["if"], "github.event_name == 'push' && startsWith(github.ref, 'refs/tags/forever-v')") + self.assertEqual(publish["permissions"], {"contents": "write"}) + steps = publish["steps"] + token_steps = [step for step in steps if "GH_TOKEN" in step.get("env", {})] + self.assertEqual(len(token_steps), 1) + command = token_steps[0]["run"] + for option in ["--verify-tag", "--prerelease", "--latest=false", "--notes-file"]: + self.assertIn(option, command) + for asset in ["dist/release.json", "dist/SHA256SUMS", "dist/source-evidence.json", "dist/coverage.json", "dist/release-notes.md"]: + self.assertIn(asset, command.split("--repo", 1)[0]) + self.assertNotIn("--clobber", command) + source = (ROOT / ".github/workflows/forever-release.yml").read_text() + self.assertNotIn("CF_API_KEY", str(workflow["jobs"]["build"])) + self.assertNotIn("WAGO_API_TOKEN", str(workflow["jobs"]["build"])) + marketplace_steps = [step for step in steps if "CF_API_KEY" in step.get("env", {})] + self.assertEqual(len(marketplace_steps), 1) + self.assertIn("WAGO_API_TOKEN", marketplace_steps[0]["env"]) + self.assertIn("--publish", marketplace_steps[0]["run"]) + self.assertNotIn("WOWI_API_TOKEN", source) + + def test_retail_pkgmeta_excludes_all_forever_specific_files(self): + meta = yaml.load((ROOT / ".pkgmeta").read_text(), Loader=yaml.BaseLoader) + self.assertEqual(meta["curse-id"], "1478824") + self.assertEqual(meta["wago-id"], "QN53W7KB") + self.assertEqual(meta["wowi-id"], "27074") + candidates = ["Forever/DungeonData.lua", "Forever/Flavor.lua", "Forever/RuntimeIndexes.lua", + "docs/FOREVER_READINESS.md", "docs/FOREVER_HALL_OF_THANES_IDS_70707.json", + "tools/package_forever.py", "tools/forever_release.py", "tools/forever_marketplaces.py", + "tests/test_forever_package.py", "tests/test_forever_runtime.lua", "tests/test_forever_release.py"] + for relative in candidates: + with self.subTest(path=relative): + self.assertTrue(any(fnmatch.fnmatch(relative, pattern) or relative.startswith(pattern + "/") for pattern in meta["ignore"])) + + +if __name__ == "__main__": + unittest.main() diff --git a/tests/test_forever_runtime.lua b/tests/test_forever_runtime.lua new file mode 100644 index 0000000..1e1b406 --- /dev/null +++ b/tests/test_forever_runtime.lua @@ -0,0 +1,713 @@ +-- Offline integration check: load the actual generated addon in TOC order. +-- Usage: lua5.1 tests/test_forever_runtime.lua [locale] +-- WoW APIs/frame geometry are stubs; this does not establish client compatibility. +-- Synthetic routing fixtures below never enter a distributed package. + +local packageDir = assert(arg[1], "expected generated KwikTip_Forever directory") +local locale = arg[2] or "enUS" +local ADDON_NAME = "KwikTip_Forever" +local checks = 0 +local function check(value, message) + checks = checks + 1 + assert(value, message) +end +local function contains(value, expected) + return type(value) == "string" and value:find(expected, 1, true) ~= nil +end + +local state = { + inInstance = false, instanceType = "none", instanceID = 0, + mapID = nil, subzone = "", instanceName = "Outside", difficultyID = 1, +} +local frames, textures = {}, {} +local Methods = {} +local newObject +local function noop() end +-- Unknown methods remain nil, so missing WoW dependencies fail explicitly. +for name in ([[SetFrameStrata SetClampedToScreen SetMovable SetResizable + SetResizeBounds SetBackdrop SetBackdropColor SetBackdropBorderColor + SetClipsChildren SetJustifyH SetJustifyV SetWordWrap SetAllPoints + SetColorTexture SetPassThroughButtons EnableMouseWheel RegisterForDrag + RegisterForClicks SetFontObject SetAutoFocus SetMaxLetters SetMultiLine + StartMoving StopMovingOrSizing StartSizing SetTextColor SetShadowOffset + SetShadowColor SetBlendMode SetOrientation SetObeyStepOnDrag SetThumbTexture + LockHighlight UnlockHighlight ClearFocus HighlightText SetFocus + SetCursorPosition SetOwner ClearLines AddLine]]):gmatch("%S+") do + Methods[name] = noop +end +function Methods:SetScript(event, callback) self.scripts[event] = callback end +function Methods:HookScript(event, callback) + local previous = self.scripts[event] + self.scripts[event] = function(...) + if previous then previous(...) end + callback(...) + end +end +function Methods:GetScript(event) return self.scripts[event] end +function Methods:RegisterEvent(event) self.events[event] = true end +function Methods:UnregisterEvent(event) self.events[event] = nil end +function Methods:SetPoint(...) self.point = { ... } end +function Methods:ClearAllPoints() self.point = nil end +function Methods:GetPoint() + local unpackArgs = unpack or table.unpack + return unpackArgs(self.point or { "CENTER", UIParent, "CENTER", 0, 0 }) +end +function Methods:GetParent() return self.parent end +function Methods:SetSize(width, height) self.width, self.height = width, height end +function Methods:SetWidth(value) self.width = value end +function Methods:SetHeight(value) self.height = value end +function Methods:GetWidth() return self.width end +function Methods:GetHeight() return self.height end +function Methods:GetLeft() return 0 end +function Methods:GetBottom() return 0 end +function Methods:GetCenter() return self.width / 2, self.height / 2 end +function Methods:GetEffectiveScale() return 1 end +function Methods:SetFrameLevel(value) self.level = value end +function Methods:GetFrameLevel() return self.level end +function Methods:EnableMouse(value) self.mouseEnabled = value end +function Methods:IsMouseEnabled() return self.mouseEnabled end +function Methods:Show() + local changed = not self.shown + self.shown = true + if changed and self.scripts.OnShow then self.scripts.OnShow(self) end +end +function Methods:Hide() + local changed = self.shown + self.shown = false + if changed and self.scripts.OnHide then self.scripts.OnHide(self) end +end +function Methods:SetShown(value) if value then self:Show() else self:Hide() end end +function Methods:IsShown() return self.shown end +function Methods:SetAlpha(value) self.alpha = value end +function Methods:GetAlpha() return self.alpha end +function Methods:SetText(value) self.text = tostring(value or "") end +function Methods:GetText() return self.text end +function Methods:GetNumLetters() return #self.text end +function Methods:GetStringHeight() + local _, count = self.text:gsub("\n", "\n") + return (count + 1) * 12 +end +function Methods:GetStringWidth() return #self.text * 6 end +function Methods:SetFont(...) self.font = { ... } end +function Methods:GetFont() + local unpackArgs = unpack or table.unpack + return unpackArgs(self.font or { "Fonts\\FRIZQT__.TTF", 11, "" }) +end +function Methods:SetChecked(value) self.checked = value end +function Methods:GetChecked() return self.checked end +function Methods:SetMinMaxValues(minimum, maximum) self.minimum, self.maximum = minimum, maximum end +function Methods:SetValueStep(value) self.step = value end +function Methods:GetValueStep() return self.step end +function Methods:SetValue(value) + self.value = value + if self.scripts.OnValueChanged then self.scripts.OnValueChanged(self, value) end +end +function Methods:GetValue() return self.value end +function Methods:SetScrollChild(value) self.scrollChild = value end +function Methods:GetVerticalScrollRange() + return self.scrollChild and math.max(0, self.scrollChild:GetHeight() - self.height) or 0 +end +function Methods:SetVerticalScroll(value) self.scroll = value end +function Methods:GetVerticalScroll() return self.scroll end +function Methods:CreateFontString(name) + local child = newObject("FontString", name, self) + return child +end +function Methods:CreateTexture(name) + return newObject("Texture", name, self) +end +function Methods:SetTexture(path) + self.texture = path + if type(path) == "string" then textures[#textures + 1] = path end +end +newObject = function(kind, name, parent) + local object = setmetatable({ + kind = kind, name = name, parent = parent, scripts = {}, events = {}, + width = 220, height = 80, shown = true, alpha = 1, level = 1, + text = "", scroll = 0, value = 0, step = 1, + }, { __index = Methods }) + frames[#frames + 1] = object + if name then _G[name] = object end + return object +end + +UIParent = newObject("Frame", "UIParent") +UIParent:SetSize(1920, 1080) +Minimap = newObject("Frame", "Minimap", UIParent) +Minimap:SetSize(140, 140) +GameTooltip = newObject("Tooltip", "GameTooltip", UIParent) +GameFontNormal = {} +SlashCmdList = {} +StaticPopupDialogs = {} +CLOSE = "Close" +StaticPopup_Show = noop +CreateFrame = function(kind, name, parent, template) + local object = newObject(kind, name, parent) + if template == "BasicFrameTemplate" or template == "BasicFrameTemplateWithInset" then + object.TitleText = object:CreateFontString(nil) + end + return object +end +GetLocale = function() return locale end +GetBuildInfo = function() return "1.60.1", "70707", "test-date", 16001 end +IsInInstance = function() return state.inInstance, state.instanceType end +GetInstanceInfo = function() + return state.instanceName, state.instanceType, state.difficultyID, + "Normal", 5, 0, false, state.instanceID +end +GetSubZoneText = function() return state.subzone end +UnitGroupRolesAssigned = function() return "HEALER" end +UnitCanAttack = function() return false end +UnitIsPlayer = function() return false end +InCombatLockdown = function() return false end +GetCursorPosition = function() return 0, 0 end +IsShiftKeyDown = function() return false end +date = function() return "test-time" end +C_Map = { + GetBestMapForUnit = function() return state.mapID end, + GetPlayerMapPosition = function() return nil end, +} +C_Timer = { + After = function(_, callback) callback() end, + NewTimer = function() return { Cancel = noop } end, +} +UIFrameFadeIn = function(object, _, _, alpha) object:SetAlpha(alpha) end +UIFrameFadeOut = UIFrameFadeIn +LibStub = nil +C_ChallengeMode = nil +C_ScenarioInfo = nil +KwikTip = nil +KwikTipDB = nil + +local addon = {} +local toc = assert(io.open(packageDir .. "/" .. ADDON_NAME .. ".toc", "r")) +local manifestFiles = {} +for line in toc:lines() do + local relative = line:gsub("\r$", ""):match("^%s*(.-)%s*$") + if relative:match("%.lua$") then manifestFiles[#manifestFiles + 1] = relative:gsub("\\", "/") end +end +toc:close() +check(#manifestFiles > 0, "TOC contains Lua files") +for _, relative in ipairs(manifestFiles) do + local chunk, loadError = loadfile(packageDir .. "/" .. relative) + assert(chunk, loadError) + local success, result = pcall(chunk, ADDON_NAME, addon) + assert(success, relative .. ": " .. tostring(result)) +end +check(_G.KwikTip == nil, "addon namespace must remain private") +for _, name in ipairs({ "DUNGEON_BY_INSTANCEID", "DUNGEON_BY_UIMAPID", "BOSS_BY_ENCOUNTERID" }) do + check(type(addon[name]) == "table", "package initializes " .. name) +end +check(type(addon.DUNGEONS) == "table", "Forever data table exists") +check(#addon.DUNGEONS == 3, "alpha manifest contains exactly three dungeon records") +local hall = addon.DUNGEON_BY_INSTANCEID[3065] +local ragefire = addon.DUNGEON_BY_INSTANCEID[389] +local stockade = addon.DUNGEON_BY_INSTANCEID[34] +check(hall ~= nil and ragefire ~= nil and stockade ~= nil, + "alpha manifest indexes Hall, Ragefire, and Stockade by verified instance identity") +local expectedIDs = { 3493, 3495, 3494, 3496 } -- Wago build 70707 OrderIndex +check(#hall.bosses == #expectedIDs, "all four Hall encounter records are present") +for i, encounterID in ipairs(expectedIDs) do + check(hall.bosses[i].encounterID == encounterID, "Hall encounter order matches raw DB2") +end +local expectedRagefireIDs = { 2732, 2733, 2734, 2735 } +local expectedRagefireNames = { "Oggleflint", "Taragaman the Hungerer", "Jergosh the Invoker", "Bazzalan" } +check(#ragefire.bosses == #expectedRagefireIDs, "all four Ragefire encounter records are present") +for i, encounterID in ipairs(expectedRagefireIDs) do + check(ragefire.bosses[i].encounterID == encounterID, "Ragefire encounter identity matches raw DB2") + check(ragefire.bosses[i].name == expectedRagefireNames[i], "Ragefire encounter name matches verified source record") +end +local expectedStockadeIDs = { 2756, 2757, 2758, 2759, 2760 } +local expectedStockadeNames = { "Targorr the Dread", "Kam Deepfury", "Hamhock", "Dextren Ward", "Bazil Thredd" } +check(#stockade.bosses == #expectedStockadeIDs, "Stockade ships only the five source-backed baseline encounters") +for i, encounterID in ipairs(expectedStockadeIDs) do + check(stockade.bosses[i].encounterID == encounterID, "Stockade encounter identity matches raw DB2") + check(stockade.bosses[i].name == expectedStockadeNames[i], "Stockade encounter name matches verified source record") +end +local encounterCount = 0 +for _ in pairs(addon.BOSS_BY_ENCOUNTERID) do encounterCount = encounterCount + 1 end +check(encounterCount == 13, "alpha manifest indexes exactly thirteen encounter records") +for _, dungeon in ipairs({ hall, ragefire, stockade }) do + check(type(dungeon.difficultyIDs) == "table" and #dungeon.difficultyIDs == 1 + and dungeon.difficultyIDs[1] == 1, + "shipped dungeon explicitly restricts sourced advice to Normal difficulty") +end +check(hall.uiMapID == nil and hall.areas == nil and next(addon.DUNGEON_BY_UIMAPID) == nil, + "no guessed Hall city-map or subzone fallback is shipped") +check(ragefire.uiMapID == nil and ragefire.areas == nil, + "no guessed Ragefire city-map or subzone fallback is shipped") +check(stockade.uiMapID == nil and stockade.areas == nil, + "no guessed Stockade city-map or subzone fallback is shipped") +check(contains(hall.bosses[2].tip, "Provisional"), "unverified guide-name association stays visible") +check(next(addon.SUBZONE_LOCALE_BY_AREA_ID or {}) == nil, + "scaffold does not import Retail subzone aliases") + +local function emit(event, ...) + -- Snapshot because production event handlers may allocate frames. + local count = #frames + for i = 1, count do + local frame = frames[i] + if frame.events[event] and frame.scripts.OnEvent then + frame.scripts.OnEvent(frame, event, ...) + end + end +end +emit("ADDON_LOADED", "OtherAddon") +check(KwikTipDB == nil, "unrelated addon event does not initialize SavedVariables") +emit("ADDON_LOADED", ADDON_NAME) +check(type(KwikTipDB) == "table" and type(KwikTipDB.encounterLog) == "table", + "actual ADDON_LOADED initializes settings and logs") +KwikTipDB.width, KwikTipDB.alpha, KwikTipDB.fontSize = 337, 0.66, nil +emit("ADDON_LOADED", ADDON_NAME) +check(KwikTipDB.width == 337 and KwikTipDB.alpha == 0.66 and KwikTipDB.fontSize == 11, + "production settings initialization preserves preferences and seeds missing defaults") +emit("PLAYER_LOGIN") +check(addon.HUD ~= nil, "actual PLAYER_LOGIN initializes HUD") +check(not addon.HUD:IsShown(), "HUD hidden outside an instance after login") +check(not addon.HUD:IsMouseEnabled(), "normal HUD leaves mouse input to the game") +check(addon.MinimapBtn ~= nil, "actual PLAYER_LOGIN creates minimap button") +addon:ToggleConfig() +check(addon.Config and addon.Config:IsShown(), "actual lazy settings window opens") +addon:ToggleConfig() +check(not addon.Config:IsShown(), "settings window closes") + +local assetTextures = 0 +for _, path in ipairs(textures) do + if path:find("Interface\\AddOns\\", 1, true) then + check(path:find("Interface\\AddOns\\KwikTip_Forever\\", 1, true) == 1, + "addon texture points into Forever package: " .. path) + local relative = path:sub(#("Interface\\AddOns\\KwikTip_Forever\\") + 1):gsub("\\", "/") + local asset = io.open(packageDir .. "/" .. relative, "rb") + check(asset ~= nil, "referenced texture is packaged: " .. relative) + if asset then asset:close() end + assetTextures = assetTextures + 1 + end +end +check(assetTextures >= 3, "minimap/settings create all three packaged asset references") + +-- Exercise every shipped encounter through the actual event path. This verifies +-- data-to-runtime wiring with simulated client events, never an in-game pass. +for _, shippedDungeon in ipairs(addon.DUNGEONS) do + check(addon.DUNGEON_BY_INSTANCEID[shippedDungeon.instanceID] == shippedDungeon, + "shipped dungeon has a working instance index") + state.inInstance, state.instanceType = true, "party" + state.instanceID, state.mapID = shippedDungeon.instanceID, shippedDungeon.uiMapID + state.instanceName, state.subzone = "Localized shipped dungeon", "" + emit("PLAYER_ENTERING_WORLD") + for _, shippedBoss in ipairs(shippedDungeon.bosses or {}) do + emit("ENCOUNTER_START", shippedBoss.encounterID, "Localized shipped boss", 1, 5) + check(addon.bossActive and addon._activeBossEntry.boss == shippedBoss, + "shipped encounter resolves through its production index") + check(contains(addon._lastContent, shippedBoss.tip), + "shipped encounter renders its authored tip") + emit("ENCOUNTER_END", shippedBoss.encounterID, "Localized shipped boss", 1, 5, 0) + end + + for _, shippedBoss in ipairs(shippedDungeon.bosses or {}) do + state.instanceID, state.mapID = 990001, nil + state.instanceName = "Unrelated synthetic party instance" + emit("PLAYER_ENTERING_WORLD") + emit("ENCOUNTER_START", shippedBoss.encounterID, "Wrong-instance shipped boss", 1, 5) + check(not addon.bossActive and addon._activeBossEntry == nil + and addon._lastContent == "" and not addon.HUD:IsShown(), + "each shipped encounter fails closed in an unrelated instance") + + for _, otherDungeon in ipairs(addon.DUNGEONS) do + if otherDungeon ~= shippedDungeon then + state.instanceID, state.mapID = otherDungeon.instanceID, otherDungeon.uiMapID + state.instanceName = "Localized other shipped dungeon" + emit("PLAYER_ENTERING_WORLD") + emit("ENCOUNTER_START", shippedBoss.encounterID, "Cross-dungeon shipped boss", 1, 5) + check(not addon.bossActive and addon._activeBossEntry == nil + and addon._lastContent == "" and not addon.HUD:IsShown(), + "each shipped encounter is rejected in every other shipped dungeon") + end + end + end + + state.instanceID, state.mapID = shippedDungeon.instanceID, shippedDungeon.uiMapID + state.instanceName = "Localized current shipped dungeon" + emit("PLAYER_ENTERING_WORLD") + local ownBoss = shippedDungeon.bosses[1] + for _, foreignDungeon in ipairs(addon.DUNGEONS) do + if foreignDungeon ~= shippedDungeon then + emit("ENCOUNTER_START", ownBoss.encounterID, "Legitimate current encounter", 1, 5) + emit("ENCOUNTER_START", foreignDungeon.bosses[1].encounterID, "Rejected foreign encounter", 1, 5) + check(addon.bossActive and addon._activeBossEntry.boss == ownBoss + and contains(addon._lastContent, "Legitimate current encounter") + and not contains(addon._lastContent, "Rejected foreign encounter"), + "a foreign dungeon event cannot replace the current dungeon's active boss tip") + emit("ENCOUNTER_END", ownBoss.encounterID, "Legitimate current encounter", 1, 5, 0) + end + end + + -- Normal-only guide text stays hidden in alternate/unknown modes rather + -- than silently promising identical mechanics outside its sourced mode. + KwikTipDB.showInDungeon = true + for _, unsupportedDifficulty in ipairs({ 201, 214 }) do + state.instanceID, state.mapID, state.difficultyID = shippedDungeon.instanceID, nil, unsupportedDifficulty + emit("PLAYER_ENTERING_WORLD") + check(addon._lastContent == "" and not addon.HUD:IsShown(), + "alternate difficulty " .. unsupportedDifficulty .. " cannot activate shipped dungeon content") + for _, shippedBoss in ipairs(shippedDungeon.bosses) do + emit("ENCOUNTER_START", shippedBoss.encounterID, "Unsupported alternate-mode boss", unsupportedDifficulty, 5) + check(not addon.bossActive and addon._activeBossEntry == nil + and addon._lastContent == "" and not addon.HUD:IsShown(), + "each shipped boss fails closed in unsupported alternate difficulty " .. unsupportedDifficulty) + end + end + for _, unknownDifficulty in ipairs({ "nil", "zero" }) do + state.difficultyID = unknownDifficulty == "zero" and 0 or nil + emit("PLAYER_ENTERING_WORLD") + check(addon._lastContent == "" and not addon.HUD:IsShown(), + "unknown or zero difficulty cannot activate shipped dungeon content") + emit("ENCOUNTER_START", ownBoss.encounterID, "Unknown-difficulty boss", state.difficultyID, 5) + check(not addon.bossActive and addon._activeBossEntry == nil + and addon._lastContent == "" and not addon.HUD:IsShown(), + "known encounter with unknown or zero difficulty fails closed") + end + KwikTipDB.showInDungeon = false + state.difficultyID = 1 + emit("PLAYER_ENTERING_WORLD") + emit("ENCOUNTER_START", ownBoss.encounterID, "Normal-mode recovery boss", 1, 5) + check(addon.bossActive and contains(addon._lastContent, ownBoss.tip), + "returning to Normal difficulty restores the sourced encounter tip") + emit("ENCOUNTER_END", ownBoss.encounterID, "Normal-mode recovery boss", 1, 5, 0) + + -- The event mode is a separate client signal. A Normal instance cannot + -- make an alternate/unknown encounter mode safe by implication, and a + -- rejected event must not retain the previous fight's lock or text. + for _, eventModeCase in ipairs({ "alternate", "alternate214", "nil", "zero" }) do + local eventMode = eventModeCase == "alternate" and 201 + or eventModeCase == "alternate214" and 214 + or eventModeCase == "zero" and 0 or nil + for _, showOverview in ipairs({ false, true }) do + KwikTipDB.showInDungeon = showOverview + state.difficultyID = 1 + emit("PLAYER_ENTERING_WORLD") + emit("ENCOUNTER_START", ownBoss.encounterID, "Valid Normal fight before contradictory event", 1, 5) + check(addon.bossActive and addon._activeBossEntry.boss == ownBoss, + "Normal instance and matching Normal event establish a valid fight") + emit("ENCOUNTER_START", ownBoss.encounterID, "Contradictory event mode", eventMode, 5) + check(not addon.bossActive and addon._activeBossEntry == nil + and addon._activeEncounterID == nil, + "alternate or unknown event mode clears the old Normal fight lock") + if showOverview then + check(contains(addon._lastContent, shippedDungeon.overview) + and not contains(addon._lastContent, "Valid Normal fight before contradictory event"), + "rejected event mode restores the opted-in overview instead of stale fight text") + else + check(addon._lastContent == "" and not addon.HUD:IsShown(), + "rejected event mode clears fight text and hides HUD when overview is off") + end + emit("ENCOUNTER_START", ownBoss.encounterID, "Recovered matching Normal event", 1, 5) + check(addon.bossActive and addon._activeBossEntry.boss == ownBoss + and contains(addon._lastContent, "Recovered matching Normal event"), + "a matching Normal event recovers after the rejected event mode") + emit("ENCOUNTER_END", ownBoss.encounterID, "Recovered matching Normal event", 1, 5, 0) + end + end + KwikTipDB.showInDungeon = false +end + +-- The Hall overview is an explicit instance-wide option, not inferred area or +-- target coverage. These are simulated client routes, not observed game IDs. +check(type(hall.overview) == "string" and hall.overview ~= "", + "Hall ships a nonempty optional instance overview") +state.inInstance, state.instanceType = true, "party" +state.instanceID, state.mapID = 3065, nil +state.instanceName, state.subzone = "Localized Hall overview test", "" +check(KwikTipDB.showInDungeon == false, "instance-wide overview remains off by default") +emit("PLAYER_ENTERING_WORLD") +check(addon._lastContent == "" and not addon.HUD:IsShown(), + "Hall entry is quiet with the default overview setting") +KwikTipDB.showInDungeon = true +emit("ZONE_CHANGED") +check(contains(addon._lastContent, hall.overview) and addon.HUD:IsShown(), + "opted-in overview renders for Hall instance even without a UI map") +check(contains(addon._lastContent, state.instanceName), + "overview header uses localized client instance name") +KwikTipDB.notes["3065"] = "HALL_OVERVIEW_PERSONAL_NOTE" +emit("ZONE_CHANGED") +check(contains(addon._lastContent, hall.overview) + and contains(addon._lastContent, "HALL_OVERVIEW_PERSONAL_NOTE"), + "overview includes the player's saved instance note") +emit("ZONE_CHANGED") +local _, personalNoteCount = addon._lastContent:gsub("HALL_OVERVIEW_PERSONAL_NOTE", "") +check(personalNoteCount == 1 and KwikTipDB.notes["3065"] == "HALL_OVERVIEW_PERSONAL_NOTE", + "overview refresh preserves the saved note and displays it once") +KwikTipDB.persistentHide = true +addon:UpdateVisibility() +check(not addon.HUD:IsShown(), "Disable Tips hides the opted-in Hall overview") +KwikTipDB.persistentHide = false +addon:UpdateVisibility() +check(addon.HUD:IsShown(), "reenabling tips restores an eligible Hall overview") + +addon:ShowPreview() +check(addon.previewActive and contains(addon._lastContent, addon.L.DEMO_DUNGEON) + and not contains(addon._lastContent, hall.overview), + "settings preview takes priority over the Hall overview") +emit("ZONE_CHANGED") +check(contains(addon._lastContent, addon.L.DEMO_DUNGEON), + "overview updates do not overwrite an active settings preview") +addon:ClearPreview() +check(not addon.previewActive and contains(addon._lastContent, hall.overview), + "clearing the settings preview restores the opted-in overview") + +local hallFirstBoss, hallSecondBoss = hall.bosses[1], hall.bosses[2] +emit("ENCOUNTER_START", hallFirstBoss.encounterID, "Known Hall boss priority test", 1, 5) +check(addon.bossActive and contains(addon._lastContent, hallFirstBoss.tip) + and not contains(addon._lastContent, hall.overview), + "actual known Hall boss tip takes priority over the overview") +emit("ZONE_CHANGED") +check(contains(addon._lastContent, hallFirstBoss.tip) + and not contains(addon._lastContent, hall.overview), + "overview updates preserve the active Hall fight tip") +emit("ENCOUNTER_END", hallFirstBoss.encounterID, "Known Hall boss priority test", 1, 5, 1) +check(not addon.bossActive and contains(addon._lastContent, hallSecondBoss.tip) + and not contains(addon._lastContent, hall.overview), + "successful Hall boss completion shows the next-boss preview before the overview") + +emit("ENCOUNTER_START", hallFirstBoss.encounterID, "Hall before mode transition", 1, 5) +state.difficultyID = 201 +emit("ENCOUNTER_END", hallFirstBoss.encounterID, "Hall before mode transition", 1, 5, 1) +check(not addon.bossActive and addon._lastContent == "" and not addon.HUD:IsShown(), + "encounter end after an unsupported mode transition cannot leak a next-boss preview") +state.difficultyID = 1 +emit("PLAYER_ENTERING_WORLD") + +emit("ENCOUNTER_START", hallFirstBoss.encounterID, "Known Hall boss before unrelated event", 1, 5) +emit("ENCOUNTER_START", 993001, "Unrelated synthetic encounter", 1, 5) +check(not addon.bossActive and addon._activeBossEntry == nil, + "an unrelated encounter arriving during a known Hall fight clears the stale boss lock") +check(not contains(addon._lastContent, "Known Hall boss before unrelated event") + and contains(addon._lastContent, hall.overview), + "an unrelated encounter replaces the stale Hall boss content with the opted-in overview") +KwikTipDB.showInDungeon = false +emit("ENCOUNTER_START", hallFirstBoss.encounterID, "Known Hall boss before unknown event", 1, 5) +check(addon.bossActive and contains(addon._lastContent, hallFirstBoss.tip), + "disabling the overview preserves normal known encounter tips") +emit("ENCOUNTER_START", 993002, "Another unrelated synthetic encounter", 1, 5) +check(not addon.bossActive and addon._activeBossEntry == nil + and addon._lastContent == "" and not addon.HUD:IsShown(), + "unknown encounter clears stale boss content and hides HUD when overview is off") +KwikTipDB.showInDungeon = true +emit("PLAYER_ENTERING_WORLD") + +-- A city/map/subzone/target name cannot replace the verified instance identity. +-- Target API traps make accidental name/GUID-based fallback fail loudly. +local previousUnitName, previousUnitGUID = UnitName, UnitGUID +UnitName = function() error("Hall overview must not inspect a target name") end +UnitGUID = function() error("Hall overview must not inspect a target GUID") end +state.inInstance, state.instanceType, state.instanceID = false, "none", 0 +state.instanceName, state.subzone, state.mapID = "The Hall of Thanes", "The Hall of Thanes", 3065 +emit("PLAYER_ENTERING_WORLD") +check(addon._lastContent == "" and not addon.HUD:IsShown(), + "Hall-like city map and names do not activate the overview outside an instance") +state.inInstance, state.instanceType, state.instanceID = true, "party", 993003 +emit("PLAYER_ENTERING_WORLD") +check(addon._lastContent == "" and not addon.HUD:IsShown(), + "Hall-like map/subzone names do not activate overview in an unrelated party instance") +state.instanceID, state.mapID = nil, 3065 +emit("PLAYER_ENTERING_WORLD") +check(addon._lastContent == "" and not addon.HUD:IsShown(), + "missing instance identity fails closed even when map/name resembles Hall") +emit("ENCOUNTER_START", hallFirstBoss.encounterID, "Hall boss without instance identity", 1, 5) +check(not addon.bossActive and not addon.HUD:IsShown(), + "known Hall encounter without its verified instance identity fails closed") +state.instanceID, state.mapID, state.instanceType = 3065, nil, "raid" +emit("PLAYER_ENTERING_WORLD") +check(addon._lastContent == "" and not addon.HUD:IsShown(), + "raid mode cannot activate the Hall overview") +emit("ENCOUNTER_START", hallFirstBoss.encounterID, "Hall boss in unsupported raid", 1, 5) +check(not addon.bossActive and not addon.HUD:IsShown(), + "known Hall encounter in unsupported raid mode fails closed") +state.instanceType = "party" +emit("PLAYER_ENTERING_WORLD") +check(contains(addon._lastContent, hall.overview), + "verified Hall party instance restores overview without a UI map or target fallback") +UnitName, UnitGUID = previousUnitName, previousUnitGUID +KwikTipDB.notes["3065"] = nil +KwikTipDB.showInDungeon = false +state.inInstance, state.instanceType, state.instanceID, state.mapID = false, "none", 0, nil +emit("PLAYER_ENTERING_WORLD") + +local function checkUnorderedClassicDungeon(dungeon, label, noteText) + local noteKey = tostring(dungeon.instanceID) + -- A Classic encounter roster is not an asserted player route. After a kill, the + -- alpha returns to the user's overview choice instead of predicting a boss. + check(dungeon.previewNextBoss == false, label .. " explicitly disables route-order boss previews") + check(type(dungeon.overview) == "string" and dungeon.overview ~= "", + label .. " ships a nonempty optional instance overview") + state.inInstance, state.instanceType = true, "party" + state.instanceID, state.mapID = dungeon.instanceID, nil + state.instanceName, state.subzone = "Localized " .. label .. " alpha test", "" + check(KwikTipDB.showInDungeon == false, label .. " overview is quiet by default") + emit("PLAYER_ENTERING_WORLD") + check(addon._lastContent == "" and not addon.HUD:IsShown(), + label .. " entry remains hidden without an opted-in overview") + for _, boss in ipairs(dungeon.bosses) do + emit("ENCOUNTER_START", boss.encounterID, "Localized " .. label .. " boss", 1, 5) + check(addon.bossActive and contains(addon._lastContent, boss.tip), + label .. " encounter tips still activate with overview disabled") + emit("ENCOUNTER_END", boss.encounterID, "Localized " .. label .. " boss", 1, 5, 1) + check(not addon.bossActive and addon._activeBossEntry == nil + and addon._lastContent == "" and not addon.HUD:IsShown(), + "each " .. label .. " kill clears the fight without guessing a next boss") + end + KwikTipDB.showInDungeon = true + emit("ZONE_CHANGED") + check(contains(addon._lastContent, dungeon.overview) and addon.HUD:IsShown(), + label .. " overview renders only after the existing setting is enabled") + check(contains(addon._lastContent, state.instanceName), + label .. " overview uses the localized instance header") + KwikTipDB.notes[noteKey] = noteText + emit("ZONE_CHANGED") + check(contains(addon._lastContent, noteText) + and KwikTipDB.notes[noteKey] == noteText, + label .. " overview preserves and displays the player's own note") + emit("ENCOUNTER_START", dungeon.bosses[1].encounterID, label .. " fight overrides overview", 1, 5) + check(addon.bossActive and contains(addon._lastContent, dungeon.bosses[1].tip) + and not contains(addon._lastContent, dungeon.overview), + label .. " boss tip takes priority over the opted-in overview") + emit("ENCOUNTER_END", dungeon.bosses[1].encounterID, label .. " fight overrides overview", 1, 5, 1) + check(not addon.bossActive and addon._activeBossEntry == nil + and contains(addon._lastContent, dungeon.overview) + and contains(addon._lastContent, noteText), + label .. " kill returns to overview and personal note instead of a route prediction") + state.instanceType = "raid" + emit("PLAYER_ENTERING_WORLD") + check(addon._lastContent == "" and not addon.HUD:IsShown(), + label .. " overview fails closed in unsupported raid mode") + state.instanceType, state.instanceID, state.mapID = "party", nil, dungeon.instanceID + state.instanceName, state.subzone = dungeon.name, dungeon.name + emit("PLAYER_ENTERING_WORLD") + check(addon._lastContent == "" and not addon.HUD:IsShown(), + label .. " map and names cannot substitute for its verified instance identity") + KwikTipDB.notes[noteKey] = nil + KwikTipDB.showInDungeon = false + state.inInstance, state.instanceType, state.instanceID, state.mapID = false, "none", 0, nil + emit("PLAYER_ENTERING_WORLD") +end +checkUnorderedClassicDungeon(ragefire, "Ragefire", "RAGEFIRE_ALPHA_PERSONAL_NOTE") +checkUnorderedClassicDungeon(stockade, "Stockade", "STOCKADE_ALPHA_PERSONAL_NOTE") + +-- This high encounter ID is a synthetic negative fixture, not a guessed rare +-- ID. A familiar rare name cannot create automatic coverage absent raw IDs. +state.inInstance, state.instanceType, state.instanceID = true, "party", 34 +state.difficultyID, state.mapID, state.subzone = 1, nil, "" +state.instanceName = "Localized Stockade rare exclusion test" +for _, showOverview in ipairs({ false, true }) do + KwikTipDB.showInDungeon = showOverview + emit("PLAYER_ENTERING_WORLD") + emit("ENCOUNTER_START", 994001, "Bruegal Ironknuckle", 1, 5) + check(not addon.bossActive and addon._activeBossEntry == nil, + "unregistered synthetic encounter named Bruegal does not activate a Stockade boss tip") + if showOverview then + check(contains(addon._lastContent, stockade.overview), + "an unregistered rare name preserves only the opted-in Stockade overview") + else + check(addon._lastContent == "" and not addon.HUD:IsShown(), + "an unregistered rare name leaves the default Stockade HUD hidden") + end +end +KwikTipDB.showInDungeon = false +state.inInstance, state.instanceType, state.instanceID, state.mapID = false, "none", 0, nil +emit("PLAYER_ENTERING_WORLD") + +-- Empty/unsupported routes must work before tests add any fixture data. +state.inInstance, state.instanceType, state.instanceID = true, "party", 990001 +state.instanceName, state.subzone, state.mapID = "Unknown fixture instance", "Unknown area", 990002 +emit("PLAYER_ENTERING_WORLD") +check(addon._lastContent == "" and not addon.HUD:IsShown(), + "unsupported instance has no content and remains hidden") +emit("ENCOUNTER_START", 990003, "Unknown fixture boss", 1, 5) +check(not addon.bossActive and not addon.HUD:IsShown(), "unknown encounter does not activate HUD") +emit("ENCOUNTER_END", 990003, "Unknown fixture boss", 1, 5, 0) + +-- Fixtures are intentionally synthetic high IDs, unrelated to Hall of Thanes. +local boss1 = { encounterID = 991003, name = "Synthetic first boss", tip = "SYNTHETIC_FIRST_TIP" } +local boss2 = { encounterID = 991004, name = "Synthetic second boss", tip = "SYNTHETIC_SECOND_TIP" } +local dungeon = { + instanceID = 991001, uiMapID = 991002, name = "Synthetic dungeon", mythicPlus = false, + bosses = { boss1, boss2 }, + areas = { + { id = "991001:1", subzone = "Synthetic corridor", tip = "SYNTHETIC_CORRIDOR_TIP" }, + { id = "991001:2", subzone = "Synthetic boss room", bossIndex = 1 }, + }, +} +-- Production indexes must already exist. Build new fixture indexes through the +-- shipped initializer rather than implementing or preseeding its tables here. +check(type(addon.BuildRuntimeIndexes) == "function", "package exposes runtime index initialization") +addon.DUNGEONS = { dungeon } +addon:BuildRuntimeIndexes() +check(addon.DUNGEON_BY_INSTANCEID[dungeon.instanceID] == dungeon, + "production initializer indexes synthetic instance") +check(addon.DUNGEON_BY_UIMAPID[dungeon.uiMapID] == dungeon, + "production initializer indexes synthetic UI map") +check(addon.BOSS_BY_ENCOUNTERID[boss1.encounterID].boss == boss1, + "production initializer indexes synthetic encounter") +local savedID = dungeon.instanceID +dungeon.instanceID = 0 +check(not pcall(addon.BuildRuntimeIndexes, addon), "initializer rejects placeholder zero IDs") +dungeon.instanceID = savedID +addon.DUNGEONS = { dungeon, { instanceID = savedID, bosses = {} } } +check(not pcall(addon.BuildRuntimeIndexes, addon), "initializer rejects duplicate instance identities") +addon.DUNGEONS = { dungeon } +addon:BuildRuntimeIndexes() +state.instanceID, state.mapID = dungeon.instanceID, dungeon.uiMapID +state.instanceName, state.subzone = "Localized synthetic dungeon", "Synthetic corridor" +emit("ZONE_CHANGED_NEW_AREA") +check(contains(addon._lastContent, "SYNTHETIC_CORRIDOR_TIP"), "production detection routes by instance ID") +check(contains(addon._lastContent, state.instanceName), "area header uses localized client instance name") +check(addon.HUD:IsShown(), "matched area shows actual HUD") +state.instanceID = 992001 +emit("ZONE_CHANGED_NEW_AREA") +check(contains(addon._lastContent, "SYNTHETIC_CORRIDOR_TIP"), "production detection routes by UI map fallback") +state.mapID = 992002 +emit("ZONE_CHANGED_NEW_AREA") +check(addon._lastContent == "" and not addon.HUD:IsShown(), + "same subzone text in another instance/map does not leak a tip") +emit("ENCOUNTER_START", boss1.encounterID, "Wrong-instance synthetic boss", 1, 5) +check(not addon.bossActive and not addon.HUD:IsShown(), + "known encounter from another instance does not activate HUD") +emit("ENCOUNTER_END", boss1.encounterID, "Wrong-instance synthetic boss", 1, 5, 0) +state.instanceID, state.mapID = dungeon.instanceID, dungeon.uiMapID +state.subzone = "Synthetic boss room" +emit("ZONE_CHANGED") +check(contains(addon._lastContent, "SYNTHETIC_FIRST_TIP"), "production subzone event previews the associated boss") +state.subzone = "Synthetic corridor" +emit("ENCOUNTER_START", boss1.encounterID, "Localized synthetic boss", 1, 5) +check(addon.bossActive and contains(addon._lastContent, "SYNTHETIC_FIRST_TIP"), + "production encounter event locks the first boss tip") +check(contains(addon._lastContent, "Localized synthetic boss"), "boss header uses localized encounter event name") +check(KwikTipDB.encounterLog[#KwikTipDB.encounterLog].encounterID == boss1.encounterID, + "production encounter logger records the event") +emit("ZONE_CHANGED") +check(contains(addon._lastContent, "SYNTHETIC_FIRST_TIP"), "area changes do not replace an active boss tip") +emit("ENCOUNTER_END", boss1.encounterID, "Localized synthetic boss", 1, 5, 1) +check(not addon.bossActive and contains(addon._lastContent, "SYNTHETIC_SECOND_TIP"), + "successful encounter advances to the next authored boss") +emit("ENCOUNTER_START", boss1.encounterID, "Localized synthetic boss", 1, 5) +emit("ENCOUNTER_END", boss1.encounterID, "Localized synthetic boss", 1, 5, 0) +check(contains(addon._lastContent, "SYNTHETIC_CORRIDOR_TIP"), "wipe restores production area routing") +emit("ENCOUNTER_START", boss1.encounterID, "Localized synthetic boss", 1, 5) +state.inInstance, state.instanceType, state.instanceID, state.mapID = false, "none", 0, nil +emit("PLAYER_ENTERING_WORLD") +check(not addon.bossActive and addon._lastContent == "" and not addon.HUD:IsShown(), + "teleport out without encounter end clears stale boss state and HUD") +state.inInstance, state.instanceType = true, "party" +state.instanceID, state.mapID = dungeon.instanceID, dungeon.uiMapID +emit("PLAYER_ENTERING_WORLD") +check(contains(addon._lastContent, "SYNTHETIC_CORRIDOR_TIP"), + "reentering after an interrupted fight restores normal routing") +KwikTipDB.persistentHide = true +addon:UpdateVisibility() +check(not addon.HUD:IsShown(), "Disable Tips hides the HUD") +KwikTipDB.persistentHide = false +state.inInstance, state.instanceType = false, "none" +emit("PLAYER_ENTERING_WORLD") +check(addon._lastContent == "" and not addon.HUD:IsShown(), "leaving the instance clears content and HUD") +check(_G.KwikTip == nil, "runtime never publishes a global addon namespace") + +io.write(string.format("Forever offline runtime (%s): %d assertions passed\n", locale, checks)) diff --git a/tools/forever_marketplaces.py b/tools/forever_marketplaces.py new file mode 100644 index 0000000..63605c9 --- /dev/null +++ b/tools/forever_marketplaces.py @@ -0,0 +1,133 @@ +#!/usr/bin/env python3 +"""Upload verified Forever alpha bytes to existing pages only with --publish. + +Payload contracts match the pinned BigWigs packager; exact Forever versions are +required instead of falling back to another patch or game flavor. No retries. +""" +from __future__ import annotations + +import argparse +import hashlib +import json +import os +from pathlib import Path +from urllib.error import HTTPError +from urllib.request import HTTPRedirectHandler, Request, build_opener +import uuid + +from forever_release import validate_tag + +CF_PROJECT = "1478824" +WAGO_PROJECT = "QN53W7KB" +PATCH = "1.60.1" +CF_FOREVER_TYPE = 88568 + + +class NoRedirect(HTTPRedirectHandler): + def redirect_request(self, request, fp, code, message, headers, newurl): + return None + + +def open_request(request): + # Upload credentials stay on the explicitly named provider endpoint. + return build_opener(NoRedirect()).open(request, timeout=60) + + +def payloads(cf_versions: list, wago_game: dict, version: str, notes: str) -> tuple[dict, dict]: + matches = [row["id"] for row in cf_versions + if row.get("gameVersionTypeID") == CF_FOREVER_TYPE and row.get("name") == PATCH] + if len(matches) != 1 or not isinstance(matches[0], int) or isinstance(matches[0], bool) or matches[0] <= 0: + raise ValueError("Need one exact CurseForge Forever patch ID; no fallback is allowed") + patches = wago_game.get("patches", {}).get("forever", []) + if not isinstance(patches, list) or PATCH not in patches: + raise ValueError("Wago must explicitly support the exact Forever patch") + label = f"KwikTip Forever {version}" + return ( + {"displayName": label, "gameVersions": matches, "releaseType": "alpha", + "changelog": notes, "changelogType": "markdown"}, + {"label": label, "supported_forever_patches": [PATCH], + "stability": "alpha", "changelog": notes}, + ) + + +def verified_inputs(directory: Path, tag: str) -> tuple[str, Path, str]: + metadata = json.loads((directory / "release.json").read_text())["releases"] + if len(metadata) != 1: + raise ValueError("Expected one isolated Forever release") + item = metadata[0] + version = item["version"] + validate_tag(tag, version) + archive = f"KwikTip_Forever-{version}.zip" + if item["filename"] != archive or item["metadata"] != [{"flavor": "forever", "interface": 16001}]: + raise ValueError("Only the declared Forever archive/interface may be uploaded") + expected = {archive, "release.json", "release-notes.md", "source-evidence.json", "coverage.json"} + seen = set() + for line in (directory / "SHA256SUMS").read_text().splitlines(): + digest, name = line.split(" ", 1) + if name not in expected or name in seen: + raise ValueError("Unexpected or duplicate checksum path") + if hashlib.sha256((directory / name).read_bytes()).hexdigest() != digest: + raise ValueError(f"Checksum failed: {name}") + seen.add(name) + if seen != expected: + raise ValueError("Missing verified publication asset") + return version, directory / archive, (directory / "release-notes.md").read_text() + + +def fetch_json(url: str, headers: dict) -> dict | list: + with open_request(Request(url, headers=headers)) as response: + return json.load(response) + + +def upload(url: str, headers: dict, metadata: dict, archive: Path) -> None: + boundary = "kwiktip-" + uuid.uuid4().hex + body = ( + f"--{boundary}\r\nContent-Disposition: form-data; name=\"metadata\"\r\n" + "Content-Type: application/json\r\n\r\n" + ).encode() + json.dumps(metadata).encode() + ( + f"\r\n--{boundary}\r\nContent-Disposition: form-data; name=\"file\"; filename=\"{archive.name}\"\r\n" + "Content-Type: application/zip\r\n\r\n" + ).encode() + archive.read_bytes() + f"\r\n--{boundary}--\r\n".encode() + request = Request(url, data=body, headers={**headers, "Content-Type": f"multipart/form-data; boundary={boundary}"}, method="POST") + with open_request(request) as response: + if response.status not in (200, 201): + raise ValueError(f"Upload returned HTTP {response.status}") + + +def publish(directory: Path, tag: str) -> None: + version, archive, notes = verified_inputs(directory, tag) + cf_token, wago_token = os.environ.get("CF_API_KEY"), os.environ.get("WAGO_API_TOKEN") + if not cf_token or not wago_token: + raise ValueError("CF_API_KEY and WAGO_API_TOKEN must both be available; nothing uploaded") + cf_headers = {"x-api-token": cf_token} + wago_headers = {"authorization": f"Bearer {wago_token}", "accept": "application/json"} + cf_versions = fetch_json("https://wow.curseforge.com/api/game/wow/versions", cf_headers) + wago_game = fetch_json("https://addons.wago.io/api/data/game", {}) + cf_payload, wago_payload = payloads(cf_versions, wago_game, version, notes) + # Complete all validation before the first POST. A later failure can still + # leave a partial publication; do not automatically retry either upload. + upload(f"https://wow.curseforge.com/api/projects/{CF_PROJECT}/upload-file", cf_headers, cf_payload, archive) + print(f"CurseForge project {CF_PROJECT}: Forever alpha upload succeeded", flush=True) + upload(f"https://addons.wago.io/api/projects/{WAGO_PROJECT}/version", wago_headers, wago_payload, archive) + print(f"Wago project {WAGO_PROJECT}: Forever alpha upload succeeded", flush=True) + + +def main() -> None: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("directory", type=Path) + parser.add_argument("--tag", required=True) + parser.add_argument("--publish", action="store_true", help="perform actual uploads; omit for verified no-network plan") + args = parser.parse_args() + try: + if args.publish: + publish(args.directory, args.tag) + else: + version, _, _ = verified_inputs(args.directory, args.tag) + print(json.dumps({"version": version, "flavor": "forever", "curseforge": CF_PROJECT, + "wago": WAGO_PROJECT, "wowinterface": "disabled", "uploaded": False})) + except HTTPError as error: + raise SystemExit(f"Marketplace request failed (HTTP {error.code}); inspect partial outcomes before retrying") from None + + +if __name__ == "__main__": + main() diff --git a/tools/forever_release.py b/tools/forever_release.py new file mode 100644 index 0000000..98278cf --- /dev/null +++ b/tools/forever_release.py @@ -0,0 +1,98 @@ +#!/usr/bin/env python3 +"""Prepare isolated Forever release assets locally; never publish or install.""" +from __future__ import annotations + +import argparse +import hashlib +import json +from pathlib import Path +import re +import zipfile + +import package_forever + +ROOT = Path(__file__).resolve().parents[1] +VERSION_PATTERN = r"[0-9]+\.[0-9]+\.[0-9]+-(?:test(?:\.[0-9]+)?|alpha\.[0-9]+)" +ALPHA_TAG_PATTERN = r"forever-v([0-9]+\.[0-9]+\.[0-9]+-alpha\.[0-9]+)" + + +def metadata() -> tuple[str, int]: + toc = (ROOT / "Forever/KwikTip_Forever.toc").read_text(encoding="utf-8") + versions = re.findall(r"(?m)^## Version: (.+)$", toc) + interfaces = re.findall(r"(?m)^## Interface: ([0-9]+)$", toc) + if len(versions) != 1 or re.fullmatch(VERSION_PATTERN, versions[0]) is None: + raise ValueError("Forever TOC needs one safe test/alpha version") + if interfaces != ["16001"]: + raise ValueError("Forever interface changed; review its flavor mapping before release") + first_line = (ROOT / "Forever/README.txt").read_text(encoding="utf-8").splitlines()[0] + if not first_line.startswith(f"KwikTip Forever {versions[0]} --"): + raise ValueError("Packaged README must identify the same Forever version as the TOC") + coverage = json.loads((ROOT / "Forever/Coverage.json").read_text()) + if coverage.get("version") != versions[0] or coverage.get("interface") != int(interfaces[0]): + raise ValueError("Coverage ledger version/interface must match the Forever TOC") + return versions[0], int(interfaces[0]) + + +def validate_tag(tag: str, version: str) -> None: + match = re.fullmatch(ALPHA_TAG_PATTERN, tag) + if match is None or match.group(1) != version: + raise ValueError("Release tag must be forever-v, with an alpha.N version") + + +def prepare(output: Path, tag: str | None = None) -> dict[str, str]: + version, interface = metadata() + if tag is not None: + validate_tag(tag, version) + output = output.expanduser().resolve() + if output.exists(): + raise FileExistsError(f"Refusing to overwrite release output: {output}") + package = package_forever.build(output / "package") + expected = (set(package_forever.SHARED_FILES) | set(package_forever.FOREVER_FILES.values()) + | {f"assets/{name}" for name in package_forever.ASSETS} | {"LICENSE"}) + files = sorted(p for p in package.rglob("*") if p.is_file()) + actual = {p.relative_to(package).as_posix() for p in files} + if actual != expected or any(p.is_symlink() for p in package.rglob("*")): + raise ValueError("Forever package must contain only its explicit standalone file list") + archive_name = f"KwikTip_Forever-{version}.zip" + with zipfile.ZipFile(output / archive_name, "x", compression=zipfile.ZIP_DEFLATED) as archive: + for path in files: + archive.write(path, "KwikTip_Forever/" + path.relative_to(package).as_posix()) + # Match the official BigWigs GitHub release-asset metadata contract. + release = {"releases": [{ + "name": "KwikTip: Forever", "version": version, "filename": archive_name, + "nolib": False, "metadata": [{"flavor": "forever", "interface": interface}], + }]} + (output / "release.json").write_text(json.dumps(release, indent=2) + "\n", encoding="utf-8") + notes = (ROOT / "Forever/RELEASE_NOTES.txt").read_text(encoding="utf-8") + (output / "release-notes.md").write_text(notes.replace("@VERSION@", version), encoding="utf-8") + coverage = json.loads((ROOT / "Forever/Coverage.json").read_text()) + (output / "coverage.json").write_text(json.dumps(coverage, indent=2) + "\n", encoding="utf-8") + evidence = {"data_build": coverage["data_build"], "client_tested": coverage["client_tested"], "dungeons": []} + for dungeon in coverage["included_dungeons"]: + path = Path(dungeon["evidence"]) + if path.is_absolute() or ".." in path.parts or path.parts[0] != "docs": + raise ValueError("Coverage evidence must be an explicit repository doc") + evidence["dungeons"].append({"instanceID": dungeon["instanceID"], "sources": json.loads((ROOT / path).read_text())}) + (output / "source-evidence.json").write_text(json.dumps(evidence, indent=2) + "\n", encoding="utf-8") + assets = [archive_name, "release.json", "release-notes.md", "source-evidence.json", "coverage.json"] + checksums = [f"{hashlib.sha256((output / name).read_bytes()).hexdigest()} {name}\n" for name in assets] + (output / "SHA256SUMS").write_text("".join(checksums), encoding="utf-8") + return {"version": version, "archive_name": archive_name} + + +def main() -> None: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("output", type=Path) + parser.add_argument("--tag", help="validate a publishing alpha tag; omitted for local/PR builds") + parser.add_argument("--github-output", type=Path) + args = parser.parse_args() + result = prepare(args.output, args.tag) + if args.github_output: + with args.github_output.open("a", encoding="utf-8") as stream: + for key, value in result.items(): + stream.write(f"{key}={value}\n") + print(json.dumps(result)) + + +if __name__ == "__main__": + main() diff --git a/tools/package_forever.py b/tools/package_forever.py new file mode 100644 index 0000000..219c22b --- /dev/null +++ b/tools/package_forever.py @@ -0,0 +1,79 @@ +#!/usr/bin/env python3 +"""Build a local, data-isolated KwikTip package for WoW Forever. + +This deliberately does not publish or install the package. Output must be a new +path so existing addon installs or build artifacts are never overwritten. +""" + +from __future__ import annotations + +import argparse +import shutil +from pathlib import Path + +ROOT = Path(__file__).resolve().parents[1] +PACKAGE_NAME = "KwikTip_Forever" +SHARED_FILES = ( + "Init.lua", + "Core.lua", + "Frames.lua", + "UI_Config.lua", + "Locale/enUS.lua", + "Locale/Locales.lua", + "Locale/deDE.lua", +) +FOREVER_FILES = { + "KwikTip_Forever.toc": "KwikTip_Forever.toc", + "DungeonData.lua": "DungeonData.lua", + "RuntimeIndexes.lua": "RuntimeIndexes.lua", + "Flavor.lua": "Flavor.lua", + "Locale/tips.lua": "Locale/tips.lua", + "README.txt": "README.txt", +} +ASSETS = ("ktmini.tga", "ktlogo.tga") + + +def build(output: Path) -> Path: + output = output.expanduser().resolve() + if output.exists(): + raise FileExistsError(f"Refusing to overwrite existing output: {output}") + + package = output / PACKAGE_NAME + package.mkdir(parents=True) + for source, relative in FOREVER_FILES.items(): + destination = package / relative + destination.parent.mkdir(parents=True, exist_ok=True) + shutil.copy2(ROOT / "Forever" / source, destination) + + for relative in SHARED_FILES: + destination = package / relative + destination.parent.mkdir(parents=True, exist_ok=True) + shutil.copy2(ROOT / relative, destination) + + # Adapt only the packaged copy; Retail source and its asset paths stay intact. + config = package / "UI_Config.lua" + source = config.read_text(encoding="utf-8") + retail_prefix = r"Interface\\AddOns\\KwikTip\\assets\\" + forever_prefix = rf"Interface\\AddOns\\{PACKAGE_NAME}\\assets\\" + if source.count(retail_prefix) != 3: + raise ValueError("Shared UI asset references changed; review Forever adaptation") + config.write_text(source.replace(retail_prefix, forever_prefix), encoding="utf-8") + (package / "assets").mkdir() + for asset in ASSETS: + shutil.copy2(ROOT / "assets" / asset, package / "assets" / asset) + shutil.copy2(ROOT / "LICENSE", package / "LICENSE") + + return package + + +def main() -> int: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("output", type=Path, help="new directory to create the package in") + args = parser.parse_args() + package = build(args.output) + print(package) + return 0 + + +if __name__ == "__main__": + raise SystemExit(main())