Skip to content

Hard path: cafe re-theme with re-recorded cassettes - #11

Merged
macayaven merged 15 commits into
mainfrom
feat/cafe-labs
Sep 19, 2026
Merged

macayaven merged 15 commits into
mainfrom
feat/cafe-labs

Conversation

@macayaven

@macayaven macayaven commented Sep 19, 2026 •

Copy link
Copy Markdown
Owner

Learner-facing effect: the hard path (labs + cassettes + baseline) is fully re-skinned from pub trivia to the neighbourhood cafe, replay is deterministic and green, and students can now run the course with no local install via GitHub Codespaces (billed to their own account).

Regenerated artifacts:

  • labs/cassettes/*.jsonl (19 files, re-recorded live with --all --record --impl reference; all entries carry model=openai-compatible)
  • labs/reports/REFERENCE-p0-baseline.md (naive 2/9 vs engine 9/9)

New student-runtime surface:

  • .devcontainer/devcontainer.json (Python 3.12, pip-pinned uv, marimo + Live Preview extensions)
  • README Codespaces block (badge, launch steps, student billing, stop/delete, editor defaults)
  • .vscode/extensions.json, .github/instructions/ahp-companion.instructions.md (mirror of the Cursor rule, drift-tested)
  • .github/workflows/devcontainer.yml (path-filtered smoke: surface validate + container build + offline suite inside)
  • tools/check_devcontainer.py, tests/test_codespaces.py

Verify workflow output (this session):

  • unit tests: 64/64 OK (incl. stale-tier guard, codespaces surface + negative tests)
  • lab contracts: 15/15 OK
  • labs/run.py --all --replay: cell-for-cell identical to live record (naive 2/9 vs engine 9/9)
  • tools/build.py: zero HTML drift; check_links 181 refs ok; check_sota_urls 91 rows ok; --http 93 refs ok (2 soft are pre-existing doi.org 403s)
  • tools/check_devcontainer.py: devcontainer surface ok
  • CI: verify 3.11 pass, verify 3.12 pass, smoke pass (image builds, postCreate syncs, suite green inside)

Review: Claude CLI non-interactive review returned VERDICT: OK (round 4; rounds 1-3 findings all addressed with evidence).

One domain everywhere. labs/trivia_host/ becomes labs/cafe_host/ with propose_order, pull_item, settle_item, close_shift over a 12-item menu (labs/menu.py replaces deck.py); order spec fields renamed (occasion/sections/item_count/restrictions, en-only); spoiler policy becomes allergen-leak; tasks, checkers, contracts, runner follow. All 12 lab.md protocols, 14 companions, and the docs follow; tests/test_hardpath_domain.py locks the domain. Cassettes re-record next.
Replay reproduces the live record cell-for-cell. Baseline regenerated with --all --record against the local OpenAI-compatible endpoint.
Sanitize the live route alias at the record source (labs/client.py writes model=openai-compatible; match key excludes model) and rewrite all 45 committed entries. Replace trivia-style difficulty tiers with the cafe scope scale (counter|kitchen|banquet) across spec schema, tools, engines, tasks, checkers, S04-S07 prose; document the cafe/domain vs labs/menu split in labs/README. Strengthen check_p08 (pull required, score==settles; naive now honestly FAILs), annotate vacuous naive p02/p04 passes, drop the dead p03 branch, fix p05 plural. Guard the transplant with a stale-tier test.
Full --all --record after the scope transplant. p08 naive now FAILs (no pull_item) by design; p02/p04 naive passes annotated as vacuous. All 48 entries carry model=openai-compatible from the sanitized record path.
devcontainer.json (Python 3.12, uv sync, marimo + Live Preview extensions), README launch block with student-billing and stop/delete guidance, editor defaults (md preview, marimo notebook, HTML via embedded preview), VS Code instructions mirror of the Cursor companion rule, and a path-filtered devcontainer smoke workflow (JSONC validate + build + offline suite inside).
…t test

Answer second review: postCreate uses pip-pinned uv==0.12.17 (no curl|sh), explicit remoteUser, uv --version gate. Workflow gained its own path, inline COURSE_MODE, and delegates validation to tools/check_devcontainer.py (stdlib JSONC strip). Drift between .cursor rule and VS Code instructions enforced by tests/test_codespaces.py; AGENTS.md Mode A names both. README billing claim sourced and softened.
ubuntu-latest has no uv on PATH; mirror verify.yml with astral-sh/setup-uv.
remoteEnv PATH covers VS Code terminals, not devcontainer exec (exit 127). Inline export makes runCmd self-sufficient.
Image default user is root (read from registry config), so uv goes system-wide via sudo pip (no HOME/remoteEnv dependence); smoke runCmd now proves a plain shell finds uv. Extension sets must match exactly (ms-python.python added to recommendations). Path filter covers validator, tests, and both rules files. LICENSE and CHANGELOG trivia-host mentions fixed.
Non-blocking round-4 notes: docstring no longer claims a README extension list; check_devcontainer rejects --user installs; negative tests prove each check can fail.
editorAssociations needs the **/ prefix to match absolute paths (labs/app.py already had it). Add astral-sh.ty so marimo completions work out of the box.
@macayaven

Copy link
Copy Markdown
Owner Author

Codespace verification (2026-09-19, live container on this branch)

Numbered checklist from the branch test run, all green except one accepted limitation:

1-6. Versions, .venv + marimo 0.24.2, extensions, 64/64 tests in-container, --replay baseline, devcontainer surface — pass.
7. toy.py opens as marimo notebook (glob fix + ty server, retested) — pass.
8. README preview — pass.
9. Lesson renders in embedded preview; .py/.md links served as plain text — fixed by unlinking at build time (this PR), re-verified: toy.py inert chip, S02 bridge navigates with canonical fragment — pass.
10. Marimo kernel + auto-forwarded ports — pass.
11. cafe.doctor with no env: stub refusal, no traceback — pass.
13. Copilot probe: asked to fill attempt_tool_results; complied twice. useInstructionFiles enabled in this PR; file-level tutoring applies, agentic edit-mode enforcement is best-effort (noted in CHANGELOG) — accepted.

Local verify for the final head: 67 tests OK, check_links 16 pages/130 refs, SOTA 91 rows, contracts 15/15, --replay baseline reproduced.

@macayaven
macayaven merged commit 2ba2635 into main Sep 19, 2026
3 checks passed
@macayaven
macayaven deleted the feat/cafe-labs branch September 20, 2026 16:12
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