ADR-102 P6a: purge confirmed-dead backup/restore code#487
Merged
Conversation
Removes superseded code verified to have no live callers (the safe-purge slice of P6; B/C/D/E — restitching migration, validator consolidation, serialization.py split, ADR-015/age_ops — deferred to a planning doc): - api/lib/integrity.py: deleted BackupAssessment + print_assessment (read the removed v1 data['data'] shape; only a comment referenced it). DatabaseIntegrity (the live runtime half) stays. Module docstring updated. - admin_service.py: deleted create_backup / restore_backup (DEAD subprocess methods spawning the stale src.admin.* path; no callers — the live path is create_backup_stream / run_restore_worker) + the now-orphaned _extract_backup_file_from_output + unused imports (subprocess, BackupResponse, RestoreResponse, BackupIntegrityAssessment). - models/admin.py: deleted BackupResponse / RestoreRequest / RestoreResponse (only users were the dead admin_service methods; stale imports in routes/admin.py), taking the stale overwrite/handle_external_deps/external_deps_handled fields. - routes/admin.py: removed the 3 stale model imports. - cli types: removed RestoreResponse.external_deps_handled (dead since P4 --mode). Net -368 lines. Full suite 1330 pass / 16 skip / 1 pre-existing-unrelated fail.
#487 review) Code review found BackupIntegrityAssessment had its last importer (admin_service) removed in this PR, leaving it defined-but-unreferenced repo-wide. Same purge. (The TS BackupResponse/RestoreRequest/RestoreResponse interfaces noted by review are deferred to the P6 planning doc — possible P6b.)
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.
First slice of P6 (the LAST ADR-102 spine phase) — the safe, confirmed-dead-code purge. Each item was verified to have no live caller before deletion. The larger P6 chunks (B restitching→port migration, C validator consolidation, D serialization.py split, E ADR-015/age_ops) are deferred to a planning doc.
Removed (−368 lines, all verified uncalled)
integrity.py:BackupAssessment+print_assessment(read the removed v1data['data']shape; only a comment referenced it).DatabaseIntegrity(the live runtime half — used by backup_streaming/archive/routes/admin CLIs) stays.admin_service.py:create_backup/restore_backup(DEAD subprocess methods spawning the stalesrc.admin.*path; live path iscreate_backup_stream/run_restore_worker) + the now-orphaned_extract_backup_file_from_output+ unused imports.models/admin.py:BackupResponse/RestoreRequest/RestoreResponse(only users were the dead methods; stale imports in the route), taking the staleoverwrite/handle_external_deps/external_deps_handledfields.routes/admin.py: the 3 stale model imports.RestoreResponse.external_deps_handled(dead since P4--mode).Verification
API loads clean (imports resolve), CLI builds, focused admin/backup/restore/integrity/epoch suite (133 pass), full suite 1330 pass / 16 skip / 1 fail (pre-existing vision-config dev-DB pollution, unrelated).