Repository navigation
fix: one list of every problem, with codes and fixes as data - #859
Merged
Merged
Conversation
tableProblems() and problemsOf() return what section 9 says makes a table invalid, what its reader kept and couldn't use, and the optional warnings. Each has a stable code, a severity, its place and the fixes that apply, as data. The reader's diagnostics carry codes. A repeated field id is said, not only mended. An unreadable schema.json throws UnreadableSchemaError. The validator now checks categories, yearmonth, exclusive bounds, bounds on dates and times, and uniqueKeys. Refs #858 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ry type Refs #858 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #858 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #858 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #858 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs: #858 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Refs #858 (parts 1 and 2; part 3, the apps' UI, is separate).
What changes
tableProblems(bundle)/problemsOf(table, name)in table-core return every problem a table has:Each problem has a stable
code, aseverity(error, warning, notice), its place (cell, row, field, kept line or file),detailsunder stable keys, an Englishmessage, and itsfixesas data. A fix has alabelandchangesSchema, and fixes are listed safe first, then decisions, then schema changes. Nothing applies a fix.The reader's diagnostics carry codes, and a kept line carries its file and text.
A repeated field id is now reported. The reader still gives the second field a new id, but now says so.
An unreadable
schema.jsonstill throws, as the spec's one fatal case. It is now anUnreadableSchemaErrorwithcode: "schema.unreadable".The validator now checks:
categories(before, onlyconstraints.enum);yearmonthvalues (now aFieldType, labelled Month);uniqueKeys.It doesn't order durations, whose months and days have no fixed length.
viewSummarynow usesproblemsOf. "schema valid" means the table has no errors: cells, pages, and lines the reader kept all count. Its newproblemsfield lists every problem.Spec: adds "Showing a table's problems" (guidance) to section 9. It also resolves the contradiction between section 7 and section 9: an orphaned page makes a table invalid.
Fixtures: the submodule moves to feat(table): schema problem examples, and a formula column of every type workspace-fixtures#17, adding
schema-errors.table,broken/schema-unreadable.table, and a column of every type informula-errors.table.schema-errorsis left out of the checks that every example reads cleanly.problems.test.tschecks that each labelled row has its problem.schema-errorswith what its reader said, so the demo apps open it.Checks
core: 581 tests pass.app: 393 tests pass.macIndexHost.tsand the desktop tsconfig report modules that aren't installed. These files aren't changed here.High-priority backlog: checked (
gh issue list --label "priority: high").🤖 Generated with Claude Code