Skip to content

refactor(bot): drop legacy wordpress module - #38

Merged
k0te1ch merged 2 commits into
mainfrom
refactor/drop-legacy-wordpress-module
Aug 15, 2026
Merged

k0te1ch merged 2 commits into
mainfrom
refactor/drop-legacy-wordpress-module

Conversation

@k0te1ch

@k0te1ch k0te1ch commented Aug 15, 2026

Copy link
Copy Markdown
Owner

app/bot/utils/wordpress.py stopped being part of any code path when WordPress
publishing moved into app/publishers/WordPress/. Nothing in app/ imports it —
only its own 23 test files did — and the README has been calling it legacy for a
while. Keeping it around cost us a pickle.load of a cookie jar (arbitrary code
execution on a tampered cookie.pkl), a swallowed exception, a stray print,
and three open TODOs, all in code that never runs.

Deletes the module and its tests, plus WP_COOKIE_FILENAME / WP_COOKIE_PATH
from the bot config and .env.example — the publisher resolves its own
WP_COOKIE_PATH from shared config, so the bot-side pair died with the module.
extra="ignore" on the settings model means a leftover WP_COOKIE_FILENAME in
someone's .env is harmless.

Not in scope, worth a follow-up: lxml, feedparser and fake-useragent are
now unused in app/bot/pyproject.toml (the WordPress publisher declares its own
copies). Dropping them means regenerating the bot lock file, which is a much
noisier diff than this one. Same for WP_URL / WP_LOGIN / WP_PASSWORD /
WP_APP_PASSWORD, which the bot config still exposes but no bot code reads.

k0te1ch and others added 2 commits August 15, 2026 17:36
app/bot/utils/wordpress.py hasn't been imported by anything since WordPress
publishing moved to app/publishers/WordPress — only its own tests referenced
it, and the README already flagged it as legacy. It carried a pickle.load of
a cookie jar, a swallowed exception and three open TODOs.

Also drops WP_COOKIE_FILENAME / WP_COOKIE_PATH from the bot config and
.env.example: the publisher reads its own WP_COOKIE_PATH from shared config,
so the bot-side pair was dead with the module.
@k0te1ch
k0te1ch merged commit 72e9bf4 into main Aug 15, 2026
5 checks passed
@k0te1ch
k0te1ch deleted the refactor/drop-legacy-wordpress-module branch August 15, 2026 15:27
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