Delete eight legacy modules that nothing reaches - #473
Merged
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This was referenced Sep 16, 2026
db/schema.rs, db/outbox.rs, db/audit.rs, db/migrations/mod.rs, sync/conflict.rs, sync/engine.rs, sync/retry.rs and tally/xml_builder.rs date from the v0.1.0 extraction of the desktop sync app. The compiler reports every item in them unused once the library's modules are made crate-visible, under default features, all features, and with tests compiled; a repository-wide grep finds no other reference. Two were pinned, so MAX_SURFACE_FILES drops to 237 with a named note. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
lamemustafa
force-pushed
the
tapish-claude/delete-legacy-sync-modules
branch
from
September 16, 2026 23:47
e6fff24 to
e1c3abe
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Eight modules from the v0.1.0 extraction of the AXAL desktop sync app are still compiled into
bridge_lib, and nothing reaches them. Every one of their items ispubinside apub mod, so rustc'sdead_codelint can't see that they're unused. They contain the old sync-app schema (outbox,sync_log,conflict_queueand similar tables), an outboxenqueuewith no worker, an auditappend, aSyncPlan, aConflictResolution, a retry backoff table, and anImportActionenum.How it was measured
This used the compiler, not grep.
pub moddeclarations insrc-tauri/src/lib.rstopub(crate).bridge_lib:agent::run_stdiofrombridge_mcp,commands::VerifiedCompanyIdentityfromtests/unit_a_live.rs, plusrunandrun_journal_confirmation_child_from_args, which are already crate-rootpub fns.cargo check -p bridge --libthree ways: default features,--features lab-writes,live-calibration-harness,voucher-scan, and--lib --testswith all features.80 items are reported unused in all three runs. This PR deletes only the files in which every item is unused:
src/db/schema.rssrc/db/migrations/mod.rssrc/db/outbox.rssrc/db/audit.rssrc/sync/engine.rssrc/tally/xml_builder.rssrc/sync/retry.rssrc/sync/conflict.rsgit grepacross the whole repository (src-tauri, tools, scripts, docs) finds no other reference to these files' paths or item names. The exceptions:docs/tally/TALLY_INTEGRATION_RESEARCH_AND_CODEX_PLAN.md.ConflictResolutionindb/tally_write_store.rs, which is untouched.The
db/migrations/*.sqlfiles are not touched; they are still pinned.Out of scope, on purpose. The other 72 items live in files that also contain live code. Most are in
commands.rsandtally/connection.rs: the four deliberately unregistered legacy reads and their selected-read helpers. Deleting those is an owner decision, already recorded indocs/rust-module-conventions.md. The remainder are intally/capability_packs.rs,tally/serial_queue.rs,tally/tdl_engine.rs,tally/validators.rsandreports/. Those are pinned and each needs its own decision.Intent check: dormant foundation or leftover?
Following #476's lesson, I searched
docs/adr,docs/step-by-step-roadmap.md,docs/tally/privacy-model.md,docs/tally/IMPROVEMENT_PLAN_2026H2.md,docs/tally/BACKLOG.mdand the README for these modules' concepts, not just their file names. I also checked history.git grepat41485853(v0.1.0),fddb6fee,0100e6b2and56409e62finds no caller ofdb::migrations::run,INITIAL_SCHEMA,audit::appendoroutbox::enqueueoutsidesrc/db/. It has never run since the open-source release.altmastid_cachehelper "retired from runtime code" and says the old table "remains only for database compatibility". The only definition of that table is this unrunINITIAL_SCHEMA. Every mirror database is created by the numbered.sqlmigrations, which are untouched, so removing it breaks no existing database.outbox.IMPROVEMENT_PLAN_2026H2.md§write substrate does plan an outbox, but the implemented one istally_import_outbox_jobsandtally_import_outbox_items(0003_tally_safe_writes.sql,db/tally_write_store.rs). The deletedoutboxtable has a different shape (operation/target/payload/next_try) and no worker. It is not that plan.sync/conflict.rsConflictResolution { Tally, Axal, Manual }.docs/step-by-step-roadmap.mdsays "Write preview, mappings, and conflict resolution remain disabled until their controlled-write roadmap slices". This enum is a three-variant stub with no consumer or tests. The live conflict type isdb::tally_write_store::ConflictResolution.sync/engine.rsSyncPlan::gst_foundation,sync/retry.rsbackoff table,tally/xml_builder.rsImportAction. No ADR, roadmap or plan names them. The import writer builds its actions elsewhere.So none of these is a documented dormant foundation. If the owner reads any of them as one, the natural keep is
ConflictResolution, and it's a one-file revert.Surface
db/migrations/mod.rsandtally/xml_builder.rs.MAX_SURFACE_FILESgoes from 251 to 249 on current master (239 to 237 when first opened, before Parse password-protected bank statements into voucher proposals, through PDFium #444 added 12 pins), with a note beside it saying why.scripts/reseal.sh --pins-changed, thenscripts/reseal.sh --verify(exit 0) after touching the tool source so it rebuilt from this worktree.compatibility_gate_passed:unknown_claims=11:evidenced_claims=0, unchanged.src-tauri/src/db/migrationsstays a required surface directory. Every file left in it is pinned.Checks
cargo check --workspace --all-targets, under default and all features: pass. The only warnings are the two unused bindings intally/runtime.rsthat Run the voucher-scan and calibration-harness tests in CI #453 removes.cargo clippy --workspace --all-targets -- -D warnings -A clippy::pedanticin src-tauri, and clippy onbridge-tally-compatibilityin tools: pass.cargo fmt --checkin both workspaces: pass.cargo test -p bridge-tally-compatibility, which includes the cap-versus-count assertion: pass.bridgelib lists 967 tests. The one test removed isdb::migrations::tests::initial_schema_runs_idempotently_with_sqlx, which exercised only the deleted schema.🤖 Generated with Claude Code