Skip to content

refactor(agents): retire Team product and simplify multi-agent runtime - #962

Merged
XuPeng-SH merged 2 commits into
matrixorigin:mainfrom
XuPeng-SH:fix/team-tui-complete-journey
Oct 8, 2026
Merged

XuPeng-SH merged 2 commits into
matrixorigin:mainfrom
XuPeng-SH:fix/team-tui-complete-journey

Conversation

@XuPeng-SH

@XuPeng-SH XuPeng-SH commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Retire the Team product surface (CLI/TUI/HTTP, Team persistence/configuration, Team-only tests and docs); keep the generic multi-agent backbone and Work.
  • Preserve shared delegation/spawn, model authorization, messaging, child supervision, pause/resume/cancel, durable recovery and result adoption. No parallel Team execution lifecycle remains.
  • Fix a real Work failure found during harness validation: a successful start_work result could be rendered as an artifact reference when its payload exceeded the journal display bound. Lifecycle reconciliation then missed the receipt and rejected the turn before spawning children. The runtime now captures a typed, exact-call-bound receipt before artifact presentation; it remains runtime-only (no DB write, prompt injection or extra DB read).
  • Fix a harness false negative: bounded CLI stream gap/truncation diagnostics no longer invalidate independently fetched canonical Server execution evidence. Identity, owner, canonical completeness and lifecycle checks remain enforced.
  • Against PR base main at 2fd7f8b: 198 files changed, 17,232 insertions and 20,462 deletions (net −3,230 physical lines).
  • Path-based change accounting: non-test source/config −4,196 lines; dedicated tests and harness +1,077; docs −111. Rust inline cfg(test) blocks are counted with their source files, so these are transparent file-role totals, not a parser-level split of inline tests.

Validation

  • Model-selection harness: 19/19 passed in one serial run; DeepSeek Flash parent with authorized GLM 5.2/Qwen 3.7 child routes. This does not certify child-inclusive cost.
  • TUI journey suite: 13 passed, 0 failed, 2 opt-in ignored.
  • Real DeepSeek Flash Work journey: 1/1 passed (110.76s), covering dependent delegated Work, client restart/resume, same-Work revisions and artifact verification.
  • Full harness after the evidence fix: cargo test -p astra-test-harness --lib, 583 passed, 0 failed; focused regression 1 passed, 0 failed.
  • Runtime regressions for typed receipt retention, exact identity, successful/failed establishment, deferred effects and durable recovery: 7 targeted tests passed.
  • gpt-6.1-sol xhigh reviewed shared spawn/delegation authority, Work receipt, and persistence paths without finding an evidenced P1/P2; this was not an exhaustive line-by-line review of all CLI/TUI, inference, migration, or cross-version recovery paths. Its separate review of the final harness fix also found no blocker, and the wording feedback was addressed.
  • cargo clippy -p astra-runtime --all-targets -- -D warnings, cargo fmt --all -- --check, and git diff --check passed.
  • Latest PR-head checks are pending; none had failed when this update was written. Earlier selected lanes passed (Web and SDK path-skipped).

The live Work failure was fixed at the receipt boundary, not hidden by a scenario-specific fallback.

@XuPeng-SH
XuPeng-SH force-pushed the fix/team-tui-complete-journey branch from e9b79f1 to 21c84dc Compare October 8, 2026 01:02

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_work captures 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.

@XuPeng-SH
XuPeng-SH merged commit 6d20ca8 into matrixorigin:main Oct 8, 2026
@XuPeng-SH
XuPeng-SH deleted the fix/team-tui-complete-journey branch October 8, 2026 01:42
gouhongshen pushed a commit to gouhongshen/Astra that referenced this pull request Oct 15, 2026
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.
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