Repository navigation
feat(validate): a free_text answer must not also be a distractor (#237) - #238
Merged
Merged
Conversation
New error E-FREETEXT-DISJOINT, the free_text counterpart of E-CLOZE-MS-DISJOINT: an accept entry that is also in distractors, compared after trimming and case-sensitively, with the shared answers (each once) in params. The schema calls distractors the renderer's fallback pool of wrong options, so a shared entry offers a correct answer as a wrong one. The rule lived only in the content template's advisory audit, outside CI. Case-sensitive because two exercises in the hub teach capitalisation with a distractor that differs only in case (I am Anna / i am Anna). Measured with this build over the 632 lessons on origin/main of the eleven content repositories: 0 hits; an overlap seeded into a real lesson is found. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This was referenced Oct 1, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #237.
Summary
New error
E-FREETEXT-DISJOINTinsrc/rules.ts, thefree_textcounterpart ofE-CLOZE-MS-DISJOINT.acceptentry that is also indistractors.sharedlists the shared answers, each once.validateLessonandvalidateLessonRules(the/rulesentry).Case-sensitive because two exercises in the hub teach capitalisation with a distractor that differs only in case (
I am Annaagainsti am Anna). The issue text wrotei am anna; the real distractor isi am Anna.Docs
lesson-format.md:free_textsection explainsdistractorsand the rule;validation.md: thefree_textrow.architecture.md: an open item. Engine side done; the template's audit drops its copy after the release and re-pin.[Unreleased]entry.Test plan
src/free-text-disjoint.test.ts: 9 tests, red before the change:/rulesentry;accept;src/issue-params.test.ts: a params case for the new id. The params-table gate was red until the docs listed it.make release-check: 1759 tests passed.make prose-checkandnpm run docs:api:check: green.origin/mainof the eleven content repositories: 0 hits. An overlap seeded into a real lesson (adaptive-learner-content,ex-free-i-capital) is found at/steps/9/exercise.🤖 Generated with Claude Code