# Bug Tracker Build and Deploy

## User
- **User:** Howard Enos (howard)
- **Machine:** Howard-Home
- **Role:** tech

## Session Summary

Built and deployed the ACG Bug/Feature/Project Tracker from scratch using Gitea Issues as the backend and a custom HTML dashboard as the frontend. The tracker is live at `tracker.azcomputerguru.com` (HTTPS via NPM) and `http://172.16.3.20:8089/dashboard.html` (internal direct).

Work started because the wiki and Discord forum were insufficient for tracking bugs, features, and project status -- they lack status fields, assignment, filtering, and visual boards.

## Key Decisions

- **Gitea Issues** selected as the tracking backend (already running, integrated with git, supports labels/milestones/assignees)
- **Standardized label scheme** created across repos: type (bug/feature/skill/project/thought), priority (P1-P4), component, client, assigned, status (in-progress/blocked/dropped/fixed/verified/wontfix)
- **"Thought" label** introduced to differentiate Mike/Howard's RMM ideas (from RMM_THOUGHTS.md) from committed features -- thoughts are not in backlog until explicitly promoted
- **Client project labels** added to claudetools repo for tracking per-client work orders
- **Dashboard deployed** as nginx:alpine Docker container on Jupiter (port 8089), proxied through NPM with Let's Encrypt SSL
- **Discord webhook** configured on gururmm, guru-connect, and claudetools repos to post issue/comment events to #dev-alerts
- **Discovery dates** added to issue bodies (since Gitea doesn't support backdating created_at via API)

## What Was Built

1. **Label scheme** applied to repos: gururmm, guru-rmm, guru-connect, claudetools
2. **Milestones** created: Active Sprint, Backlog (on all repos)
3. **Dashboard HTML** (`projects/msp-tools/bug-tracker/dashboard.html`) -- single-page app with login, tabs for Bugs/Features/Skills/Thoughts/Client Projects/Done, filtering by repo/priority/label
4. **Nginx proxy** (`projects/msp-tools/bug-tracker/nginx.conf`) -- serves dashboard + proxies /gitea/* to localhost:3000
5. **Docker container** `acg-tracker` on Jupiter (172.16.3.20:8089), --add-host host.docker.internal
6. **DNS** `tracker.azcomputerguru.com` A record -> 72.194.62.10
7. **SSL cert** (ID 13) via NPM DNS challenge with Cloudflare
8. **NPM proxy host** (ID 12) tracker.azcomputerguru.com -> 172.16.3.20:8089
9. **Bug-tracker skill** (`.claude/skills/bug-tracker/skill.md` + `scripts/tracker.py`) for CLI issue management
10. **Discord webhook** (ID 1528119396894114005) for issue notifications to #dev-alerts

## Issues Filed

- **claudetools**: 10 bugs (vault leak, remediation-tool failures, discord-dm, unifi, msp360, syncro, coord), 8 skill work items, 3 projects, ~40 client projects (Cascades, Dataforth, Valley Wide, Neptune, BirthBiologic, CryoWeave, GlazTech, Peaceful Spirit, Kittle, Khalsa, Quantum WMS, UCryo, Gonzvar, etc.)
- **gururmm**: 14 RMM Thoughts filed as issues then recategorized to "thought" label, all 12 closed bugs got fix comments with commit references
- **guru-connect**: All 18 open issues labeled with type + priority

## Final Issue Counts (end of session)

- gururmm: 21 open (7 bugs, 14 thoughts), 12 closed (all with fix comments)
- guru-connect: 18 open
- claudetools: 21+ open (9 bugs, 8 skills, 3 projects, client projects)

## Problems Encountered

- NPM SSL cert creation: initial attempts failed with "meta must NOT have additional properties" -- needed exact format `dns_challenge: true, dns_provider: cloudflare, dns_provider_credentials: <string>`
- Gitea proxy 502: container couldn't reach gitea container -- fixed with `--add-host host.docker.internal:host-gateway` and proxying to `host.docker.internal:3000`
- HTTPS from WAN not working (NAT/port forward issue on 443 to Jupiter NPM) -- internal and --resolve curl work fine, external access via hairpin may need router rule
- Client project bulk-file Python heredoc had unescaped single quotes causing bash parse failure (partial execution)
- `/tmp` path hook blocked a command (known Windows friction -- use repo-relative paths)
- Gitea does not support backdating `created_at` via API even with admin/Sudo -- workaround: added `**Discovered:** YYYY-MM-DD` to issue body

## Pending / Incomplete Tasks

- Client projects batch file had a bash quoting error -- some projects may not have been filed (the ones with apostrophes in the body text)
- External HTTPS access (tracker.azcomputerguru.com from outside the LAN) -- needs port 443 forwarded to Jupiter NPM (1880/18443)
- Dashboard filtering could be expanded (sort by due date, group by client)
- Integration with session workflows (auto-file bugs when errors surface)

## Configuration Changes

- [created] `projects/msp-tools/bug-tracker/dashboard.html`
- [created] `projects/msp-tools/bug-tracker/nginx.conf`
- [created] `projects/msp-tools/bug-tracker/Dockerfile`
- [created] `projects/msp-tools/bug-tracker/serve.sh`
- [created] `.claude/skills/bug-tracker/skill.md`
- [created] `.claude/skills/bug-tracker/scripts/tracker.py`
- [created] `.claude/memory/project_bug_tracker_gitea.md`
- [created] `.claude/memory/feedback_tracker_discipline.md`
- [created] `.claude/memory/feedback_tracker_autofile.md`
- [created] `.claude/memory/feedback_tracker_encoding.md`
- [modified] `.claude/memory/MEMORY.md`

## Infrastructure

- **Jupiter** (172.16.3.20): Docker host, runs `acg-tracker` container (nginx:alpine, port 8089)
- **NPM** (172.16.3.20:7818): Proxy host ID 12, cert ID 13, routes tracker.azcomputerguru.com
- **Cloudflare**: DNS A record `tracker` -> 72.194.62.10
- **Discord**: Webhook ID 1528119396894114005 in #dev-alerts channel (1509998508198068484)
- **Gitea**: Labels, milestones, webhooks configured on gururmm/guru-connect/claudetools repos

## Credentials (already vaulted)

- Gitea API token: `9b1da4b79a38ef782268341d25a4b6880572063f` (services/gitea)
- Discord webhook: `https://discord.com/api/webhooks/1528119396894114005/R31E4JVeNvX0_scFHLWYQGxcNyBjP69vIxFgbVG_e18-u6c_uYvHjNzaA1PfDIgeNNNl`
- Howard Gitea password: `q6Uh-qZCq-d6mMf_DrJ64pf7WQQ6` (used for dashboard Basic auth)
