test(charts): the chart-dialect guard fails on new dialect, not on the spec adopting one (#2945) - #3016
Merged
Merged
Conversation
…e spec adopting one (#2945) The parity guard added in #3011 asserted `dialect === ['combo']` — an exact match against the one name objectui draws that the resolved spec does not define. That is the wrong shape for a drift guard: framework#4070 has already promoted `combo` into `ChartTypeSchema`, so the moment objectui bumps to a spec version carrying it, `dialect` becomes `[]` and the test fails with "expected [] to deeply equal ['combo']" — a cryptic red for the good outcome, landing on whoever does the bump rather than on whoever adds dialect. Now the tracked set is an upper bound: only UNTRACKED dialect fails, so the list shrinks silently as the spec adopts a name, and an entry the spec has since defined is reported via console.info so it gets pruned instead of accumulating as a stale exception. No renderer change; the coverage assertions are untouched. Refs #2945, #2943 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
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.
A one-test follow-up to #3011, found while checking what remained of #2945.
The problem
The chart-type parity guard I added in #3011 asserted an exact match against the one name objectui draws that the resolved spec doesn't define:
That's the wrong shape for a drift guard. framework#4070 has already promoted
combointoChartTypeSchema(it isn't in a published spec version yet, so objectui still resolves the enum without it). The moment objectui bumps to a spec carryingcombo,dialectbecomes[]and the test fails withexpected [] to deeply equal ['combo']— a cryptic red for the good outcome, landing on whoever does the version bump instead of on whoever introduces dialect.The fix
The tracked set becomes an upper bound rather than an expectation:
console.infoso it gets pruned rather than accumulating as a stale exception.Coverage assertions (every spec chart type lands on a real branch; no silent bar collapse; single-value/tabular behavior) are untouched.
Context on #2945
While verifying, I found Track A and the additions-only work are both already done framework-side, so #2945's "safe, ready now" section is stale:
AggregationFunctionEnum, websocketFilterOperator+EventFilterSchema,ODataFilterOperatorSchema), each with a tombstone comment. I verified zero residue in framework, and zero consumers in objectui.combo, madeWidgetActionTypeSchemabeActionType, derivedListChartConfigSchema.chartTypevia.extract([...]), and derived@objectstack/lint's chart-family set from the taxonomy.saveMetanow persists the normalized operator spellings, which was prerequisite Add automated testing infrastructure and CI/CD workflows #2 for Track C.I've commented the same on #2945. Track C is still blocked on objectstack#3948 item 1 and shouldn't start.
Verification
vitest7/7 on the touched file, eslint clean. Test-only change.🤖 Generated with Claude Code