Skip to content

fix: enforce the guide lesson authoring contract - #1438

Open
fhammerschmidt wants to merge 2 commits into
rescript-lang:masterfrom
fhammerschmidt:fix/1421-guide-contract
Open

fhammerschmidt wants to merge 2 commits into
rescript-lang:masterfrom
fhammerschmidt:fix/1421-guide-contract

Conversation

@fhammerschmidt

@fhammerschmidt fhammerschmidt commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Validate guide lesson IDs and exercise paths, and require positions to be signed 32-bit integers. Require a string exercise.expectedOutput so missing or misspelled fields fail during the build. Preserve its exact whitespace and allow an empty string.

Remove the unsupported manual checkpoint variant and unused description and exercise.title fields. Keep source filenames for build diagnostics and duplicate checks, then leave them out of published lesson data.

Run frontmatter and filesystem collection tests through the guide's CI command, covering invalid fields, duplicate IDs and positions, lesson ordering, and published data.

Part of #1421.
Fixes #1404

Validate slug identifiers, 32-bit integer positions, and required exact output strings. Remove unused description and exercise title metadata and keep source paths only in build diagnostics.

Run frontmatter and real lesson collection checks in Node as part of guide CI. Cover malformed fields, duplicate diagnostics, nested discovery, exact output, and path-free serialized lessons.

Fixes rescript-lang#1404

Part of rescript-lang#1421.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 9, 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-10-09T21:13:56.302375Z 1c48f66 PR opened
ℹ️ 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.

Comment thread apps/guide/__tests__/content/GuideLessonContent_.test.res Outdated
Use shared Node and Vitest bindings in the content tests. Resolve conflicts with master while retaining lesson validation and browser history test commands.

This branch has not been deployed

No deployments
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.

Lesson contract not enforced

2 participants