Skip to content

Add _require_fleet() Guards to Fleet Telemetry/Cleanup Tools#3362

Merged
Trecek merged 2 commits into
developfrom
add-require-fleet-guards-to-fleet-telemetry-cleanup-tools/3339
May 31, 2026
Merged

Add _require_fleet() Guards to Fleet Telemetry/Cleanup Tools#3362
Trecek merged 2 commits into
developfrom
add-require-fleet-guards-to-fleet-telemetry-cleanup-tools/3339

Conversation

@Trecek
Copy link
Copy Markdown
Collaborator

@Trecek Trecek commented May 31, 2026

Summary

Four MCP tools (get_pipeline_report, get_token_summary, get_timing_summary, get_quota_events) carry the fleet tag 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 that FLEET_TOOLS call _require_fleet(). batch_cleanup_clones is explicitly excluded because it legitimately serves L2 orchestrator sessions (e.g., process-issues skill).

Acceptance Criteria

  • get_pipeline_report, get_token_summary, get_timing_summary, get_quota_events call _require_fleet() after _require_enabled()
  • batch_cleanup_clones is NOT modified (retains only _require_enabled())
  • Each guarded tool returns headless_error when called from non-fleet sessions
  • Each guarded tool still works when called from fleet sessions with an open gate
  • Guard tests added for all 4 guarded tools
  • batch_cleanup_clones continues 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.py
  • tests/arch/test_layer_enforcement.py
  • tests/infra/test_schema_version_convention.py
  • tests/server/test_tools_status_kitchen.py
  • tests/server/test_tools_status_mcp_response.py
  • tests/server/test_tools_status_quota_and_db.py
  • tests/server/test_tools_status_summaries.py

Closes #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 Model count uncached output cache_read peak_ctx turns cache_write time
plan* opus[1m] 1 104 15.3k 2.7M 155.7k 154 77.7k 14m 1s
review_approach* sonnet 1 52 5.0k 181.6k 42.1k 58 31.0k 3m 38s
verify* sonnet 1 78 8.7k 336.8k 55.0k 97 36.5k 3m 35s
implement* sonnet 1 9.1M 46.0k 3.1M 31.0k 241 47.2k 37m 30s
audit_impl* sonnet 1 76 10.7k 273.8k 40.8k 69 34.2k 4m 16s
prepare_pr* sonnet 1 77.2k 3.4k 213.8k 31.0k 20 15.8k 1m 25s
compose_pr* sonnet 1 42.5k 1.9k 182.8k 31.0k 14 15.5k 44s
review_pr* sonnet 1 249 29.8k 837.9k 78.1k 80 62.4k 6m 33s
resolve_review* sonnet 1 173 6.9k 1.0M 60.5k 47 45.1k 3m 38s
Total 9.2M 127.6k 8.8M 155.7k 365.5k 1h 15m

* Step used a non-Anthropic provider; caching behavior may differ.

Token Efficiency

Step LoC Changed cache_read/LoC cache_write/LoC output/LoC
plan 0
review_approach 0
verify 0
implement 0
audit_impl 0
prepare_pr 0
compose_pr 0
review_pr 0
resolve_review 13 79709.5 3468.7 531.5
Total 13 679535.7 28113.4 9817.4

Model Usage Breakdown

Model steps uncached output cache_read cache_write time
opus[1m] 1 104 15.3k 2.7M 77.7k 14m 1s
sonnet 8 9.2M 112.3k 6.2M 287.8k 1h 1m

Trecek and others added 2 commits May 30, 2026 17:44
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>
@Trecek Trecek force-pushed the add-require-fleet-guards-to-fleet-telemetry-cleanup-tools/3339 branch from fa32a87 to 2426246 Compare May 31, 2026 00:45
@Trecek Trecek added this pull request to the merge queue May 31, 2026
Merged via the queue into develop with commit 1a30802 May 31, 2026
3 checks passed
@Trecek Trecek deleted the add-require-fleet-guards-to-fleet-telemetry-cleanup-tools/3339 branch May 31, 2026 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant