Skip to content

chore(skills): add release-widget skill - #2370

Open
yordan-st wants to merge 16 commits into
mainfrom
skill/release-widget
Open

yordan-st wants to merge 16 commits into
mainfrom
skill/release-widget

Conversation

@yordan-st

Copy link
Copy Markdown
Contributor

Summary

  • Adds `.agents/skills/release-widget/SKILL.md` — automates widget/module release pipeline (version bump → GitHub draft release → OSS clearance → Marketplace publish)
  • Previously ran as private trial (untracked); opening as draft for team feedback before promoting to shared skill set

Test plan

  • Used successfully for image-web v1.6.0 and charts-web v6.3.2 releases

@yordan-st
yordan-st marked this pull request as ready for review August 4, 2026 09:30
@yordan-st
yordan-st requested a review from a team as a code owner August 4, 2026 09:30
@github-actions

This comment has been minimized.

Comment thread .agents/skills/release-widget/SKILL.md Outdated
Comment thread .agents/skills/release-widget/SKILL.md Outdated
@yordan-st
yordan-st force-pushed the skill/release-widget branch 2 times, most recently from fbe06a0 to 7773a8b Compare August 21, 2026 13:57
@github-actions

This comment has been minimized.

@yordan-st
yordan-st force-pushed the skill/release-widget branch from 74a8e99 to cce0a0d Compare September 7, 2026 12:36
@github-actions

This comment has been minimized.

Comment thread .agents/skills/release-widget/SKILL.md Outdated
Comment thread .agents/skills/release-widget/SKILL.md Outdated
Comment thread .agents/skills/release-widget/SKILL.md Outdated
Comment thread .agents/skills/release-widget/SKILL.md Outdated
Comment thread .agents/skills/release-widget/SKILL.md Outdated
Comment thread .agents/skills/release-widget/SKILL.md Outdated
Comment thread .agents/skills/release-widget/SKILL.md Outdated
Comment thread .agents/skills/release-widget/SKILL.md Outdated
Comment thread .agents/skills/release-widget/SKILL.md Outdated
Comment thread .agents/skills/release-widget/SKILL.md Outdated
Comment thread .agents/skills/release-widget/SKILL.md Outdated
Comment thread .agents/skills/release-widget/SKILL.md Outdated
Comment thread .agents/skills/release-widget/SKILL.md Outdated
Comment thread .agents/skills/release-widget/SKILL.md Outdated
Comment thread .agents/skills/release-widget/SKILL.md Outdated
@github-actions

This comment has been minimized.

Comment thread .agents/skills/release-widget/SKILL.md Outdated
Comment thread automation/utils/bin/rui-bump-version.ts Outdated
@yordan-st
yordan-st force-pushed the skill/release-widget branch from 50fbf1e to 1ac50b0 Compare September 8, 2026 13:34
Comment thread .agents/skills/release-widget/SKILL.md Outdated
Comment thread .agents/skills/release-widget/SKILL.md Outdated
Comment thread .agents/skills/release-widget/SKILL.md Outdated
Comment thread .agents/skills/release-widget/SKILL.md Outdated
Comment thread .agents/skills/release-widget/SKILL.md Outdated
@github-actions

This comment has been minimized.

Comment thread .agents/skills/release-widget/SKILL.md Outdated
Comment thread .agents/skills/release-widget/SKILL.md Outdated
Comment thread .agents/skills/release-widget/SKILL.md Outdated
@yordan-st
yordan-st force-pushed the skill/release-widget branch from a050f29 to 5d4bfd4 Compare September 9, 2026 14:09
@github-actions

This comment has been minimized.

  Automates widget/module release pipeline: version bump, GitHub draft
  release, OSS clearance SBOM, Marketplace publish. Sharing for team
  feedback before promoting out of private trial.
…helpers

- skill: user merges the changelog PR, not the agent (needs team approvals)
- skill: drop gh pr merge from the autonomy carve-out
- skill: clarify why a successful publish call doesn't guarantee the version is live
- skill: check the public Marketplace listing instead of the admin panel
- skill: find a wrapped widget's owner in pluggableWidgets too, not just modules
- skill: correct which phases reuse appNumber vs npm-package-name
- skill: drop the unnecessary rui-helpers-not-linked check
- rui-bump-version: accept only an explicit x.y.z version, no bump-type shorthand
- rui-bump-version: keep the @mendix/ scope in bumpedPackages output
- bump-version: getNewVersion now uses Version's bump methods instead of manual math
- rui-changelog: read each wrapped widget's own CHANGELOG.md for module unreleased work
@github-actions

Copy link
Copy Markdown
Contributor

AI Code Review

🔶 Changes requested — one or more medium-severity items must be addressed


What was reviewed

