Skip to content

cleanup: remove verified dead code surfaced by the v0.8.2b3 assessment (tracker) #983

Description

@thinmintdev

Each item below was adversarially verified as unreachable/unused at runtime against HEAD. All are low-risk removals; the last two need a one-line "no live install depends on it" confirmation first.

  • slots/manager.py:1517-1529 route_for_request — compat wrapper; every prod caller (omni_router/filter.py:113, omni_router/dispatch.py:127) uses resolve_for_request. Only its own tests reference it. Remove (+ its tests) or drop the "callers that have not moved yet" framing.
  • providers/llama_server.py LlamaServerProvider — registered as _PROVIDERS["llama-server"] but get_provider() is only ever called with "comfyui" (api/routes/v1.py:1068). The llama path goes ContainerProvider.container_spec→_llama_launch_plan, never this provider. __init__.py:10 mis-describes it as "consumed by container profiles". Delete or demote to a clearly-labelled reference (stop registering it as dispatchable) and fix the docstring.
  • providers/base.py:292-400 Provider.render_systemd_override — no src caller (live renderer is container.py:_render_unit_from_plan). Worse, base.py:340 unpacks spec.mounts as 2-tuples but plans now carry frozen Mount dataclasses → TypeError; and it emits EnvironmentFile/${VAR} drop-ins that container.py:696-700 actively strips as legacy (Migration: clean stale lemonade-era hal0-slot@<name>.service.d drop-ins when converting slots to container runtime #694). A maintenance trap. Delete (+ _quote_for_systemd/_SYSTEMD_VAR_REF helpers + its test) or fix to coerce Mounts.
  • providers/flm.py:435 _FLM_PROBE_OK — write-only module global (assigned at 577/600/612, never read). Remove, or expose an accessor if "probe failed" vs "probe empty" needs distinguishing.
  • install/perms.py:124-189 hardened-flip branchesownership_table() is only ever called with the default service_user="root" (sole consumer: hal0 doctor); the non-root branches are live but unreachable since the hardened mode was removed. Confirm hal0 doctor never passes a non-root user, then collapse to the root-era table.
  • memory/migrate.py + hal0 memory migrate — dry-run only (cli/memory_commands.py:199-203 hard-fails --apply); its own docstring says the Cognee store has been dark since v0.4. ADR-0023 removed cognee. Confirm no live install carries hal0_memory_index.sqlite, then retire the module + command + _DEFAULT_COGNEE_DIR.

Related stale-comment cleanup: #776.


Filed from the v0.8.2b3 codebase assessment sweep; finding adversarially verified against HEAD (`chore/release-0.8.2b3`).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions