Files
AzerothAI/docs/realm-insights.md
T
2026-09-24 03:16:52 +12:00

26 lines
5.0 KiB
Markdown

# Realm reports and activity explanations
Nightly Report and Bot Activity are available in both the admin and read-only visitor monitor. Visitor access is unchanged.
The existing Ubuntu operations timer samples realm state once a minute through authenticated `POST /api/realm-insights`. The first sample establishes a baseline: existing deaths, levels and relationships are not presented as new events. Reports close at 06:00 UTC, finalized on the first successful sample after that boundary. The first period is partial. Thirty completed reports and 31 days of evidence/samples are retained in D1, included in existing verified realm backups. The latest 100 native recovery attempts are retained separately.
Reports count observed level gains, verified deaths, first online appearances, confirmed bot reply exchanges, positive relationship pairs, party invitations, guild admissions and same-goal guild progress. First appearances need not mean newly created characters, invitations do not prove a party remains together, and positive bonds do not prove reciprocal friendship. Private player conversations and synthetic openers are excluded. Collection gaps may miss events. A report includes sample coverage; no historical event reconstruction is attempted.
Activity explanations prioritize fresh native combat, casting, taxi travel and human control. AI decisions are labeled intentions. Stationary explanations and possible stalls are inferences, not diagnoses. Last observed progress uses movement, level gain or health change. Recovery attempts are shown without claiming success; the existing native guard still enforces its independent ten-minute progress window, safety exclusions and 30-minute cooldown.
`GET /api/realm-insights` returns only public summaries and managed bot activity. The visitor gateway permits that fixed GET and rejects every mutation. Collection POST requires AUTONOMY_TOKEN. No credentials, native account IDs, memory text, private chat or raw command payloads are returned.
## Gameplay, recovery and performance diagnostics
Needs attention links resource pressure, stale collectors, population/faction mismatches, possible stalls and unresolved recovery follow-ups to their detail views. These checks are evidence-based signals, not an assurance that all game mechanics work.
Gameplay Results uses native ALE quest-completion (54), quest-abandon (38), item-loot (32) and shared-target kill (7) observations. Counters are flushed to `acore_auth.azerothai_outcomes` every minute. An unexpected reload/crash can lose that minute's unflushed observations. Rewarded quest IDs are counted from `character_queststatus_rewarded`; repeat rewards for an existing record are not counted again. The collector establishes a baseline before reporting deltas, so old character history is excluded. A quest abandonment is not classified as a failure. Confirmed party commands and rejected party actions are distinct from observed current membership and shared-target combat.
Recovery Results retains up to 100 attempts. Native follow-up checks position, map and level after each intervention for three minutes. Movement beyond five yards, map change or level change means progress resumed; it does not establish causation or sustained success. Offline/dead/mismatched identities are unverified. After a reload, attempts without persisted verification remain unverified. Results are persisted in `azerothai_recovery_results` keyed to the exact attempt timestamp and character GUID. Existing recovery exclusions, ten-minute detection and 30-minute cooldown remain unchanged.
Bot Performance reads the native `playerbots pmon tick` JSON export every five minutes. Enable `AiPlayerbot.PerfMonEnabled = 1` in the installed module configuration; on an already-running server, toggle the native profiler once only if it is currently disabled. Deploy `ale/azerothai_outcomes.lua` alongside the existing bridge and recovery scripts. The collector reads only fixed container paths. Timings are converted from microseconds to milliseconds. Operation timings overlap; they are not CPU percentages. Cumulative means are explicitly labeled, and only the top 20 operations and 144 snapshots are retained in D1. No new chat/model calls are made by diagnostics.
Visitor access remains read-only. The same components render both monitors; diagnostics expose aggregate evidence and managed character names, excluding raw database identities, credentials, command sources and private chat. Native counter/result tables are included in the existing full auth database backup, and all D1 diagnostic tables are covered by the existing D1 backup.
Currency looted is tracked independently through native player event 37, in copper, and displayed as gold/silver/copper. Item event 32 remains item quantities only. Coin totals exclude quest rewards, sales, trades, and existing wallet balances; no historical currency is inferred. The first sample establishes a baseline, then the last-24-hour view reports observed gains. Both admin and visitor use the same read-only measurements.