File Change
.agents/skills/release-widget/SKILL.md New release skill — phases 0–8, autonomy carve-outs, common mistakes
automation/utils/bin/rui-bump-version.ts New CLI: version bump with validation
automation/utils/bin/rui-changelog.ts New CLI: unreleased changelog reader
automation/utils/bin/rui-create-jira-version.ts New CLI: Jira version creation (soft-fail)
automation/utils/bin/rui-generate-oss-sbom.ts New CLI: SBOM artifact generation
automation/utils/bin/rui-package-info.ts New CLI: package info reader from cwd
automation/utils/bin/rui-upload-readme-oss.ts New CLI: READMEOSS asset upload
automation/utils/package.json Registered new bin entries
automation/utils/src/bump-version.ts Refactor: Version class, write validation, hasPackageXml helper
automation/utils/src/changelog-parser/index.ts Added getPackageChangelog unified parser
automation/utils/src/github.ts Renamed GitHubDraftReleaseGitHubRelease, new getReleaseByTag/listReleases
automation/utils/src/monorepo.ts Added resolvePackagePath helper
automation/utils/src/oss-clearance.ts Extracted computeSha256, new verifyAssetDigest
automation/utils/src/package-info.ts Added isReleasable()
automation/utils/src/prepare-release-helpers.ts Simplified to use getPackageChangelog
automation/utils/src/version.ts Fixed bumpMajor bug, added isGreaterThan

Skipped (out of scope): dist/, pnpm-lock.yaml


Findings

🔶 Medium — Snyk security CI check failing

File: CI checks
Problem: security/snyk (AppDev AppStore content) is reporting FAILURE. Per the review guidelines, CI must be green before merge. The code/snyk and license/snyk checks passed, so this is specifically the security scan.
Fix: Check the Snyk PR check URL and resolve the flagged vulnerability or add a suppression with justification if it is a false positive.


🔶 Medium — verifyAssetDigest silently skips integrity check when digest is absent

File: automation/utils/src/oss-clearance.ts line 933–941
Problem: The asset.digest field is typed as string (non-optional in GitHubReleaseAsset), but verifyAssetDigest uses optional chaining (?.) and then guards with if (expectedDigest && ...). If digest is ever falsy — empty string, undefined at runtime despite the type — the integrity check is silently skipped and the function returns the local hash without verifying it matches what GitHub reported. The old rui-oss-clearance.ts code called .replace(...) directly (no optional chain), which would throw a TypeError on a null digest rather than silently proceeding. Silent skip is a worse failure mode here because the SBOM zip is named after the hash and submitted to the OSS clearance portal.
Fix:

export async function verifyAssetDigest(asset: GitHubReleaseAsset, downloadedPath: string): Promise<string> {
    const fileHash = await computeSha256(downloadedPath);
    const expectedDigest = asset.digest.replace("sha256:", "");

    if (fileHash !== expectedDigest) {
        throw new Error(
            `Asset integrity check failed for '${asset.name}': expected ${expectedDigest}, got ${fileHash}`
        );
    }

    return fileHash;
}

If some GitHub releases legitimately lack a digest, add an explicit branch that logs a warning and returns, rather than the current invisible skip.


⚠️ Low — listReleases fetches only the first 100 releases

File: automation/utils/src/github.ts line 862–867
Note: The new listReleases method appends ?per_page=100 but has no pagination loop. For getReleaseByTag, this means a draft whose tag isn't found in the most recent 100 releases would be silently missed and the method returns undefined. Repos with long release histories (this one has many) could hit this limit. Since drafts are recent, this is unlikely to be a problem in practice, but it is worth noting for future callers of the public listReleases API.


Positives

  • Bug fix in bumpMajor() — the original incremented minor instead of major (this.major, this.minor + 1); this PR silently fixed a year-old bug without fanfare.
  • bumpPackageJson now verifies the write — reading back package.json after pnpm version and throwing if the version wasn't updated catches silent pnpm version failures that were previously swallowed.
  • getReleaseByTag draft fallback is well-motivated — the comment correctly explains that GitHub's releases/tags/{tag} endpoint returns 404 for drafts (no git tag yet), making the list-and-filter fallback necessary rather than defensive.
  • isReleasable() cleanly encodes the two failure modes — both null (module-wrapped widget) and -1 (never published) return false, matching the documented semantics in the JSDoc.
  • Phase 8 (rollback) is correctly gated — the skill explicitly carves rollback out of the autonomy exception and lists teardown commands for human confirmation before executing any of them. Good safety design.
  • computeSha256 extracted as a shared utility — removes the duplicated createHash/pipeline block that existed in rui-oss-clearance.ts and would have needed to exist again in rui-generate-oss-sbom.ts.
  • getPackageChangelog unified parser — replaces a scattered if changelogType === "widget" branch in two separate callers with a single delegating function; the JSDoc explains why the fallback chain is needed.

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