fix(agent-org): stabilize real-provider lifecycle convergence - #1079
fix(agent-org): stabilize real-provider lifecycle convergence#1079ShiboSheng wants to merge 11 commits into
Conversation
Database compatibility follow-upThis PR currently contains two temporary compatibility paths for the immediately preceding schema manifest:
These paths exist only to preserve continuity for Stabilization development and packaged-app test sessions. They do not define the database upgrade or downgrade compatibility contract for this PR, and they do not change the current reset-only policy in the Design Doc. Follow-up plan: after the current 10-PR stack is complete, a dedicated database compatibility PR will define schema version detection, upgrades, downgrades, rollback, and data-preservation behavior as one coherent design. That PR must remove or replace the two temporary paths above and their temporary migration tests so they do not become an accidental long-term compatibility commitment. Until that follow-up lands, unknown or partially corrupted schemas must continue to fail closed. |
2582796 to
44beb36
Compare
44beb36 to
67bd3bf
Compare
ed43bc7 to
f8a5b4a
Compare
f8a5b4a to
c127623
Compare
c127623 to
4dbb1cd
Compare
0ffcc57 to
3bfa53b
Compare
3bfa53b to
76bca5e
Compare
Separate durable work episodes, route root group follow-ups through coordinator turns, enforce exact process finality, and preserve formal lifecycle recovery. Verification: - git diff --cached --check Refs #1051 Pre-commit hook ran. Total eslint: 5, total circular: 0
Pre-commit hook ran. Total eslint: 5, total circular: 0
Pre-commit hook ran. Total eslint: 5, total circular: 0
Pre-commit hook ran. Total eslint: 5, total circular: 0
Pre-commit hook ran. Total eslint: 5, total circular: 0
Preserve multi-episode task and plan history, enforce cancellation and duplicate-task invariants, and expose deferred task completion without false failures. Allow an idle Team to open a fresh episode after a cancelled outcome while keeping the previous episode certificate visible and authoritative. Pre-commit hook ran. Total eslint: 5, total circular: 0
Persist handoff decisions before slow shutdown work so Cancel, Keep stopped, Continue replacement, and Abandon episode remain recoverable and report their real in-progress state. Start TaskExecution only after its exact TaskAssigned input is materialized, preventing a worker wakeup from invalidating the Inbox row before Provider work begins. Verification: - cargo test -p agent_core --lib --quiet -- --test-threads=1 (3391 passed, 2 ignored) - cargo clippy -p agent_core --lib -- -D warnings - cargo check -p org2 - pnpm run typecheck - pnpm test -- src/engines/ChatPanel/InputArea/components/AgentOrgTaskPanel.test.ts --reporter=dot (23 passed) - pnpm exec eslint and prettier checks on changed frontend files - BuildFast packaged App completed Planner to Implementer to Tester with codexmaggie gpt-5.4-mini-medium and delivered Pre-commit hook ran. Total eslint: 5, total circular: 0
Keep the Reassign selector inside the overview ownership boundary, distinguish quiesced approval waits from uncertain live execution, and allow failed cleanup decisions to be retried or revised. Verification: - pnpm exec vitest run targeted Agent Org and Select suites — 27 passed - pnpm typecheck — passed - pnpm run lint — passed with 5 unrelated warnings - cargo test targeted handoff and task_update suites — 19 passed - cargo check -p agent_core — passed - cargo clippy -p agent_core --lib -- -D warnings — passed - pnpm tauri:build:fast:local — packaged app built and real codexmaggie reassignment dispatched without a new cleanup receipt - pnpm run check:circular — not passed because two pre-existing raw imports are unresolved - cargo clippy -p agent_core --all-targets -- -D warnings — not passed on an unrelated bool assertion in message/tests.rs Pre-commit hook ran. Total eslint: 5, total circular: 0
Separate Team phase from Coordinator activity, keep overview actions readable, and add consistent collapsible Plan history and Current work sections. Order plan revisions and terminal Tasks by canonical timestamps with bounded keyset pagination, including a strict compatibility upgrade for the previous runtime schema. Verification: - pnpm exec vitest run src/engines/ChatPanel/InputArea/components/AgentOrgTaskPanel.test.ts (25 passed) - pnpm run typecheck (passed) - pnpm exec eslint on changed frontend files (passed) - cargo check -p agent_core (passed) - cargo clippy -p agent_core --lib -- -D warnings (passed) - targeted Plan, Task pagination, scale, and schema suites (29 + 27 + 11 passed) - gate-enabled BuildFast packaged App with codexmaggie GPT 5.4 Mini (3/3 Tasks delivered) Pre-commit hook ran. Total eslint: 5, total circular: 0
76bca5e to
8134167
Compare
Problem
Fixes #1051
PR8F established formal Plans, receipts, completion certificates, and final summaries, but the real packaged-App journey still exposed gaps between message delivery, Task execution ownership, cancellation and reassignment, work-episode closure, and historical presentation.
Those gaps could reject a second Group mission, mix new work into an unresolved episode, leave terminal Tasks stuck in Needs attention, repeat Planner work, lose Member round history, or require manual intervention after execution had already become safe and terminal.
Solution
This PR is stacked on the PR8F head in #1052 and stabilizes the complete lifecycle as one review unit:
The Agent Org redesign rollout gate remains closed. This PR stays Draft until stacked review and final acceptance are complete.
Potential risks
Verification
Rollout and rollback
Keep this PR and #1052 Draft with the redesign gate closed. If review or additional acceptance finds a regression, close the gate and revert the stabilization commits from this branch. The schema change is additive and preserves existing rows, so rollback does not require destructive data cleanup.