Repository navigation
Conversation
The DataSearch components and the src/lib/search helpers take the page's Spec, Part and Slot types where they took any, so a reader that skips an absent member fails to compile. SpecReading is Partial<Spec> | UnreadableSpec, and an unreadable spec's stat_vars is unknown, so StatVars reach a reader only through readStatVars. A spec flagged statVarsUnreadable supplies no StatVar count, years or members from the value that failed validation. priceBasis reads a prices value other than current or constant as unknown, and withResolvedSlotEdit returns the identity unchanged for a spec with no slots. Test fixtures go through partialSpec and partialSlot, which take a deep partial of the wire type; two fixtures that named non-members of ObservationSeries now name stat_var.
jm-rivera
added this pull request to stack #44
October 21, 2026 17:03
This branch has not been deployed
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.
Stacks on #43.
The DataSearch components and the
src/lib/searchhelpers take the page's spec, part and binding types in place ofany, so a reader that skips an absent member fails to compile. 112 such parameters are typed. Three remain, each at a boundary:flattenPartinsearchClient.tsreads an unvalidated response body, andpreviewColumns.test.tsedits a trimmed fixture in place.SpecReadingintypes.tsisPartial<Spec> | UnreadableSpec, the shape a helper that accepts any part's spec reads, andUnreadableSpec.stat_varsisunknown, the raw value that failed validation. A spec's StatVars reach a reader only throughreadStatVarsinview.ts, which returns nothing for an unreadable spec. Nested members keep the wire's optionality, which exposed readers that assumed a bare coverage hasdimensions, thatrequested_windowis never'latest', and thatentity_typeanddownloadare never null. Test fixtures go throughpartialSpecandpartialSlotintest/fixtures/partial.ts, which take a deep partial of the wire type, so each member a fixture names keeps its wire name and type. Two fixtures named membersObservationSerieslacks (series_keyandindex) and now namestat_var.Three behaviours change, and a reviewer should confirm each. A spec flagged
statVarsUnreadablesupplies no StatVar count, years or members read from the value that failed validation, so the measure token's About drops its count and span and the Why panel counts no variables (servedMembership,servedSeriesCount,yearsTextandbuildWhySummaryinview.ts, andservedSpan,latestDateandsingleStatVarSpecintokenAbout.ts).priceBasisinunitLabel.tsreads apricesvalue other thancurrentorconstantas unknown and falls back to the unit ref and the qualifier, where it printed the unknown value as constant prices.withResolvedSlotEditinpromote.tsreturns the identity unchanged for a spec with no slots, where it threw, a path no rendered slot menu reaches.Testing: typecheck, lint, lint:css, the 1,613 tests outside
db/andpnpm buildpass. A newwhy.test.tscase gives an unreadable spec with{ served_count: 3, member_count: "3" }to the measure About andbuildWhySummary, and fails whenreadStatVarsis bypassed.