Skip to content

zarr queue: normalize version comparison (bare vs vX.Y.Z) - #61

Merged
neuromechanist merged 1 commit into
mainfrom
fix/zarr-queue-version-normalize
Jul 31, 2026
Merged

neuromechanist merged 1 commit into
mainfrom
fix/zarr-queue-version-normalize

Conversation

@neuromechanist

Copy link
Copy Markdown
Member

Prevents a full Zarr-rebuild burst when nemar-cli #899 deploys.

nemar-cli epic #896 (#899) canonicalizes the catalog latest_version to the vX.Y.Z tag. reconcile() compared it raw against the stored converted_version/latest_version, which for datasets stored bare (1.0.0) would suddenly != the tagged wire value (v1.0.0), flip every such done row back to pending, and re-drain the whole queue on the next hallu-zarr cron tick.

Fix: route both sides of the 3 version comparisons through _vtag() so the comparison is agnostic to bare-vs-tagged. Idempotent; self-corrects; new regression test (test_bare_vs_tagged_same_version_does_not_requeue), full suite green (14 tests).

Deploy note: land + deploy this on Hallu BEFORE nemar-cli #899 reaches prod to avoid the burst.

nemar-cli epic #896 (#899) normalizes the catalog latest_version to the
canonical vX.Y.Z tag. reconcile() compared it raw against the stored
converted_version/latest_version, so once #899 deploys, every dataset whose
version was stored bare would read as a new version, flip done->pending, and
re-drain the entire queue -- a full needless Zarr rebuild of every already-
converted public dataset. Route both sides of the 3 version comparisons
through _vtag() so the comparison is agnostic to the wire format. Regression
test added.
neuromechanist added a commit to nemarOrg/nemar-cli that referenced this pull request Jul 6, 2026
- 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 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 2e54901 into main Jul 31, 2026
3 checks passed
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