Commit graph

5 commits

Author SHA1 Message Date
245a27c7a3 chore: drop watermark feature, CLI, docs, design.md; consolidate requirements
- Remove the watermark feature end to end (watermarked.py, apply_watermark/
  mark_delivery/watermark_filter, WATERMARK env, assets/) and its tests; self-host
  delivery is now unconditionally clean.
- Delete the unused cli/ package and .github/workflows/publish-cli.yml.
- Delete docs/ (compliance) and design.md; drop the dangling references in the
  legal page and the design-token/ui comments.
- Consolidate requirements: requirements.txt (runtime) + requirements-test.txt
  (unit + E2E); remove requirements-e2e.txt and requirements-ml-e2e.txt and
  point both CI jobs at the single test file. Add libgl1 to the unit job
  (scenedetect -> opencv-python links libGL).

Verified in the CI container: unit 701 passed; API E2E 209; pipeline E2E 127;
Playwright 19 passed / 1 skipped.
2026-10-05 09:53:47 +01:00
719946b3cd refactor/package-layout (#3)
All checks were successful
CI / backend-tests (push) Successful in 29s
CI / frontend-build (push) Successful in 9m48s
Reviewed-on: #3
Co-authored-by: pedro-bento <mail@pbento.pt>
Co-committed-by: pedro-bento <mail@pbento.pt>
2026-10-04 20:47:12 +01:00
edcfeaf9d5 refactor: remove cloud/ billing mode and flatten to self-hosted-only
- Delete the entire cloud/ package (Stripe billing, auth/OAuth, metering, API keys,
  account erasure, lifecycle/digest emails, R2 archive, autopilot, MCP OAuth,
  proxy ledger, managed keys) and all BILLING_ENABLED branches in app.py
- Keep self-host behavior via no-op shims; /api/config now returns
  {youtubeUrlEnabled, jobRetentionSeconds, localLlm}
- Remove cloud tests (31 files), alembic/, log_view.py, requirements-billing.txt,
  docker-compose.cloud.yml; update CLI to Postiz + /api/config; clean docs/skills
- Flatten dashboard: remove auth/billing/pricing/history chrome, inert config-only AuthContext
- Fix residual test drift; lint + build + compile all green
2026-10-04 17:02:55 +01:00
juancarlos.cavero
56697568f9 fix(source): refuse to mint a signed url for a job we cannot identify
/api/source-url skipped the ownership check when the job record did not
resolve, and then signed anyway. That made it the one door in the design that
hands out a working capability without asking who is asking, which is precisely
what locking down /api/source was for.

Narrow in practice: a real job resolves, from its metadata or from the manifest
that names its owner while it runs, so the uncovered case is a directory in a
half-written state. It also still takes guessing a UUID, so this was never
worse than the behaviour it replaced. It is fixed because "a hole with a rare
precondition" is still a hole.

Off billing it keeps answering, since there is no owner to check and the
self-host preview would otherwise break for nothing.

The test stubs the minter so that reopening the hole fails on the status
assertion rather than on _cloud_config being None off billing: a test that
passes only because the code under it happens to crash stops guarding the day
it stops crashing. Verified by reopening the hole and reading the failure.

Claude-Session: https://claude.ai/code/session_01WyFE2wXi8quZR6nLRRLDgE
2026-08-31 00:14:18 +02:00
juancarlos.cavero
87adf88daa fix(source): stop serving the untouched original without a credential
GET /api/source streams the file we downloaded, not a derived clip, and it was
open on the reasoning that the UUID job id is the capability. That makes the
product a public YouTube downloader wearing a UUID, which is the characterisation
worth avoiding, and one leaked id in a log or a referer opens someone else's
video.

A <video src> cannot carry an Authorization header, which is why it was open in
the first place, so the owner mints a short-lived signed URL from
/api/source-url and hands the player that. The endpoint takes the signature or
falls back to the owner check. Self-host and ownerless BYOK jobs are untouched:
no owner to check, no secret to sign with. The owner lookup is gated on
BILLING_ENABLED because it falls through to a full rescan of the output
directory, which off billing would run on every preview and buy nothing.

Both minters go through _signed_source_url. The EDL feeds ClipEditor's source
monitor the same way and was built as a bare path, which works in self-host and
in every test and 404s in cloud. The regression test asserts the endpoint calls
the minter rather than comparing strings: off billing the helper returns that
same bare path, so a string comparison passes just as happily with the bug in.
Verified by putting the bug back and watching it fail.

The frontend mints at render, not when the session is persisted, or localStorage
would hold a token that expired overnight.

SOURCE_RETENTION_SECONDS can age the retained download out ahead of the clips it
produced, and defaults to the job clock, so nothing changes until someone sets
it. Lowering it is not free: the EDL, rerender, scenes and reframe endpoints all
read that file and answer 409 once it is gone.

Claude-Session: https://claude.ai/code/session_01WyFE2wXi8quZR6nLRRLDgE
2026-08-29 17:19:39 +02:00