Add _require_fleet() Guards to Fleet Telemetry/Cleanup Tools#3362
Merged
Trecek merged 2 commits intoMay 31, 2026
Merged
Conversation
get_pipeline_report, get_token_summary, get_timing_summary, and get_quota_events carry the fleet tag but only enforced _require_enabled(). Add _require_fleet() guard after _require_enabled() matching the dispatch_food_truck/record_gate_dispatch pattern. Add per-tool guard tests and an AST arch test enforcing FLEET_TOOLS call _require_fleet(). batch_cleanup_clones is exempt (serves L2 orchestrator sessions). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…n test_tools_status_kitchen.py Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fa32a87 to
2426246
Compare
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.
Summary
Four MCP tools (
get_pipeline_report,get_token_summary,get_timing_summary,get_quota_events) carry thefleettag but only enforce_require_enabled()— they lack the_require_fleet()guard. This plan adds the fleet guard to those 4 tools, adds per-tool guard tests, and adds an AST arch test enforcing thatFLEET_TOOLScall_require_fleet().batch_cleanup_clonesis explicitly excluded because it legitimately serves L2 orchestrator sessions (e.g.,process-issuesskill).Acceptance Criteria
get_pipeline_report,get_token_summary,get_timing_summary,get_quota_eventscall_require_fleet()after_require_enabled()batch_cleanup_clonesis NOT modified (retains only_require_enabled())headless_errorwhen called from non-fleet sessionsbatch_cleanup_clonescontinues to work in L2 orchestrator sessions (process-issues not broken)Conflict Resolution Decisions
The following files had merge conflicts that were automatically resolved.
Changed Files
Modified (●):
src/autoskillit/server/tools/tools_status.pytests/arch/test_layer_enforcement.pytests/infra/test_schema_version_convention.pytests/server/test_tools_status_kitchen.pytests/server/test_tools_status_mcp_response.pytests/server/test_tools_status_quota_and_db.pytests/server/test_tools_status_summaries.pyCloses #3339
Implementation Plan
Plan file:
/home/talon/projects/autoskillit-runs/impl-20260530-161451-271542/.autoskillit/temp/make-plan/add_require_fleet_guards_plan_2026-05-30_163500.md🤖 Generated with Claude Code via AutoSkillit
Token Usage Summary
* Step used a non-Anthropic provider; caching behavior may differ.
Token Efficiency
Model Usage Breakdown