# S06: Forgejo KB Update — Auth, Consent, LightRAG — UAT

**Milestone:** M019
**Written:** 2026-04-03T23:25:35.092Z

## UAT: S06 — Forgejo KB Update

### Preconditions
- Access to Forgejo at https://git.xpltd.co
- Forgejo API token available on ub01 (~/.forgejo_token)

### Test 1: Wiki Page Count
1. Query Forgejo wiki API: `curl -sf "https://git.xpltd.co/api/v1/repos/xpltdco/chrysopedia/wiki/pages?limit=50" -H "Authorization: token $(cat ~/.forgejo_token)"`
2. **Expected:** Response contains at least 11 pages
3. **Expected:** Page titles include: Architecture, Data Model, API Surface, Deployment, Authentication, _Sidebar, Home, Pipeline, Frontend, Development Guide, Decisions

### Test 2: Authentication Page Exists
1. Query: `curl -sf "https://git.xpltd.co/api/v1/repos/xpltdco/chrysopedia/wiki/page/Authentication" -H "Authorization: token $(cat ~/.forgejo_token)"`
2. **Expected:** 200 response with content covering JWT auth, invite codes, roles, consent

### Test 3: Architecture Page Updated
1. Fetch Architecture page content from wiki
2. **Expected:** Container count shows 11 (not 8 or 9)
3. **Expected:** LightRAG appears in Docker Services table with port 9621
4. **Expected:** JWT authentication mentioned (no longer says "No authentication")

### Test 4: Data Model Page Updated
1. Fetch Data-Model page content from wiki
2. **Expected:** User model documented with fields (id, email, display_name, password_hash, role, creator_id)
3. **Expected:** VideoConsent model documented with consent boolean fields
4. **Expected:** ConsentAuditLog model documented

### Test 5: API Surface Page Updated
1. Fetch API-Surface page content from wiki
2. **Expected:** Auth endpoints listed (POST /auth/register, POST /auth/login, GET /auth/me, PUT /auth/me)
3. **Expected:** Consent endpoints listed (GET/PUT /consent/videos, history, admin/summary)

### Test 6: Sidebar Updated
1. Fetch _Sidebar page content from wiki
2. **Expected:** Authentication link present in sidebar navigation

### Edge Cases
- **Forgejo API rate limiting:** If API returns 429, wait and retry
- **Token expiry:** If 401, regenerate token via `forgejo admin user generate-access-token`
