Skip to content

feat(strata-editorial): independent ForgeCMS consumer of the Strata RC tuple (spec 102) - #125

Merged
Andersseen merged 9 commits into
mainfrom
feat/strata-rc-real-consumer-adoption
Nov 7, 2026
Merged

Andersseen merged 9 commits into
mainfrom
feat/strata-rc-real-consumer-adoption

Conversation

@Andersseen

Copy link
Copy Markdown
Owner

Spec 102. Adds an independent ForgeCMS + Strata consumer, consumers/strata-editorial. It has its own pnpm-workspace.yaml and lockfile and sits outside the monorepo workspace. The PR also adds a path-filtered qualification workflow. No packages/* or apps/* change, no changeset, no public API change.

⚠️ Strata RC status

1.0.0-rc.0 is not published. The RC entry (Strata #182) was reverted by #183 while this work ran, and Strata main (efff41c) is not in pre mode. The consumer therefore runs the published RC0 baseline (core 0.2.2 / analog 0.12.1 / server-components 0.17.0), whose integrities equal Strata's frozen RC0 candidate. It uses the exact RC framework tuple (Angular 22.2.3, Analog 2.7.2, Vite 8.3.0, Nitro 2.13.4, H3 1.15.11). pnpm verify:tuple labels all evidence rehearsal only until an RC is installed. Nothing here qualifies an RC, a deployment or operational adoption.

Why a separate consumer

Adopting in place would put Angular 22 / Vite 8 into a workspace pinned to Vite 7.1.4, with @forge-cms/admin peering on Angular ^21. That means either duplicated Angular, which Strata's contract excludes (NO-DUPLICATES), or a monorepo upgrade. ForgeCMS's server packages have no Angular peer, so an isolated app can consume them as published.

What it is

An editorial desk. ForgeCMS owns the content model, drafts, author relation, sessions, access rules and the response envelope. Strata owns:

  • a request-scoped controller (factory-built, no Angular DI);
  • a strict Server Component;
  • two islands;
  • document navigation;
  • the /ssr failure contract;
  • build identity.

Both the controller and the Server Component delegate to one EditorialService over the Local API (overrideAccess: false). Native H3 login/logout/me/health routes coexist.

Evidence (local; the hosted workflow runs the same suites, retries off)

Suite Result
Policy matrix with 2 mutation negative controls (weakened read/update rule detected) 6/6
Browser-output leak scan with positive control 6/6
Node node-server + durable libSQL (isolation, CSRF, 300 interleaved requests / 0 crossings, DB down → safe 500, recovery, SIGTERM) 44/44
Chromium on the Node build (SSR DOM reuse, JS off, pre-hydration replay ×1, one POST per action, navigation, history) 9/9
Cloudflare Pages build on local workerd + local D1: HTTP matrix / Chromium 35/35 · 9/9
Release A → B → retained A (sessions, data, schema, build identity) 12/12
Root lint / typecheck / test / build / format:check / docs:verify green

Findings

  • S-1 (Strata, separate work): on Node, StrataAnalogRequest.url has a placeholder http://localhost origin, so origin/CSRF checks built on it refuse legitimate same-origin mutations. There is an executable repro against the published analog 0.12.1.
  • S-2 (Strata, separate work): ControllerClass is typed new () => object, which contradicts the README's controllerFactory example.
  • R-1: Nitro node-server only serves its build-time asset manifest, so a stale document under a new release loses its scripts. This is asserted to fail safe and to recover on reload.
  • Fixed in the app: published HTML and the list had a max-age, which kept a retracted post visible for 60s. The browser test caught it; both are now public, no-cache.

Details: consumers/strata-editorial/ADOPTION-REPORT.md, STRATA-EVIDENCE.md (for Strata maintainers; edits nothing in Strata) and OPERATIONAL-OBSERVATION.md (NOT RUN).

Not done (needs authorization or upstream)

  • Publish the Strata RC, switch the three pins, and re-run.
  • Deploy to an isolated staging host. No Cloudflare project was created and no deployment was touched.
  • Run the real 7-day operational observation.

An isolated consumer (own pnpm workspace root and lockfile, outside the
monorepo) on PUBLISHED @forge-cms/* 1.0.0 server packages and the exact
Strata RC framework tuple (Angular 22.2.3, Analog 2.7.2, Vite 8.3.0,
Nitro 2.13.4, H3 1.15.11). Strata itself is pinned to the published RC0
baseline (core 0.2.2 / analog 0.12.1 / server-components 0.17.0) because
1.0.0-rc.0 is not on npm yet; scripts/verify-strata-tuple.mjs labels any
evidence from this install as rehearsal-only until it is.

Vertical slice: an editorial desk. ForgeCMS owns the content model, the
draft lifecycle, the session and every access rule; a request-scoped
Strata controller (explicit dependencies, no Angular DI) and a strict
Server Component both delegate to one EditorialService over the Local API
with overrideAccess: false. Native H3 session routes coexist. Opt-in /ssr
failure contract, build identity with bounded skew recovery, document
navigation guard, two independent client islands.

qualification/node-production.ts: 43 checks on the built node-server with
durable libSQL (isolation, CSRF, concurrency, failure/recovery, shutdown).
…an, Strata repro

- tests/editorial-policy.test.ts: the access policy as executable expectations
  over the ForgeCMS Local API; two mutation negative controls (weakened read
  and update rules) must be detected. The update control first exposed a test
  gap (the read rule masked the update rule); a dedicated check now covers it.
- qualification/leak-scan.ts: browser output (incl. hidden maps) carries no
  server marker, secret, password, email or draft canary; markers are proven
  present in the server output; a planted server chunk is detected.
- tests/strata-findings.test.ts: executable reproduction of S-1
  (StrataAnalogRequest.url has a placeholder http://localhost origin on Node).
- Controller constructor works around S-2 (ControllerClass is new () => object)
  and fails closed without its factory; separate server typecheck with
  standard decorators.
…d; fix retraction caching

e2e/editorial.spec.ts (retries off, built node-server, fresh durable libSQL):
SSR DOM reused on hydration (node identity), JS-disabled reads, a click
queued before hydration replayed exactly once, one POST per action before
and after hydration, safe failure + recovery, cross-user draft never in any
browser response, document navigation with Back/Forward/reload, login return
via StrataDocumentNavigator, open-redirect refusal, 404s.

Finding fixed: anonymous published documents and the published list were
served with a max-age, so an unpublished (retracted) post stayed visible to
a reader for up to 60s. Both are now 'public, no-cache' (storable, always
revalidated). Hydration observations are recorded through Strata's public
provideStrataHydrationObserver (privacy-safe fields only).
…de/rollback rehearsal

- BUILD_PRESET=cloudflare-pages build (no node: imports in the Worker;
  compatibility date 2026-09-21, no flags) served by wrangler pages dev with a
  fresh LOCAL D1 seeded through the ForgeCMS Local API. The same 9 Chromium
  tests pass; the HTTP security matrix (35 checks) runs against it via
  EXTERNAL_BASE. Nothing remote is created or touched.
- Cloudflare env reaches SSR through a Nitro request hook that attaches the
  bindings to this request's own object, read back from Analog's public
  REQUEST token into REQUEST_CONTEXT (no global, no module state).
- qualification/upgrade-rollback.ts: release A -> B -> retained A on one
  durable database and secret with an open Chromium session: unfinished
  action completes across the switch, sessions and data survive both ways,
  schema unchanged, distinct build identities. Finding R-1: Nitro node-server
  only serves its build-time asset manifest, so a stale A document under B
  loses its scripts; asserted to fail safe (readable, no cross-build
  hydration) and recover on reload.
…bservation plan; CI workflow

- docs/specs/102: boundary decision (isolated consumer; in-place rejected),
  ownership split, security contract, acceptance criteria.
- ADOPTION-REPORT.md: verified upstream state (RC0 unpublished), exact tuple
  and integrities, evidence per profile, findings S-1/S-2/R-1/F-1..F-3,
  remaining GA blockers.
- STRATA-EVIDENCE.md: per-contract-id evidence levels for a future,
  separately authorized Strata PR (edits nothing in Strata).
- OPERATIONAL-OBSERVATION.md: preconditions, 7-day proposal, objectives,
  abort criteria, rollback; record explicitly NOT RUN.
- .github/workflows/strata-editorial.yml: path-filtered qualification
  (frozen install, tuple classification, typecheck, unit, leak scan, Node,
  Chromium, upgrade/rollback, Pages on local workerd + D1). No deploy, no
  secrets.
- STATE.md header.
…ators

tests/strata-findings.test.ts declares a Strata controller (standard
decorators); it belongs to the server typecheck, not the Angular one.
ubuntu-latest now resolves to Ubuntu 26.04, where Playwright 1.60 (www,
tiny-project, demo) cannot install Chromium; every job that installs it
failed in seconds. Pin to the image main last passed on until Playwright
is upgraded.
…e in the angular-22 profile

The newest Angular 22 resolves @angular/build 22.2.5, whose
@oxc-parser/binding-wasm32-wasi 0.150.0 ships @emnapi/* 2.0.0-alpha.3,
outside @napi-rs/wasm-runtime's peer range; the strict install of the
release:certify compat stage failed on registry drift alone. Allow exactly
that version for exactly that peer (peerDependencyRules.allowedVersions);
every other peer stays strict and nothing installed changes. Full matrix
(5 profiles) passes locally.
@Andersseen
Andersseen merged commit 85d5f42 into main Nov 7, 2026
12 checks passed
@Andersseen
Andersseen deleted the feat/strata-rc-real-consumer-adoption branch November 7, 2026 13:31
Andersseen added a commit that referenced this pull request Nov 7, 2026
…loy) (#126)

* fix(www): sync the two new Glossa language keys into the snapshot and contract

The main deploy failed at i18n:pull: the Glossa source catalog gained
language.loading and language.failed (each with a {$language} variable,
in en/es/uk), so it no longer matched contract.generated.ts and the deploy
refused to publish, as designed. Nothing was removed or changed; the keys
are not used by the site yet. Pulled the three published catalogs and
regenerated the contract; i18n:check and i18n:verify-remote pass.

* docs(state): record the www i18n sync, the CI fixes and the #125 merge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant