Commit Graph
3 Commits
Author SHA1 Message Date
alexmandClaude c5157fcad5 Move the engine core into core/, a project of its own (pplus-core)
What programs mean (the languages, translators, Mojo checker and
interpreter, prover, fuzzer, machine model, catalog problems and the Mojo
corpus with godbolt's stored answers) was mixed into the site's tree, so a
change to the prover and a change to a button went through the same gate
and the same docs. This moves all of it under core/, laid out as its own
repository, ready to be extracted with its history and pinned here as a
git submodule.

- core/: src/{engines,services,sync,mojo,exercises,curriculum,common},
  mojo/, syntax/mojo.xml, its tests (with Workspace and workForProblem in
  place of the site's Session), scripts (corpus pipeline, play, the
  exercise and probe starters, engines export/diff), and its docs
  (engines, trust, mojo-corpus, exercises, coverage). Its own pixi.toml,
  package.json, README, AGENTS.md and CI workflow.
- core/tests/boundary.test.mjs: library modules use no DOM, import no
  page widget, and import nothing outside src/.
- core/scripts/cli.mjs: pixi run cli check|run|prove|fuzz|translate.
- core/scripts/dafny.py: Dafny 4.11.0 pinned by version and SHA-256 per
  platform, fetched into .tools/ (pixi run dafny-fetch, pixi run dafny).
- The site imports core only as #core/<path>.js: an import map in
  index.html, "imports" in package.json for node, core's declarations for
  tsc. The site's TypeScript builds core first (npm run build).
- assemble.sh, the Quarto engine copy, the render cache key, check-pages,
  quarto-export and quarto-css read core/dist and core/mojo; quarto-css
  copies core's syntax/mojo.xml into the extension.
- Site tests that covered engines moved to core; the rest keep Session.
- README, AGENTS.md, docs/app.md, docs/deploy.md and the CI workflow
  describe the split (checkout with submodules; core's tests and corpus
  status run against the pinned commit).

Gate: site 110 pass; core 307 pass; corpus status --strict passes.
Manual check: the assembled site opens Bridge (count-base-proved),
Developer and Hardware (count-base) with the editor, the stepper and the
board, and no module errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FgvbRdoEheAHqsRmr2WuKZ
2026-10-05 05:43:58 +00:00
alexmandClaude d4730b7d5a Send Compile & run through a CompileBackend instead of straight to godbolt
Every compile went to godbolt.org from the session directly. The roadmap
moves compiles, and later Dafny and Lean checks, to a pinned service of the
app's own, and godbolt has no service guarantee, so where a compile goes is
now one replaceable piece.

- src/services/compile-backend.ts: a CompileBackend (id, host, compiler,
  compile), explorerBackend() for any service that speaks Compiler
  Explorer's API at a base URL, GODBOLT as the default, and
  compileBackend() / setCompileBackend().
- godbolt.ts: compileMojo takes a CompileTarget (base, compiler, host) and
  names that host in its messages; the request body is unchanged, so
  tests/mojo.test.mjs still holds it to what the corpus pipeline sends.
- Session.compile asks the current backend and records which host answered
  (CompileRecord.host; older records came from godbolt.org).
- The Compiler view names the host it is asking and the host that answered.
  The "Compiled on godbolt" badge keeps its wording until a second backend
  is deployed.

A test sends a compile through a fake backend and a refused local address.

Manual check list: open a Mojo exercise in the Developer area, Compile &
run, and see "Asking godbolt.org (mojo_1_1_0)…" then "Mojo 1.1.0 on
godbolt.org" in the Compiler view.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FgvbRdoEheAHqsRmr2WuKZ
2026-10-05 03:46:04 +00:00
alexm 659c03bbf8 Baseline: tree as shared 2026-10-05 03:03:38 +00:00