chore(server): remove dead code + cruft (#138 cleanup) #144

Merged
mahmoud merged 4 commits from development_cleanup_138 into development 2026-06-08 15:59:25 +00:00
Owner

Cleanup: dead code + cruft removal (#138 — cleanup + triage)

Scope of this PR: repo cleanup + dead-code removal + open-issue triage. The "solid tests + bug fixes" parts of #138 are deferred to follow-up PRs to keep this reviewable.

Removed — 96 files, +25 / −17,070

Cruft

  • .hero/build_logs/* (19 committed build logs); gitignore /.hero/
  • _archive/ (61 obsolete files incl. a stray Cargo.toml.hero_builder_backup)

Dead code (each removal build- and clippy-verified)

  • db/rpc.rs (1324 lines) — dead duplicate JSON-RPC dispatcher, zero callers → Closes #130
  • 7 legacy single-domain handler modules rpc/{action,debug,log,quick_service,run,schedule,service}.rs — the live server routes via the oschema-generated rpc::impls::*; commenting these out compiles clean (build-proven dead)
  • Trimmed rpc/{job,secret,system}.rs to only the helpers the live impls call (apply_inputs, init_secrets_catalogue, sweep_orphan_sockets) — ~1,600 dead handler lines removed (job 812→45, secret 939→292, system 313→118)
  • Fixed two stale doc-comments referencing the removed rpc::job::handle_logs

Verification — behavior-neutral

cargo build --workspace + cargo clippy --workspace clean after every step. The integration suite was run through an isolated daemon on both this branch and the development baseline:

run 1 run 2
development (baseline) 273/282 274/282
this branch (cleanup) 273/282 275/282

Identical pass band and identical failing set on both — the residual failures (4× daemon_singleton::*, cleanup::clean_test_data_is_idempotent, the parallel_jobs_logging/service_log_isolation #141 log-race, jobs::delete_removes_log_files_on_disk) are pre-existing harness/flaky failures, not introduced by this PR. Dead-code removal changes no runtime behavior.

Open-issue triage

  • Closed: #130 (dispatcher removed here, via Closes #130), #111 (server no longer hard-refuses without FORGE_TOKEN/WEBROOT — status-only/defaulted in 0.6.0, no refuse logic in startup).
  • Kept (valid backlog / deferred Phase 2-3 / needs deeper review): #141, #131, #122, #117, #126, #116, #114, #92, #135, #120, #115, #66, #65, #61, #54, #35, #125, and the admin-UI cluster #96/#94/#77/#39.

Refs #138

## Cleanup: dead code + cruft removal (#138 — cleanup + triage) Scope of this PR: repo **cleanup + dead-code removal + open-issue triage**. The "solid tests + bug fixes" parts of #138 are deferred to follow-up PRs to keep this reviewable. ### Removed — 96 files, +25 / −17,070 **Cruft** - `.hero/build_logs/*` (19 committed build logs); gitignore `/.hero/` - `_archive/` (61 obsolete files incl. a stray `Cargo.toml.hero_builder_backup`) **Dead code** (each removal build- and clippy-verified) - `db/rpc.rs` (1324 lines) — dead duplicate JSON-RPC dispatcher, zero callers → **Closes #130** - 7 legacy single-domain handler modules `rpc/{action,debug,log,quick_service,run,schedule,service}.rs` — the live server routes via the oschema-generated `rpc::impls::*`; commenting these out compiles clean (build-proven dead) - Trimmed `rpc/{job,secret,system}.rs` to only the helpers the live impls call (`apply_inputs`, `init_secrets_catalogue`, `sweep_orphan_sockets`) — ~1,600 dead handler lines removed (job 812→45, secret 939→292, system 313→118) - Fixed two stale doc-comments referencing the removed `rpc::job::handle_logs` ### Verification — behavior-neutral `cargo build --workspace` + `cargo clippy --workspace` clean after every step. The integration suite was run through an isolated daemon on **both this branch and the development baseline**: | | run 1 | run 2 | |---|---|---| | development (baseline) | 273/282 | 274/282 | | this branch (cleanup) | 273/282 | 275/282 | **Identical pass band and identical failing set** on both — the residual failures (4× `daemon_singleton::*`, `cleanup::clean_test_data_is_idempotent`, the `parallel_jobs_logging`/`service_log_isolation` #141 log-race, `jobs::delete_removes_log_files_on_disk`) are pre-existing harness/flaky failures, **not** introduced by this PR. Dead-code removal changes no runtime behavior. ### Open-issue triage - **Closed:** #130 (dispatcher removed here, via `Closes #130`), #111 (server no longer hard-refuses without `FORGE_TOKEN`/`WEBROOT` — status-only/defaulted in 0.6.0, no refuse logic in startup). - **Kept** (valid backlog / deferred Phase 2-3 / needs deeper review): #141, #131, #122, #117, #126, #116, #114, #92, #135, #120, #115, #66, #65, #61, #54, #35, #125, and the admin-UI cluster #96/#94/#77/#39. Refs #138
- Drop 19 tracked .hero/build_logs/* and the obsolete _archive/ tree
- gitignore /.hero/ so build logs are not re-committed

Refs #138
- db/rpc.rs (1324 lines) was a duplicate JSON-RPC dispatcher with no
  callers; the live server serves via rpc::impls multi-domain services
- Drop the dangling db re-export of its RpcRequest/RpcResponse/dispatch

Closes #130
Refs #138
- Delete rpc/{action,debug,log,quick_service,run,schedule,service}.rs —
  the hand-rolled dispatcher is gone; requests route through the
  oschema-generated rpc::impls per-domain services, which do not call these
  legacy handle_* fns (build-proven: removing them compiles clean)
- Refresh the stale mod.rs doc that claimed they were a retained logic library

Refs #138
refactor(server): trim dead legacy handlers from rpc job/secret/system
All checks were successful
Build and Test / build (pull_request) Successful in 8m50s
8d80df4a7f
- Drop the unused single-domain handle_* fns from rpc/{job,secret,system}.rs,
  keeping only the helpers the live impls call:
  job::apply_inputs, secret::init_secrets_catalogue, system::sweep_orphan_sockets
- ~1600 dead lines removed (job 812->45, secret 939->292, system 313->118)
- Fix two stale doc-comments referencing the removed rpc::job::handle_logs

Refs #138
mahmoud merged commit 2c53d73682 into development 2026-06-08 15:59:25 +00:00
mahmoud deleted branch development_cleanup_138 2026-06-08 16:00:11 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_proc!144
No description provided.