Artifact presentation, publisher labels, and structured dimensions (spec-driven countries 2/2) - #170
Merged
Merged
Conversation
Lane bookkeeping, not repository content; the PR description carries the report. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Second of two PRs for #166, on top of #168. The remaining three conformance
test.todos are now passing tests, so thezzacceptance suite is fully green: a fourth country renders from artifacts alone, with one registry entry as the only country-specific change.What changed
release_manifest.presentation(typed, narrow):overview_introandtargets_introonly — the two existing text slots. Trimmed, capped, unknown keys dropped;nullwhen nothing valid. Served on the overview and target-diagnostics responses.lib/microcosm/presentation.tscentralizes the fallback order: artifact slot → legacy per-country copy (marked for deletion once producers publish the block) → generic sentence. The overview keeps the code-owned "Data is built live from …" sentence.release_manifest.publisher_labels: keyed by the first Chronicle record-ID segment, validated. Every row now carriessource_label(artifact label → structuredsource.label→ the shared humanizer); the treemap, calibration tree, variable summary, and target detail read the row's label instead of calling the code map directly.calibration_diagnostics.dimensionsdictionary (label,role: "geography"+ level, value labels, explicit order) plustargets[].dimensionsvalues. Facet ordering follows the artifact's declared order when every value is ranked; geography-role dimensions set the row's geography/level. Adapter selection is per artifact and per row —structuredwhentargets[].dimensionsis present, else thelegacy_filterpattern adapter, elselegacy_namegrammar — recorded on every row asdimension_adapterand summarized astarget_schemaon the calibration. Never by country.targets[].source/targets[].variable: objects ({id, citation, label, url}/{id, label, measure}) accepted alongside the legacy strings. Publisher precedence stays Chronicle-record-ID first;source_citationkeeps its v2 string behavior; newsource_urlgives the target detail a "View official source" link (Chronicle-entry fallback unchanged);variable_labelandmeasureflow into grouping and detail views.sourceAuthorityLabeluses an own-property check.Backward compatibility
The live US artifact (schema_version 5, dotted names,
filter: null, stringsource) and the UK/BE filter-coded artifacts shape byte-identically — pinned by a new live-US-shaped regression test plus ~650 lines of reader tests (validation, malformed blocks, rank ordering, adapter selection, publisher-label precedence).bun test: 263 pass / 0 todo / 0 fail;tsc --noEmitclean;next buildclean.Conformance
All four
zztodos enabled with their original assertions intact, plus a fifth test for the structured identifiers.docs/spec-driven-countries.mdnow documents the contract as implemented and the producer follow-up list (microcosm publishescountry,presentation,publisher_labels,dimensions, structuredsource/variable; the legacy adapters retire after that).Closes the reader side of #166.
🤖 Generated with Claude Code