# ApiVault v1.3.9 — Bug Reporter V2 Hardening

Bug Reporter V2 is the primary cockpit workflow for addon error triage.

## Goals

- Surface new/unreviewed errors directly in AppShell navigation and Home.
- Keep BugGrabber/BugSack imports read-only.
- Avoid repeated occurrence inflation when the same BugGrabber buffers are refreshed.
- Provide practical developer outputs: Markdown report, GitHub report, CurseForge report and minimal repro checklist.
- Add optional ApiVault-owned history persistence that stores sanitized summaries only.

## Persistence policy

`ApiVaultDB.errorHistory.enabled` is `false` by default.

When enabled, ApiVault stores only capped summaries:

- addon
- message
- category
- count
- firstSeen
- lastSeen
- reviewed
- source

Full stack traces are not persisted by the error history feature.

## Settings

Open `/av settings` and use:

- Toggle History
- Set History Max
- Auto Refresh
- Error Badge
- Copy Stacks

Command examples:

```text
history max 100
output chars 30000
output lines 250
```

## Developer workflow

1. Open `/av errors`.
2. Click Refresh Bridge.
3. Filter by addon, message, category or source.
4. Use category buttons for common failure classes.
5. Mark reviewed once triaged.
6. Copy Markdown or Minimal Repro output for issue trackers.

## Safety

This feature does not execute pasted code, does not read runtime source files, does not register `COMBAT_LOG_EVENT_UNFILTERED`, and does not mutate BugGrabber/BugSack internal buffers.


## v1.3.10 bridge-status cleanup

The BugSack/BugGrabber bridge status intentionally separates several concepts that used to be easy to confuse:

- **BugGrabber global present**: `_G.BugGrabber` exists at runtime.
- **BugGrabber addon loaded by exact token**: `C_AddOns.IsAddOnLoaded("BugGrabber")` is true through the ApiVault C_AddOns runtime adapter.
- **BugGrabber callback API available**: `_G.BugGrabber.RegisterCallback` exists and can be used.
- **BugGrabber runtime buffer available**: `_G.BugGrabber.errors` is readable.
- **BugGrabberDB saved buffer available**: `_G.BugGrabberDB.errors` is readable.
- **BugSack addon loaded**: `C_AddOns.IsAddOnLoaded("BugSack")` is true through the ApiVault C_AddOns runtime adapter.

If `RegisterCallback` is unavailable, ApiVault does not treat that as a fatal error. It reports the condition explicitly and uses the fallback WoW error-handler mirror when the mirror preference is enabled.

`mirrorReinstallCount` only increases when ApiVault actually has to install its mirror because another handler is currently active. Repeated `/av bugsack` refreshes should not increase this value while ApiVault's mirror is already active.

Disabling the mirror preference prevents future bridge refreshes from installing new capture behavior. It does not forcibly rewrite the current WoW error-handler chain, because doing so could break another addon's handler chain.
