refac: article reads, story delete, no leaks, stored SEO status, rate limit, cleanup (%site%, article repo split, old lang repos, one default per site rule to domain)

This commit is contained in:
Florian Sylvain committed 2026-11-03 16:01:52 +01:00
1 parent 9d284e65a9
commit 7c15206170
85 files changed
+1788 -593

No files matched your search

@@ -303,6 +303,14 @@ Feature: Localized public API, SEO output and the existing surfaces that show la
Then fallbacks.site_text_skipped is true
And this is the documented limitation of treating the site text as written in the current default language
Scenario: The SEO check and the list status follow the same language rule
Given journal's default_description is 108 characters long and versions 10 (en, default) and 12 (fr) have no description, excerpt or body sentence
When the owner sends POST /v1/article/10/seo/check and POST /v1/article/12/seo/check with {}
Then only the fr check reports desc_short
And the seo_suggestions of 12 in GET /v1/article/ is one more than that of 10
When the owner makes fr the default language of journal
Then the next GET /v1/article/ reports one more suggestion for 10 than for 12, without any edit of the articles
Scenario: Brand text and images stay shared
Then title_template and site_name apply to every language
And the image chain (social, cover, site default image) is unchanged and each version's cover_image_alt stays its own
@@ -326,6 +334,15 @@ Feature: Localized public API, SEO output and the existing surfaces that show la
When an anonymous caller sends GET /v1/site/journal/sitemap
Then the url of version 20 is "https://www.journal.example/spring" as before this slice
Rule: The public routes and the sitemap are rate limited per client
Scenario: The public article routes and the sitemap share one budget per client
Given one client address has sent 120 requests within a minute to /v1/public/... and /v1/site/journal/sitemap together
When it sends one more request to either
Then the response status is 429 with Retry-After and the body "Too many requests. Please try again later."
And another client address is still answered
And X-Real-IP is used as the client address only when the connection comes from TRUSTED_PROXIES
Rule: Media usage names the language and counts a story once
Background:
@@ -400,6 +417,7 @@ Feature: Localized public API, SEO output and the existing surfaces that show la
And the tool descriptions no longer say that a title cannot be changed
And get_article, list_articles and get_sitemap return the JSON they already return, which now carries lang and story_id
And no tool is added for the public routes
And the MCP server keeps calling the authenticated HTTP routes with its API key rather than the use cases, for the reasons in docs/mcp.md
Scenario: The llms documents mention languages
Then docs/llms.md, docs/llm/ and the llms-full output describe lang, story_id, alternates, the two public routes and the fallback rule