From 34be13e5ad676fbf09eba6ff84b5ede155a6bdd9 Mon Sep 17 00:00:00 2001 From: Hoid Date: Fri, 20 Feb 2026 08:18:55 +0000 Subject: [PATCH] =?UTF-8?q?snapapi:=20session=209=20=E2=80=94=20browser=20?= =?UTF-8?q?fix,=20CI/CD=20progress?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- projects/snapapi/memory/bugs.md | 7 +++--- projects/snapapi/memory/sessions.md | 38 +++++++++++++++++++++++++++++ projects/snapapi/memory/state.json | 11 +++++---- 3 files changed, 48 insertions(+), 8 deletions(-) diff --git a/projects/snapapi/memory/bugs.md b/projects/snapapi/memory/bugs.md index 1eaeaeb..4c143b8 100644 --- a/projects/snapapi/memory/bugs.md +++ b/projects/snapapi/memory/bugs.md @@ -39,9 +39,10 @@ ## Open -### BUG-007: Simultaneous browser restart causes QUEUE_FULL (HIGH) +### BUG-007: Simultaneous browser restart causes QUEUE_FULL (HIGH) — FIXED (staging) - **Found:** Session 9 - **Impact:** When both browser instances hit RESTART_AFTER_MS simultaneously (every ~1h), all requests during the ~4s restart window queue for 30s then fail with 503 QUEUE_FULL - **Root cause:** Both browsers initialized with same `lastRestartTime`, hit restart threshold together. `acquirePage()` triggers `scheduleRestart()` on both simultaneously. -- **Fix in progress:** Stagger restarts — only one browser restarts at a time + offset initial `lastRestartTime` -- **Status:** Fix assigned to snapapi-browser-fix sub-agent +- **Fix:** Staggered initial `lastRestartTime` per browser + one-at-a-time restart guard in `acquirePage()` +- **Deployed to staging:** Yes (commit e49c4073). Verified playground returns 200. +- **Production:** Awaiting investor approval for v* tag diff --git a/projects/snapapi/memory/sessions.md b/projects/snapapi/memory/sessions.md index 5800031..45602d7 100644 --- a/projects/snapapi/memory/sessions.md +++ b/projects/snapapi/memory/sessions.md @@ -1,5 +1,43 @@ # SnapAPI Session Log +## Session 9 — 2026-02-20 (Browser Fix + CI/CD Attempt) + +**Goal:** Fix production reliability bug, set up CI/CD pipeline. + +### What Was Done + +1. **BUG-007 Fixed: Simultaneous browser restart** (snapapi-browser-fix specialist): + - Root cause: Both browsers hit `RESTART_AFTER_MS` simultaneously, causing 0 capacity for ~4s + - Fix: Staggered `lastRestartTime` per browser + one-at-a-time restart guard + - Commit: `e49c4073` — deployed to staging, verified playground returns 200 + - **Needs production tag to fix in prod** (currently affects prod every ~1hr) + +2. **CI/CD pipeline partially set up** (snapapi-cicd-setup specialist): + - Updated `.forgejo/workflows/deploy.yml` and `promote.yml` with working kubectl deployment steps + - Created deployer SA with RBAC for both namespaces + - Generated deployer kubeconfig with 10-year token + - **BLOCKED:** Forgejo API token only has read scope, can't add secrets. Needs `write:repository` scope. + - REGISTRY_TOKEN secret already exists (from previous session) + - KUBECONFIG secret still missing + +3. **Staging TLS investigation:** + - Certificate stuck for 21h — `staging.snapapi.eu` has no DNS record + - Needs investor to add DNS A record + +### Investor Test — Session 9 +1. **Trust with money?** → YES, professional product, but playground has intermittent 503 (BUG-007 in prod) +2. **Pod crash data loss?** → No, PostgreSQL is separate +3. **Free tier abuse?** → Playground rate-limited to 5/hr/IP, no free API keys +4. **Key recovery?** → Via Stripe customer portal (when webhook is registered) +5. **Website features work?** → All pages work, playground intermittently fails due to BUG-007 + +### Open Issues +- BUG-007 fix on staging only — needs prod tag +- Stripe webhook URL not registered +- CI/CD blocked on Forgejo token scope +- staging.snapapi.eu DNS missing +- No external uptime monitoring + ## Session 8 — 2026-02-19 (Git Sync + CI/CD Prep + Checkout Verification) **Goal:** Housekeeping — sync repo, prepare CI/CD credentials, verify checkout flow. diff --git a/projects/snapapi/memory/state.json b/projects/snapapi/memory/state.json index 0ddf6ce..165c238 100644 --- a/projects/snapapi/memory/state.json +++ b/projects/snapapi/memory/state.json @@ -1,6 +1,6 @@ { "phase": "production-live", - "version": "0.4.3", + "version": "0.4.3-prod / 0.4.4-staging", "staging": { "status": "running", "namespace": "snapapi-staging", @@ -50,9 +50,10 @@ ], "notDone": [ "Register Stripe webhook URL in Stripe Dashboard", - "CI/CD pipeline functional (workflows in repo, needs KUBECONFIG + REGISTRY_TOKEN secrets)", - "Staging TLS (blocked on DNS for staging.snapapi.eu)", - "External uptime monitoring" + "CI/CD pipeline: workflows updated, RBAC+kubeconfig ready, BLOCKED on Forgejo token scope (needs write:repository)", + "Staging TLS (blocked on DNS for staging.snapapi.eu — no DNS record exists)", + "External uptime monitoring (no UptimeRobot account/key)", + "Deploy browser fix to production (v0.4.4 tag needed — investor decision)" ], "stripeProducts": { "starter": { @@ -68,6 +69,6 @@ "priceId": "price_1T2XHpRtlDv9c8GoThHfd8kS" } }, - "lastSession": "2026-02-19T20:00:00Z", + "lastSession": "2026-02-20T08:00:00Z", "codeLocation": "Forgejo repo openclawd/SnapAPI. Clone: git clone forgejo-snapapi:openclawd/SnapAPI.git" }