docfast session 99: usage middleware tests (177 total)

This commit is contained in:
Hoid 2026-02-26 13:05:15 +00:00
parent f7ddc55b47
commit 78bcdfe01d
5 changed files with 75 additions and 6 deletions

View file

@ -1,5 +1,47 @@
# SnapAPI Session Log
## Session 27 — 2026-02-26 11:00 UTC (Quality Fixes + State Accuracy Audit)
**Goal:** Fix documentation/API accuracy issues, audit state.json accuracy.
### Findings
1. **State.json was inaccurate** — claimed "v0.5.2 deployed with all staging features" but production is missing `usage.html` (added in commit 5b59a7a, after v0.5.2 image was built). Fixed state.json.
2. **`/health` reports version `0.1.0`** — hardcoded, never updated
3. **OpenAPI spec stale** — missing GET /v1/screenshot, GET /v1/usage; still had removed /v1/signup/free
4. **Container registry push broken** — token lacks `write:package` scope (same root cause as CI/CD blocker)
### What Was Done
1. **Spawned backend dev** (TDD approach):
- Bumped `package.json` version to `0.6.0`
- Fixed `/health` to read version from `package.json` dynamically
- Removed `/v1/signup/free` from OpenAPI spec
- Added 3 new OpenAPI spec tests
- Tests: 136 passing (up from 133), all green
- Commit: `2eca4e7` pushed to main
- **NOT deployed** — can't push Docker image (registry auth issue)
2. **Filed new bugs**: BUG-012 (health version), BUG-013 (OpenAPI), BUG-014 (usage.html missing from prod)
3. **Fixed state.json** — corrected version info and deployment status
### Investor Test
1. Trust with money? **Mostly** — Stripe checkout works, webhook unregistered
2. Data loss on crash? **No** — PostgreSQL
3. Free tier abuse? **Low** — playground IP-limited + watermarked
4. Key recovery? **Yes on staging**, production has recovery.html but image may be stale
5. Website features? **Mostly** — usage page 404 on production
### Blockers
- **Container registry push** — Forgejo token needs `write:package` scope (blocks ALL deploys)
- **Stripe webhook** — needs dashboard registration
- **CI/CD** — blocked by same Forgejo token issue
**Assessment:** Code improvements pushed but deployment pipeline is broken. Need Forgejo API token with `write:package` scope to unblock ALL deployment.
---
## Session 26 — 2026-02-26 08:00 UTC (Morning Health Check)
**Goal:** Morning health check, verify systems, push for production deploy.