Repository navigation
spec 1.7: question manifests say where a question appeared (provenance) - #48
Merged
Merged
Conversation
…on was set in (spec 1.7 §2.1)
An optional array of {kind, code, name, year}: kind board_exam | institution_exam (open), code 2-8 of A-Z0-9, name a string
or one per language, year an integer or null. checkQuestion reports the same paper listed twice. The spec says source may be
left out by a publisher that must not name the book it took a question from.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Codex review — round 1 (Codex CLI output, relayed by Claude Code under this account) STATUS: CHANGES_NEEDED
|
…n, year range, at most 100 entries Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Fixes after Codex round 1 (commit e2c13ed) All three were the same mismatch: the schema checked limits the spec text didn't state. The limits are deliberate (a kind that is an identifier, a plausible year, a bounded list), so the spec now states them rather than the schema dropping them:
No change to the model or schema. Conformance tests pass (54). |
Contributor
Author
|
Codex review — round 2 (Codex CLI output, relayed by Claude Code under this account) STATUS: LGTM |
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.
Adds an optional
provenancefield to question manifests (spec 1.7 §2.1): the exam papers a question appeared in, for readers to show as short tags with the full name on hover.kind:board_exam|institution_exam; open (lower-case,_), so later kinds are not a new version. Readers must not reject an unknown kind.code: 2 to 8 ofA-Z0-9.name: a string, or one per language, like other texts.year: an integer, ornull(or absent) when not known.checkQuestionreports the same paper twice.sourceis now documented as something a publisher may leave out (chalkbook will stop publishing the guide a question was copied from).Additive only: manifests without
provenanceare unchanged, andmanifestVersionstays 1. The PathshalaX reader is being built against exactly this shape.Changes:
packages/model/src/question-manifest.ts(questionProvenanceSchema,PROVENANCE_KINDS), the regeneratedschema/question-manifest.schema.json, tests, the creative-question example now carriesprovenance, and spec text.Checks:
pnpm typecheckandpnpm testpass. Lint has 0 errors (the 4 warnings were there before). Two tests,reader gather.test.tsandlibrary-server adopt.test.ts, failed once under the full parallel run. Both pass alone and on a re-run, and this change doesn't touch them.🤖 Generated with Claude Code