Skip to content

MR-23a: root wiring and gallery (six packages, one version, workspace edges, integration) - #797

Closed
michaeljgrimm wants to merge 3 commits into
monorepo/importfrom
codex/mr-23a-root-gallery
Closed

michaeljgrimm wants to merge 3 commits into
monorepo/importfrom
codex/mr-23a-root-gallery

Conversation

@michaeljgrimm

@michaeljgrimm michaeljgrimm commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

MR-23a: root wiring and the gallery (slice of MR-23 "Wire-up", docs/programs/monorepo/README.md section 9, Phase 2). Base is monorepo/import (b511d59); retarget to main once the owner has pushed the import (O3). Three commits, none squashed: wire-up, pnpm-lock.yaml, cleanup. Merge with a merge commit or rebase, not a squash.

What is in it

  • Workspace. pnpm-workspace.yaml lists gallery, core, CLI, render, pptx, editor and the private packages/integration (explicit, no glob). One root lockfile; the four sibling package-lock.json are gone. The cli>opf override is dropped. New: autoInstallPeers: false (see decisions).
  • Versions (D16). All six manifests are 0.26.0; the gallery goes backwards from 5.0.0. check:versions passes.
  • Edges. Runtime deps and peers between packages are workspace:^, devDependencies workspace:*. cli -> opf is workspace:^. Core's registry pins on render and pptx are deleted; gallery's devDependencies on core and render are deleted (gallery has no workspace edge). Root devDependencies: gallery, opf, render, pptx (workspace:*). repository / bugs / homepage of render, pptx, editor, gallery point at OpenPresentation/opf (directory). check:workspace-graph and check:pins pass.
  • Gallery. Materializer + its test + postinstall + the .gitignore entry deleted (packages/gallery/dist and packages/*/*.tgz are ignored instead). Gallery's bootstrap-*.mjs and tests, stability.mjs, fixtures.mjs, stability.test.mjs, package-lock.json, .github/ deleted; the root gallery-stability.mjs (MR-35) and gallery-stability-fixtures.mjs are the only copies, and editorial-previews, layout-equivalence and editorial-previews.test import the fixtures from there; render-previews.mjs has a 7-line engine loader. The retired 1.x sync is cut from sync-gallery-catalog.mjs (kept: --verify, --rehash [--match-gallery], --catalogs, loadValidators, which reads spec/schemas directly) with its tests. Core's duplicate sync-gallery-catalog.mjs, catalog-snapshot.mjs and test are deleted; check:catalog and check:spec use the gallery's. Gallery README ("Versions", "Where the records come from") and CONTRIBUTING describe the monorepo and the MR-35 rule. test/gallery.test.mjs asserts the monorepo repository. Gallery scripts that need engines build core first (pnpm --filter @openpresentation/opf build &&).
  • Integration. packages/integration (private) holds node.test.mjs moved from core (git rename, 25 tests): the one core test that needs the real opf-render/opf-pptx.
  • Root scripts. pnpm typecheck covers all six; pnpm test = core, CLI, gallery, integration, the three engine contract suites (test:engines), then all check:*. check:changed knows packages/integration.
  • Cleanup commit (plan section 2 "Not imported"): each old repo's .github/**, package-lock.json, .nvmrc, .gitignore, nested changes/ (no pending fragments existed), gallery .gitattributes, freeze banners in the render/pptx/editor README and CONTRIBUTING. Deletions and banner lines only, so blame is unaffected and no .git-blame-ignore-revs entry is needed. render's and pptx's .gitattributes stay (byte-exact rules).
  • Fragment changes/mr-23-workspace-wire-up.md; burndown row and log line.

Decisions

  1. 0.26.0 now, not at MR-40/44. check:versions needs one value and the only plan-defined one is 0.26.0 (editor is already at 0.25.3, so no 0.25.x value is monotonic). Consequence: core's PEER_RANGES (install hints, the peer-not-installed error) is ^0.26.0; release.mjs prepare (MR-40) must bump it with the versions (or derive it). A core 0.25.x hotfix from this tree is no longer possible without reverting this.
  2. autoInstallPeers: false. With pnpm's default, the workspace:^ optional peers of core are linked into its importer, so the lockfile has core -> pptx -> core and check:workspace-graph fails ("a link: ... which its package.json does not declare" and a cycle). pnpm still prints no cycle warning with it off. Every peer a package needs in tests is also a devDependency.
  3. Only node.test.mjs moves to integration, not "13 tests". The 13 files that mention opf-render/opf-pptx are a grep count; with core's engine devDependencies removed, only node.test.mjs fails (and exports.test.mjs on the gallery range text). The other 12 use the isolated-core copy with stub peers or just name the packages, and stay in core so core keeps its coverage. In node.test.mjs the unreleased-gate skip and the candidate-gallery preflight were removed (the engines are always in the workspace).
  4. Release machinery MR-34 deletes still has to pass today, so concreteRange (in workspace-packages.mjs) maps workspace:^ to ^<version> where unreleased-gate.mjs and two tests read ranges from source manifests; convert.test.mjs and doctor.test.mjs of the CLI do the same.
  5. Native-acceptance and other root tests that resolved opf-pptx through core's package.json resolve it from the root (root devDependency on pptx).
  6. Dist files were not touched: a local test:contract run rebuilds packages/editor/dist and shows it is stale at the import (the committed dist lacks the source-pane/presenter changes); I discarded that rebuild. MR-23d decides (rebuild in its own commit).

Local results (macOS, Node 26.7, pnpm 10.33.2)

  • pnpm install --frozen-lockfile: ok. pnpm lint: ok. pnpm typecheck (six packages): ok.
  • core suite 2521 tests (143 files + 6 scripts), CLI 211 (24 files + 2 scripts), gallery 145, integration 25: pass. All 71 check:* (node scripts/run-checks.mjs): pass, including check:versions, check:workspace-graph, check:pins, check:playwright-pin, check:stability (baseline fetched from npm: "every existing record draws the same").
  • Lockfile: core's and the CLI's resolutions did not move; 86 packages added; 19 transitive entries newer than the siblings' npm lockfiles (pptx: fast-xml-builder, xml-naming; editor: @lezer/common, @lezer/lr, @napi-rs/canvas family).
  • Not run: render/pptx/editor suites (below), test:packed/registry checks, Windows, CI (a PR into monorepo/import may not run CI).

Remaining for MR-23b (render), MR-23c (pptx), MR-23d (editor)

pnpm test:engines fails at the first test of each package because the cleanup removed what they read. Per package (greps of this branch):

  • All three: npm run -> pnpm run and scripts/<shared>.mjs -> ../../scripts/<shared>.mjs in package.json (MR-12 table in MR-12: shared scripts take a package directory #780; drop check:runners/check:changes), delete the local copies of changelog-fragments(+test), flake-repeat, publish-source, quarantine(+test), run-tests(+test; move the check-syntax tests out of run-tests.test.mjs into scripts/check-syntax.test.mjs), ci-evidence.{mjs,json} and (render, editor) check-font-hotlinks(+test, allowlist); delete the workflow-contract tests that read the deleted .github/ (candidate-gallery-ci, publish-source, publish-workflow-trust, ci-evidence; render also candidate-goldens, golden-pinned-image, plus ecosystem-pins.mjs, golden-ci-notify.mjs); other .github readers to fix: render font-license.mjs, update-font-manifest.mjs, test/aptos-preview.mjs, test/font-licenses.mjs, test/open-fonts.mjs; pptx scripts/keynote-qualification/registry-runtime.mjs. test/QUARANTINE.md/golden/README.md text. Nested AGENTS.md. workflow_dispatch runs in the Playwright container (needs CI).
  • npm_execpath (use scripts/package-manager.mjs): render scripts/check-next-bundle.mjs, scripts/update-font-manifest.mjs, test/packed-install.mjs; pptx test/packed-install.mjs, test/provenance-interop.mjs, test/packed-bundle-browser.mjs; editor test/packed-install.mjs. The three test:packed suites read raw workspace: specs and must read the packed manifest.
  • package-lock.json readers (the lock is gone; read pnpm-lock.yaml or drop): render scripts/check-font-hotlinks.mjs, test/furniture-review.mjs, test/packed-install.mjs, test/review-code-raster.mjs; pptx scripts/verify-vendor.mjs (the @node-projects/jszip integrity; 3 lines, same value), scripts/keynote-qualification/{pack,registry-runtime}.mjs, test/compare-native-picture*.mjs, native-*.mjs, footer-text-shape.mjs, compare-published.mjs, keynote-*.mjs, packed-install.mjs (evidence hashes: 19 files); editor scripts/check-font-hotlinks.mjs, test/packed-install.mjs, test/rich-input-browser.mjs.
  • Sibling-layout paths (../../opf, ../opf-*): render scripts/probe-font-variants.mjs, test/furniture-review.mjs; pptx test/color-ref-export.mjs (silently falls back to an inline fixture when core's fixture is missing: coverage loss), test/native-evidence.mjs.
  • Editor dist/ is stale at the import (see decision 6). The golden digest mismatch (70b9e5d4 vs 22ebe285) is MR-31.

Left for other items (found while wiring)

  • Root test:* / build-* scripts that read sibling checkouts (../opf-render, ../opf-editor, register-local-opf.mjs): about 40 files in scripts/ (audit-svg-contrast, build-editor-demo, build-*-browser, font-shaping-probe, ecosystem-preview-plan, link-ecosystem, ...). They are not in pnpm test; they are the link plumbing MR-34 deletes, or need packages/<x> paths.
  • .github/** of the root still references the deleted materializer (actions/candidate-gallery/action.yml, workflows/regenerate-core-golden.yml): both are machinery MR-31/MR-34 delete.
  • AGENTS.md/CONTRIBUTING.md/docs/release-process.md still describe the independent gallery repository (MR-50); docs/default-catalog.md and the gallery docs are corrected here.
  • Optional catalog entries (typescript, @resvg/resvg-js) not added.

🤖 Generated with Claude Code

michaeljgrimm and others added 3 commits October 22, 2026 05:02
… edges, packages/integration

- pnpm-workspace.yaml lists gallery, core, CLI, render, pptx, editor and the private packages/integration explicitly;
  the cli>opf override is gone; autoInstallPeers is false so core's optional peers on render and pptx are not linked
  into its node_modules (pnpm would otherwise re-create the core <-> engines cycle in the lockfile).
- All six published manifests carry 0.26.0 (D16; the gallery goes backwards from 5.0.0). Runtime dependencies and peers
  between packages are workspace:^, devDependencies workspace:*; core's registry pins on render and pptx are removed and the
  gallery's devDependencies on core and render are removed (the root links core, render, pptx and gallery as devDependencies
  for the gallery gates and the root scripts). repository, bugs and homepage point at OpenPresentation/opf with directory.
  PEER_RANGES in core's install hints is ^0.26.0.
- Gallery: the materializer, its postinstall and the .gitignore entry are deleted (packages/gallery is tracked);
  bootstrap-*.mjs and tests, stability.mjs, fixtures.mjs and stability.test.mjs are deleted (the root
  gallery-stability.mjs and gallery-stability-fixtures.mjs replace them); the retired 1.x sync is cut from
  sync-gallery-catalog.mjs, keeping --verify and --rehash; core's duplicate sync-gallery-catalog.mjs, catalog-snapshot.mjs and
  test are deleted and check:catalog / check:spec read the gallery's; README and CONTRIBUTING describe the monorepo.
- packages/integration (private): core's node.test.mjs, the one core test that needs the real opf-render and opf-pptx.
- Root: test, typecheck and lint cover all six packages; scripts that resolved the engines through core's devDependencies
  resolve them from the root; workspace: ranges read by the release machinery MR-34 retires are mapped to what pack publishes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ne reviewed commit)

One root lockfile replaces the four sibling package-lock.json files. Core's and the CLI's resolutions are unchanged (no
existing package moved); 86 packages are added for render, pptx, editor and gallery. Against the siblings' own npm lockfiles, 19
transitive entries resolve to a newer version: pptx fast-xml-builder 1.2.0 to 1.3.1 and xml-naming 0.1.0 to 0.3.0; editor
@lezer/common 1.5.2 to 1.5.4, @lezer/lr 1.4.10 to 1.4.11 and @napi-rs/canvas (and its 11 platform packages) 1.0.10 to 1.0.11 (the
version render and the root already resolve). Render and gallery are unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…, nvmrc, gitignore, nested changes, freeze banners

Plan section 2, "Not imported": each old repository's .github/** (workflows, gallery's bootstrap-engines.json), package-lock.json, .nvmrc,
.gitignore (the root .gitignore covers node_modules, artifacts, *.tgz and editor's dist/styles.css), gallery's .gitattributes (identical
to the root rule) and the nested changes/README.md and config.json (no package had a pending fragment). The freeze banners at the top of
the render, pptx and editor README.md and CONTRIBUTING.md come out too. render's and pptx's .gitattributes stay: they hold byte-exact
rules the root file does not. Deletions and banner lines only, so git blame of every retained line is unchanged and this commit needs
no .git-blame-ignore-revs entry.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@michaeljgrimm

Copy link
Copy Markdown
Contributor Author

Landed on main through #808 (merge commit 62c4b26), which carries this PR's commits unchanged.

@michaeljgrimm
michaeljgrimm deleted the codex/mr-23a-root-gallery branch October 26, 2026 08:03
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