[PR #161] [MERGED] [cleanup] Delete dead code, dead re-exports and repo junk #164

Closed
opened 2026-10-13 19:48:13 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Glitchy-Sheep/boosty-downloader/pull/161
Author: @Glitchy-Sheep
Created: 8/18/2026
Status: ✅ Merged
Merged: 8/18/2026
Merged by: @Glitchy-Sheep

Base: main ← Head: chore/dead-code-cleanup


📝 Commits (3)

  • e4dafbd chore: Delete dead code across the package
  • 97ad26c chore: Drop the dead unknown_content field from the mapping result
  • 96c8ced chore: Drop dead re-exports and clean repo hygiene

📊 Changes

20 files changed (+35 additions, -439 deletions)

View changed files

📝 .gitignore (+3 -0)
➖ analyze_image_downloading_problem.md (+0 -45)
📝 boosty_downloader/src/application/mappers/__init__.py (+0 -7)
📝 boosty_downloader/src/application/mappers/html_converter.py (+0 -16)
📝 boosty_downloader/src/application/mappers/post_mapper.py (+0 -11)
📝 boosty_downloader/src/cli/console_progress_reporter.py (+2 -113)
📝 boosty_downloader/src/domain/post.py (+0 -4)
📝 boosty_downloader/src/infrastructure/boosty_api/__init__.py (+1 -5)
➖ boosty_downloader/src/infrastructure/boosty_api/utils/textual_post_extractor.py (+0 -28)
📝 boosty_downloader/src/infrastructure/html_generator/__init__.py (+1 -7)
➖ boosty_downloader/src/infrastructure/html_reporter/__init__.py (+0 -0)
➖ boosty_downloader/src/infrastructure/html_reporter/html_reporter.py (+0 -166)
📝 boosty_downloader/src/infrastructure/post_caching/__init__.py (+0 -4)
📝 boosty_downloader/src/infrastructure/update_checker/pypi_checker.py (+0 -9)
📝 test/fixtures/single_post_domain.json (+1 -7)
📝 test/integration/boosty_api/boosty_api_test.py (+1 -3)
📝 test/integration/flows/full_parse_flow_test.py (+8 -3)
📝 test/unit/mappers/post_mapper_golden_test.py (+5 -0)
📝 test/unit/mappers/post_mapper_test.py (+11 -7)
📝 test/unit/ok_video_ranking/ok_video_ranking_test.py (+2 -4)

📄 Description

[cleanup] Delete dead code, dead re-exports and repo junk

Summary

First PR of the cleanup stage (audit этап 2). Every deletion was verified by a fresh code sweep: zero references from product code. Net effect: about 420 lines removed, one real double-computation gone, zero behavior changes - the 164-test safety net stayed green untouched.

What is deleted

  • infrastructure/html_reporter/ (166 lines) - a second Jinja renderer without autoescape, never imported; one wrong import away from an XSS-prone page
  • boosty_api/utils/textual_post_extractor.py - never imported
  • The FakeDownloader demo block in the progress reporter (92 lines) plus the methods and imports that lived only for it (headline_rule, newline, log_list, import secrets)
  • convert_image_to_html / convert_file_to_html - the image path is inlined in the use case, files are not rendered into HTML at all (a known gap, queued for the renderer audit)
  • PostDataPostOnlyChunksList alias, UpdateCheckStatus enum (an abandoned first design - the live mechanism is the tagged union)
  • PostMappingResult.unknown_content - the product always recomputed it via collect_unknown_content, the field fed only tests; bulk downloads no longer walk every post DTO twice
  • Dead __init__ re-exports in post_caching, boosty_api, html_generator, mappers - the product imports canonical modules everywhere; tests updated to do the same

Hygiene

  • Personal analysis notes (analyze_image_downloading_problem.md) untracked - the file stays local
  • .DS_Store added to .gitignore (one sat in the repo root unignored)
  • test/unit/download_manager/ renamed to test/unit/ok_video_ranking/ - the module it was named after no longer exists

Deliberately NOT touched

Two dead-looking spots are symptoms of real bugs and get their own fixes next: the discarded _PostDownloadOutcome (a failed --post-url currently exits 0) and the unreachable except DownloadTimeoutError (a network timeout is misreported as an I/O failure).

Verification

  • task ci green: lint, format, pyright, 164 passed + 1 xfail, build
  • Integration tests still collect (6/6) after the import canonicalization
  • The mapper golden was regenerated (the dead field left the snapshot) and the fixture's unknown chunk is now pinned explicitly

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Glitchy-Sheep/boosty-downloader/pull/161 **Author:** [@Glitchy-Sheep](https://github.com/Glitchy-Sheep) **Created:** 8/18/2026 **Status:** ✅ Merged **Merged:** 8/18/2026 **Merged by:** [@Glitchy-Sheep](https://github.com/Glitchy-Sheep) **Base:** `main` ← **Head:** `chore/dead-code-cleanup` --- ### 📝 Commits (3) - [`e4dafbd`](https://github.com/Glitchy-Sheep/boosty-downloader/commit/e4dafbd484284bb02f2fb45aa635ec05226441e2) chore: Delete dead code across the package - [`97ad26c`](https://github.com/Glitchy-Sheep/boosty-downloader/commit/97ad26cc10a8bb699f6ad33ecff0f9d5bd05ca72) chore: Drop the dead unknown_content field from the mapping result - [`96c8ced`](https://github.com/Glitchy-Sheep/boosty-downloader/commit/96c8ced47e56e8422366dd5bedd729c388dcc34a) chore: Drop dead re-exports and clean repo hygiene ### 📊 Changes **20 files changed** (+35 additions, -439 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+3 -0) ➖ `analyze_image_downloading_problem.md` (+0 -45) 📝 `boosty_downloader/src/application/mappers/__init__.py` (+0 -7) 📝 `boosty_downloader/src/application/mappers/html_converter.py` (+0 -16) 📝 `boosty_downloader/src/application/mappers/post_mapper.py` (+0 -11) 📝 `boosty_downloader/src/cli/console_progress_reporter.py` (+2 -113) 📝 `boosty_downloader/src/domain/post.py` (+0 -4) 📝 `boosty_downloader/src/infrastructure/boosty_api/__init__.py` (+1 -5) ➖ `boosty_downloader/src/infrastructure/boosty_api/utils/textual_post_extractor.py` (+0 -28) 📝 `boosty_downloader/src/infrastructure/html_generator/__init__.py` (+1 -7) ➖ `boosty_downloader/src/infrastructure/html_reporter/__init__.py` (+0 -0) ➖ `boosty_downloader/src/infrastructure/html_reporter/html_reporter.py` (+0 -166) 📝 `boosty_downloader/src/infrastructure/post_caching/__init__.py` (+0 -4) 📝 `boosty_downloader/src/infrastructure/update_checker/pypi_checker.py` (+0 -9) 📝 `test/fixtures/single_post_domain.json` (+1 -7) 📝 `test/integration/boosty_api/boosty_api_test.py` (+1 -3) 📝 `test/integration/flows/full_parse_flow_test.py` (+8 -3) 📝 `test/unit/mappers/post_mapper_golden_test.py` (+5 -0) 📝 `test/unit/mappers/post_mapper_test.py` (+11 -7) 📝 `test/unit/ok_video_ranking/ok_video_ranking_test.py` (+2 -4) </details> ### 📄 Description # [cleanup] Delete dead code, dead re-exports and repo junk ## Summary First PR of the cleanup stage (audit этап 2). Every deletion was verified by a fresh code sweep: zero references from product code. Net effect: about 420 lines removed, one real double-computation gone, zero behavior changes - the 164-test safety net stayed green untouched. ## What is deleted - `infrastructure/html_reporter/` (166 lines) - a second Jinja renderer **without autoescape**, never imported; one wrong import away from an XSS-prone page - `boosty_api/utils/textual_post_extractor.py` - never imported - The `FakeDownloader` demo block in the progress reporter (92 lines) plus the methods and imports that lived only for it (`headline_rule`, `newline`, `log_list`, `import secrets`) - `convert_image_to_html` / `convert_file_to_html` - the image path is inlined in the use case, files are not rendered into HTML at all (a known gap, queued for the renderer audit) - `PostDataPostOnlyChunksList` alias, `UpdateCheckStatus` enum (an abandoned first design - the live mechanism is the tagged union) - `PostMappingResult.unknown_content` - the product always recomputed it via `collect_unknown_content`, the field fed only tests; bulk downloads no longer walk every post DTO twice - Dead `__init__` re-exports in `post_caching`, `boosty_api`, `html_generator`, `mappers` - the product imports canonical modules everywhere; tests updated to do the same ## Hygiene - Personal analysis notes (`analyze_image_downloading_problem.md`) untracked - the file stays local - `.DS_Store` added to `.gitignore` (one sat in the repo root unignored) - `test/unit/download_manager/` renamed to `test/unit/ok_video_ranking/` - the module it was named after no longer exists ## Deliberately NOT touched Two dead-looking spots are symptoms of real bugs and get their own fixes next: the discarded `_PostDownloadOutcome` (a failed `--post-url` currently exits 0) and the unreachable `except DownloadTimeoutError` (a network timeout is misreported as an I/O failure). ## Verification - `task ci` green: lint, format, pyright, 164 passed + 1 xfail, build - Integration tests still collect (6/6) after the import canonicalization - The mapper golden was regenerated (the dead field left the snapshot) and the fixture's unknown chunk is now pinned explicitly --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-13 19:48:13 +00:00
Sign in to join this conversation.
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
Glitchy-Sheep/boosty-downloader#164
No description provided.