121 lines
7.5 KiB
Markdown
121 lines
7.5 KiB
Markdown
# Shared public content
|
|
|
|
The authoritative application-help source remains
|
|
`PlotDirector/PlotLine/Help/Articles`. Context keys, category slugs, article slugs,
|
|
search, related articles and the existing Markdown renderer are retained. The
|
|
application's contextual drawer retains the same service/renderer and can read its
|
|
own separately installed approved publication. Without HelpContent:Path it keeps
|
|
the original file-source behavior used by source tools and existing tests. Website content
|
|
never comes from a running application, SQL query or an HTTP call to the application.
|
|
|
|
`Help/published` is the checked-in, generated bootstrap publication, not an editable
|
|
second documentation source. Its manifest identifies source commit, publication
|
|
channel, version and every SHA-256. Normal publication uses the external content
|
|
store, so documentation updates require no application/website restart or deployment.
|
|
The website reloads the current publication when its manifest changes and generates
|
|
its index, categories, search results, canonical article URLs and sitemap from those
|
|
same approved records. Original identifiers and collision-resolved slugs are exported
|
|
by the existing application HelpService, rather than independently recomputed.
|
|
Modification dates come from each article's last Git commit, not packaging time.
|
|
`Content/page-modified.json` pins genuine source modification dates for the existing
|
|
public pages; update the relevant entry when their published content changes. The
|
|
help index/category/article dates derive from the approved publication. No build-time
|
|
or request-time timestamps are invented for the sitemap.
|
|
|
|
## Application developer: publish
|
|
|
|
1. Commit the help changes in the application repository. Review exactly which
|
|
public article URLs and linked assets are appropriate for the target release.
|
|
Never publish a directory glob. Internal and unreleased content needs exclusion.
|
|
2. Create a private approval JSON outside the checkout with `sourceCommit` (full
|
|
current SHA), `channel` (`Development` or `Production`), `audience` (`public` or `application`), `version` (unique content
|
|
version) and `articles` (explicit array of existing public article URLs).
|
|
`Tools/PublicContent/production-approval.json` records the initial released URL
|
|
approval; it is historical input, not blanket approval for later changes.
|
|
3. For Production, confirm that the content describes the deployed application or
|
|
has explicit approval as compatible with it. Development approval is insufficient.
|
|
4. Export from the exact source commit to a new directory:
|
|
|
|
```sh
|
|
dotnet run --project Tools/PublicContent/PublicContent.csproj -- \
|
|
/srv/repos/PlotDirector /absolute/approval.json /absolute/new-help-publication
|
|
sha256sum /absolute/new-help-publication/manifest.json
|
|
```
|
|
|
|
5. Retain the artifact and approval with the release evidence. Pass the manifest
|
|
digest through the reviewed publication record, separately from untrusted files.
|
|
A tar.zst archive of this directory is sufficient for transport; extract only
|
|
trusted archives to a private staging directory. No new shared repository needed.
|
|
Publishing help does not activate application code or invoke database operations.
|
|
|
|
## Website developer/operator: consume
|
|
|
|
Use the independent website checkout:
|
|
|
|
```sh
|
|
python3 Tools/consume_help.py /absolute/new-help-publication \
|
|
--store /absolute/content-store \
|
|
--channel Development \
|
|
--manifest-sha256 APPROVED_SHA256
|
|
```
|
|
|
|
For the installed Atlas website, the administrator uses
|
|
`--store /opt/plotdirector-website-dev/shared/help`; Production uses
|
|
`/srv/plotdirector-website/shared/help` and **must use `--channel Production`**.
|
|
Both channels are usable in Development, but explicitly choose the approved channel.
|
|
For application help, consume the **application-audience artifact and its approved digest** into
|
|
`/opt/plotdirector-dev/shared/help` (Development) or `/srv/plotdirector/shared/help`
|
|
(Production), using the application's `HelpContent__Path` to select its own `current`.
|
|
These are immutable public/application projections of one authoritative source, not separately edited documentation.
|
|
Neither deployment operates the other's store. Publish/rollback each pointer explicitly;
|
|
both services reload their own approved content without a restart.
|
|
|
|
The stores are administrator-owned. The helper validates checksums, channel, paths and
|
|
public article identities, installs an immutable digest-named directory and atomically
|
|
switches `current`. No service restart follows. `HelpContent__Path` selects `current`.
|
|
Retain old directories. Rollback is an atomic `current` symlink replacement to a
|
|
previous approved directory; never edit a published directory. A website code release
|
|
keeps the external content pointer, so its rollback does not silently republish help.
|
|
|
|
## Other public content and branding
|
|
|
|
`Content/solver.json` is the complete published Development graph exported read-only
|
|
through `dbo.WritingSolver_Get`, without SQL/authentication dependencies in this product.
|
|
Editorial/result/payoff JSON and the deterministic engine are retained as extraction
|
|
version 1. The public website now owns future public solver development; application
|
|
workspace actions remain application functionality. Validate the whole graph before
|
|
publishing. Do not maintain parallel edits to the old application's public catalogue.
|
|
The migration compared all 78 solver/browse/feature pages with live Production; their
|
|
public text matches. Solver indexing was intentionally disabled in Production and remains so.
|
|
|
|
`Content/pricing.json` is a public plan snapshot, not an entitlement or checkout engine.
|
|
Payment actions always go to the application, which remains authoritative for billing.
|
|
The baseline snapshot was checked against live Production and preserves its limits,
|
|
including differences from Development. A later pricing publication must be checked
|
|
against released plan facts. No provider price
|
|
IDs or account data are required. Prices must never be inferred from marketing text.
|
|
|
|
The initial shared brand is version `public-brand-v1`, with source provenance and
|
|
checksums in `Content/brand-manifest.json`. Website owns public brand development.
|
|
`Tools/brand_package.py` publishes/consumes an explicitly versioned CSS/asset snapshot
|
|
for the application's authentication shell. The application pins a reviewed version;
|
|
independent deployments need not share a live filesystem or update simultaneously.
|
|
|
|
## Visibility and pricing correction
|
|
|
|
See HelpVisibility.md. Publications now use format 2 and an explicit audience in
|
|
addition to the environment channel. Generate a `public` projection for the website
|
|
and an `application` projection for the application from the same source commit.
|
|
The latter retains administrator documentation, guarded by the application's existing
|
|
AdminOnly policy. Use `--audience application` only for the application content store;
|
|
the public consumer rejects that audience. A URL approval never overrides visibility.
|
|
|
|
Public pricing is **not automatically synchronised**. The current snapshot was checked
|
|
against Production's rendered plans; it is not a live database feed. The application
|
|
`Tools/PublicPricing` exporter now provides a reproducible read-only export of
|
|
`dbo.SubscriptionLevel_ListActive`, restricted to public plan fields and checkout IDs.
|
|
An authorised operator exports from the intended database, then a website developer
|
|
reviews and publishes the snapshot/provenance through the website's independent
|
|
release process. A database plan change therefore requires an explicit pricing
|
|
publication. Development limits must not be substituted for Production facts.
|