docs: record live independent Production publishing and edge verification

This commit is contained in:
Nick Beckley 2026-11-27 23:17:15 +00:00
parent 681edbd4c3
commit 0ac72e60c1
6 changed files with 65 additions and 16 deletions

View File

@ -41,3 +41,5 @@ No Production activation or infrastructure modification without explicit approva
Do not modify unrelated web1 sites, especially catherinelynwood.com.
Help publication format 2 must declare audience public and explicit Visibility=public on every served article. Reject application/legacy/unclassified artifacts. Article visibility is maintained only in authoritative application Markdown, never a website exclusion list. See Docs/HelpVisibility.md. Pricing is an explicitly published snapshot, not an automatic DB feed; use the application PublicPricing exporter and review the correct environment before updating it.
Production cutover completed with owner approval on 27 November 2026. See Docs/Publishing.md for current independent identities, signing/SSH keys and commands. Public cookies use distinct names and an explicit Nginx allowlist; never forward application authentication cookies to the website process.

View File

@ -1,3 +1,10 @@
> Owner-approved Production cutover completed on 27 November 2026 at 23:03:34 UTC.
> Live website source: `681edbd4c3d9dd53a59469b443848f8a71a870b6`, release `website-production-separation-20261127-v4`.
> Direct authoritative Production pricing was published. All 484 routes/406 sitemap URLs,
> 26 browser checks and administrator-help exclusions passed externally. Fourteen
> publishing-security tests passed. Current operations are in Publishing.md; the
> application ProductionSeparation-20261127 report holds consolidated evidence.
# Development qualification
Both products are functioning independently on Atlas. The private Gitea repository

View File

@ -77,7 +77,9 @@ This re-verifies the retained signed package and retained files before switching
writes a new rollback receipt. It does not roll back shared help; select its prior
approved content publication independently if necessary.
## Production (prepared; NOT activated)
## Production (live after owner-approved cutover)
Current application origin is `https://app.plotdirector.com`; website is `https://plotdirector.com`. Qualified website source `681edbd4c3d9dd53a59469b443848f8a71a870b6` is live as `website-production-separation-20261127-v4`, receipt `f3771060-6105-40fc-94dc-6fc06ad801ee`. Use v4 or later compatible releases as the website rollback floor.
Templates are in `Tools/Deployment/production`. Production preparation must use a
separate signing key and deployment SSH identity. The website uses port 5004, service
@ -110,3 +112,30 @@ Preparation/transfer/validation do not authorize activation. Retain receipts/rel
The application's independent Development/Production commands remain documented in
`/srv/repos/PlotDirector/Docs/Codex/Deployment.md` and `Docs/Deployment/Production.md`.
Website publication never invokes those commands and never deploys application SQL.
Actual independent Production signing key: `/home/nick/.local/share/plotdirector-website-production/signing/private.pem`
(public key alongside it). SSH identity: `/home/nick/.ssh/plotdirector-website-production`.
Private signing key remains on Atlas; only its public key is installed on web1.
The forced account accepts upload/validate/activate/rollback/receipt, rejects shells,
and cannot change its helper or application configuration. Routine code publishing
requires no administrator access. Content-store publication remains separately protected.
The installed helper accepts only bounded receiver telemetry in addition to signed
bundle members; that telemetry is untrusted and never authorizes payloads. Cold-page
smokes allow 15 seconds, while health requests remain bounded to three seconds.
Nginx forwards only `PlotDirectorWebsiteAntiforgery` and `PlotDirectorWebsiteSolverResult`
cookies to this process. Keep this allowlist aligned with any deliberately added public
cookie. Never forward application authentication cookies or share cookie domains.
Post-cutover validation through the legacy compatibility edge:
```sh
python3 Tests/verify.py --origin https://plotdirector.com --production --legacy-application-bridge
WEBSITE_ORIGIN=https://plotdirector.com APPLICATION_ORIGIN=https://app.plotdirector.com npm run test:browser
```
Standalone website validation omits `--legacy-application-bridge`; it then requires
application hubs to be absent. The real edge intentionally proxies those protected
legacy endpoints and must return an authentication denial instead of website content.
See the application `Docs/Deployment/ProductionSeparation-20261127.md` for consolidated
verification, exact Production pricing provenance, preserved help publication and recovery.

View File

