Skip to content

feat(memory,subagent): add A* node cap and sub-agent fleet registration#4377

Merged
bug-ops merged 5 commits into
mainfrom
astar-node-cap-fleet-reg
May 18, 2026
Merged

feat(memory,subagent): add A* node cap and sub-agent fleet registration#4377
bug-ops merged 5 commits into
mainfrom
astar-node-cap-fleet-reg

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented May 18, 2026

Summary

Changed files

  • crates/zeph-memory/src/graph/retrieval_astar.rsMAX_GRAPH_NODES constant + cap_node_map helper + 2 unit tests
  • crates/zeph-subagent/src/fleet.rs — new FleetRegistry trait + SharedFleetRegistry type alias
  • crates/zeph-subagent/src/manager.rs — fleet registration wiring + 3 unit tests with MockFleetRegistry + Notify-based synchronisation
  • crates/zeph-subagent/src/lib.rs — re-export fleet module
  • src/fleet_session.rsSqliteFleetRegistry impl
  • src/runner.rs — wire set_fleet_registry after manager construction

Test plan

  • cargo nextest run --workspace --lib --bins — 9884 passed, 21 skipped
  • cargo clippy --workspace -- -D warnings — clean
  • cargo +nightly fmt --check — clean
  • Unit tests cover: truncation path (>500 nodes), register_active on spawn, mark_terminal(Completed) on collect, mark_terminal(Cancelled) on cancel and cancel_all

Closes #4368
Closes #4370

@github-actions github-actions Bot added enhancement New feature or request size/XL Extra large PR (500+ lines) documentation Improvements or additions to documentation memory zeph-memory crate (SQLite) rust Rust code changes core zeph-core crate dependencies Dependency updates and removed size/XL Extra large PR (500+ lines) labels May 18, 2026
Add MAX_GRAPH_NODES (500) constant to zeph-memory graph retrieval: node_map
is truncated to the highest-scored nodes before the A* inner loop, bounding
worst-case complexity from O(seeds × n²) to O(seeds × n log n). Closes #4368.

Introduce FleetRegistry trait and SqliteFleetRegistry adapter in zeph-subagent.
SubAgentManager now calls register_active on spawn and mark_terminal on
completion or cancellation, making sub-agents visible in the fleet dashboard.
cancel_all also marks sessions as cancelled during shutdown. Closes #4370.
@bug-ops bug-ops force-pushed the astar-node-cap-fleet-reg branch from b7a3454 to a9949cc Compare May 18, 2026 16:25
@github-actions github-actions Bot removed core zeph-core crate dependencies Dependency updates labels May 18, 2026
@bug-ops bug-ops enabled auto-merge (squash) May 18, 2026 16:25
@github-actions github-actions Bot added the size/L Large PR (201-500 lines) label May 18, 2026
@bug-ops bug-ops merged commit 5429bd4 into main May 18, 2026
32 checks passed
@bug-ops bug-ops deleted the astar-node-cap-fleet-reg branch May 18, 2026 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request memory zeph-memory crate (SQLite) rust Rust code changes size/L Large PR (201-500 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

subagent: spawned sub-agents not registered in fleet agent_sessions table retrieval_astar: O(seeds × all_nodes) A* loop has no node-count cap

1 participant