Skip to content

fix(site): unblock the production build - #36

Merged
macanderson merged 2 commits into
mainfrom
worktree-deploy-cgp-microsite
Jul 22, 2026
Merged

fix(site): unblock the production build#36
macanderson merged 2 commits into
mainfrom
worktree-deploy-cgp-microsite

Conversation

@macanderson

Copy link
Copy Markdown
Owner

Deploying the microsite to cgp.oxagen.sh surfaced two independent breaks that stopped site/ from building on a clean checkout. Both are fixed here.

pnpm-workspace.yaml held scaffolder placeholders

allowBuilds:
  esbuild: set this to true or false

allowBuilds is a package → boolean map. The placeholder strings are neither true nor false, so pnpm 11 counted all three as ignored build scripts and failed install with ERR_PNPM_IGNORED_BUILDSpnpm build exited before ever invoking next. Set to true, and mirrored under onlyBuiltDependencies so CI images pinned to pnpm 10 behave identically.

This is not cosmetic: esbuild and unrs-resolver fetch platform binaries in their install scripts, and sharp builds its native image pipeline.

@types/mdx was undeclared

src/mdx-components.tsx imports mdx/types, but @types/mdx was never a dependency. pnpm's strict node_modules layout does not hoist it out of fumadocs, so type checking failed with Cannot find module 'mdx/types'.

Verification

  • Clean pnpm install --frozen-lockfile runs the unrs-resolver and sharp install scripts, no ERR_PNPM_IGNORED_BUILDS
  • next build compiles and prerenders all 16 routes (/, /icon.svg, _not-found, 12 docs pages)
  • node --test tests/*.test.mjs — 5 passed, 0 failed
  • Deployed to production from this branch; https://cgp.oxagen.sh serves 200 with valid TLS, /docs/overview 200, unknown routes 404

Deployment note

The microsite now lives at https://cgp.oxagen.sh — Vercel project oxagen/context-graph-protocol, root directory site/. DNS auto-configured since oxagen.sh is on Vercel nameservers. The project is not yet connected to Git, so it does not auto-deploy on merge.

The site could not build from a clean checkout. Two independent breaks:

- `pnpm-workspace.yaml` shipped scaffolder placeholder text
  (`esbuild: set this to true or false`) where `allowBuilds` expects
  booleans. pnpm 11 treats the unresolved entries as ignored build
  scripts and fails install with ERR_PNPM_IGNORED_BUILDS, so `pnpm
  build` never reached next. Set all three to true and mirror them
  under `onlyBuiltDependencies` for pnpm 10 images.

- `src/mdx-components.tsx` imports `mdx/types`, but `@types/mdx` was
  never declared. pnpm's strict node_modules layout does not hoist it
  from fumadocs, so type checking failed to resolve the module.

Verified: clean install runs the esbuild/sharp/unrs-resolver scripts,
`next build` prerenders all 16 routes, and `node --test` passes 5/5.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @macanderson, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

The marketing page is authored almost entirely in px and the docs in
rem, so a root font-size bump would only scale the docs. Setting
`zoom: 1.07` on the root scales both layouts uniformly — like a browser
zoom — while keeping sticky headers and document flow intact (unlike
transform: scale).

Verified in headless Chrome: both the marketing page and the fumadocs
docs layout render proportionally with no horizontal overflow and no
double scrollbar (docScrollW == clientW == 1440 on both routes).
@macanderson
macanderson marked this pull request as ready for review July 22, 2026 00:33

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @macanderson, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@macanderson
macanderson merged commit a6e2bea into main Jul 22, 2026
1 check passed
@macanderson
macanderson deleted the worktree-deploy-cgp-microsite branch July 22, 2026 00:33
macanderson added a commit that referenced this pull request Jul 22, 2026
Resolves the 12 conflict hunks across 7 files. Every conflict was additive —
main's consent/egress-scope track (#35, #36, #37) versus this branch's
normative sweep — so the resolution is a union in each case, with main's
newer normative wording kept where both sides described the same rule.

Resolutions:
- contextgraph-types/src/lib.rs — union of both module sets and re-exports.
- contextgraph-conformance/src/lib.rs — keeps this branch's check_budget
  (§B1/§B3/§B4, strictly stronger than main's inline respects_budget) and
  adds main's check_consent_scopes; the runner already calls both.
- contextgraph-example-docs — union of imports and of the misbehave modes,
  so scope-lie joins the branch's eleven.
- schema — main's egress_scopes + EgressScope $def, rewritten in the
  expanded JSON style this branch normalized the file to.
- host.rs / host consent.rs / reference-messages.json — main's newer text.

Also repairs breakage that predates this merge: the previous merge commit
(10808ed) silently dropped ContextFrame::identity() while keeping the
content_digest field it feeds, so PR 33's head did not compile against its
own tree. identity() is restored and the reference provider now declares a
content_digest. rustfmt applied to main's frame_representation_witness.rs,
which arrived unformatted.

Verified: cargo check/clippy -D warnings clean, fmt clean, schema examples
validate, conformance green 6/6 and red 12/12 misbehave modes caught,
cargo test 136 passing.

Known-red, pre-existing on main and not addressed here:
frame_representation_witness::reference_frame_without_inline_content_deserializes
fails identically on origin/main — ContextFrame.content is a required String,
so a content-less reference frame cannot deserialize. Making it optional is a
normative decision that interacts with §B3 canonical token accounting, so it
is left for the maintainer.
macanderson added a commit that referenced this pull request Jul 22, 2026
The Vercel project is now linked to this repo for git-driven deploys, so
`vercel link` writes a `.vercel/` directory into every checkout. Ignore it
rather than committing project/org IDs.

`site/` also carried both `package-lock.json` and `pnpm-lock.yaml`. Vercel
resolves the ambiguity in pnpm's favour, but a local `npm install` does not:
npm's flat node_modules hoists `@types/mdx` up from fumadocs, which is exactly
what masked the missing `@types/mdx` declaration fixed in #36 — the site built
locally and failed type checking on Vercel. Keep pnpm as the single source of
truth so a clean local install matches the build image.
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