@ -22,7 +22,7 @@ class Page(HTMLParser):
if self.in_title:self.title+=data
if self.in_ld:self.ld[-1]+=data
def run(origin,production=False):
def run(origin,production=False,legacy_bridge=False):
root=Path(__file__).resolve().parents[1];public=json.loads((root/'Tests/public-urls.json').read_text())['urls']
graph=json.loads((root/'PlotDirector.Website/Content/solver.json').read_text());editorial=json.loads((root/'PlotDirector.Website/Content/WritingSolver/Editorial/pages-v1.json').read_text())
urls={urllib.parse.urlsplit(u).path for u in public}
@ -70,9 +70,10 @@ def run(origin,production=False):
if modified is not None and datetime.fromisoformat(modified.text).date()>datetime.now(timezone.utc).date():errors.append(path+': future modification date')
if sitemap_urls!=set(public):errors.append('Sitemap differs from approved Production URL inventory')
for path in ['/missing-page-acceptance','/help/missing/missing','/site.webmanifest','/service-worker.js','/hubs/word-companion-follow']:
try:fetch(path);errors.append(path+': expected 404')
expected=401 if legacy_bridge and path=='/hubs/word-companion-follow' else 404
try:fetch(path);errors.append(path+': expected '+str(expected))
except urllib.error.HTTPError as e:
if e.code!=404:errors.append(path+': expected 404 got '+str(e.code))
if e.code!=expected:errors.append(path+': expected '+str(expected)+' got '+str(e.code))
articles=json.loads((root/'PlotDirector.Website/Help/published/articles.json').read_text())
sample=articles[0];status,fragment,headers=fetch('/HelpDrawer/Article?key='+urllib.parse.quote(sample['ContextKey']))
if status!=200 or sample['Title'] not in fragment.decode() or 'noindex' not in headers.get('X-Robots-Tag',''):errors.append('published legacy help fragment differs')
@ -94,7 +95,7 @@ def run(origin,production=False):
if 'story-intelligence-admin' in body.lower() or 'storyIntelligence.admin.' in body:errors.append(path+': restricted navigation/index entry')
for path,page in pages.items():
if any(urllib.parse.urlsplit(u).path in restricted_paths for u in page.links):errors.append(path+': restricted related/navigation link')
report={'origin':origin,'productionPolicy':production,'baselineUrls':len(public),'renderedPages':len(pages),'internalPaths':len(links),'assets':len(assets),'restrictedArticlesChecked':len(restricted['articles']),'errors':errors,'passed':not errors}
report={'origin':origin,'productionPolicy':production,'legacyApplicationBridge':legacy_bridge,'baselineUrls':len(public),'renderedPages':len(pages),'internalPaths':len(links),'assets':len(assets),'restrictedArticlesChecked':len(restricted['articles']),'errors':errors,'passed':not errors}
print(json.dumps(report,indent=2));return bool(errors)
if __name__=='__main__':
p=argparse.ArgumentParser();p.add_argument('--origin',required=True);p.add_argument('--production',action='store_true');a=p.parse_args();sys.exit(run(a.origin.rstrip('/'),a.production))
p=argparse.ArgumentParser();p.add_argument('--origin',required=True);p.add_argument('--production',action='store_true');p.add_argument('--legacy-application-bridge',action='store_true');a=p.parse_args();sys.exit(run(a.origin.rstrip('/'),a.production,a.legacy_application_bridge))

View File

@ -10,19 +10,22 @@ server {
server_name app.plotdirector.com;
ssl_certificate /etc/letsencrypt/live/app.plotdirector.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/app.plotdirector.com/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
access_log /var/log/nginx/plotdirector-app-access.log;
error_log /var/log/nginx/plotdirector-app-error.log;
client_max_body_size 100m;
client_max_body_size 110m;
add_header X-Robots-Tag "noindex, nofollow" always;
location ~* ^/_deployment(?:/|$) { return 404; }
location / {
include /etc/nginx/snippets/plotdirector-maintenance.conf;
proxy_pass http://127.0.0.1:5001;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $plotdirector_website_upgrade;
proxy_read_timeout 120s;
proxy_set_header Connection $plotdirector_connection_upgrade;
proxy_read_timeout 3600s;
proxy_buffering off;
}
}

View File

