Skip to content

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

Open
chiliec wants to merge 12 commits intomasterfrom
chore/dead-code-tier-a
Open

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

Conversation

@chiliec
Copy link
Copy Markdown
Member

@chiliec chiliec commented Apr 28, 2026

Summary

Five-commit dead-code sweep across CMake, Dockerfiles, and one plugin. Net -6510 lines across 35 files. Each commit is self-contained and individually reviewable.

Commit Scope
19e6d68 Tier A: orphan files (Doxyfile, .travis.yml, util scripts), cotire/USE_PCH removal, ENABLE_INSTALLER/CPack removal, #if 0 blocks in libraries/network/, delayed_node subdir comment, Doxygen-only wallet plumbing
7843238 Drop unused plugins/auth_util/ (debug-only RPCs, never registered in any default config), programs/js_operation_serializer/ and programs/size_checker/ (dev-only one-shot tools whose output isn't consumed by vizd or CI). Fix matching add_subdirectory() lines so configure stays valid.
5f1a918 Drop ghost references to graphene::version (target/include paths point at libraries/version/, which doesn't exist) in libraries/protocol/, libraries/network/, plugins/test_api/
c431c60 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)
666d98d plugins/debug_node: remove debug-node-edit-script and edit-script CLI options + the _edit_scripts field they populated. Both have been silent no-ops since the f07fbc2 import — the only code that read the field was already commented out. Also drop _private_keys (declared but never used), commented-out signal/method decls, two /* ... */ blocks in plugin_startup/plugin_shutdown, and now-unused fc/io/buffered_iostream and fc/io/fstream includes.

What this is not

  • Not a behavior change for vizd in any default config. The plugins that remain registered are the same set; the only operator-visible delta is that two debug_node CLI options that were already no-ops will now produce a hard unknown option error if anyone has them in a config — which is a strict improvement over the silent-failure-with-deprecation-warning that's been there since 2022.
  • 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) — those look dead but are required for chain replay from genesis.
  • Not gating test_api/debug_node behind a CMake option — that would be a separate behavior-change PR if desired.

Test plan

  • CI: PR-build workflow completes (docker-pr-build.yml) — confirms the Dockerfile Doxyfile removal and the missing add_subdirectory() entries don't break CMake configure.
  • CI: vizd binary builds and is non-zero size (existing CI smoke).
  • Local: cmake -B build && cmake --build build --target vizd succeeds on Linux.
  • Confirm cli_wallet still builds (touched by programs/CMakeLists.txt — the add_subdirectory(cli_wallet) line is preserved).
  • Manual: start vizd with the default share/vizd/config/config.ini, observe normal plugin initialization log lines.

Tier A follow-up commits (added 2026-04-30)

Same Tier A risk profile as the original bundle — every reference verified absent before deletion. No source files compiled into vizd are touched.

Commit Scope
9a2b34a 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
3172b37 Untrack .qoder/ AI-tool research artifacts (130 files). Treated like .claude/ — gitignored going forward; files preserved on disk locally.
7bd4448 Drop 16 stale .gitignore rules pointing at files/dirs absent from the tree: Doxyfile, js_operation_serializer, delayed_node, size_checker, inflation_model, the tests/* block, and doxygen output dirs. Fixes a missing trailing newline as a side effect.
0bbb803 Remove documentation/git_guildelines.md — typo'd filename ("guild" vs "guide"), zero references in build, scripts, CI, code, or docs.

Aggregate impact (these 4 commits): ~3.9k lines of real on-disk deletions plus the .qoder/ untrack (purely bookkeeping — files persist on disk).

🤖 Generated with Claude Code

chiliec and others added 12 commits April 29, 2026 01:17
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 debug-node-edit-script and edit-script CLI options have been a
silent no-op since at least the f07fbc2 import: both populated the
_edit_scripts vector, but the only code that read it was already
commented out in plugin_startup(). Operators relying on either option
have been getting silent failures, so the deprecation warning misled
rather than informed.

Removes:
- both CLI options and the matching set_program_options override
  (header decl + impl)
- _edit_scripts and the never-read _private_keys field
- the commented-out for/if blocks in plugin_startup, plugin_shutdown,
  and apply_debug_updates
- a redundant trailing return in plugin_shutdown
- the orphaned commented decls (save_/load_debug_updates,
  signals2::scoped_connection trio, _debug_updates type-alias note)
- the now-unused fc/io/buffered_iostream and fc/io/fstream includes

The plugin's actual feature surface (debug_generate_blocks, debug_push_*,
debug_update callbacks) is unchanged.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Removing the override entirely in 666d98d made plugin abstract because
appbase::plugin's set_program_options is pure virtual. Restore the
declaration with an empty inline body, matching the pattern used by
block_info::plugin and other plugins that take no options.

The CLI options that previously lived in this method (debug-node-edit-script
and edit-script) remain removed; only the empty override scaffold returns.

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>
Qoder is a local AI dev tool whose research artifacts were committed.
Treat the same as .claude/ — local-only, gitignored — so future runs
don't pollute the repo. Files remain on disk for the original author.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Each removed rule references a file or directory absent from the
current tree:

- libraries/wallet/Doxyfile, api_documentation.cpp, doxygen — Tier A
  removed the Doxygen build pipeline
- programs/js_operation_serializer/* — program removed in Tier A
- programs/delayed_node, programs/size_checker — directories absent
- programs/util/inflation_model — file absent
- tests/* (six entries) — no tests/ directory exists in this repo
- documentation/doxygen/{html,xml,latex} — moot after parent dir removal

Live build artifacts (git_revision.cpp, vizd, cli_wallet, cat-parts,
get_dev_key) remain ignored.

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>
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