Skip to content

fix(clawhub): accept -boon.N in plugin API compat regex - #41

Merged
insomnius merged 2 commits into
boonfrom
eng/plugin-api-suffix-boon
Jul 7, 2026
Merged

insomnius merged 2 commits into
boonfrom
eng/plugin-api-suffix-boon

Conversation

@insomnius

@insomnius insomnius commented Jul 7, 2026 •

Copy link
Copy Markdown

What Problem This Solves

@openclaw/[email protected] (and every @openclaw/* plugin declaring openclaw.compat.pluginApi: ">=2026.6.11") fails to install on Boon fork hosts with:

PLUGIN_INSTALL_ERROR_CODE.INCOMPATIBLE_PLUGIN_API
plugin requires plugin API >=2026.6.11, but this OpenClaw runtime exposes 2026.6.11-boon.2. Upgrade OpenClaw or install a compatible plugin version and retry.

Reproduced during the follow-up to PR #39 (the msteams default-on flip) when trying to bump the msteams plugin on a fork host — the fork tarball was blocked at the install gate. Confirmed by prior debug session (d49fbc8c-8032-46b6-8dd9-0f616e77bcb0).

Why This Change Was Made

Both the pre-install gate in src/plugins/clawhub.ts (validateOpenClawPackageInstallCompatibility) and the discovery-time gate in src/plugins/discovery.ts route through satisfiesPluginApiRange, and its normalization regexes in src/infra/clawhub.ts only recognized:

  • -N (numeric correction)
  • -alpha.N, -beta.N, -rc.N

-boon.N fell through both patterns, so normalizeOpenClawReleaseSuffixForPluginApi("2026.6.11-boon.2") returned the raw string. compareSemver then treated the whole thing as a prerelease and evaluated 2026.6.11-boon.2 < 2026.6.11 under standard semver rules, failing the >= check.

The rest of the fork already treats -boon.N as a stable correction rank — parseOpenClawReleaseVersion in src/infra/npm-registry-spec.ts has an explicit OPENCLAW_BOON_FORK_VERSION_RE — but clawhub.ts had not been kept in sync. This PR closes that gap.

User Impact

  • Every @openclaw/* externalized plugin installs on 2026.6.11-boon.N hosts — Teams plugin bump unblocked, and every future @openclaw/slack, @openclaw/brave-plugin, etc. lockstep on the fork works out of the box.
  • Explicit prerelease floors continue to work: >=2026.6.11-beta.2 still accepts -boon.2 (fork correction ranks stable ≥ beta), and >=2026.6.11-boon.1 correctly rejects 2026.6.11-beta.1.
  • Version bump: 2026.6.11-boon.2 → 2026.6.11-boon.3.
  • No upstream contract change — this file is fork-only surface (the fork's boon branch); upstream main never sees -boon.N.

Evidence

  • Fix: src/infra/clawhub.ts — extend both regexes to include -boon.\d+.
  • Tests: src/infra/clawhub.test.ts — 7 new assertions in a Boon fork -boon.N correction versions block covering >=, ^, and mixed prerelease-floor semantics. Local pnpm test src/infra/clawhub.test.ts = 59 pass / 2 skip.
  • Version + changelog: package.json + CHANGELOG.md + regenerated npm-shrinkwrap.json for release-check parity.
  • Sibling call sites unchanged: discovery.ts and clawhub.ts pre-install gate both auto-pick up the regex fix via satisfiesPluginApiRange; no other producer of the "plugin API version" string exists.

Follow-up

Rollout after merge: cut v2026.6.11-boon.3 as RC on the fork release channel → soak on arief-openclaw-test → fleet-sweep Teams hosts to install the fork @openclaw/msteams tarball (retires the last of the SP-PATCH runbook).

🤖 Generated with Claude Code


Summary by cubic

Accepts -boon.N as a stable correction in plugin API compatibility so external plugins (e.g., @openclaw/[email protected]) install on 2026.6.11-boon.N hosts. Bumps fork version to 2026.6.11-boon.3.

  • Bug Fixes
    • Include -boon.N in plugin API regexes so >=2026.6.11 passes pre-install and discovery on Boon.
    • Add tests for >=, ^, and prerelease floors; update changelog and package metadata.
    • CI: grant id-token: write to anthropics/claude-code-action@v1 to fix OIDC token failures.

Written for commit 7b9323f. Summary will update on new commits.

Review in cubic

@openclaw/[email protected] (and every @openclaw/* plugin declaring
`openclaw.compat.pluginApi: >=2026.6.11`) failed to install on Boon fork
hosts with `PLUGIN_INSTALL_ERROR_CODE.INCOMPATIBLE_PLUGIN_API`:

  plugin requires plugin API >=2026.6.11, but this OpenClaw runtime
  exposes 2026.6.11-boon.2. Upgrade OpenClaw or install a compatible
  plugin version and retry.

Root cause: both the pre-install gate in `src/plugins/clawhub.ts` and
the discovery-time gate in `src/plugins/discovery.ts` route through
`satisfiesPluginApiRange`, and its normalization regexes in
`src/infra/clawhub.ts` only recognized `-N`, `-alpha.N`, `-beta.N`,
`-rc.N`. `-boon.N` fell through, got treated as an unrecognized
prerelease, and `2026.6.11-boon.2 < 2026.6.11` under semver.

Fix: extend both `OPENCLAW_RELEASE_SUFFIX_PATTERN` and
`OPENCLAW_NUMERIC_CORRECTION_PATTERN` to also accept `-boon.\d+`.
Mirrors how `parseOpenClawReleaseVersion` in
`src/infra/npm-registry-spec.ts` already treats `-boon.N` as a stable
correction rank.

Version bump: 2026.6.11-boon.2 -> 2026.6.11-boon.3.

Verified: `src/infra/clawhub.test.ts` 59 passed / 2 skipped, including
7 new assertions covering `>=2026.6.11`, `^2026.6.11`, and mixed
prerelease-floor semantics against `-boon.N` hosts.
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

Dependency Guard

This PR changes dependency-related files. Maintainers should confirm these changes are intentional.

Changed files:

  • npm-shrinkwrap.json
  • package.json

Maintainer follow-up:

  • Review whether the dependency changes are intentional.
  • Inspect resolved package deltas when lockfile, shrinkwrap, or workspace dependency policy changes are present.
  • Treat package-lock.json and npm-shrinkwrap.json diffs as security-review surfaces.
  • Run pnpm deps:changes:report -- --base-ref origin/main --markdown /tmp/dependency-changes.md --json /tmp/dependency-changes.json locally for detailed release-style evidence.

@github-actions

github-actions Bot commented Jul 7, 2026 •

Copy link
Copy Markdown

Dependency graph changes noted

This PR includes dependency graph changes. The dependency guard is informational because the PR author is a repository admin or a member of @openclaw/openclaw-secops.

  • Current SHA: 7b9323f90389fd7d8a95b3023562872508007c1e
  • Trusted actor: @insomnius
  • Trusted role: pull request author; repository admin

Security review is still recommended before merge when the dependency graph change is intentional.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 5 files

Re-trigger cubic

…e-action

Job started failing with:

  Failed to get OIDC token: Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable
  Attempt 1 failed: Could not fetch an OIDC token. Did you remember to add
  `id-token: write` to your workflow permissions?
  ##[error]Action failed with error: Could not fetch an OIDC token.

The prior comment claimed OIDC was unnecessary because `anthropic_api_key`
is supplied. That is no longer true for `anthropics/claude-code-action@v1`
(pin `787c5a0ce96a9a6cfb050ea0c8f4c05f2447c251`) — its token bootstrap
step always calls `getIDToken`, and without `id-token: write` on the
job permissions the run fails immediately, regardless of the API key.

Grant `id-token: write` on the job (not the workflow default) so the
privileged token stays scoped to this single job.
@insomnius
insomnius merged commit 7292c1f into boon Jul 7, 2026
146 checks passed
@insomnius
insomnius deleted the eng/plugin-api-suffix-boon branch July 7, 2026 15:34
convyusboy added a commit that referenced this pull request Jul 18, 2026
…(PR #60 CI)

The msteams version bump to 2026.6.11-boon.4 failed checks-node-core-tooling
(test/plugin-npm-release.test.ts): parseReleaseVersion in npm-publish-plan.mjs
only recognized YYYY.M.PATCH[-N|-alpha.N|-beta.N], so a publishable plugin at
-boon.N was rejected as an unrecognized prerelease. msteams must stay publishable
(publishToNpm/publishToClawHub) or the release workflow's dist build no-ops.

Add a BOON_VERSION_REGEX arm parsed identically to the numeric `-N` correction
(stable channel + correctionNumber) — the same treatment src/infra/clawhub.ts
already gives -boon.N for the plugin API compat gate (getboon/openclaw PR #41). So
2026.6.11-boon.4 parses as a stable correction: publishTag "latest", sorts after
-boon.3 and after the plain 2026.6.11 base; -boon.0/-boon.x still rejected.

Verified: plugin-npm-release, npm-publish-plan, official-channel-catalog,
package-manager-config, openclaw-npm-release-check suites all pass (189 tests).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
convyusboy added a commit that referenced this pull request Jul 20, 2026
…s (ENG-14431) (#60)

* feat(release): publish fork @openclaw/msteams tarball on boon releases (ENG-14431)

The boon fork ships only the gateway tarball; @openclaw/msteams was consumed
from the upstream public npm registry, so the fork's Teams fixes (ENG-14349
attachment Graph fallback + aadGroupId, ENG-14117 topLevel, filecard->SharePoint
-link) never reached a running host — gandalf-manager shipped them as a fragile
host-local SP-PATCH / dist-swap that a plugin reinstall or fresh standup wiped.

Publish a fork-versioned @openclaw/msteams as a sibling GitHub Release asset on
the same v*-boon.* tag as the gateway:

- extensions/msteams/package.json: version 2026.6.11 -> 2026.6.11-boon.4 (tracks
  the gateway -boon.N in lockstep). compat.pluginApi >=2026.6.11 stays correct
  (a -boon.N host normalizes to 2026.6.11 per PR #41). publishToNpm stays true —
  it gates the official channel catalog / shrinkwrap / runtime build, NOT just
  the npm-publish path (which only fires on main and can't ship a -boon.N version
  anyway); the fork ships msteams via GitHub Release like the gateway.
- boon-release.yml: pack the plugin with the fork's own release tooling
  (plugin-npm-runtime-build.mjs + plugin-npm-package-manifest.mjs --run npm pack)
  so the tarball is runnable (dist/*.js entries + bundled workspace deps), assert
  it on disk, compute sha256, and upload openclaw-msteams-<ver>.tgz + .sha256
  alongside the gateway. Version guard mirrors the gateway "tag == version" step.

gandalf-manager installs this via `openclaw plugins install npm-pack:<tgz>` — the
only path that records source:npm (matching catalog npmSpec @openclaw/msteams) so
6.11's openKeyedStore trust-gate accepts it; a bare-tarball/--link install records
source:archive/path and crash-loops the channel.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* fix(release): pass tag via env in msteams pack step (zizmor template-injection)

The version guard interpolated ${{ github.ref_name }} directly into the run:
shell body — zizmor flags this as a code-injection vector. Pass it via env TAG
instead, matching the gateway pack/assert steps above. No behavior change.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* fix(release): align msteams shrinkwrap version + drop Unreleased CHANGELOG (PR #60 review)

- extensions/msteams/npm-shrinkwrap.json: bump the two version fields (root +
  packages[""]) 2026.6.11 -> 2026.6.11-boon.4 to match package.json. This fixes
  the `checks-node-core-tooling` failure: test/package-manager-config.test.ts
  ("ships shrinkwrap for every publishable plugin package") asserts the shrinkwrap
  version equals package.json's, so the tarball's lock metadata isn't stale.
- CHANGELOG.md: remove the `Unreleased` block. This repo adds a per-version
  `release: CHANGELOG section for <ver>` commit at tag-cut (e.g. #58 for boon.4)
  and package-changelog.mjs narrows to a versioned section; there's no Unreleased
  convention. The release-note context lives in the PR body + this commit instead.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* fix(release): accept -boon.N in publishable-plugin version validator (PR #60 CI)

The msteams version bump to 2026.6.11-boon.4 failed checks-node-core-tooling
(test/plugin-npm-release.test.ts): parseReleaseVersion in npm-publish-plan.mjs
only recognized YYYY.M.PATCH[-N|-alpha.N|-beta.N], so a publishable plugin at
-boon.N was rejected as an unrecognized prerelease. msteams must stay publishable
(publishToNpm/publishToClawHub) or the release workflow's dist build no-ops.

Add a BOON_VERSION_REGEX arm parsed identically to the numeric `-N` correction
(stable channel + correctionNumber) — the same treatment src/infra/clawhub.ts
already gives -boon.N for the plugin API compat gate (getboon/openclaw PR #41). So
2026.6.11-boon.4 parses as a stable correction: publishTag "latest", sorts after
-boon.3 and after the plain 2026.6.11 base; -boon.0/-boon.x still rejected.

Verified: plugin-npm-release, npm-publish-plan, official-channel-catalog,
package-manager-config, openclaw-npm-release-check suites all pass (189 tests).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* test(release): cover -boon.N version path + surface it in validator guidance (PR #60 review)

Addresses the two open cubic P3s on getboon/openclaw PR #60:

- Validator guidance for an invalid publishable-plugin version now lists the
  supported `YYYY.M.PATCH-boon.N` form (3 message sites: resolvePublishablePluginVersion,
  collectPublishablePluginPackageErrors, collectReleaseTagErrors) so a rejected
  fork version is actionable. Existing assertions updated in lockstep.
- Add a focused regression suite for the `-boon.N` acceptance path in
  npm-publish-plan.mjs: parse (stable correction w/ correctionNumber), reject
  boon.0, publish-plan (latest + beta mirror), compare ordering, and patch-floor
  validity. Guards the matcher added in 8ff610d against silent regression.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
convyusboy added a commit that referenced this pull request Jul 20, 2026
…-npm rationale (PR #61 review)

Addresses the two cubic review comments on PR #61:

- P1: root npm-shrinkwrap.json version fields were still at boon.3 (never bumped
  since #41), so the packed gateway tarball would ship shrinkwrap metadata not
  matching the boon.5 manifest — check-openclaw-package-tarball asserts they match.
  Bump both root version fields to 2026.6.11-boon.5. Version-string-only change; no
  dependency entries touched (pnpm-lock alignment unaffected; package-manager-config
  test passes 12/12).
- P3: the CHANGELOG rationale claimed `-boon.N` "has no npm-publish validator arm" —
  stale as of #60, which added BOON_VERSION_REGEX to the publish validator. Drop that
  clause; the upstream-owned @openclaw/* scope is the real (and sufficient) reason the
  fork ships msteams via GitHub Release.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants