Skip to content
This repository was archived by the owner on Nov 19, 2026. It is now read-only.

Add dynamic CMS key registry and manifest sync - #1

Merged
jacksteamdev merged 2 commits into
mainfrom
import/dynamic-cms-keys
Nov 17, 2026
Merged

jacksteamdev merged 2 commits into
mainfrom
import/dynamic-cms-keys

Conversation

@jacksteamdev

Copy link
Copy Markdown
Contributor

Summary

The running CMS can register website-defined keys without a CMS catalog change. Import the recovered implementation from ec11af0d-4ef6-44e3-8d47-cf832242a93c_30_a_all_code.tar.gz, compared with cms-main.zip; the original export matches source/base commit e69a53e345c97a86d7cfb866cd0fcacea508963e file for file.

website manifest → authenticated sync → D1 collections, keys, English defaults
                                       ├─ preserve editor changes
                                       ├─ active ↔ unused → deleted / restore
                                       └─ public definitions and translated content

Includes typed manifest helpers, shared field validation, a sync client and CLI, and a minor Changeset. Import review replaced custom error classes with functional factories, fixed prototype-named collection loading and inherited CLI command lookup, and enforced stale-head rejection for no-op syncs, with regression tests.

The legacy contract catalog and English seed remain for transitional tooling. Website manifest ownership, deploy integration and final legacy removal remain a separate handoff; this PR does not complete every phase of the archived plan.

Excluded generated contract builds and release packages, .wrangler caches/databases, .dev.vars, macOS metadata and archived agent instructions. The repository's instructions remain intact. No export notes or disposable scripts/review.sh runner were present in either archive; neither was introduced. No relocations or binary replacements were needed.

Evidence

  • Before: Runtime entry validation and content serving depended on the compiled catalog; new keys required CMS changes.
    After: Local D1 tests register keys through sync and serve their text, retain unused keys, freeze retired definitions, and preserve editor text.
  • Node 24.10.0, Bun 1.3.14; frozen dependency install with lifecycle scripts disabled.
  • bun run validate: 273 tests in 24 Worker/contract files, plus 27 Node CLI/release tests, all passing. Includes type checks, lint, formatting, complete contract/CLI builds, package packing and independent installation.
  • Regression tests cover constructor:toString, inherited command names, and stale expected heads on unchanged syncs.
  • Gitleaks scanned the staged candidate with an external default-rules config, inline allow comments disabled, and full redaction: no findings. Changed content also reviewed; scanning is not exhaustive detection.
  • Initial sandbox validation could not open local listeners; the successful run used local workerd/D1 and loopback CLI fixtures outside the sandbox. No remote migrations, seeds or deployments were run.

Merge Danger

Door: one-way for database schema adoption.

Rewrites 0001_init.sql for a fresh database, consistent with the archived plan and checked-in placeholder remote D1 IDs. This is not an upgrade migration for a database that has already applied the old schema. Preserve existing local data and use a fresh test database; hosted provisioning/deployment acceptance is not established by these tests.

Blast Radius: CMS

Changes admin response shapes (coverage, key status), removes /v1/admin/catalog in favor of public /v1/definitions, and changes the database schema. Coordinate web integration before deployment. The retained legacy seed tooling is transitional, not a completed web cutover.

@jacksteamdev
jacksteamdev merged commit e740a3d into main Nov 17, 2026
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant