Skip to content

chore(fleet_stats): drop unused _SECTION_ORDER - #373

Open
t11z wants to merge 1 commit into
mainfrom
claude/relaxed-fermat-vcz0i8
Open

t11z wants to merge 1 commit into
mainfrom
claude/relaxed-fermat-vcz0i8

Conversation

@t11z

@t11z t11z commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator

What & why

Scheduled dead-code audit. One removal this run:

  • Removed (high confidence): _SECTION_ORDER in kenny-server/kenny_server/fleet_stats.py. The private severity-rank map has no reader in the server, the tests, the dashboard or the scripts — its definition is the only occurrence of the name in the repository.

Nothing was flagged with a POSSIBLY DEAD comment this run: every other medium-confidence candidate is already flagged on main or in an open audit PR (#372, #369, #363, #358, #351, #342, #332).

Looked at and left alone

Candidate Why it stays
chat.CHAT_EVENT_TYPES Read only by tests, by design: it is the server half of the chat-event seam that tests/test_chat_event_seam.py checks against the console's ChatEvent union.
TicketCallback.armed_at / ended_at / ended_by, BuiltSpecRow.deleted_by, Ticket.assignee_user_id / blocked_nudged_at, approval decided_at Never read as attributes, but they leave through asdict() in the public payloads.
nvidia::query, proc::run_ok (agent) Unused in a Linux build; the Windows thermals source calls nvidia::query, which calls run_ok.
collectors::section_names (agent) Test-only, and already annotated as such at its allow(dead_code).
~70 dashboard exports with no importer Each is used inside its own file — over-exported, not dead.

How it was scanned

  • Server: vulture at 60 % confidence plus a cross-reference of every top-level name and method against production sources.
  • Agent: cargo build is warning-free; the two blanket allow(dead_code) attributes (nvidia.rs, section_names) were lifted temporarily to see what the compiler reports, then restored. Linux target only — no Windows target is installed here.
  • Dashboard: a cross-reference of every export against the other source files. knip could not be run in this environment.

Checklist

  • Tests pass: pytest -q (server) — 4256 passed, 6 skipped. cargo test not run; no agent code changed.
  • Lint/format clean: ruff check on the touched file
  • If the wire contract changed — not applicable
  • If the change is architectural — not applicable
  • Docs updated where relevant — not applicable
  • Commits are signed off (DCO: git commit -s) — not signed off

Generated by Claude Code

The private severity-rank map has no reader anywhere in the server, the
tests, the dashboard or the scripts; nothing in fleet_stats orders
sections by it.

Not user-visible: no aggregate, payload or dashboard output changes, so
the docs and screenshots mapped to fleet analytics are unaffected.
[skip-doc-drift]

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QcqxZQQV6RrEssL7fiA8n2
@t11z
t11z force-pushed the claude/relaxed-fermat-vcz0i8 branch from 2af3050 to d0218a3 Compare November 26, 2026 08:08

This branch has not been deployed

No deployments
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.

2 participants