@ -20,6 +20,7 @@ server {
server_name www.plotdirector.com;
ssl_certificate /etc/letsencrypt/live/plotdirector.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/plotdirector.com/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
return 301 https://plotdirector.com$request_uri;
}
server {
@ -27,9 +28,10 @@ server {
server_name plotdirector.com;
ssl_certificate /etc/letsencrypt/live/plotdirector.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/plotdirector.com/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
access_log /var/log/nginx/plotdirector-website-access.log;
error_log /var/log/nginx/plotdirector-website-error.log;
client_max_body_size 100m;
client_max_body_size 110m;
gzip on;
gzip_types text/plain text/css application/javascript application/json application/xml image/svg+xml;
location ~* ^/_deployment(?:/|$) { return 404; }
@ -37,23 +39,26 @@ server {
# Browser redirects are insufficient for these legacy integration clients.
# Keep taskpane scripts/styles/icons on the same legacy origin during client updates.
location ~* ^/(api|hubs|native-companion|word-companion|uploads|css/(?:word-companion|notifications)\.css|js/(?:notifications|word-notifications|word-companion-host(?:\.min)?)\.js|android-chrome-(?:192x192|512x512)\.png|apple-touch-icon\.png)(?:/|$) {
include /etc/nginx/snippets/plotdirector-maintenance.conf;
proxy_pass http://127.0.0.1:5001;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $plotdirector_website_upgrade;
proxy_read_timeout 120s;
proxy_read_timeout 3600s;
proxy_buffering off;
add_header X-Robots-Tag "noindex, nofollow" always;
}
# Published help images belong to the website, even though the legacy URL
# contains the former application drawer controller name.
location ~* ^/HelpDrawer/(?:Image|Article)$ {
include /etc/nginx/snippets/plotdirector-maintenance.conf;
proxy_pass http://127.0.0.1:5004;
proxy_set_header Cookie "$plotdirector_public_antiforgery$plotdirector_public_solver";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
}
location ~* ^/(Acceptance|Account|Admin|Ai|AiAdministration|Analytics|Appearance|Archives|BookRecovery|Books|Chapters|CharacterAttributes|CharacterWorkspace|Characters|ContextNames|ContextNavigation|ContextRelationshipLenses|ContextTools|ContinuityExplorer|DeploymentHealth|Dynamics|Exports|FeatureRequests|FloorPlans|Geography|HelpDiagnostics|HelpDrawer|Imports|IntelligenceReview|IntentAssessment|InvestigationCompanion|LocationWorkspace|Locations|ManageAccount|ManuscriptReader|Maps|NameVerification|Names|NarrativeFocus|NativeChapterSync|NativeCompanion|NativeCompanionAuth|NativeCompanionWorkflow|NativeInstallation|NativeManuscriptCapture|NativePresence|NativeWorkspace|Onboarding|ParagraphManuscript|PlotLineWorkspace|PlotLines|PlotThreads|ProjectCollaborators|ProjectMetrics|ProjectRestorePoints|Projects|RelationshipMap|Scenarios|SceneMetrics|Scenes|SharedFocus|SpatialContext|StoryAssets|StoryBible|StoryCalendar|StoryPoint|StripeWebhook|Timeline|Toolbar|Warnings|WordCompanion|WordCompanionHost|Writer|WriterActivities|WriterAuthoring|WriterInvestigations|WriterPlanning|WriterReview|WriterWord|WriterWork|Writing|WritingActivity|WritingSolverAdmin|WritingSolverReview|WritingSolverWorkspace|admin|intelligence-review|manuscript|onboarding|InvestigationCompanion|problem-solver/workspace|writing-problems/workspace|Home|Pricing/(?:StartTrial|Checkout))(?:/|$) {
@ -66,20 +71,22 @@ server {
return 308 https://app.plotdirector.com$request_uri;
}
location @plotdirector_legacy_application {
include /etc/nginx/snippets/plotdirector-maintenance.conf;
proxy_pass http://127.0.0.1:5001;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
add_header X-Robots-Tag "noindex, nofollow" always;
}
# Retain original public Help and solver URLs, including legacy help redirects.
location / {
include /etc/nginx/snippets/plotdirector-maintenance.conf;
proxy_pass http://127.0.0.1:5004;
proxy_set_header Cookie "$plotdirector_public_antiforgery$plotdirector_public_solver";
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
}
}