Skip to content

chore(hardware_catalog): flag queried_events and ATTRIBUTED_LINUX_KEYS as possibly dead - #372

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

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

Conversation

@t11z

@t11z t11z commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator

What & why

Scheduled dead-code scan. Comment-only: two POSSIBLY DEAD markers in kenny_server/hardware_catalog.py, no behaviour change.

Flagged (medium confidence)

Symbol Why
queried_events() No production caller. Only tests/test_hardware_catalog.py calls it, as the seam check between the agent's Windows query and ATTRIBUTED_EVENTS.
ATTRIBUTED_LINUX_KEYS No production reader. Attribution looks keys up in _LINUX_COMPONENTS directly; only the same test reads the set.

Both are the Windows/set-side siblings of queried_linux_keys, which #332 flags. They are flagged rather than removed because the tests that use them are seam checks, so deleting them is a decision about the test, not about dead code.

Removed (high confidence)

Nothing. No statically unreachable code turned up: cargo check --all-targets is warning-free, ruff check --select F passes, vulture reports no unreachable code, and knip reports no unused files or dependencies in kenny-web.

Skipped because an open PR already covers it

#369, #363, #358, #351, #342, #332 (for example the unused prop loop binding in stewards/builder.py, wait_previews, evidence_providers, count_running, pcie_width_regression, error_rate_rising, queried_linux_keys).

Looked at and left alone

  • chat.CHAT_EVENT_TYPES is test-only, and its own comment already says it exists for tests/test_chat_event_seam.py.
  • Row-mirror dataclass fields with no Python reader (deleted_by on steward specs, blocked_nudged_at, last_human_at, assignee_user_id on tickets): they mirror live columns, and ADR-0062 keeps assignee_user_id on purpose.
  • 19 exports and 36 exported types in kenny-web that knip lists are all used inside their own file; only the export keyword is surplus.
  • The agent's module-wide allow(dead_code) in nvidia.rs, disk_smart::core and os_support::cpu: with the allowances dropped, the 23 items that warn on Linux all have Windows-only callers.

Checklist

  • Tests pass: pytest -q (server) and cargo test (agent) — not run here; the session's Python environment lacks the server's dependencies (httpx). The change is comments only and the module parses.
  • Lint/format clean: ruff check passes on the touched file
  • Wire contract unchanged
  • Not architectural, no ADR
  • Docs: none needed
  • Commits are signed off (DCO) — not signed off, matching the existing commits on main

Generated by Claude Code

…S as possibly dead

Neither has a production reader: attribution checks ATTRIBUTED_EVENTS and
_LINUX_COMPONENTS directly, and only tests/test_hardware_catalog.py reads
these two, as the seam check against the agent's query list. Comment-only.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QcqxZNMaR9T12TRGzAjZaj

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