diff --git a/Docs/Sprints/2026-11-03-overnight.md b/Docs/Sprints/2026-11-03-overnight.md index 5f961fc9..91dadd40 100644 --- a/Docs/Sprints/2026-11-03-overnight.md +++ b/Docs/Sprints/2026-11-03-overnight.md @@ -88,3 +88,11 @@ Verification: existing record-workspaces browser suite passed for nine real Razo Traced global ProjectAccessFilter and current-user access service before evaluating repository calls. Existing export and restore controllers are guarded by the global filter; Maps also checks access explicitly. Added behavioural tests that run the real filter and access service against an isolated repository boundary: reject foreign projects and scene exports, reject collaborator owner-only backup export, reject foreign restore-point download/restore/delete, preserve valid collaborator reads, propagate current author, and reject anonymous/invalid identities without querying data. No permission rules changed. Verification: solution build and full executable harness passed. Corrected B4 security analysis above after tracing the global filter; the retired null-project aggregate fallback was the remaining issue. D1 commit: ab5325d. + +### H — Sitemap resilience and live public SEO verification + +When WritingSolver:EnableIndexing is false, sitemap generation now skips loading the solver graph entirely. Previously a graph-loading failure could fail a sitemap that does not include solver pages. Expanded the existing publication regression to make the solver repository unavailable while indexing is disabled. Indexing flags and Development noindex policy are unchanged. + +Verification: solution build and full harness passed, including eligible solution URLs, inactive/unindexed exclusions and Development/Production indexing boundaries. Read-only live public audit found 505 sitemap URLs and exactly 52 solution pages, all successful with matching clean canonical URLs, unique descriptions, one H1 and parseable structured data; none had noindex metadata. Development GET verified X-Robots-Tag: noindex, follow. Public robots points at the canonical production sitemap. No Production changes performed. Audit details in /tmp/plotdirector-public-seo-audit.json (temporary evidence). + +Deployment preflight: verified effective database name PlotDirector_Development. Read-only status counts show no queued/running intelligence jobs, runs, synthesis, enrichment or import commits; pipeline is NeedsReview and candidate generations Ready. Recheck immediately before any restart. diff --git a/PlotLine.Tests/WritingSolverSeoTests.cs b/PlotLine.Tests/WritingSolverSeoTests.cs index b608d91f..cac3a8a2 100644 --- a/PlotLine.Tests/WritingSolverSeoTests.cs +++ b/PlotLine.Tests/WritingSolverSeoTests.cs @@ -18,7 +18,9 @@ internal static class WritingSolverSeoTests { private sealed class Repository(SolverGraph graph) : IWritingSolverRepository { - public Task GetAsync() => Task.FromResult(graph); + public bool Unavailable { get; set; } + public Task GetAsync() => Unavailable + ? throw new InvalidOperationException("Solver graph unavailable") : Task.FromResult(graph); public Task PublishAsync(string json, string editor) => throw new NotSupportedException(); } private sealed class Host(string environment) : IWebHostEnvironment @@ -85,7 +87,9 @@ internal static class WritingSolverSeoTests Check(!Sitemap(config).Contains(PublicSeo.AbsoluteUrl(config, "/problem-solver/" + first.Slug)), "Unpublished index flag ignored by sitemap."); first.Index = true; first.Active = false; Check(!Sitemap(config).Contains(PublicSeo.AbsoluteUrl(config, "/problem-solver/" + first.Slug)), "Inactive diagnosis entered sitemap."); first.Active = true; var disabled = new ConfigurationBuilder().AddInMemoryCollection(new Dictionary { ["WritingSolver:EnableIndexing"] = "false" }).Build(); + repo.Unavailable = true; Check(!Sitemap(disabled).Any(u => new Uri(u).AbsolutePath.StartsWith("/problem-solver")), "Disabled Solver entered sitemap."); + repo.Unavailable = false; foreach (var environment in new[] { "Production", "Development" }) { using var services = new ServiceCollection().AddSingleton(new Host(environment)).BuildServiceProvider(); diff --git a/PlotLine/Controllers/SitemapController.cs b/PlotLine/Controllers/SitemapController.cs index 2d5a178b..23f1d6a7 100644 --- a/PlotLine/Controllers/SitemapController.cs +++ b/PlotLine/Controllers/SitemapController.cs @@ -25,9 +25,9 @@ public sealed class SitemapController(IHelpService help, IConfiguration configur new("/terms", "yearly", "0.3") }; - var graph = await solver.GetAsync(); if (configuration.GetValue("WritingSolver:EnableIndexing", true)) { + var graph = await solver.GetAsync(); urls.Add(new("/problem-solver", "monthly", "0.8")); if(editorial is not null) {