PlotDirector/Docs/Deployment/ProductionSeparation-20261127.md

13 KiB

Production separation — completed 27 November 2026

Owner explicitly approved this cutover and confirmed pending PWA/editor/Word work was saved and windows closed. Nginx switched at 23:03:34 UTC. Production now has two independently signed, compressed, deployed services. Catherine is unchanged.

Product Origin Source commit Release / receipt
Application https://app.plotdirector.com a36e1d8c172f81d7e22f513c96b66e8568f2c7c4 plotdirector-production-separation-a36e1d8c172f-20261127 / 20261127T230312Z-0b6dbdee4c45
Website https://plotdirector.com 681edbd4c3d9dd53a59469b443848f8a71a870b6 website-production-separation-20261127-v4 / f3771060-6105-40fc-94dc-6fc06ad801ee

Source repositories remain /srv/repos/PlotDirector (separation branch) and /srv/repos/PlotDirector.Website (main). Later documentation/test/template commits do not change these deployed binary identities. Internal PlotLine names remain.

Persistence and recovery

No SQL migration executed. Production retains the 337-entry ledger and schema 96de8e6cdd4001f4e2cf3ceff28ee0238e0c0c8fc79d662928a76a45e05f4e35. The activation made and verified a COPY_ONLY/CHECKSUM backup: /srv/backups/sql/PlotLine-predeploy-20261127T230312Z-0b6dbdee4c45.bak. All non-domain environment settings, database connection, secrets, uploads and Data Protection paths/discriminator were retained. Only AllowedHosts, WebsiteBaseUrl and HelpContent path changed. Existing accounts, subscriptions and manuscripts remain in the same database. The owner subsequently confirmed normal login, Projects, manuscripts, subscription, theme, Context Workspace and authorised administrator help.

Protected configuration backup: /srv/backups/configuration/plotdirector-before-separation-20261127T224859Z. Previous combined source: 9dcd29d423b20e373e49fb28180d993c40aa165d. An independently signed exact original binary rollback package is staged and validated as plotdirector-rollback-exact-9dcd29d423b2-separation-20261127. It matches deployed baseline DLL SHA-256 7fc84cb642bba8ddd9726acdcc5fed9566544b4adcff3a4ec09f37d47df3aa29. Do not substitute the attempted rebuild, whose identity differed and was refused.

Atlas preparation/recovery artifacts: /home/nick/.local/share/plotdirector-production/releases/separation-20261127/. Keep the original packages, signatures, full plans, backups and receipts.

Infrastructure and isolation

Application remains plotdirector.service, user plotdirector, loopback 5001, /srv/plotdirector/current. Website is plotdirector-website.service, user plotdirector-website, loopback 5004, /srv/plotdirector-website/current. Website has its own transfer account, SSH/signing keys, forced command, protected helper/configuration, immutable releases, receipts, lock and logs. Neither website identity has application/Catherine/sudo/adm/docker group membership or application configuration/help access. Website deployment never invokes SQL or the app service.

Both DNS origins resolve to web1. A separate app certificate covers app.plotdirector.com, expires 25 February 2027, and passed targeted renewal dry-run. Existing apex certificate, renewal hook and certbot timer were preserved. The app-specific deploy hook only reloads validated Nginx for the app lineage. Catherine certificate/config/service were untouched.

Reviewed vhosts retain TLS 1.2/1.3, 110 MB request limit, maintenance gate, existing forwarded-client policy, long-lived application connections and private deployment health routes. Public-cookie forwarding whitelists only the website's antiforgery and solver cookies; application authentication cookies never enter the website process. API/SignalR/webhook/taskpane legacy locations proxy to 5001 with bodies and upgrades. Browser application links redirect 308 to the identical app path/query. Legacy AJAX and controller POSTs proxy. Unknown public routes remain 404. No catch-all home redirect.

Shared help and pricing

The authoritative application Markdown declares visibility. The Production v3 publication from 242e32e4a6d02a911ab9f8a43a6b7ff6af2b54b3 has two projections:

  • Public: 367 articles, manifest a1dade89dc3fb624cbf241e2a39d7caa682e5ef777802f4721b5e1f2e9e5af2f.
  • Application: 409 articles, manifest 58f6cb23f06556df671aec99811b5c61ebdadfd0f42f80c618f3139ff3ca34b0.

Stores are /srv/plotdirector-website/shared/help/current and /srv/plotdirector/shared/help/current. The latter is root:plotdirector, directories 0750/files 0640, inaccessible to the website runtime. All 42 administrator articles and their category are absent from public navigation/search/related/sitemap/machine indexes and return 404 anonymously, including legacy aliases. They remain accessible to the existing authenticated administrator allowlist; owner acceptance confirmed it. Internal authoring guidance is not published. Publication remains independently versioned and hot-reloadable without restarting either application. Use Tools/PublicContent/README.md and the website Docs/Content.md; select the correct Production audience and approved digest, never Development/unclassified content.

Pricing was freshly exported read-only from the authoritative Production PlotLine database using dbo.SubscriptionLevel_ListActive. All four plans' prices, limits and checkout IDs matched the qualified public facts. Published snapshot/provenance are in the website Content directory. It is not an automatic database feed: future plan changes need the reviewed Tools/PublicPricing export and independent website publication. No customer/provider secrets or Development limits were published.

Verification and downtime

