fix(orchestration): repair main build after #4249/#4430 squash-merge#4432
fix(orchestration): repair main build after #4249/#4430 squash-merge#4432senamakel wants to merge 3 commits into
Conversation
…ansai#4430 squash-merge The TinyAgents migration (tinyhumansai#4249) squash-merged on top of tinyhumansai#4430's subconscious orchestration layer, but the pre-integration merge state landed: tinyhumansai#4430's wake graph still references SqlRunLedgerCheckpointer (deleted by the migration in 04.3) and the new frontend_agent/reasoning_agent registrations pass a bare graph_fn while the migration made that field Option<fn() -> AgentGraph>. main does not compile (E0432 unresolved import + E0308 mismatched types). Restore the fixes that never reached main: - agent_registry/agents/loader.rs: wrap the two orchestration graph_fn entries in Some(...). - orchestration/{graph/mod.rs, ops.rs test, graph/state.rs doc}: port the wake graph off the retired SqlRunLedgerCheckpointer to the crate SqliteCheckpointer at a dedicated orchestration_checkpoints.db, mirroring agent_orchestration/ delegation.rs. main + this fix compiles clean. Claude-Session: https://claude.ai/code/session_0137dT9i1vLjeUQZ3mj8ZAct
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughOrchestration checkpointing now uses a SQLite-backed database file, with matching documentation and test updates. The builtin agent registry now wraps two graph functions in ChangesOrchestration checkpoint migration
Agent registry and runtime resource updates
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
rustfmt keeps the config.workspace_dir.join(...) binding on one line; satisfies the Rust Quality (fmt) gate. Claude-Session: https://claude.ai/code/session_0137dT9i1vLjeUQZ3mj8ZAct
With the build restored, two pre-existing failures from the tinyhumansai#4249/tinyhumansai#4430 merge seam now run: - mcp_server/resources.rs: tinyhumansai#4430 added frontend_agent + reasoning_agent to the agent BUILTINS but not to RESOURCE_CATALOG, so catalog_mirrors_builtins and read_resource_returns_content_for_each_subagent panicked. Add both entries (using each agent's prompt.md). - app_state/ops.rs: the tinyhumansai#4249 profiling fix raised RUNTIME_SNAPSHOT_TTL to 10s, breaking app_state_snapshot_degrades_runtime_service_status_failures, which ages the process-global runtime cache out with a 2100ms sleep. Revert the TTL to 2s — the single-flight gate is the real stampede cure; the TTL only sets how often a coalesced rebuild runs, so 2s keeps status fresh and honors the test's age-out contract with no perf regression. Verified: mcp_server::resources 9/9, app_state::ops 17/17, and the e2e app_state_snapshot_degrades... 1/1 against the mock backend. Claude-Session: https://claude.ai/code/session_0137dT9i1vLjeUQZ3mj8ZAct
Summary
mainbuild, which does not compile after the TinyAgents migration (Improve agent harness with LangGraph-style state machine or Polaris-like architecture #4249) squash-merged on top of the subconscious-orchestration layer (feat(orchestration): subconscious split-brain layer (stages 4-8) #4430).#4430's wake graph still imports/usesSqlRunLedgerCheckpointer, which the migration deleted (04.3) — ports it to the crateSqliteCheckpointer.#4430's newfrontend_agent/reasoning_agentregistrations pass a baregraph_fn, but the migration made that fieldOption<fn() -> AgentGraph>(08.4) — wraps them inSome(...).Problem
The two PRs were mutually incompatible at the seam and merged in an order that landed the pre-integration state on
main.cargo checkonmainfails with:E0432: unresolved import crate::openhuman::tinyagents::SqlRunLedgerCheckpointer(orchestration/graph/mod.rs,orchestration/ops.rstest) — the type was removed by the migration.E0308: mismatched types×2 (agent_registry/agents/loader.rs:294,300) — barefnwhereOption<fn()->AgentGraph>is expected.These fixes were prepared while resolving the migration branch's conflicts but did not reach
mainbecause the PR squash-merged at the pre-fix commit.Solution
agent_registry/agents/loader.rs: wrap the two orchestrationgraph_fnentries inSome(...).orchestration/graph/mod.rs,orchestration/ops.rs(test),orchestration/graph/state.rs(doc): drive the wake graph's durable checkpoints through the crateSqliteCheckpointerat a dedicated{workspace}/orchestration_checkpoints.db, mirroringagent_orchestration/delegation.rs. Pre-swap in-flight wake graphs simply expire (orphaned tasks reconciled at boot per 07.2).Verified:
main + this fixcompiles clean (both Cargo worlds); 366 tests pass across the touched areas (orchestration::*,agent_registry::agents::loader).Submission Checklist
ops.rswake-cycle test now asserts persistence viaSqliteCheckpointerreading the sameorchestration_checkpoints.dbthe graph writes (happy path + the disabled/empty short-circuits are covered upstream).orchestration::*cycle tests (checkpointer construction + list) and the registry loader parse tests.N/A: build-repair, no feature behaviour change.## Related—N/A: no feature IDs.N/A: internal checkpointer wiring only.N/A: no dedicated issue; fixes the #4249/#4430 merge seam.Impact
openhuman) and, transitively, the Tauri host. No runtime behaviour change beyond the durable-checkpoint store location for the subconscious wake graph (orchestration_checkpoints.dbinstead of the retired run-ledger table).SqlRunLedgerCheckpointerread the old table.Related
AI Authored PR Metadata (required for Codex/Linear PRs)
Linear Issue
Commit & Branch
https://claude.ai/code/session_0137dT9i1vLjeUQZ3mj8ZAct
Summary by CodeRabbit
New Features
Bug Fixes
Performance