Skip to content

fix(release): pack F292 workspace directories locally - #27

Merged
zts212653 merged 1 commit into
mainfrom
fix/f292-publish-local-directory
Aug 10, 2026
Merged

fix(release): pack F292 workspace directories locally#27
zts212653 merged 1 commit into
mainfrom
fix/f292-publish-local-directory

Conversation

@zts212653

Copy link
Copy Markdown
Owner

Why

The post-merge F292 publication run failed before registry inspection because npm interpreted the unprefixed packages/plugin-contract argument as a package spec and attempted SSH access to a nonexistent GitHub repository.

No package publication or dist-tag mutation occurred. The SDK beta.5 and Feishu alpha.0 versions remain absent from npm.

What

  • pass the already-validated workspace package path to npm pack as an explicit relative directory
  • add a conformance assertion that prevents regression to an ambiguous package spec

Red → Green evidence

  • Red: release configuration test failed on the current action
  • Green: release configuration and workflow shell syntax tests pass 26/26
  • Real command probe: npm pack ... ./packages/plugin-contract exits 0 and emits the expected contract artifact
  • git diff --check passes

Risk snapshot

  • Behavior: fixes only package path resolution in the release action.
  • Data: no application or user data changes.
  • Security: token scope and registry write steps are unchanged.
  • Contract: package bytes and versions are unchanged; only the pack input is disambiguated.
  • Irreversible: this PR itself does not publish; a later main run resumes the already-authorized immutable prerelease publication.

Why: npm treats an unprefixed packages/... argument as a registry or git package spec in GitHub Actions, so the authorized release failed before touching the registry. Prefix the already-validated workspace path with ./ and lock the boundary in release conformance tests.
@zts212653
zts212653 requested a review from mindfn as a code owner August 10, 2026 11:43
@zts212653

Copy link
Copy Markdown
Owner Author

Exact-delta review — verdict: APPROVE

Reviewed commit: ba96db6a1cfa2b33a786c7789d4e79ba21b18610
Reviewer: Kimi (k3)

Failure truth independently verified (run 31384421199): the run died at the first pack step with npm error 128 — git ls-remote ssh://git@github.com/packages/plugin-contract.git — i.e. npm interpreted the bare packages/plugin-contract argument as a GitHub shorthand spec. SDK/Feishu publish steps never executed. Registry independently queried: @clowder-ai/plugin-sdk and @clowder-ai/feishu-meeting-intake both still E404; contract dist-tags unchanged (latest=0.1.0-beta.1, next=0.1.0-beta.9). Zero registry mutation confirmed.

Fix correctness (RED→GREEN reproduced locally):

  • RED: on this machine the bare form fails with the exact CI signature (npm 128, same ssh:// URL).
  • GREEN: "./${PACKAGE_DIRECTORY}" packs cleanly to the standard clowder-ai-plugin-contract-0.1.0-beta.9.tgz filename; the ./ prefix only disambiguates the source locator and never enters tarball contents.
  • No injection regression: the pre-existing ^packages/[a-z0-9-]+$ grammar rejects anything but lowercase alnum/dash before the ./ prefix is applied, so the composed argument is always an unambiguous in-repo directory.

Guard: release-config.test.ts now pins the exact ./${PACKAGE_DIRECTORY} spelling with a rationale comment — a mutation guard against reverting to the ambiguous form. The workflow-shell-syntax gate already covers the action's bash blocks.

Independent evidence (exact ba96db6a): contract suite 308/308 (includes new guard), git diff --check PASS, GitHub CI green.

APPROVE for merge at exact HEAD ba96db6a1cfa2b33a786c7789d4e79ba21b18610.

[墨墨/Kimi-k3🐾]

@zts212653
zts212653 merged commit e932b8f into main Aug 10, 2026
2 checks passed
@zts212653
zts212653 deleted the fix/f292-publish-local-directory branch August 10, 2026 11:57
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