Skip to content

feat(agent): unify model-aware collaboration and retire unused paths - #921

Merged
XuPeng-SH merged 9 commits into
matrixorigin:mainfrom
XuPeng-SH:feat/subagent-model-selection-catalog
Oct 2, 2026
Merged

XuPeng-SH merged 9 commits into
matrixorigin:mainfrom
XuPeng-SH:feat/subagent-model-selection-catalog

Conversation

@XuPeng-SH

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

Copy link
Copy Markdown
Collaborator

Summary

Unify model-aware subagent collaboration around the existing agent/run backbone:
candidate-aware authorized model selection, parent/child messaging, completion
adoption, execution evidence, and bounded private harness event archives.
Retire unused product and tool paths rather than retain compatibility adapters.

This remains a draft. The latest milestone repairs the observed CI failures and
consolidates CLI test execution without dropping test identities. It does not
certify that all product issues, scale targets, or cleanup goals are complete.

User-visible behavior and ownership

  • Explicit model selection preserves authorization and run identity. Auto is
    unavailable where the current entrypoint cannot support it; no silent fallback.
  • Parent/child collaboration uses the existing RunEngine, messaging, admission,
    and observation owners, not a second agent lifecycle.
  • Retire optional Evaluation analytics and Harness/Skillify authoring/publishing;
    retain normal skills, runtime evidence, usage facts, and the real test harness.
  • Remove unregistered CLI context/notebook/config islands. Governed session
    configuration, introspection, and reflection remain.
  • Text-based rename is preview-only and labeled non-semantic. Modification
    requires the semantic LSP path.
  • Reuse the builtin-registry cache; cache misses no longer hash an entire file
    before determining whether cached content exists.
  • Private harness event retention is opt-in and bounded, separate from ordinary
    reports. No credentials, populated environment files, or private traces are
    included in this PR.
  • Fresh-system contract: no compatibility shims, migration paths, dual writes,
    or deletion/reset of existing user databases.

Latest CI repair and efficiency milestone

Three confirmed causes from the failing Test Suite run were addressed:

  1. Runtime stack overflow: restore one boxed allocation boundary on the
    shared subrun execution future for both direct and trait callers. No larger
    CI stack, timeout increase, or changed execution/authorization semantics.
  2. Online fanout fixtures: supply the required candidate-assessment provider
    through a shared loopback HTTP/SSE fixture, and test actual asynchronous
    completion rather than treating a start receipt as a complete result.
    Assertions check the parent's captured synthesis input, exact launched-child
    identities, complete results/failures, cross-user/session isolation,
    settlement, cancellation, and durable lineage.
  3. Grep fixture: exercise more than the default match-count limit while
    respecting the independent output-byte budget. Production limits unchanged.

CLI CI now builds the normal mock MCP server and runs the entire unfiltered
CLI library/binary test inventory once. Five existing protected labels gate
that same execution; they no longer repeat setup or download/extract a test
archive. Failure, cancellation, or an unexpected required skip fails closed.
Cache trust, test profile, feature coverage, concurrency and timeout bounds
remain unchanged. JUnit evidence is retained on success and failure.
Rerunning this job repeats its combined build/test work; there is no archived
execution fallback. Other test jobs retain independent parallel execution.

This removes archive creation/transfers/extraction and redundant consumer
setup. It does not yet prove a reduction in total workflow elapsed time or
billed runner resources
: the previous critical path was online integration,
not the CLI consumers. Compare the next remote run before claiming those gains.

Verification

Follow-up: fanout acceptance and disk cleanup

Commit: cc4b582390f432dff9353b7c6b9df285b14abeee.

The remote run at 9722a717b passed Runtime, CLI, and static checks, but online
integration still failed one concurrent fanout case. Its total elapsed time was
21m54s versus 19m54s previously; overall CI acceleration was not established.

Real MatrixOne reproduction exposed the cause: the shared output adapter used
group_id plus results to guess a fanout response. A successful start carries
agents, so it was incorrectly classified as agent_incomplete. A later
successful wait supplied assessment evidence for this false failure, opening an
unnecessary completion-action window and leaving the parent paused.

The adapter now receives the canonical tool identity from its callers. Valid
accepted start receipts remain neutral control acknowledgements, while actual
partial failures, rejection, unknown execution, and child-settlement obligations
remain enforced. Its oracle now also checks the root run_finished status before
checking durable state. Repeated testing exposed a separate fixture exhaustion:
terminal child batches can legitimately supersede an in-flight response. The
same tool prefix now has at most target_count + 1 text-only candidates, and
capture assertions select the actual accepted final round. No repeated tools,
sleeps, larger timeout, or weaker child/context/durability assertions were added.

The shared Rust setup now skips its existing cleanup when the workspace
filesystem has at least 30 GiB free. Low, invalid, or failed measurements retain
cleanup. The previous cleanup took 166.5 seconds while reclaiming only 1.863 GB
and leaving approximately 105 GB free. Cache paths, build/test inventory,
parallelism, timeouts, and runner allocation are unchanged. Actual remote
wall-time and runner-resource improvements still require a new run.

