chore: more cleanup in the specs

This commit is contained in:
2026-04-09 17:37:46 +02:00
parent 92f0687549
commit b7807161f0
10 changed files with 334 additions and 0 deletions

View File

@@ -49,6 +49,20 @@ entity SiteGeneration {
generated_files: GeneratedFile with project_id = this.project_id
}
surface GenerationStatusSurface {
context generation: SiteGeneration
exposes:
generation.project_id
generation.base_url
generation.language
generation.blog_languages
generation.max_posts_per_page
generation.pico_theme
generation.sections
generation.generated_files.count
}
invariant IncrementalByContentHash {
-- Files are only written when content_hash changes
-- generatedFileHashes table tracks (projectId, relativePath, contentHash)
@@ -61,6 +75,21 @@ invariant MultiLanguageRoutes {
-- Each language subtree gets its own feeds and archives
}
invariant CanonicalBaseUrlConfigured {
for generation in SiteGenerations:
generation.base_url != ""
}
invariant NamedPicoTheme {
for generation in SiteGenerations where generation.pico_theme != null:
generation.pico_theme != ""
}
invariant GeneratedFilesTracked {
for generation in SiteGenerations:
generation.generated_files.count >= 0
}
-- Core section: root pages, sitemap, RSS, Atom, calendar.json
rule GenerateCoreSectionPages {