Evidence is in Evidence/ProductionSeparation-20261127.

  • Exact application source already passed the normal build and 896-check full executable regression. Production helper verified signature, checksums, backup, idle state, unchanged schema/full ledger, runtime identity and activation history.
  • Final website passed a Production loopback crawl before traffic switched, then all 484 rendered public routes, 510 internal paths, 42 assets, 406 sitemap URLs, canonical/metadata/JSON-LD/indexing, and all restricted help URLs/aliases externally.
  • 26 desktop/mobile public browser checks passed, including actual solver POSTs, public help search and the absence of website PWA installation. Screenshots retained.
  • 178 application/protocol smoke checks passed: account pages, safe deep-link return URLs, legacy redirects/AJAX, API authentication, all four SignalR negotiation guards, unsigned webhook rejection on both domains, taskpane and PWA URLs, TLS and indexing. These are endpoint/authentication checks, not authenticated live SignalR execution.
  • Ten additional application browser checks passed, including real service-worker registration scoped to the app, no caches and a failed offline browser fetch. No login screenshots, credentials, private manuscripts or browser storage retained.
  • The owner separately confirmed normal authenticated application acceptance.
  • Website continued returning 200 throughout the application restart; its PID/start time did not change. Earlier website activations did not restart the baseline app.
  • Public sampling saw five failed one-second samples, approximately five seconds of HTTP unavailability (sampling bound: about four to six seconds), followed by four samples of temporary sign-in redirection before Nginx switched. Total homepage interruption was approximately nine seconds. Helper measured 7.51 seconds confirmed-inactive to application health-ready; 3.39 seconds to start command completion. No further failed public samples. Website outage: none observed.
  • Catherine response hash and seven tracked files match preflight. Its process remained running since 26 November; no restart or unrelated service change.

Two pretraffic website provisioning issues were corrected: bounded receiver telemetry was initially rejected, and a five-second cold solver load exceeded a three-second smoke request limit. Telemetry remains untrusted, bounded and never authorizes payloads; page smoke requests now allow a bounded 15 seconds while health requests remain three seconds. All 14 deployment security tests pass. Failed initial artifacts/receipts were preserved; guards stopped the unexposed website. No failed Production traffic cutover or unqualified automatic rollback occurred. Website v3 is superseded by v4's explicit cookie isolation; use v4 as the independent website rollback floor.

Integrations and remaining manual acceptance

Read-only Stripe inspection verified that the owner updated the single enabled webhook to https://app.plotdirector.com/api/stripe/webhook, preserving all six event types. No duplicate endpoint, agent-written provider change, live charge or synthetic valid payment event was made. Legacy webhook proxy remains. Next legitimate webhook/payment delivery is still a manual acceptance item; unsigned request rejection does not prove real signature/event processing. Provider signing configuration was not changed by us.

Live email delivery remains blocked by the pre-existing acceptance permission fence. Log comparison before/after cutover shows the same EmailQueue_ResetStuckSending EXECUTE denial; it is not a new domain regression. Restoring outbound queue operation requires a separate review/authorisation under the existing Production acceptance procedure. Real email verification/reset delivery and MFA-device round trips remain manual; rendering and legacy token/query routing passed. Existing worker/acceptance/egress restrictions were not enabled or relaxed. Physical Windows/Word capture/synchronisation, SignalR behaviour inside Word and actual PWA installation remain owner acceptance. Follow Companion and PWA migration.

Independent future publishing

Application preparation uses the existing full Production plan/ledger and signing key; qualify each new exact source and schema before signing. Standard compressed workflow:

python3 Tools/Deployment/deploy.py --bundle /absolute/qualified-new-app-bundle \
 --identity /home/nick/.ssh/plotdirector-production \
 --public-key /home/nick/plotdirector-phase1-20261125/release-signing/phase1-candidate.pub.pem \
 --receipt /absolute/new-app-operation.json --public-acceptance --activate

Each operation requires a unique release ID and a new output/receipt path. No migration flag is needed for code-only releases. Application activation does not restart website.

Website commands run from its independent clean committed checkout:

python3 Tools/Deployment/website_release.py prepare --source /absolute/clean/website \
 --output /absolute/new-website-bundle --release-id UNIQUE-ID \
 --signing-key /home/nick/.local/share/plotdirector-website-production/signing/private.pem \
 --public-key /home/nick/.local/share/plotdirector-website-production/signing/public.pem
python3 Tools/Deployment/transfer.py /absolute/new-website-bundle \
 --identity /home/nick/.ssh/plotdirector-website-production

Use pinned SSH with plotdirector-website-deploy@85.190.124.132 for validate UNIQUE-ID, activate UNIQUE-ID, rollback PREVIOUS-ID, receipt UUID. Strict options remain in Production.md. Logs: journalctl -u plotdirector / -u plotdirector-website, plus separate Nginx app/website logs. Routine restricted publishing needs no administrator. Both temporary Atlas administrator authorisations were removed (including the additional key from the corrected initial request); desktop/laptop key lines were preserved byte-for-byte. Administrator reconnection is denied, while both restricted receipt commands still work. Temporary pricing-export binaries/private configuration and the task SSH tunnel were removed.

Rollback

Website-only: reverify/rollback its retained signed v4-or-later compatible release; app and database stay untouched. Help rollback selects an approved audience-specific immutable publication; never restore unrestricted or unclassified public help.

Whole cutover/app emergency: fence writes if integrity is uncertain. The prepared root-only operators/rollback-infrastructure.py in the protected configuration backup restores the backed-up app environment and original PlotDirector vhost with a help security fence on both origins, validates/reloads Nginx, and preserves app TLS/legacy clients. Then invoke the restricted app command:

rollback plotdirector-rollback-exact-9dcd29d423b2-separation-20261127

The retained compressed package already passed schema/ledger validation. Old binaries may not publicly serve help/drawers/diagnostics/sitemap/LLM indexes until corrected visibility is restored. Do not simply restore the unrestricted baseline vhost. No database restore, key rotation, upload replacement or Catherine change is part of rollback. Administrator configuration recovery may require temporary key authorisation; normal application/website rollback remains restricted. No rollback was needed after the successful traffic switch.