Conversation
* refactor(api): posters router splits into a package by resource
3622-line module becomes ten resource modules behind the same router.
Route list is byte-identical to the old module — same paths, methods,
names and registration order, which FastAPI matches on; the include order
in __init__ IS that order, so items (the /{poster_id} catch-all) stays
last. One test repointed at the submodule that now owns
preview_poster_file; nothing else reached past router.
* fix(codeql): one import style for the posters module in this test file
py/import-and-import-from 311: the stage-3 test repoint added a
'from ... import' beside the existing 'import ... as'.
* fix(review): validate destructive inputs, confine backfill, live logger config
An unvalidated optimize mode meant a client typo took the destructive
branch and rewrote poster files; apply_match lacked the empty-path guard
its artwork sibling has, so a row could lock as matched with no source.
Backfill confines each cache row before opening it, added_since rejects a
cutoff SQLite would compare as text, and the module logger re-reads config
per request instead of caching it at creation. sort and force are gone
from the two routes that accepted and ignored them.
* fix: serialize module-logger setup, store optimized posters by path
Lock the cache-miss construction, push a live level onto console handlers
that inherit it, and update the poster row by id with an absolute path —
a bare basename could not match the UNIQUE key and inserted a duplicate.
* fix: persist the optimized path before deleting the original
An invalid CONSOLE_LOG_LEVEL now inherits the logger level instead of
freezing the handler, and record_optimized_file raises on a rowcount
other than 1 so a failed update rolls the converted file back.
* style: explain the best-effort rollback suppression
CodeQL py/empty-except wants the note inside the handler.
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.
@coderabbitai ignore
develophas drifted behindmain(releases, fixes, dependency bumps). Do not merge this PR — it reports the drift, it does not fix it.developrequires branches be up to date, andhead:maincan never satisfy that without pulling develop's extension files into main, which the branch invariant forbids. Squash or rebase would also leavemainunreachable fromdevelop, so this workflow would just open another PR next push.Sync locally instead:
Then verify
git diff main developis added extension files plusdeploy/docker/Dockerfileonly. GitHub marks this PR merged on its own once develop contains main's tip. Opened by the sync-develop workflow.