fix(db): add missing toolCallBudgetCount/toolCallBudgetExceeded to Run model

The executor calls finalizeRun with toolCallBudgetCount and
toolCallBudgetExceeded in the updateMany data clause, but these
fields were missing from the Prisma schema, causing an Invalid
updateMany invocation error that blocked all runs from completing.

Also updated CLAUDE-RESUME-NOW with full infrastructure status.
This commit is contained in:
Ingo Wagner 2026-09-22 09:56:38 +00:00
parent 06943e209f
commit 81708ea3df
2 changed files with 31 additions and 28 deletions

View File

@ -1,4 +1,4 @@
# CLAUDE RESUME — 2026-09-22 (~06:10 Vienna) # CLAUDE RESUME — 2026-09-22 (~10:00 Vienna)
## Completed ✅ ## Completed ✅
- ✅ **Emoji-first Onboarding.tsx** (5 steps: emoji → preferences → language → integrations → bot) - ✅ **Emoji-first Onboarding.tsx** (5 steps: emoji → preferences → language → integrations → bot)
@ -12,35 +12,36 @@
- ✅ **executor.ts split**: 4697 → 4231 lines (18 module files) - ✅ **executor.ts split**: 4697 → 4231 lines (18 module files)
- ✅ **pi-runtime.ts split**: 1726 → 1102 lines - ✅ **pi-runtime.ts split**: 1726 → 1102 lines
- ✅ **TypeScript: 0 errors** across apps/web AND packages/adapters - ✅ **TypeScript: 0 errors** across apps/web AND packages/adapters
- ✅ **Graphile worker fixed**: `GraphileJobWorkerHost.start()` now called in app.ts (was never started for graphile jobs, only for in-memory)
- ✅ **Graphile schema**: `graphile_worker` schema created via `graphile-worker schema-only`
- ✅ **Sandbox supervisor**: Built `rakazo/sandbox-supervisor:local` from source (was using wrong `rakazo/app:edge` image)
- ✅ **Computer image**: Built `rakazo/computer:local` from source
- ✅ **Smart model routing**: `estimateMessageComplexity()` + `resolveSmartModelSelection()` implemented
- Fast model (3B) for short messages (<80 chars)
- Strong model (30B) for complex/long messages (>500 chars)
- Medium routing for keyword-based detection
- ✅ **Model credential**: `local` provider connected with empty apiKey allowed
- ✅ **PRs merged**: All PRs 36-58 merged to main, stale branches cleaned
### PR-Aufräumung (2026-09-22) ### Infrastructure fixes
- ✅ **16 DRAFT-PRs 36-51** → cherry-pick-merged auf main + Branches gelöscht - ✅ **GraphileJobWorkerHost**: Added `else if (jobPool)` branch in app.ts to start the worker
- Authz/Security Fixes: Shared Spaces (44-51), desktop shell guard (37), computer-busy retry (36), handoff (39), messaging (40-43), tool-call budget (38), agent secrets (47), memory provider config (46), team computer (48), bot outcome race (49), monotonic webhooks (50), respond_agent_connection (41), memory runtime authz (51) - ✅ **Sandbox provider**: `SANDBOX_PROVIDER=docker` with proper supervisor at port 7091
- ✅ **13 Squash-Duplikate PRs 13-25** → geschlossen (inhalt bereits in main), Branches gelöscht - ✅ **Computer provisioning**: Docker containers spin up successfully (verified: `rakazo-bot-cmuber4og000561yrhm2q81c5` running)
- PRs waren Cursor-Squash-Duplikate mit 100+ CI-Dateien statt inkrementellen Diffs - ✅ **DATA_DIR path**: Supervisor mounted with correct host path for home directory validation
- ✅ **PR 31** (CORS) → cherry-pick-merged + Branch gelöscht
- ✅ **19 stale branches** von merged PRs gelöscht (PRs 1-10, 12, 27-30, 32-34, 35, 5, 7-10, 12, 26, 32-34, 35)
- ✅ **PR 11** (CLOSED) → branch bereits gelöscht
### Verbleibende offene PRs (6) — alle sauber scoped:
- PR 52: Team Computer export → exporting bot workspace
- PR 53: spawnBot replay → spawning member scope
- PR 54: memory provider details redaction in aiConsent
- PR 55: Team Computer takeover hijack block
- PR 56: group follow-up routing
- PR 57: run owner authz for secrets and approval prompts
## Pending ⏳ ## Pending ⏳
- **BLOCKER: `events.ts:996` Prisma `updateMany` error** — `finalizeRunOnce` throws `Invalid tx.run.updateMany()` during run setup. Prisma client regenerated, types verified, inline schema correct. All WHERE fields (id, spaceId, threadId, botId, taskId, status, leaseOwner, leaseFence) exist in schema. Suspect Prisma 7 incompatibility or runtime resolution issue. Computer is running but runs never advance past "queued" → setup phase.
- Fat banner kill on first chat (requires backend language support) - Fat banner kill on first chat (requires backend language support)
- Playwright E2E tests (needs running backend server) - Playwright E2E tests (backend blocked on Prisma error)
- PRs 52-57 review/merge (coherente Security-Work: Shared Spaces authz)
## TS-Status (2026-09-22 ~06:30) ## Architektur-Status
- **apps/web: 0 TS errors** ✅ - **API**: Port 3100, Graphile worker active, consuming jobs
- **packages/adapters: 0 TS errors** ✅ (4 pre-existing errors gefixed) - **Sandbox supervisor**: Port 7091, `rakazo/sandbox-supervisor:local`, DATA_DIR mounted correctly
- Cherry-picks von PR 38 haben executor.ts/pi-runtime.ts kaputtgemacht → repariert - **Computer**: `rakazo/computer:local` image built and running
- **Smart routing**: Fast (3B) → Strong (30B) model selection based on message complexity
- **Known error**: `events.ts:996` — Prisma `updateMany` in `finalizeRunOnce` throws "Invalid invocation" despite all fields existing in schema
## Status ## Status
- Working tree: clean - Working tree: clean (Graphile fix committed + pushed)
- **6 offene PRs** (PRs 52-57) — alle DRAFT, sauber scoped - **3 draft PRs** (66, 67, 69) — messaging, adapters, teamchat fixes
- **0 stale Branches** übrig - **0 stale branches**

View File

@ -583,6 +583,8 @@ model Run {
routine Routine? @relation(fields: [routineId], references: [id], onDelete: SetNull) routine Routine? @relation(fields: [routineId], references: [id], onDelete: SetNull)
startedAt DateTime? startedAt DateTime?
completedAt DateTime? completedAt DateTime?
toolCallBudgetCount Int?
toolCallBudgetExceeded Boolean?
botOutcomeReturnedAt DateTime? botOutcomeReturnedAt DateTime?
messagingMirroredAt DateTime? messagingMirroredAt DateTime?
teamChatMirroredAt DateTime? teamChatMirroredAt DateTime?