Skip to content

chore: sync develop with main - #509

Merged
chodeus merged 3 commits into
developfrom
main
Aug 12, 2026
Merged

chore: sync develop with main#509
chodeus merged 3 commits into
developfrom
main

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

@coderabbitai ignore

develop has drifted behind main (releases, fixes, dependency bumps). Do not merge this PR — it reports the drift, it does not fix it.

develop requires branches be up to date, and head:main can never satisfy that without pulling develop's extension files into main, which the branch invariant forbids. Squash or rebase would also leave main unreachable from develop, so this workflow would just open another PR next push.

Sync locally instead:

git checkout develop && git merge origin/main && git push

Then verify git diff main develop is added extension files plus deploy/docker/Dockerfile only. GitHub marks this PR merged on its own once develop contains main's tip. Opened by the sync-develop workflow.

renovate Bot and others added 3 commits August 12, 2026 17:20
chore(deps): update github-actions

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
chore(deps): update actions/setup-node action to v7

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…r import cycle (#511)

* fix(api): keep exception text out of response bodies; break the logger cycle

- sweep all 171 sites where str(e)/f-string exception text reached a JSON
  response (17 api modules, the FastAPI catch-all included): responses carry
  stable public messages, the detail stays in logger.error (14 log lines
  added, 2 upgraded to exc_info)
- ConfigError carries a curated .message (position-only YAML errors via
  problem_mark; no parser or OS text) and the handler reads the attribute,
  never the exception object
- error/status codes byte-identical across the sweep (312 values verified)
- move create_bar into logger.py (its dominant consumer) with a helper
  re-export: kills the logger<->helper import cycle and the lazy-import
  workaround that papered over it

Closes code-scanning alerts 294 (stack-trace exposure) and 273 (cyclic import).

* test: raise the leak-marker error from a real accessor, not __getattr__

Special methods should honor their contract (CodeQL 296); an explicit
get_poster_stats stub also can't be swallowed by attribute-probing paths.

* test: route the leak marker through the real stats accessor

The previous stub method was never called (the route reads db.stats), making
the marker assertion vacuous; bite re-proven against a deliberately leaky
handler.

* fix(api): review round — close the ConfigError class, confine deletes, sanitize passthroughs

- ConfigError now re-raises to the shared CONFIG_INVALID contract from every
  api handler (50 sites across two rounds; a transitive checker proves zero
  swallowing trys remain, with two documented exceptions). A malformed config
  can no longer 200 as empty roots, a false "no secret configured" wiring
  panel, or silently-missing styles
- worker failure results pass through worker_error(): stable public message,
  detail logged (the worker's own strings can embed exception text)
- upstream Plex bodies stay out of responses (_PlexFetchError grows a
  server-only detail); validation 422s drop echoed input values and mask
  sensitive fields via the existing SENSITIVE_FIELD_NAMES
- GDrive folder deletion re-asserts the resolved target immediately before
  rmtree; poster file deletion realpaths and requires configured-root
  membership before os.remove (poisoned rows can no longer point deletes
  outside the roots), and file_deleted reports the real outcome

* test: record-and-raise AttributeError in the webhook tripwire

Special methods keep their contract (CodeQL 298) and the touch list survives
even if a handler swallows the exception; bite re-proven via exit codes with
the guard genuinely removed.

* fix(api): close the sentinel-assignment ConfigError shape

delete_poster loads config before the destructive row delete (a malformed
config can no longer 200 after an irreversible deletion); the directory
guards' inner config=None fallbacks re-raise instead of impersonating
PATH_NOT_ALLOWED; webhook trusted-proxy resolution fails closed either way.

* fix(api): webhook secret dependency uses the shared ConfigError contract

The deliberate 503 predates the campaign's uniform CONFIG_INVALID handling and
its retryability rationale doesn't hold (failed webhook events aren't re-queued
on any 5xx). ConfigError now propagates from the dependency; tests assert the
shared 500 CONFIG_INVALID with zero enqueues.
@chodeus
chodeus merged commit a5cd8a5 into develop Aug 12, 2026
34 checks passed
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