Repository navigation
refactor(agents): retire Team product and simplify multi-agent runtime - #962
Conversation
e9b79f1 to
21c84dc
Compare
XuPeng-SH
left a comment
There was a problem hiding this comment.
Deep commit review of 1808e54abee3fda4f8bb2dce7cbac65f43d1e824 against 2fd7f8be27593bc211e4d9a1acaad426335ac58f, including the final harness-evidence fix after 21c84dce.
No evidenced P1/P2 defect found in the reviewed paths. The source review supports this change; the latest-head CI still needs to finish before merging.
The review focused on shared delegation and recovery, inference admission/settlement around pause, guidance custody, parent/child completion, Work establishment, TUI identity boundaries, and the replacement harness oracles:
- Team retirement preserves valuable shared implementation. Generic spawn/fanout, HTTP delegation, builtin personas, model authorization, permission/depth limits, messaging and Work remain. Fork children retain non-delegating authority, including through the durable representation. Coordination prompts are retained under their generic name. Ordinary session commit hashing retains the old absent-field byte, avoiding an incidental recovery-identity change.
- Pause is handled as retained execution. Logical admission reuses the same uncommitted plan; recovery distinguishes confirmed absence from an already-settled identity. Physical admission retains the exact undispatched request, while guidance, cancellation, lease loss and the original deadline still fence it. Waiting releases capacity, and the existing control watcher supplies resume observation. Parent waiting preserves completed siblings and paused-child obligations without treating resume as completion.
- Guidance/result custody is substantive. A paused application acknowledgement retries the same input without advancing its cursor. Child completion carries applied guidance, uses durable winner data when ownership races, and bounds the aggregate pending notification. Oversized deliveries retain recoverable results rather than falsely acknowledging full adoption.
- The Work receipt fix belongs at this boundary.
start_workcaptures a typed runtime-only receipt before artifact/display transformation. Reconciliation checks the exact tool call, executed disposition and successful outcome; deferral additionally matches the cancelled operation. This does not introduce a DB read/write or put the receipt into the model prompt. - TUI actions retain their intended identity. Control receipts are scoped to owner/session/attachment/request, guides keep their original target and stop detached observation, and typed continuation text remains literal through queueing and restoration. Transcript reconciliation uses item/run identity rather than matching displayed text.
- The harness changes have useful regression value. The canonical capture is owner-scoped and bounded. Child proofs correlate launch identities, actual execution, terminal output, adoption and subsequent parent finalization; missing/contradictory evidence cannot count as success. The final fix permits presentation-side stream gaps while the load path still rejects owner conflicts and the oracle still requires verified identity and complete canonical evidence. Sampled negative cases retain unavailable-model/no-child checks and question/answer correlation.
On redundancy: verified total change is 198 files, +17,232/-20,462, net -3,230 physical lines. That alone does not establish simplicity, but the added pause, receipt, custody and evidence tests exercise distinct failure boundaries. I would retain these implementations and their focused regressions; deleting them merely to reduce added-line counts would remove useful behavior. This PR also includes meaningful runtime/TUI behavior changes, so it should be understood and validated beyond Team removal alone.
Validation performed here: python3 scripts/schema/test_schema_inventory.py — 47 passed; git diff --check 2fd7f8be HEAD — passed. No local Rust toolchain was available, so I did not rerun Rust suites or live-provider journeys. The PR's 583 harness tests, 19/19 model-selection run and live Work journey remain author-reported validation. Earlier-head major checks passed, but latest-head lint/runtime/online/terminal checks were still running at the last inspection; Web/SDK checks were skipped. Cross-version Team-run recovery, performance under load and child-inclusive cost were not independently exercised.
The runtime admission for a missing child model (e.g. glm-99.99) is a callable request-time validation failure, not a provider availability issue. The harness case's error_kind contract (introduced in matrixorigin#921, promoted unchanged in matrixorigin#962) has always required 'invalid_request' for missing models. After the harness switched the flash_missing_child_model_fail_closed case back to deepseek-v4.1-flash (matrixorigin#1006) and live regression runs actually exercised this path (matrixorigin#1003), the only criterion that fails is the error_kind mapping: the spawn produces 'tool_unavailable' while the contract requires 'invalid_request'. Preserve the distinction between 'the model catalog does not have an offering for this id' (user/request fault) and 'the upstream cannot reach the model' (provider availability fault). Update the mock-only runtime test to expect the aligned kind for missing offerings. This restores the case's fail-close semantics without changing anything else.
Summary
Validation
The live Work failure was fixed at the receipt boundary, not hidden by a scenario-specific fallback.