Skip to content

Rollout: serve /llms.txt in production - #59

Merged
bjacobso merged 1 commit into
mainfrom
conductor/serve-llms-production
Oct 8, 2026
Merged

bjacobso merged 1 commit into
mainfrom
conductor/serve-llms-production

Conversation

@bjacobso

@bjacobso bjacobso commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

/llms.txt still serves the playground HTML after #58 because Alchemy skipped the frontend deployment. Fix the playground input hash so public assets trigger a rebuild/upload, then fail production deployment verification if the canonical URL serves an app shell.

Cause and evidence:

  • The successful production run for caf21ca explicitly planned [Playground] noop and updated only the API/build-SHA binding. The new frontend asset and _headers were never uploaded.
  • Cloudflare.Website.Vite hashes memo globs relative to rootDir (apps/playground). The configured apps/playground/**, alchemy/**, and packages/** globs were repository-relative, so the added public files did not affect the input hash.
  • An isolated reproduction with the installed Alchemy version confirmed that editing public/llms.txt leaves the original hash unchanged and changes the corrected hash.
  • The Vite output already contains the file. Reading that output with Alchemy's actual asset reader produces a /llms.txt manifest entry and the Content-Type: text/plain; charset=utf-8 header rule. Its normal handling supports both the public asset and _headers with SPA fallback enabled. The fallback is serving HTML because the old frontend remains deployed; changing CDN query strings does not repair the skipped upload.

Changes:

  • Move the playground memo configuration into alchemy/playground-memo.ts, use globs relative to the Vite root, and explicitly include the nearest lockfile. Public assets, source, and repository/workspace build inputs now invalidate the memo; ignored build output remains excluded.
  • Add regression tests using Alchemy's real hash and manifest functions for public-file additions/edits/removal, _headers, workspace inputs, ignored output, and asset/header inclusion with SPA fallback enabled. Include their shared inputs in the Turbo test cache key.
  • Add Smoke Cloudflare production llms.txt immediately after the production deploy. It GETs https://schematics.run/llms.txt with a 15-second timeout and fails unless status is 200, content type is text/plain, and the body starts with # Schematics. Status, MIME, and cf-cache-status are logged for diagnosis.

Verification:

  • pnpm check passed: formatting, agent-doc validation, 270 package tests, types, builds, built docs validation, and local HTTP smoke.
  • pnpm turbo run test --filter @schematics/server passed again after the final Turbo cache-input adjustment.
  • Alchemy's asset reader confirmed the actual playground build output includes /llms.txt and the text header rule.
  • The exact new workflow smoke was exercised against mocked responses: it accepts a valid text asset and rejects an HTML fallback, an HTML body mislabeled as text, and a 404.
  • The new smoke also correctly rejects the current live 200 text/html response, so the previously green broken deployment would now fail.
  • pnpm format:check and git diff --check passed.

Template IDs: repairs production llms-txt and makes llms-links reachable through the deployed entry point; extends llms-tested to production HTTP verification. Existing document links and their offline validation remain intact.

No manual deployment or merge was performed. Live production validation awaits the existing pipeline after merge.

Final status: root cause reproduced, fix and regression checks passing, ready for review; production verification pending merge/deployment.


Open workspace in Conductor

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

Cloudflare Preview Deployed

Playground: https://schematics-playground-pr-59-srgubgtlrwmvglpx.bjacobso.workers.dev
API: https://schematics-api-pr-59-zaw44ove2fw34bzr.bjacobso.workers.dev

Built from commit f54a0cc


2026-10-08T05:21:46.129Z

This comment updates automatically with each push.

@bjacobso
bjacobso merged commit bcd34f2 into main Oct 8, 2026
2 checks passed
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