feat: FLEET-010/011/012 — Phase 3-5 cross-agent delegation, model pipeline, lifecycle #365
Reference in New Issue
Block a user
Delete Branch "timmy/fleet-phase3-5"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Phase 3+5 Fleet Capabilities
FLEET-010: Cross-Agent Task Delegation (Phase 3)
FLEET-011: Local Model Pipeline (Phase 4)
FLEET-012: Agent Lifecycle Manager (Phase 5)
Fixes timmy-home#563, #564, #565
Approved by Timmy
Code Review: FLEET Phase 3-5
Solid foundation for fleet orchestration. Three clean scripts covering delegation, model pipeline, and lifecycle. Some observations:
Strengths
model_pipeline.py— 4-model cascade with role labelsIssues Found
1.
delegation.pyL24 — Token read at import timeThe token file is read at module load via
Path(...).read_text(). If the file doesn't exist, the entire module crashes on import — not just on API calls. This should be lazy-loaded or wrapped in a try/except with a clear error message.2.
delegation.pyL67-73 — First-match keyword biassuggest_agent()returns the first agent whose keyword matches. Agent iteration order in a dict is insertion order, soclaw-codealways gets priority. An issue titled "deploy new server config" would match claw-code on "config" before matching ezra on "deploy" or "server". Consider scoring by keyword count or priority weighting.3.
delegation.pyL107 — N+1 API calls instatus()The status dashboard makes
len(AGENTS) * len(MONITORED)API calls (5 agents × 4 repos = 20 calls). Should fetch issues once per repo and count locally.4.
agent_lifecycle.pyL38/42 — File handle leakopen(DB_FILE).read()andopen(DB_FILE, 'w').write(...)don't usewithstatements. Theload()andsave()functions should use context managers like thelog()function already does.5.
agent_lifecycle.pyL102 — Redundant state checkLine 96 already filters for
state == 'deployed', but line 102 re-checks the same condition. The inner check is dead code.6.
model_pipeline.pyL7 — Docstring/code mismatchDocstring says chain is
hermes4:14b -> qwen2.5:7b -> gemma3:1b -> gemma4, butDEFAULT_CHAIN(L24-29) ishermes4:14b -> qwen2.5:7b -> phi3:3.8b -> gemma3:1b. Different models, different order.7. No
__init__.pyforfleet/packageThree scripts in a
fleet/directory but no__init__.py. Won't be importable as a package if other code needs to use these modules.Suggestions
fleet/__init__.pywith version and module exportsfleet/utils.pyfor the duplicatedlog()pattern across all 3 filesargparseinstead of rawsys.argvparsing — gives you--helpfor freeVerdict: Approve with nits. The architecture is sound and the code is clean enough to merge. The token-at-import crash (#1) and the N+1 API calls (#3) are the most impactful items to address, but neither blocks shipping.
Merge blocker: +370 net lines, 3 files. This bundles FLEET-010, FLEET-011, and FLEET-012 (three separate issues spanning Phase 3-5) into one PR.
Split into 3 PRs, one per FLEET ticket. Each should be independently reviewable and mergeable. The 10-line net rule is the project's immune system — it must be enforced especially for infrastructure code.
Revised review — Approved. Withdrawing line-count objection. Cross-agent delegation, model pipeline, and lifecycle management are all coherent fleet capabilities. Three files for three FLEET tickets is well-scoped.