Focused adapter and real-database regression checks passed (9/9), as did 44 CI
configuration contracts, including mocked above/equal/below/invalid/failed disk
measurements. All four online scenarios (concurrent owner/session isolation,
failed children, parent cancellation, and normal synthesis) passed five
consecutive iterations: 20/20. These use a real MatrixOne database and
scripted provider responses, not paid live-model calls.
Final formatting, repository metadata checks, and affected runtime/integration
Clippy with warnings denied passed. Independent gpt-6-astra / xhigh review
accepted the final eight-file candidate. Remote CI for this commit is pending;
no elapsed-time or resource reduction is claimed yet.

Previous milestone evidence

Latest CI milestone: 9722a717ba11d1d0736fd52f40542dc6ddba19ff.

Latest candidate validation:

  • Complete CLI workflow command: 5,209/5,209 passed, nine normally ignored;
    test execution 79.730 seconds. The unfiltered test identity set exactly equals
    the union of the previous five partitions: zero omitted or repeated.
  • All four originally failing online fanout cases passed against an actual
    isolated MatrixOne database, using the strict online CI profile: 16.997 seconds.
  • Four affected shared-fixture offline Web/runtime regressions passed:
    31.344 seconds. These use normal production entrypoints and deterministic
    loopback provider responses, not paid live model calls.
  • Both original runtime stack-overflow regressions passed with
    RUST_MIN_STACK unset/default; 30 focused grep contracts also passed.
  • Three existing fanout result/failed-result/terminal-manifest contracts passed
    with the default stack, preserving coverage of the result-reading owner.
  • 108 CI-script contracts, actionlint, repository metadata checks, Rust
    formatting, and diff hygiene passed.
  • Targeted runtime library and affected integration-test Clippy passed with
    warnings denied.
  • Independent precommit review configured/requested gpt-6-astra / xhigh
    accepted the frozen 13-file diff after the captured-input decoder repair;
    hidden backend identity is not independently attested.

These local execution times are validation evidence, not remote workflow
benchmarks. A new remote CI result is still required.

Prior clean live-model evidence at 0df82c9f7: real DeepSeek Flash to authorized
GLM 5.2 delegation passed the minimal arithmetic, natural model-alias, and
missing-model cases (11.765, 11.276, and 8.823 seconds respectively). Reported
primary-request cache-read ratios were 94.6%, 93.9%, and 95.7%. Parent/child
identity and Explain evidence were checked. These single samples do not certify
whole-tree monetary cost, p95 latency, or thousand-session capacity.

Reproduction: see
crates/astra-test-harness/cases/subagent_model_selection/README.md.
Use normal model registration and matching clean CLI/Server/harness builds;
keep diagnostic artifacts private. The CI changes do not add database
operations to the production path.

Remaining readiness work

  • Required remote CI must pass; overall elapsed/resource improvements must be
    measured rather than inferred from removing jobs or lines.
  • Workspace-binding consolidation, shared file-commit consistency, LSP
    workspace-edit/lifecycle unhappy paths, SQL mutation classification, and
    bounded read/query work remain follow-ups. File-edit cleanup is paused while
    this CI milestone is delivered.
  • Persistent waiting-parent scale, complete historical whole-tree cost, and
    the large cleanup target are not certified complete.
  • A prior harness hash mismatch remains unclassified; a subsequent successful
    sample does not erase the historical failure.

Checklist

  • Owning entrypoints and affected unhappy paths exercised.
  • CI documentation updated; protected check identities preserved.
  • No credentials, private endpoints, or unsanitized traces in the diff.
  • Feature-branch delivery only; no default-branch mutation.
  • Remaining readiness work and required remote CI complete.

XuPeng-SH added 9 commits October 2, 2026 08:49
Consolidate execution ownership and retire dormant frameworks and product workflows. Preserve authorization, observation, prompt-cache evidence and private harness child streams through existing owners.
Classify agent control output using trusted tool identity so accepted fanout starts do not create false incomplete outcomes. Keep real child failures and unknown execution fail-closed.

Bound scripted synthesis candidates by child count and verify the accepted final request. Skip shared runner cleanup only with at least 30 GiB workspace free space; retain all test and cache coverage.

Validated with 20 real-DB fanout runs, eight adapter tests, 44 CI contracts, formatting, metadata checks and warnings-denied Clippy. Reviewed with gpt-6-astra xhigh.
@XuPeng-SH
XuPeng-SH marked this pull request as ready for review October 2, 2026 12:39
@XuPeng-SH
XuPeng-SH merged commit a98c630 into matrixorigin:main Oct 2, 2026
@XuPeng-SH
XuPeng-SH deleted the feat/subagent-model-selection-catalog branch October 2, 2026 13:17
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