feat(agent-org): add authoritative team lifecycle - #834
Draft
ShiboSheng wants to merge 1 commit into
Draft
Conversation
Establish durable Starting materialization receipts and a centralized quiescence boundary so Working teams enter Idle only from committed facts. Keep Run View pure-read, bound the global watchdog, and stop frontend polling for hidden or non-pollable teams behind one fail-closed rollout gate. Verification: - cargo clippy --all-targets -- -D warnings - Packaged Tauri Command+5 foreground, hidden, and restore lifecycle passed - Run View refresh left the isolated database byte-identical Pre-commit hook ran. Total eslint: 0, total circular: 0
This was referenced Aug 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Replaces #824.
Fixes #756.
Agent Org did not have one authoritative, restart-safe lifecycle boundary for a long-lived Team. Initial materialization, quiescence, Run View reads, watchdog recovery, and frontend polling could not yet guarantee that a Team moves safely through
Starting -> Running/Idle/Failed, becomes quiet inIdleorFailed, and can later be extended without introducing another state owner.Solution
This branch starts from
origin/developat641c43c8a37edfb89fb5b07d61bad7083c3bca18and contains one adapted commit only.Startingmaterialization receipts and authoritative lifecycle transitions.Idleonly from committed facts.The resulting PR1 boundary does not add Pause/Resume, Archive/Delete, the Task FSM rewrite, Writer settings, UserDirectedWork, or Group-send behavior.
Potential risks
runningalthough the coordinator and all four Members wereidle, all materializations had succeeded, and tasks, unread inbox entries, and interventions were all zero.Idleprecondition. This PR must remain Draft until the convergence defect is fixed and that measurement is rerun.Architecture and performance audit
Reviewed compilation, structure, lifecycle semantics, fail-closed branches, persistence ownership, naming, wire compatibility, initialization parity, and launch/run-view resolver symmetry. The selected change keeps one bounded global watchdog, bounded recovery budgets, and shared polling ownership; it introduces no per-component polling owner or unbounded cache.
Verification
Passed on this PR tip:
cargo check -p agent_core -p org2 -p session_persistence --all-targetscargo test -p agent_core agent_org -- --nocapture— 237 passed.pnpm run typecheckagentOrgRunViewStore.test.ts— 12 passed.git diff --check origin/develop...HEADThe complete stacked tip was also verified after PR3 was added; those results are recorded in #836.
The stacked packaged app was rebuilt successfully with the redesign compiled and enabled:
ORGII_AGENT_ORG_REDESIGN=1 WEBDRIVER=1 pnpm run tauri:build:fast -- /private/tmp/ORG2-stack-834-836.app— passed in 364.3 seconds.cargo fmt --all -- --checkreports formatting differences already present onorigin/developin untouched files. No changed file in this PR contributes to that output.Commit provenance
7beec790733035741ed7c5591d31e2a8264bea3b-> adapted commit239702009cab1d60baa288a2120cfee0df1b3891, authored by Shibo Sheng.