Repository navigation
Add an orphan-code gate and remove ignored MCP parameters and duplicated harness helpers #1017
Description
This was generated by AI during triage.
Current reconciliation, 5 October 2026
Checked against current main. Owner approved this realignment.
Mark deleted-frontend items resolved; narrow the remaining work.
The nine cited old files are gone and prism-react-renderer is absent. The two TanStack table/virtualisation packages are used by the replacement. Knip is still absent from frontend scripts and CI. McpApiClient.__init__ still accepts ignored tracer_name; harness_utils.py and golden_path_common.py still contain parallel helper implementations. Preserve those independent cleanup tasks, with the standalone-script dependency constraint considered before sharing helpers. Remove this issue as a prerequisite for the new UI accessibility work.
Completed through replacement
- The nine cited orphaned old frontend files were removed by feat(observatory): replace legacy UI in Phlo #1051.
-
prism-react-rendereris absent from the replacement dependencies. - Deleted-component accessibility items no longer block Establish accessibility checks for the bundled replacement Observatory #992/Make replacement Observatory lineage keyboard-accessible and provide a text alternative #993.
Do not delete @tanstack/react-table or @tanstack/react-virtual: the replacement uses both.
Remaining scope
- Configure an unused-file/dependency gate for the replacement, accounting for TanStack-generated routes and server entry points. Run it in CI.
- Remove the ignored MCP
tracer_nameparameter or make its intended tracer selection real, preserving supported callers. - Remove duplicate command/HTTP-wait/directory-removal implementations across the installed test harness and release-script helpers. Preserve scripts that intentionally run on a bare interpreter; do not add an installed-package dependency without checking those consumers.
Acceptance criteria
- The unused-code gate reports no unexplained orphans and fails for a deliberately introduced orphan.
- MCP tests prove tracer construction follows the retained constructor contract.
- The duplicated helper behaviours have one tested implementation or a documented necessary boundary; no unexplained clone remains.
- Replacement lint, typecheck, tests, and build, plus script/harness tests, pass.
Maintainer deferral is preserved. This is not a prerequisite for the replacement accessibility programme. Out of scope: deleting dependencies used by current tables/logs or unrelated helper consolidation.
Historical issue brief, superseded by the current scope above
Evidence baseline: e9d796e9e4c4e966bc3dea478e7ec5349a1e2f5c (2026-09-24)
Parent
Outcome
Orphaned files, unused dependencies, ignored parameters and duplicated implementations are removed, so readers only meet code that runs. knip runs in CI so orphans don't return.
Current behavior and root cause
Orphaned Observatory files. knip reports them, and rg confirms none has an importer. Paths are relative to packages/phlo-observatory/src/phlo_observatory/src/:
components/data/BranchSelector.tsxcomponents/data/QueryEditor.tsxcomponents/data/SavedQueriesPanel.tsxcomponents/data/TableBrowserVirtualized.tsxcomponents/GraphCanvas.tsxcomponents/hub/ServiceCard.tsxcomponents/NodeInfoPanel.tsxutils/sqlIdentifiers.tsutils/effectiveSettings.ts
Unused npm dependencies: @tanstack/react-table, @tanstack/react-virtual and prism-react-renderer. If #991 adopts react-virtual, keep that one and use it.
Ignored parameters (vulture): tracer_name in packages/phlo-mcp/src/phlo_mcp/api_client.py:27 is accepted but never used; get_tracer() is called without it. The break-glass denied_by and revoked_by parameters are handled in their own issue.
Duplicated implementations (jscpd). packages/phlo-testing/src/phlo_testing/harness_utils.py and scripts/golden_path_common.py share three clones, 349 lines in total: HTTP wait (:111 ↔ :191), command execution (:236 ↔ :346) and forced directory removal (:57 ↔ :62). Overall duplication is a modest 2.58%; this is the largest real duplicate.
Effect on other issues: #992 and #993 include accessibility items for TableBrowserVirtualized, SavedQueriesPanel and GraphCanvas. Deleting these files removes those items.
Implementation scope
- Delete the nine files and three dependencies, confirming lint, tsc, tests and the build still pass.
- Configure knip entries for TanStack routes and generated files so the report is clean, and run
knipin CI with a zero-issue gate. - Remove
tracer_name, or pass it through to the tracer if it's intended. - Give the harness helpers one home: the release scripts import
phlo_testing.harness_utils, or both import a small shared module.
Acceptance criteria
-
npx knipreports no unused files or dependencies, and it runs in CI. - jscpd shows no clone between
harness_utils.pyandgolden_path_common.py. - Observatory lint, tsc, tests and build pass;
tests/scriptsand phlo-testing tests pass.
Blocked by
None (can start immediately).
Activity
iamgp commentedon Sep 25, 2026
Deferred at maintainer request while Wave 2 prioritizes #1014 (credential redaction). This issue remains open for a later planning cycle; no technical blocker or completion date is asserted. Revisit its cleanup before the dependent accessibility work in #992 and #993.
[-]Delete orphaned Observatory files, unused dependencies and duplicated harness helpers[/-][+]Add an orphan-code gate and remove ignored MCP parameters and duplicated harness helpers[/+]