chore: update status — executor.ts split failed after 3 attempts

This commit is contained in:
Ingo Wagner 2026-09-21 23:55:35 +00:00
parent 57c968dc8b
commit 7f7d477f15

View File

@ -1,4 +1,4 @@
# CLAUDE RESUME — 2026-09-21 (~21:30 Vienna)
# CLAUDE RESUME — 2026-09-21 (~22:00 Vienna)
## Completed in this session
- ✅ **Full emoji-first Onboarding.tsx rewrite** (5 steps: emoji → preferences → language → integrations → bot)
@ -10,34 +10,31 @@
- User context saved to bot instructions
- ✅ onboarding-discovery.ts (3 items), OnboardingDiscoveryShell.tsx updated
- ✅ ui-web exports: GROK_COLOR_LIST, SHIPPED_SHAPE_KEYS, GrokColorDef, GROK_SHAPES
- ✅ Build: web app green (apps/web/tsconfig.json)
- ✅ executor.ts split **attempted** but abandoned — brace-counting unreliable for tokenizeProtectedShellCommand (TypeScript Generics + Template-Strings). Errors are pre-existing (inherited from SubAgent work).
- ✅ pi-runtime.ts split **abandoned** — same risk profile.
- ✅ **Build: apps/web green** (4 pre-existing errors, none from our changes)
## executor.ts split status
| File | Lines | Notes |
|------|-------|-------|
| executor.ts | 4697 | Not split (attempt failed) |
| executor-completion.ts | 65 | Exists on disk |
| executor-computer.ts | 231 | Exists on disk |
| executor-effects.ts | 151 | Exists on disk |
| executor-model.ts | 207 | Exists on disk |
| executor-utils.ts | 63 | Exists on disk |
| executor-tools.ts | 58 | Exists on disk |
| executor-attachments.ts | 43 | Exists on disk |
| executor-types.ts | 50 | Exists on disk |
| executor-shell-guard.ts | 177 | Exists on disk |
| executor-checkpoint.ts | 23 | Exists on disk |
## executor.ts split — FAILED (3 attempts)
Three attempts to split executor.ts (4697 lines → ~3700) all failed:
1. **Attempt 1**: Python line-range removal — removed wrong ranges due to brace-counting failure with TypeScript generics/templates. File broken.
2. **Attempt 2**: Character-by-character brace parser — better but still missed multi-line function bodies (runSandboxCommand was 16 lines claimed, actually 41). Required manual fixes which caused cascading shifts.
3. **Attempt 3**: Same as attempt 2 with verified ranges — same problem: orphaned function bodies after removal, duplicate imports from SubAgent work, cascading edit failures.
These 10 module files contain extracted functions but are **NOT wired** into executor.ts (imports/re-exports missing). The executor.ts still contains the original definitions.
**Root cause**: The SubAgents created separate module files (executor-*.ts) but left duplicate definitions in executor.ts. Removing those definitions requires **exact brace matching** which is unreliable in TypeScript code with Generics, Template-Strings, Regex. The iterative manual approach (sed + git checkout) causes line number shifts that break subsequent edits.
**Remaining on disk** (10 module files, NOT wired into executor.ts):
- executor-types.ts, executor-attachments.ts, executor-checkpoint.ts, executor-shell-guard.ts
- executor-effects.ts, executor-completion.ts, executor-model.ts, executor-utils.ts
- executor-tools.ts, executor-computer.ts
## pi-runtime.ts split — ABANDONED
Same risk profile. 1726 lines, pi-model-config.ts exists on disk but wiring would need same careful brace-matching.
## Pending
- executor.ts split: needs a **reliable brace-matching approach** (not blind line-range removal)
- pi-runtime.ts split: same risk
- executor.ts split: needs a **reliable structural parser** (AST-based, not line-based)
- pi-runtime.ts split: same requirement
- Kill fat banner on first chat: requires backend language support
- Playwright E2E tests: need running backend
## Constraints
- Local models only (`:1234` coder). OpenRouter intentionally off.
- SubAgents overwrite files — atomic writes preferred for critical files.
- The executor.ts split errors are pre-existing and don't affect web app build.
- apps/web build is green. packages/adapters has pre-existing TS errors from SubAgent work.