Skip to content

chore: remove dead code, orphan files, and stale CMake plumbing#100

Open
chiliec wants to merge 8 commits into
masterfrom
chore/dead-code-tier-a
Open

chore: remove dead code, orphan files, and stale CMake plumbing#100
chiliec wants to merge 8 commits into
masterfrom
chore/dead-code-tier-a

Conversation

@chiliec
Copy link
Copy Markdown
Member

@chiliec chiliec commented Apr 28, 2026

Summary

Tier A dead-code sweep across CMake, Dockerfiles, documentation, and one plugin. Rebased onto current master on 2026-05-20 after master picked up the witness→validator rename, the P2P network redesign, and the move of debug_node / private_message / mongo_db / etc. into examples-plugins/. Three original commits were dropped during the rebase (see "Dropped" below); the remaining 8 commits stand on their own and are individually reviewable.

Commit Scope
54256c5 Tier A: orphan files (Doxyfile, .travis.yml, util scripts), cotire/USE_PCH removal, ENABLE_INSTALLER/CPack removal, delayed_node subdir comment, Doxygen-only wallet plumbing, Dockerfile COPY lines for the deleted Doxyfile. Network-side #if 0 removals from the original commit dropped during rebase because master deleted those files outright (message_oriented_connection.cpp, node.cpp, peer_connection.cpp) for the DLT P2P rewrite.
0eb6a57 Drop unused plugins/auth_util/ (debug-only RPCs, never registered in any default config), programs/js_operation_serializer/ and programs/size_checker/. Fix matching programs/vizd/{main.cpp,CMakeLists.txt} to remove the auth_util plugin registration.
bfbb3a4 Drop ghost references to graphene::version (target/include paths point at libraries/version/, which doesn't exist) in libraries/protocol/, libraries/network/, and the (now examples-plugins/) test_api/ CMakeLists.
a42c2a8 Drop orphan installer vars (GUI_CLIENT_EXECUTABLE_NAME, CUSTOM_URL_SCHEME, INSTALLER_APP_ID) consumed only by the CPack block removed in Tier A; drop bogus libraries/fc/GitVersionGen module path (real path is thirdparty/fc/... and is already added at root scope).
e706f15 Remove orphan Doxygen consumers: documentation/doxygen/ styling assets, programs/build_helpers/check_reflect.py (parses doxygen XML that's never produced), and the doxygen apt-package mention in documentation/building.md.
da6c05c Remove documentation/git_guildelines.md — typo'd filename ("guild" vs "guide"), zero references in build, scripts, CI, code, or docs.
7a4b871 CMake/doc/script drift: drop add_subdirectory(elasticsearch) and add_subdirectory(market_history) for plugins that don't exist; fix documentation/plugin.md to reference real plugins; sync programs/build_helpers/cat_parts.py shebang/path.
ad1c94c Add docs/TECH_DEBT_AUDIT.md snapshot from 2026-04-30 (read-only report, no code impact). Note: contains stale references to witness/private_message plugins from before master's rename/move; will be refreshed in a follow-up.

Dropped during the 2026-05-20 rebase

  • 3172b37 (.qoder/ untrack) — master re-tracked .qoder/ docs going forward; the removal would re-conflict every rebase.
  • 666d98d + 2a32b4f (debug_node edit-script cleanup)plugins/debug_node/ was moved to examples-plugins/debug_node/ on master; cleanup no longer pulls weight in a now-non-shipping plugin.
  • 7bd4448 (.gitignore stale rule sweep) — master had already removed the stale rules independently; skipped as a no-op after the .qoder/ line dropped out.

What this is not

  • Not a behavior change for vizd in any default config. The plugins registered in programs/vizd/main.cpp are the same set, minus auth_util.
  • Not a refactor. No code was moved or rewritten; everything here is deletion plus the minimum CMake/include adjustments needed to keep configure valid.
  • Not touching pre-HF4 evaluators (vote_operation, content_operation, delete_content_operation).
  • Not gating examples-plugins behind a CMake option — that would be a separate behavior-change PR.

Test plan

  • CI: PR-build workflow completes (docker-pr-build.yml).
  • CI: vizd binary builds and is non-zero size.
  • Local: cmake -B build && cmake --build build --target vizd succeeds on Linux.
  • cli_wallet still builds.
  • Manual: start vizd with the default config, observe normal plugin initialization log lines.

chiliec added a commit that referenced this pull request Apr 30, 2026
Captures 51 file-cited findings from a tech-debt-skill audit run
against the current branch baseline. Reference for Tier B planning
beyond PR #100.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
chiliec and others added 8 commits May 20, 2026 14:43
Tier-A cleanup with no behavioral change in the CI/Docker build path:

  Files removed (orphaned, no consumer):
   - .travis.yml (referenced a Dockerfile-test that no longer exists)
   - Doxyfile (Doxygen 1.8.13 from 2017; not invoked by any build step)
   - libraries/wallet/Doxyfile.in + generate_api_documentation.pl
     (gated on PERL_FOUND AND DOXYGEN_FOUND AND NOT Ninja, never true in
     the apt-installed Docker builder; the standin was the actual code path)
   - programs/util/schema_test.cpp (CMakeLists block was already commented out)
   - programs/util/{inflation_plot,newplugin,pretty_schema,saltpass}.py
     (Python helpers with no shell/CMake/Dockerfile consumer)

  Dead conditionals removed:
   - Root CMakeLists: USE_PCH/cotire include, ENABLE_INSTALLER CPack block
     (cotire abandoned in 2017; ENABLE_INSTALLER never set, and its
     if(LINUX) branch was dead even when alive — CMake doesn't define LINUX)
   - libraries/network/CMakeLists.txt + libraries/utilities/CMakeLists.txt:
     latent cotire() calls that would have failed configure if USE_PCH
     was ever enabled (the include() was already gone)
   - libraries/wallet/CMakeLists.txt: collapsed the Perl/Doxygen-or-standin
     if/else; standin is now the unconditional code path
   - programs/CMakeLists.txt: stale `#add_subdirectory( delayed_node )`
     pointing at a directory that doesn't exist

  Dead `#if 0` blocks removed (4 blocks, ~70 lines):
   - libraries/network/node.cpp x2 (one with a live #else preserved)
   - libraries/network/peer_connection.cpp x1
   - libraries/network/message_oriented_connection.cpp x1

  Dockerfile sync:
   - Dropped now-deleted Doxyfile from the four `COPY` lines so the
     production/testnet/lowmem/mongo builds don't fail on a missing path

Net diff: 22 files changed, 10 insertions(+), 5600 deletions(-).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Drop three subtrees that are dead in the shipping build:

- plugins/auth_util — debug-only RPC helpers; not registered in any
  default config and never referenced by API consumers. Removed plugin
  source, vizd registration, and link dependency.
- programs/js_operation_serializer — one-shot dev tool that emits
  operation schemas; output not consumed by vizd or CI.
- programs/size_checker — one-shot dev tool that prints struct sizes;
  output not consumed by vizd or CI.

Also drops the matching add_subdirectory() entries in programs/CMakeLists.txt
which would otherwise break configure after directory removal.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
libraries/version/ no longer exists, but three CMake files still
referenced it as commented-out targets/include paths or stale
trailing comments. CMake silently absorbs missing include dirs as
useless -I flags, and the comments mislead future readers.

- libraries/protocol/CMakeLists.txt: remove commented add_dependencies,
  trailing comment on target_link_libraries, and the two non-existent
  ../../version/include paths.
- libraries/network/CMakeLists.txt: remove commented ../version/include.
- plugins/test_api/CMakeLists.txt: remove duplicate trailing
  target_link_libraries comment.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- CMakeLists.txt: GUI_CLIENT_EXECUTABLE_NAME, CUSTOM_URL_SCHEME, and
  INSTALLER_APP_ID were only consumed by the CPack/installer block
  removed in a47dd1e. Now set but never read.

- libraries/utilities/CMakeLists.txt: prepended libraries/fc/GitVersionGen
  to CMAKE_MODULE_PATH, but that directory does not exist (fc lives in
  thirdparty/fc/). The real path is already added at root scope, so the
  line was a silently-ignored no-op pointing at a phantom location.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The Doxygen pipeline was removed in Tier A core. These referencing
artifacts were left behind:

- documentation/doxygen/ — Doxygen styling assets (CSS, layout XML,
  header/footer HTML), only consumed by the removed pipeline
- programs/build_helpers/check_reflect.py — parses doxygen/xml/index.xml
  which is never produced
- documentation/building.md — apt install line for the doxygen package

All references verified absent across CMake, scripts, Dockerfiles, and CI.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Typo'd filename (note "guild" vs "guide"). No references in build
files, scripts, CI, source code, or other documentation. Safe to drop.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Removes the unread CHAIN_INTERNAL_PLUGINS env-var from
plugins/CMakeLists.txt, rewrites documentation/plugin.md to match the
actual plugin layout (no auto-discovery; explicit registration in
programs/vizd/main.cpp), drops the unbuildable chain_test target
reference from documentation/building.md, and fixes two latent
NameError typos (false/true lowercase) in
programs/build_helpers/cat_parts.py — unreachable today only because
hardfork.d/ contains regular .hf files.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Captures 51 file-cited findings from a tech-debt-skill audit run
against the current branch baseline. Reference for Tier B planning
beyond PR #100.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@chiliec chiliec force-pushed the chore/dead-code-tier-a branch from d704ab9 to ad1c94c Compare May 20, 2026 07:07
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