Skip to content

fix: full publisher name in the timeseries download when there is no short one - #987

Merged
jacobvjk merged 1 commit into
epic/v2from
fix/csv-publisher-fallback
Oct 12, 2026
Merged

jacobvjk merged 1 commit into
epic/v2from
fix/csv-publisher-fallback

Conversation

@jacobvjk

@jacobvjk jacobvjk commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

The bug: the timeseries CSV download read only publication.publisher.short. TransitionZero's four timeseries files carry a full name only, so their downloads had:

  • an empty publisher column
  • a source column starting with the literal text "undefined"

This was found by the benchmark prep repo's review workbook (RMI/tpr_benchmark_data_preparation#18): the workbook and TPR's download matched in every value except these.

The fix: a new publisherLabel helper in scripts/timeseries-csv.ts returns the short name, or the full name where there is none. Both publisher and source use it. It's the same rule the review workbook uses, so the two now match exactly.

Checked:

  • Built every CSV before and after the change: only the four TransitionZero files change, and every other file is byte-identical.
  • The generated index is unchanged.
  • Unit tests cover the helper.
  • Full suite, lint and prettier pass.

Best merged before the first real benchmark import, so the review workbook and the imported downloads agree.

🤖 Generated with Claude Code

The timeseries CSV read only publication.publisher.short. TransitionZero's
four timeseries files carry a full name only, so their downloads had an
empty publisher column and a source starting with "undefined" (found by
the benchmark prep repo's review workbook, RMI/tpr_benchmark_data_preparation#18).

publisherLabel now uses the short name, or the full name where there is
none, for both columns, the same rule the review workbook uses, so the
two match. Only the four TransitionZero CSVs change; every other file
builds byte-identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

Expected version change and release notes

🚨 WARNING: This PR is not expected to trigger a new version

To trigger a version bump, use at least one conventional commit message in this branch. See: https://www.conventionalcommits.org/en/v1.0.0/

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://proud-glacier-0f640931e-987.westus2.2.azurestaticapps.net

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused fix correctly covers both affected CSV fields with appropriate unit tests.

0 open findings

What changed in this PR

Fixes timeseries CSV metadata when publishers have no short name.

Changes:

  • Adds a short-name-to-full-name fallback helper.
  • Uses it for CSV publisher and source fields.
  • Adds unit tests for short, missing, and blank names.
File Description
scripts/​timeseries-csv.ts Adds publisherLabel.
scripts/​build-timeseries-files.ts Applies the fallback during CSV generation.
scripts/​timeseries-csv.test.ts Tests publisher-label selection.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@jacobvjk
jacobvjk merged commit 823c378 into epic/v2 Oct 12, 2026
11 checks passed
@jacobvjk
jacobvjk deleted the fix/csv-publisher-fallback branch October 12, 2026 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants