Skip to content

Fix vv1.0.0: coerce dataset version prefix - #145

Merged
neuromechanist merged 2 commits into
mainfrom
fix/dataset-version-prefix
Jul 24, 2026
Merged

neuromechanist merged 2 commits into
mainfrom
fix/dataset-version-prefix

Conversation

@neuromechanist

Copy link
Copy Markdown
Contributor

DatasetCard rendered an already-v-prefixed latest_version as vv1.0.0. Coerce (startsWith('v') ? v : 'v'+v) so it's correct whether the catalog API emits bare or tagged versions.

Pairs with nemar-cli epic #896 #899, which canonicalizes the catalog latest_version to the vX.Y.Z tag. This coercion is deploy-order-safe (works with both the old mixed-format and new tagged-format backend), so it can ship independently and should ideally land before the backend change.

The catalog API may emit a bare version (1.0.0) or the canonical tag
(v1.0.0). DatasetCard blindly prepended 'v', rendering an already-tagged
value as 'vv1.0.0'. Coerce instead — safe regardless of which nemar-cli
backend (pre/post epic #896 #899 latest_version normalization) is deployed.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 6, 2026 •

Copy link
Copy Markdown

Deploying nemar-website with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1654c94
Status: ✅  Deploy successful!
Preview URL: https://7dd69d38.nemar-website.pages.dev
Branch Preview URL: https://fix-dataset-version-prefix.nemar-website.pages.dev

View logs

neuromechanist added a commit to nemarOrg/nemar-cli that referenced this pull request Jul 6, 2026
…939)

* Fix contract drift: getCurrentUser + version prefix

Epic #896 Phase 4 (#899). Applies the #898 contract to the known drift.
- getCurrentUser() unwraps the {user, token} envelope (.user) and validates
  against userMeResponseSchema. It previously declared flat UserInfo and read
  the envelope top level, so every field was undefined at runtime -- silently
  writing undefined over stored account config on 'auth status --refresh' and
  disabling the upload ORCID auto-match. Consumers coerce nullable username/
  github_username -> undefined for config.
- Catalog latest_version is emitted in the canonical vX.Y.Z tag form
  (withCanonicalLatestVersion) at the list/fallback/detail responses, matching
  the data plane + what hallu-sync's archives/<v>.zip URLs need. Fixes the
  website vv1.0.0 double-prefix (website PR nemarOrg/website#145 coerces too).
- file_size (#895): the compute is already annex-aware (getDatasetS3Stats sums
  real S3 object sizes); the ~36B symptom is stale legacy folded rows -> fixed
  by an operational reindex backfill at finalize, no code change.
- /datasets/:id parity (#864) is backend-complete (#853); website backfillSearchHit
  removal tracked separately.

* Address #899 review: strict version test + cleanup

- Live contract test now asserts the RAW catalog latest_version is the
  canonical tag via the non-coercing strictVersionTagSchema, so a dropped
  withCanonicalLatestVersion call site fails CI (the coercing envelope schema
  couldn't catch that).
- Added a getCurrentUser() live-integration test that calls the function and
  asserts flat access (config dir is isolated by setup.ts).
- Removed the now-dead UserInfo interface and a redundant cast at the detail
  return.
- Cross-repo: nemarDatasets/.github#61 normalizes the Hallu zarr-queue version
  comparison so #899's tagged latest_version doesn't re-drain the queue.
@neuromechanist
neuromechanist merged commit 99d7945 into main Jul 24, 2026
5 checks passed
@neuromechanist
neuromechanist deleted the fix/dataset-version-prefix branch July 24, 2026 15:26
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.

1 participant