Skip to content

fix(update): default self-update to public npm + truthful versioning#21

Merged
kreneskyp merged 3 commits into
mainfrom
fix/update-default-registry-and-drift-guards
Jun 27, 2026
Merged

fix(update): default self-update to public npm + truthful versioning#21
kreneskyp merged 3 commits into
mainfrom
fix/update-default-registry-and-drift-guards

Conversation

@kreneskyp

Copy link
Copy Markdown
Contributor

Why

quoin update passed no registry to ix-cli-core's runSelfUpdate, so npm used the ambient config. On a machine whose npm default points at a private snapshot registry (e.g. npm.ix), that 404s — @agent-ix/quoin is published to public npm.

What

  • FR-022: default the self-update registry to https://registry.npmjs.org/ when no --registry is given; --registry still overrides for local-dev snapshots. Spec (FR-022 / matrix / plan) and tests updated.
  • Truthful runtime version: bake git describe --tags --dirty into the build (vite define); packageVersion() prefers it. A clean tagged release reports its tag (0.5.2); any other build reveals drift (0.5.1-3-gabc123-dirty). Falls back to package.json for dev/test/no-git builds.
  • Release-drift guard: new release-drift.yml fails while main's src/ is ahead of the latest release tag, so fixes can't sit unreleased. Self-heals — re-evaluates on tag push and daily.

Verification

  • quoin update --check resolves public npm (no ambient 404); --registry http://npm.ix/ still honored.
  • quoin --version on a dirty tree → 0.5.1-dirty; on a clean v0.5.2 tag → 0.5.2.
  • New tests/version.test.ts covers both version branches; update.test.ts asserts the npmjs default.

🤖 Generated with Claude Code

`quoin update` passed no registry to ix-cli-core's runSelfUpdate, so npm used
the ambient config. On machines whose npm points at a private snapshot
registry, that 404s — @agent-ix/quoin is published to public npm. Default to
https://registry.npmjs.org/ when no --registry is given (FR-022); --registry
still overrides for local-dev snapshots.

Also prevent the version drift this surfaced:

- Bake `git describe --tags --dirty` into the build (vite define) and have
  packageVersion() prefer it, so `quoin --version` is truthful: a clean tag
  shows the tag (0.5.2), any other build reveals it's ahead/dirty
  (0.5.1-3-gabc123-dirty). Falls back to package.json for dev/test/no-git builds.
- Add a release-drift CI guard that fails while main's src/ is ahead of the
  latest release tag, so fixes can't sit unreleased; self-heals on tag push.

Updates FR-022 (spec, matrix, plan) and adds tests for both version branches.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@kreneskyp
kreneskyp requested a review from a team as a code owner June 27, 2026 02:10
Peter Krenesky and others added 2 commits June 26, 2026 19:14
Code-review finding: the fallback test used weak assertions (typeof/length).
Assert the exact package.json version instead.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Gap analysis (SR-001) flagged that baking git-describe into packageVersion()
changed FR-002 behavior without updating the requirement, and that
version.test.ts was untracked.

- FR-002: Description + Behavior now specify "prefer the build-time baked
  version, fall back to package.json"; add FR-002-AC-4.
- Matrix: add version.test.ts to the FR-002 row.
- Add the gap-analysis SpecReview artifact (reviews/, quire-validated).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@kreneskyp
kreneskyp merged commit cd85c95 into main Jun 27, 2026
6 checks passed
@kreneskyp
kreneskyp deleted the fix/update-default-registry-and-drift-guards branch June 27, 2026 14:43
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