29 lines
4.3 KiB
Markdown
29 lines
4.3 KiB
Markdown
# Permanent result URLs
|
|
|
|
Baseline: `f9cd616` (Development runtime `127a85d`). Development only; Production unchanged.
|
|
|
|
Previously the answer POST redirected to the transient solver Index with protected answer history in `?state=...`, including completed diagnoses. The permanent slug action separately rendered a generic article.
|
|
|
|
A completed genuine diagnosis now saves its accepted choices server-side and redirects directly to the existing primary diagnosis slug. Completed state-bearing GETs also bridge and redirect. Reassurance and insufficient evidence remain transient. No solver graph, coefficients, thresholds, evidence gates or routing data changed.
|
|
|
|
`WritingSolverResultContext` uses the existing application memory-cache service with an absolute two-hour lifetime. A cryptographically random 256-bit opaque HttpOnly, SameSite=Lax, path-scoped cookie identifies the browser; HTTPS requests set Secure. Cache keys hash the token, authentication subject/scheme and diagnosis slug. Entries contain only graph version and accepted choice IDs. No manuscript, workspace, scores, evidence prose or answer history enters the cookie or permanent URL. This single-instance implementation intentionally loses temporary enhancements after restart; another instance without the entry renders generic content. A distributed deployment would need a shared cache if cross-instance persistence is desired.
|
|
|
|
The slug GET re-evaluates accepted choices against the current graph and checks that the primary diagnosis still matches. Expiry, eviction, absent cookie or graph mismatch produces the ordinary useful generic page. Responses are private/no-store with Vary: Cookie, preventing shared HTML caches from leaking evidence. Anonymous/authenticated identities and different authenticated subjects do not share entries. Visitors sharing only a URL receive no original evidence.
|
|
|
|
The same permanent page now uses the authored result component for generic and contextual arrivals: diagnosis, concise explanation, Start here, Look for, approved optional secondary/article, real screenshot placeholder and existing signed-in/out CTA. Only contextual arrivals add actual evidence, supporting patterns, history and Back. Existing generic editorial prose remains in a compact disclosure; related diagnosis and primary feature links remain crawlable. No article catalogue was restored.
|
|
|
|
The final POST redirects straight to the slug so browser Back returns to the last question. Explicit Back also carries the protected prefix for that question. Forward and refresh retain context while available. Revising a prefix discards stale answers through the unchanged engine and can redirect to a different slug.
|
|
|
|
SEO uses the existing page title, description, canonical, OG and WebPage JSON-LD metadata, with the same clean URL for either presentation. State pages stay noindex. Existing sitemap generation includes all active/indexable diagnoses and never includes state. Owner explicitly chose to preserve Development's `WritingSolver__EnableIndexing=false`; indexability and the 52 sitemap entries are verified in the isolated test host with indexing enabled. Development remains noindex and omits solver sitemap entries, as intended.
|
|
|
|
Validation and live deployment evidence: see Deployment.md after verification.
|
|
|
|
## Automated validation
|
|
|
|
- Solution build passed (two pre-existing nullable warnings).
|
|
- Full executable regression harness: **392 PASS**, including the new clean transition/privacy fixture and unchanged solver acceptance, prefix, reachability, neutral and presentation suites.
|
|
- Indexing-enabled browser host: all **52** direct permanent slugs return 200 with one diagnosis heading, primary capability, clean canonical and crawlable feature link. Sitemap includes all 52, without state URLs.
|
|
- Browser completion, personal evidence, refresh, fresh-session isolation, Back/Forward, explicit Back prefix revision to a different diagnosis, clean metadata and no horizontal overflow passed at **390/1440px**, with **JavaScript on/off**.
|
|
- Context tests cover opaque HttpOnly cookie, refresh, Back prefix, private/no-store, fresh visitors, anonymous vs authenticated isolation, different authenticated subjects, cache loss and graph-version mismatch.
|
|
- No solver graph files changed. Existing repair regression still proves all 60 cases / 290 prefixes, all 52 primary-capable, and zero confirmed-problem dead ends.
|