Skip to content

feat(docs): gate Casework tutorials with the runner that reads the page as its spec - #1573

Merged
jeremi merged 3 commits into
mainfrom
feat/tutorial-runner-casework
Sep 27, 2026
Merged

jeremi merged 3 commits into
mainfrom
feat/tutorial-runner-casework

Conversation

@jeremi

@jeremi jeremi commented Sep 26, 2026

Copy link
Copy Markdown
Member

Stacked on #1572. Until that merges, this PR also shows its commits; review only the last one, "feat(docs): gate Casework tutorials with the runner that reads the page as its spec".

What changes

  • tutorials/first-casework declares tutorial_test: {toolset: casework} and carries its own checks, replacing the assertion list in check-casework-tutorial.sh:
    • HTTP 201 after the create and HTTP 204 after the decision, as text test-expect output blocks the reader now sees too;
    • the answered result as a json test-excerpt (status: answered, outcome: confirmed).
  • start/casework and tutorials/review-breg-changes-in-casework declare why they are skipped (the first moves from breg to casework, since it runs both products' commands).
  • casework toolset in tutorial-runner/toolsets.mjs: serves casework, caseworkctl, breg, bregctl (from CASEWORK_BIN, CASEWORKCTL_BIN, BREG_BIN, BREGCTL_BIN, all or none, else built from source) and stops Casework sessions before BReg ones. breg and casework now share one small factory.
  • Gate rule: a toolset can include another (casework includes breg), and a page running a toolset's commands under a toolset that does not serve them is refused. Before this, toolset: none on a page running bregctl escaped every gate.
  • Removed check-casework-tutorial.sh and its test. CI, ci_changes.py routing, and the gates inventory point at run-tutorial.mjs --gate casework. test:tutorial:breg becomes test:tutorial:runner, used by both jobs.

Verification

  • npm test (638 pass: 661 minus the 26 removed bash-gate tests plus 3 new), npm run test:tutorial:runner (64 pass)
  • check:tutorial:{breg,casework,evidence}:dry-run, check:content, check:markdown, vale on both changed pages: clean
  • python3 -m unittest discover -s .github/scripts -p test_ci_changes.py (119 OK), test_check_gates_inventory.py OK, check-gates-inventory.py (219 gates)
  • Real replay on macOS with the ci-profile toolset: gate PASS: 1 journey replayed, 2 pages skipped, about 11 s, no token in the log, no dev container left behind
  • Mutation check: changing the page's HTTP 201 to HTTP 202 and confirmed to rejected fails both checks by line with the actual value

@jeremi

jeremi commented Sep 26, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-27T04:18:15.098629Z 1a66abe Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8369dc18ad

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/ci.yml
Comment thread docs/site/scripts/check-casework-tutorial.sh
@jeremi
jeremi force-pushed the feat/tutorial-runner-casework branch 2 times, most recently from 5bc2a07 to 4255b80 Compare September 26, 2026 06:40
…ge as its spec

first-casework now declares tutorial_test with the casework toolset and
carries its own checks: the create and decision status lines as output
blocks, and the answered result as a JSON excerpt, replacing the
assertion list in check-casework-tutorial.sh. The start page and the
BReg review guide declare why they are skipped.

The casework toolset serves casework, caseworkctl, breg, and bregctl,
and stops Casework sessions before BReg ones. Because it includes breg,
a page running both belongs to its gate; a page running a toolset's
commands under a toolset that does not serve them is now refused, so
toolset: none can no longer take a page out of every gate.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
The runner's tests import yaml and remark, which the job never installed,
and the changelog evidence anchor still cited the deleted shell gate.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
@jeremi
jeremi force-pushed the feat/tutorial-runner-casework branch from 4255b80 to 1a66abe Compare September 26, 2026 19:20
@jeremi
jeremi marked this pull request as ready for review September 27, 2026 04:13
@jeremi
jeremi added this pull request to the merge queue Sep 27, 2026

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1a66abecd4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/site/scripts/tutorial-runner/toolsets.mjs
Merged via the queue into main with commit a305c2e Sep 27, 2026
55 checks passed
@jeremi
jeremi deleted the feat/tutorial-runner-casework branch September 27, 2026 04:50
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