Eight findings from re-reading the erasure path, each one something that would
have shown up in production rather than in a test:
- The local purge missed two stores. SaaSShorts outputs (output/saas_<id>) and
generated thumbnails record ownership in their own in-memory dicts, not in
the .owner file, so neither was erased. Thumbnails are the serious half: the
hourly sweep deliberately skips their directory, so a deleted user's
generated images stayed on disk forever, publicly served at /thumbnails/.
- The purge ran on the event loop. rmtree over gigabytes of video stalled every
other request on the process; it goes through asyncio.to_thread now.
- Paths from those dicts are now resolved through _safe_under, so a session id
or output_dir containing ".." deletes nothing.
- Deleting a user made a webhook path reachable that never was: _apply_topup
takes the user id from Stripe metadata, so a top-up completing around the
deletion inserted a row pointing at a user that no longer exists. The FK
violation 500s the webhook, and since the event is only recorded after
handle_event returns, Stripe retries the same doomed insert for three days.
It confirms the row exists first.
- The "why are you leaving" box was free text stored in a record that
deliberately outlives the account, which is how personal data ends up in one
by accident. It is a closed list now, which also makes twenty deletions a
month countable instead of readable.
- Two concurrent deletes wrote two erasure records and sent two goodbye emails.
The DELETE's rowcount now decides which call is the real one; the UI holds a
ref so a double click doesn't fire a second Stripe cancel and R2 purge.
- The delete button armed itself when the confirm box was empty, if the page
ever rendered before /api/me resolved.
- The goodbye email claimed we keep "a one-way hash of your email and nothing
else", which was not true of the Stripe reference beside it. Fixed in the
email and in the privacy policy, EN and ES.
Also: skip the Upload-Post call when no managed key is configured, and say
plainly in the in-flight comment that it covers metered work only.
tests/test_account_local_purge.py covers tenant isolation across all three
stores and both traversal attempts; test_account_erasure.py gains the
confirmation gate, the API-key refusal, and the already-cancelled-at-Stripe
case that would otherwise trap a user forever.
The privacy policy already told users that "deleting your account from the
dashboard removes your content" — there was no way to do it. This adds one:
Account -> Delete account in the dashboard, DELETE /api/account on the server.
The endpoint refuses API-key auth (a leaked osk_ must not destroy the account
it was issued from) and requires the caller to retype the account email; the UI
does the same, collapsed behind a danger zone that itemises what actually goes.
Erasure is immediate and irreversible, because after it there is nothing left
to authenticate a recovery request against.
The order of the steps is the design, each one a failure mode:
- Stripe cancel first, aborting everything if it fails, so we never erase a
user we are still billing. An InvalidRequestError is treated as already
cancelled: a portal cancellation whose webhook never landed leaves our row
reading "active" forever, and the one account that could not be deleted
would be the one Stripe already stopped charging.
- R2 before the database, because those rows are the only index of which
objects belong to the user; dropping them first turns a failed purge into
permanent orphans.
- The DB delete is one transaction over an explicit table list, not the
declared ON DELETE CASCADEs: create_all never ALTERs an existing table, so a
constraint added after a table shipped lives in the models and not in
production. tests/test_account_erasure.py fails if a new table references
users.id without joining that list.
- A reserved usage_ledger row blocks the delete: erasing under a running job
would pull the output from beneath it and leave the reservation unsettled.
What survives, and why: the Stripe customer and its invoices (six years,
Spanish commercial law) and one account_deletions row holding a sha256 of the
email as proof the erasure happened, itself purged after five years by the
retention sweeper. app.py registers a callback so the working files in output/
and uploads/ go too instead of waiting for the hourly sweep.
Privacy policy sections 6 (EN + ES) now point at the button and name both
survivors; the Legal hub summary says the same in one line.
The page opened with a TL;DR box, which is the wrong lead for a page
whose subject is a workflow: the canvas shows in one glance what four
paragraphs were describing. Screenshot in, summary box out, and the
TL;DR block in render.js is now optional so other pages can make the
same call.
Two nodes in act 3 sat on identical coordinates after the queue node
landed, so the template opened with overlapping labels on import.
The landing named n8n in the hero without linking anywhere; it now
points at the workflow page, in the app and in the crawler fallback
that has to mirror it.
/n8n-youtube-shorts-automation answers the two loudest unanswered asks
in the n8n community (a free/self-hostable clipper callable from a
workflow, and why posting video to TikTok/Instagram is so painful), and
gives the Reddit and forum posts a stable URL of ours to point at
instead of a raw file on GitHub.
Also drops the now-false 'there is no official n8n template yet' from
the automation page's body and FAQ, and links the two.
The hero now pitches the agent audience too: 'also a clipping tool for ai
agents: claude, chatgpt and n8n drive it over mcp', linking to /mcp. Same
sentence added to the crawler-visible fallback copy (landing-fallback.js
must stay in sync with Landing.jsx).
Business decision: the reminder email will not be implemented for now, so
the Terms must not contractually promise it — a broken written promise is
worse than the underlying statutory ambiguity. Renewal terms now state
auto-renewal until cancellation, cancellable anytime from the account.
(The art. 97.1.p TRLGDCU obligation from Ley 10/2025 still exists for
Spanish companies; revisit if enforcement picks up.)
Replaces the single thin Terms & Privacy SPA view with six indexed static
pages (/terms /privacy /legal-notice + /terminos /privacidad /aviso-legal)
built like the SEO pages, in the sitemap and llms.txt but out of the
marketing interlinking ring. The #legal SPA route becomes a hub linking to
them, so the text lives in exactly one place. Footer and the rights-
attestation checkbox now link to the real documents.
Drafted from a clause inventory of OpusClip/Klap/Vizard/Submagic legals
plus a 2026 Spanish/EU compliance review. Notable substance:
- LSSI art. 10 identity (TONVI TECH SL, Málaga) — was missing entirely.
- Rights warranty covers URL-instructed downloads explicitly and declares
the attestation record (IP+UA+date) as evidence; DSA arts. 11-17
notice-and-action with repeat-infringer policy.
- Explicit output ownership (clips are the user's; free-tier watermark as
a written licence condition) and a no-AI-training commitment naming
Gemini/ElevenLabs/Whisper — clauses none of the competitors have.
- EU withdrawal per CJEU C-234/25: SaaS is a digital service, the 14-day
right survives with pro-rata payment (not the digital-content forfeit
the old page used); renewals do not reopen it. 15-day renewal reminder
duty (Ley 10/2025) stated.
- AI Act art. 50: dubbed clips declared as labelled/marked; users must
not strip marks.
- Privacy: per-purpose legal bases, named processors, DPF+SCC transfers,
real retention (7-day free clips, sub+7 days paid — matching
cloud/config.py), AEPD analytics exemption documented, no cookie
banner rationale.
- Spanish versions with prevalence clause (art. 60.1 TRLGDCU; AEPD has
fined foreign-language-only policies). renderPage supports page.lang.
New mcp_ui module holds the template: preview each 9:16 clip inline,
select the keepers and publish them via publish_clip from inside the
conversation. One template, three data paths, because the ecosystem has
not converged: baked-in JSON on the per-call embedded resource, the
ChatGPT Apps window.openai bridge, and the MCP Apps ready/render-data
postMessage handshake. Titles are JSON-escaped so a clip name cannot
break out of the script tag, and the template is fully inline because
host CSPs block external fetches.
The server grows resources/list, resources/read and the resources
capability; list_clips declares the template under both _meta.ui
.resourceUri and openai/outputTemplate. Non-UI clients see the same
text and structured content as before; the extra content entry is
spec-tolerated. The unknown-method protocol test moves off
resources/list, which is now a real method.
New static pages, each re-housing demand GSC already shows landing on the
homepage: no-watermark clip generator (the AI-answer gap: unwatermarked
free clipping only exists self-hosted), open-source AI video generator
(splits the text-to-video intent honestly), podcast-to-shorts (the SPLIT
layout as the capability no competitor page can show), YouTube-to-Shorts
converter (link import is free here, paid at Opus Clip), and an
automation recipe page (API + signed webhooks + n8n shape).
/mcp gains a checked comparison table: Opus Clip shipped MCP in July
2026, so the claim that survives is flat-minute billing and self-hosted
agent access with no meter, not MCP existence. All competitor claims
carry checked dates.
The rendered React landing had zero links to the static SEO pages, so
Googlebot's rendered homepage dropped the whole cluster; the static
pages' nav and footer missed /mcp and the /alternatives hub; and the
crawler fallback missed both too. Every surface now links the full set
with descriptive anchors.
The MCP server existed everywhere except the one page most visitors
see. Feature card + FAQ on the landing (mirrored in the SEO fallback,
which must stay in sync with Landing.jsx), and a new row in the README
edition table framing it honestly: both editions serve /mcp, but an
agent needs an endpoint that is always on, and only the hosted one is.
The MCP server documents itself over the protocol, but nothing on the
site existed for a human or an answer engine to cite when asked 'how do
I automate shorts with Claude/ChatGPT'. One page in the established
shape (TL;DR, one question per H2, FAQ schema): connect command, the
six tools, REST + webhooks, self-host parity, and pricing stated next
to every 'free'. Lands in sitemap.xml and llms.txt automatically via
the shared page list.
The 404 was rendered through the same template as the comparison pages, so it
carried a byline and "Published 2024-06-01 / Updated 2026-07-27", and its schema
declared an Article with an author and a publication date. Both assert authorship
of a page nobody wrote, and the date read as a bug to anyone who landed on it.
noindex pages now render without the byline and describe themselves as a plain
WebPage. Verified: 404.html has no byline, no datePublished anywhere, and a
WebPage node; the real pages keep their byline and Article node unchanged.
Three routing fixes, all in nginx.conf so they live in version control.
Apex to www is now a 301. Traefik was answering 307 because Coolify generates
`redirectregex.permanent=false` and hardcodes it, so pinning the label would be
overwritten on the next deploy. Moving the redirect into the container means the
app's `redirect` setting in Coolify must be `both`, otherwise Traefik still
redirects the apex before nginx ever sees it. A temporary redirect consolidates
nothing, and every canonical on the site pointed through it.
Unknown paths now return 404 instead of 200 with the SPA shell. The app routes
entirely through the hash (#/pricing, #/auth/callback), which never reaches the
server, so nothing deep-links to a path and the fallback was load-bearing for
nothing. Answering 200 with byte-identical markup for every made-up path made
the site look like a single page duplicated infinitely. The 404 body is a
branded page generated by the same renderer, marked noindex and kept out of both
the sitemap and llms.txt.
/gallery and /video/* now 301 to api.openshorts.app, which is where those
server-rendered pages actually live. The README has linked them on the apex since
they were written, and the apex quietly served the landing page instead.
Verified against the production nginx config in a container: 15 real routes 200,
6 made-up paths 404, both gallery paths 301 to the API host, apex 301s to www
preserving path and query. Coolify's health check for this app is disabled and
would target /, which still returns 200.
The dashboard is a client-rendered SPA, so the HTML served for / contained an
empty <div id="root"> and nothing else. Googlebot renders JavaScript and saw the
real landing page; GPTBot, ClaudeBot and PerplexityBot do not, and measured the
homepage as zero characters of text. That is why the site ranks #1 in Google for
its own name and is absent from AI answers. Verified: curl with a GPTBot UA
returned 13,651 bytes of markup and 0 characters of body text.
vite-plugin-seo.js fixes it at build time, with no runtime cost and no change to
how the app mounts:
- Injects crawler-visible homepage content into #root. React replaces it on
mount, so users get the app unchanged. Homepage now serves 7,524 characters
of text instead of 0.
- Emits eight standalone static pages: four "X alternative" comparisons plus
free-ai-clip-generator, open-source-video-clipper, how-openshorts-works and an
/alternatives hub. Commercial-investigation prompts are answered almost
entirely out of comparison content, and informational pages are cited far more
than product pages.
- Generates sitemap.xml (was one hand-written URL with a stale lastmod) and
llms.txt from the same page list so the three cannot drift.
Also corrects three things that were actively misinforming engines:
- canonical pointed at the apex, which 302s to www. It named a URL that only
ever redirects. Now www everywhere, matching what is served.
- The schema declared one SoftwareApplication at price 0. That is true of the
self-hosted edition and false of the hosted one, so the whole product read as
free. Split into SoftwareApplication (MIT, $0) and Service (Cloud, real
AggregateOffer of $12-59), and the FAQ answers now name both prices together.
- Opus Clip was described as "$15-228/month" and the Cloud tier as a "3-day free
trial". Both are stale. Competitor pricing now lives in seo/data.js with the
date it was checked rendered next to it on the page.
nginx: try_files gains $uri.html before $uri/, so the generated pages resolve at
their clean path with a 200. Resolving them as directories makes nginx 301 to a
trailing slash, which would point every canonical at a redirect.
Verified against the production nginx config in a container: all 12 routes 200,
no redirects, all 9 JSON-LD graphs parse, React mounts with a clean console.