Skip to content

Serve the playground from a Cloudflare Worker and publish conformance results - #4

Merged
be-thomas merged 2 commits into
mainfrom
feat/cloudflare-worker
Oct 26, 2026
Merged

be-thomas merged 2 commits into
mainfrom
feat/cloudflare-worker

Conversation

@be-thomas

Copy link
Copy Markdown
Owner

What

The playground moves off GitHub Pages. The Pages workflow is deleted and the
site is disabled. The playground is served by a Cloudflare Worker at
https://openiac.cwz.workers.dev, with static assets coming straight from
playground/ and a /api/health endpoint the observability panel can build on.

The Wrangler project and its state live in a local deploy/ folder that
.gitignore now excludes, so no deployment data is committed. Deployment is
manual, as requested:

make wasm && cd deploy/cloudflare && wrangler deploy

Conformance results are published. openiac-conformance status parses every
fixture and writes conformance/status.json (corpus size, parse counts,
minimum-version distribution) plus conformance/badge.json (the shields.io
endpoint the README renders). CI runs status -check, so the published numbers
cannot drift from the corpus.

README gains a live conformance badge and a chart of the minimum Terraform
version each fixture needs. All 853 modules parse into schema 0.2 IR.

Checks

  • gofmt -l ., go vet ./..., go test ./...
  • make conformance-verify — 853 fixtures, 6,471 files
  • make conformance-status-check — summary current
  • Worker endpoints: / 200 text/html, /api/health 200 JSON, /main.wasm 200
    application/wasm, /app.js and /styles.css 200

… results

- Replace the GitHub Pages workflow. The playground is served from a
  Cloudflare Worker, deployed manually from a local, git-ignored deploy
  folder, and the README points at the deployed URL.
- Add `openiac-conformance status`, which parses every fixture and writes
  conformance/status.json plus the shields.io badge the README renders.
  CI runs it with -check so the published numbers cannot drift.
- Render the minimum-Terraform-version distribution in the README.

@be-thomas be-thomas left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Independent review of the conformance status tooling, corpus reproducibility and docs.

Verified: openiac-conformance status -check passes; regenerating status.json/badge.json in a clean scratch copy of HEAD produces byte-identical files; repeat runs are identical; gofmt -l, go vet ./... and go test ./... are clean; the fixture corpus is committed (853 inputs / 6471 files) and verify succeeds; deploy/ is untracked and matched by .gitignore.

Findings below, all low severity.

Comment thread Makefile Resolved
Comment thread cmd/openiac-conformance/main.go Resolved
Comment thread README.md Resolved
Comment thread docs/CONFORMANCE.md Resolved
Comment thread docs/CONFORMANCE.md Resolved
Comment thread CONTRIBUTING.md Resolved
Comment thread internal/conformance/status/status.go Resolved
Mark the README chart with start/end comments so `status` rewrites it and
`status -check` verifies it alongside status.json and badge.json. Compare
every generated artifact after normalising line endings, and pin the
generated files to LF in .gitattributes so a Windows checkout does not
report a false stale summary.

Also document the Worker deployment from a fresh clone, move the parse
summary to the end of the corpus section, refresh the add-a-source steps,
and cover the section helpers with tests.
@be-thomas
be-thomas merged commit 3a96ddc into main Oct 26, 2026
1 check passed
@be-thomas
be-thomas deleted the feat/cloudflare-worker branch October 26, 2026 16:24
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