Skip to content

feat(inbox): add durable routing and explicit IOA collaboration - #193

Merged
M09Ic merged 6 commits into
masterfrom
codex/inbox-router-durable-cleanup
Nov 5, 2026
Merged

M09Ic merged 6 commits into
masterfrom
codex/inbox-router-durable-cleanup

Conversation

@M09Ic

@M09Ic M09Ic commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Problem and resulting behavior

A resident router must persist external input, route updates to the same logical task, and recover workers without losing unread messages or executing duplicate feedback. Add the independent inbox command and durable Router using the existing subagent/Session backend and internal tmux work units. Waiting workers release execution capacity and reacquire it before resuming, including timeout, cancellation and restart paths.

Changes

  • Persist task/input/attempt state, execution journals, route records, result outbox and IOA cursors. Preserve logical task identity, unread corrections and original source provenance across restarts and ACK-loss retries.
  • Define one application protocol directly in dynamic IOA meta: version, event, stable id, source/target and validated event-specific fields. CLI messages, inbox.route, subagent.delegate/return and task.result share it. No cyber.harness wrapper, compatibility decoder or dual writes; IOA transport and Ref stay generic.
  • Replace arbitrary runtime metadata with fixed fields and remove the copied Handoff DTO. Lifecycle facts never execute as work; invalid application records are reported and skipped without poisoning durable replay. CLI metadata cannot forge lifecycle, feedback or source fields.
  • Close capacity/wake and preparation gaps: paired wait/resume admission, no parallel inbox_wait with work, original seed/media preservation and stable task-to-execution correlation.
  • Display explicit message references and labeled task/session affiliations in WebUI. Keep cross-node IDs separate, preserve restart identities, and center selected messages at readable desktop/mobile zoom.

Validation

Five complex scenarios ran against the official DeepSeek API with deepseek-flash; all passed in 362.349 seconds. Models selected tools and processed real files; independent business oracles and persisted state verified results.

Scenario Scheduling/failure coverage Result
Versioned reconciliation Three roles, late corrections, stale-evidence gating, offline replay/restart 25 rows, 21 events, four duplicates; exact isolated CNY/USD totals
24-job DAG One execution slot; three consumers wait while producer runs; internal tmux wakes original executions Makespan 59, peak concurrency one, stable execution IDs
Urgent allocation Interrupt after committed draft and revise capacity within same execution Exact final cost 74, weight 22, value 173
IOA inventory Nine out-of-order offline batches, newer revisions followed by stale data, backpressure and duplicate replay 48 unique events, 10 inputs, 13 backpressure rejections; duplicate model calls zero
Release attestation Independent hashing/audit of 12 files, transitive dependency/license checks, ACK loss and both-host restart 2725 bytes; two sends, one audit write, zero producer reexecution calls
  • Affected Go packages pass race tests; full/sqlite builds and focused behavior suites pass. cmd/harness offline behavior tests pass; live_llm-tag compilation passes.
  • Frontend TypeScript compilation and 56 UI regressions pass. The default external-Hub test is skipped in that suite and independently passes against both live-model histories replayed through the IOA SDK into a real Hub.
  • Real WebUI login/API reads, source/reference graph edges, final return inspection and 390px mobile layout verified. This is real-model history replay into the actual Hub/UI, not a claim that all model tasks were launched concurrently from WebUI.
  • Affected-package go vet, whitespace checks and whole-repository compilation pass. Whole-repository compilation is not an all-package behavioral test claim.

Protocol: direct application metadata. Evidence: validation report, live test log, and independent oracle summary. The report includes desktop/mobile screenshots; raw databases, full traces and unrelated workspace artifacts are excluded.

Breaking switch and delivery limits

  • Active state schema is 2. Schema 1 is rejected: use a fresh state directory and preserve old state for audit. No automatic migration or deletion.
  • Router records and task results use the durable outbox. Subagent delegate/return records remain synchronous: delegation send failure prevents execution; return-record failures are surfaced. Lifecycle records have no durable offline resend guarantee, and arbitrary external effects are not exactly-once across every crash window.
  • Internal tmux manages host work units; restart restores durable task progress rather than preserving old OS processes. Multi-hour soak and arbitrary third-party monitoring sources are outside completed validation.

Dependency

chainreactors/cyber-ui#28 is merged. This branch pins its GraphExtension commit 147423bd42b665aab361409c57258d9370f75bb0, now reachable from cyber-ui main.

CI follow-up

5feb133 resolves nine lint findings and preserves normal cancellation during graceful delivery shutdown. 7b88da7 removes conflicting short subprocess deadlines and lets the real repository CI continuation finish within its command budget; all lock, ancestry, EOF, timeout and replay assertions remain.

Local golangci-lint v2.12.2 reports 0 issues. Both complex scenarios pass twice with race, coverage and GOMAXPROCS=2; full race/coverage tests for cmd/aiscan and exts/inbox also pass.

GitHub CI run 41958497771 passes all 17 checks at 7b88da7: build/vet/lint, three platform audits, root/AOP race and coverage floor, Windows full CLI variants, scanner/full-tag integrations, headless record/replay, frontend and backend E2E, repeated connection shutdown regressions, all 18 release build targets, archives/checksums, and Windows/Linux amd64/arm64 packaged-release verification.

Frontend CI records 65 base E2E, 88 JEV, 56 UI and 26 viewer tests passed, with configured skips reported separately.

Use direct typed application metadata for CLI messages, router records, delegation and results. Preserve source provenance, cooperative wait capacity and durable replay identity; add live-model scenarios and WebUI graph validation.
@M09Ic M09Ic changed the title feat(inbox): add durable routing with fault-tested worker recovery feat(inbox): add durable routing and explicit IOA collaboration Nov 5, 2026
@M09Ic
M09Ic merged commit e0986c9 into master Nov 5, 2026
17 checks passed
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