Skip to content

fix: npm 0.6.0 version-sync + workflow_dispatch + already-published guard - #33

Merged
laynepenney merged 1 commit into
mainfrom
fix/npm-publish-workflow-dispatch-guard
Jul 15, 2026
Merged

fix: npm 0.6.0 version-sync + workflow_dispatch + already-published guard#33
laynepenney merged 1 commit into
mainfrom
fix/npm-publish-workflow-dispatch-guard

Conversation

@laynepenney

Copy link
Copy Markdown
Member

Resolves the npm 0.6.0 gap (Opus's decision, since publish-npm.yml has no workflow_dispatch today: the automatic release-triggered publish for extract#31's release already fired-and-failed against the stale 0.5.0 npm version — no automatic retry path once npm's version catches up).

What's in this PR

  1. packages/ts/package.json + package-lock.json: 0.5.0 → 0.6.0, via npm version --no-git-tag-version (both files kept in sync through npm's own tooling, not hand-edited — avoiding the exact lockfile-drift class Sentinel caught earlier this session). Semantically honest: main already carries the full additive-role ts/py parity slice, so the version number now matches what's actually shipped.

  2. publish-npm.yml: added workflow_dispatch alongside the existing release: published trigger, so this already-fired release can be manually re-triggered now that the version has genuinely changed. Guarded the release-only SBOM-upload step (reads github.event.release.tag_name) behind github.event_name == 'release' so a manual dispatch doesn't crash on a nonexistent release context.

  3. Added an "already published" guard: checks npm view @synapt-dev/extract@$VERSION version before publishing, skips publish/SBOM/upload-to-release when that version is already live. Fixes a real noise problem this exact release train just produced — the workflow fires unconditionally on every GitHub release regardless of whether npm's own version changed, so a future Python-only release will otherwise always fail-red ("cannot publish over previously published version") — expected, not a bug, but noisy. The guard turns that into a clean skip.

CHANGELOG.md: corrected the now-stale "npm keeps 0.5.0 for now" and "+ version-sync" claims from the earlier landed commit — version-sync is done here; the FULL ts/py parity effort (a TS extract_batch/batch.ts port) remains the separate, still-deferred follow-up.

Verification

  • 265 TS tests green, tsc --noEmit clean.
  • No test hardcodes the package version (checked before assuming safe).
  • publish-npm.yml YAML validated.

Sequence after merge

Merge → run gh workflow run publish-npm.yml (using the new workflow_dispatch) → verify npm view @synapt-dev/extract version == 0.6.0.

Premium boundary

OSS — extract's IL schema/build/CI infrastructure only.

Reviewers: Opus, Sentinel

…blished guard

Opus's decision (no workflow_dispatch on publish-npm.yml today, so the automatic release-
triggered publish for extract#31/79acca7's release already fired-and-failed against the
stale 0.5.0 npm version -- there is no automatic retry path once npm's version catches up).

1. packages/ts/package.json + package-lock.json: 0.5.0 -> 0.6.0, via `npm version
   --no-git-tag-version` (keeps both files in sync through npm's own tooling, not hand-edited
   sed -- avoiding the exact lockfile-drift class Sentinel caught earlier this session).
   Semantically honest: main already carries the full additive-role ts/py parity slice
   (schema.ts/builder.ts/validate.ts/finalize.ts/prompt-data.ts all match Python), so the
   version number now matches what's actually shipped, not a hollow bump.

2. publish-npm.yml: added `workflow_dispatch` trigger alongside the existing `release:
   published` trigger, so this specific already-fired release can be manually re-triggered
   once the version genuinely changed. Guarded the release-only step (SBOM upload, which reads
   github.event.release.tag_name) behind `github.event_name == 'release'` so a manual dispatch
   doesn't crash on a nonexistent release context.

3. Added an "already published" guard: checks `npm view @synapt-dev/extract@$VERSION version`
   before publishing: skips publish/SBOM/upload-to-release when that version is already live.
   Fixes a real noise problem this exact release train just produced: the workflow fires
   unconditionally on EVERY GitHub release regardless of whether npm's OWN version actually
   changed, so a future Python-only release (npm version unchanged) will otherwise always
   fail-red with "cannot publish over previously published version" -- expected, not a bug,
   but noisy. The guard makes that case a clean skip instead of a red X.

CHANGELOG.md: corrected the now-stale "npm keeps 0.5.0 for now" and "+ version-sync" claims
from the earlier landed commit -- version-sync is done here; the FULL ts/py parity effort (a
TS extract_batch/batch.ts port) remains the separate, still-deferred follow-up.

Verified: 265 TS tests green, tsc --noEmit clean, no test hardcodes the package version
(checked before assuming safe), publish-npm.yml YAML validated.

Premium boundary: OSS -- extract's IL schema/build/CI infrastructure only.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017ZMaT1FQJD6rqfN77piMHm
@laynepenney
laynepenney merged commit 7763576 into main Jul 15, 2026
11 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