Skip to content

docs: execution-bug meta-analysis + target-arch result-contract tightenings - #1087

Merged
vybe merged 1 commit into
devfrom
docs/orchestration-bug-meta-analysis
Jun 6, 2026
Merged

vybe merged 1 commit into
devfrom
docs/orchestration-bug-meta-analysis

Conversation

@vybe

@vybe vybe commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Meta-analysis of ~80 orchestration/execution issues (#56→#1085) — 11 per-family forensic analyses (each adversarially verified) + 4 cross-cutting synthesis lenses. New report at docs/planning/ORCHESTRATION_BUG_META_ANALYSIS_2026-06.md.

Headline finding: every bug family traces to two co-original-sins —

  • PUSH_DISPATCH_BLOCKING — the backend holds an HTTP connection for the entire agent turn, so it can never know an execution finished, only time out;
  • SPLIT_STATE_AUTHORITY — with no completion signal, "is-running" got split across a Redis ZSET + a SQL row + agent RAM, reconciled by nothing.

The cleanup pyramid, slot-TTL math, circuit breakers, and the canary harness are all compensation for those two. #1081 pull/work-stealing is the only structural cure.

Target-architecture changes (coordination model unchanged)

Folds three residual seams pull alone does not close into TARGET_ARCHITECTURE.md:

  1. Typed terminal-reason on the reply envelope — the agent emits {status, error_code, …}; the backend never infers failure from exit codes/substrings. Kills the MISCLASSIFIED_FAILURE class (auth-substring classifier re-patched 5+ times across 3 hand-synced copies). Pins part of spec: message envelope payload schema (pull coordination) #945.
  2. Agent-owned out-of-band result record — the worker's result POST reads from a durable agent-written record, not parsed stdout (which Claude's grandchildren inherit on fd 1 and corrupt before the POST — bug: child processes inherit agent-server stdout pipe → reader thread stuck, false '0 tool calls' failures #548/bug: agent-server.py develops futex spin loop after days of uptime #333).
  3. Credential rotation via hot-reload, not recreate — rotation uses /api/credentials/update; recreate reserved for image/template changes (bug: subscription auto-switch (SUB-003) recreates agent container without draining in-flight executions, killing them (RemoteProtocolError) #1037).

Follow-up issue sync (separate)

Tracker-truth corrections (#408↔#1083, #429 blocked-on-#307), reprioritization (#1022→P1), and two new issues (classifier unification, credential hot-reload rotation) are being handled via /roadmap-plan + issue comments — not in this PR.

🤖 Generated with Claude Code

…-contract tightenings

Meta-analysis of ~80 orchestration/execution issues (#56→#1085): 11 per-family
forensic analyses + cross-cutting synthesis. Headline finding — every family
traces to two co-original-sins: PUSH_DISPATCH_BLOCKING (backend holds an HTTP
connection for the whole agent turn → no completion signal) and the
SPLIT_STATE_AUTHORITY it forces (is-running split across Redis ZSET + SQL row +
agent RAM). The cleanup pyramid, slot-TTL math, circuit breakers, and the canary
harness are all compensation; #1081 pull is the only structural cure.

Folds three residual seams pull does NOT close into TARGET_ARCHITECTURE.md
(coordination model unchanged):
- typed terminal-reason on the reply envelope (kills the auth-substring
  classifier re-patched 5+ times across 3 hand-synced copies) — §Message Envelope, #945
- agent-owned out-of-band result record, not parsed stdout (#548/#333) — §Agent Runtime
- credential rotation via hot-reload, not container recreate (#1037) — §Agent Runtime

New report: docs/planning/ORCHESTRATION_BUG_META_ANALYSIS_2026-06.md

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant