Skip to content

ci: fix release workflow + add kc-check-imports gate#13

Merged
timeleft-- merged 1 commit into
mainfrom
ci/release-workflow-fixes
May 2, 2026
Merged

ci: fix release workflow + add kc-check-imports gate#13
timeleft-- merged 1 commit into
mainfrom
ci/release-workflow-fixes

Conversation

@timeleft--
Copy link
Copy Markdown
Member

Summary

Two CI changes:

  1. Release workflow fixespermissions: contents: write (was read), guarded tarball-rename mv (was unconditional self-mv), resolved release tag once via outputs.
  2. kc-check-imports CI gate (NEW) — runs on PRs targeting ga/** and lts/**. Fetches MachineWisdomAI/kissclaw-tools, runs both per-candidate and final-tree validation against the v2026.4.20 baseline, uploads JSON reports.

Why

Release runs 25261002727 failed in two places:

The mv *.tgz "kissclaw-${version}.tgz" line was also broken: when package.json name is already kissclaw, pnpm pack writes kissclaw-1.0.1-rc.1.tgz directly, and the unguarded mv becomes a same-file move.

For kc-check-imports — per architect audit 01KQN6BG2GV02V387EWSP924E2, the tool was never wired into CI. Pre-commit hook is bypassable; CI is the authoritative gate. This wires it for PRs targeting release lines.

Test plan

  • After merge, the next release workflow run uploads tarball + sha256 + metadata as release assets
  • PR fix(agents): extend onAgentEvent callback type with sessionKey #12 (sessionKey type fix) gets a kc-check-imports run after this lands (not before — the workflow file isn't on main yet)
  • kc-check-imports successfully reads MachineWisdomAI/kissclaw-tools (private repo) using secrets.GITHUB_TOKEN or a configured KISSCLAW_TOOLS_TOKEN PAT
  • Verify v2026.4.20 baseline tag is now pushed to origin (it is — see this PR's prerequisite)

Release workflow fixes:
- permissions: contents: read -> write (gh release upload requires write).
- Tarball move logic: guarded mv when src and dst names already match.
  pnpm pack already produces "<name>-<version>.tgz", which equals the
  desired "kissclaw-<version>.tgz" when package.json name is "kissclaw".
  The unguarded mv would silently fail or no-op depending on coreutils.
- Resolved release tag once via outputs, used consistently for checkout
  ref, integrity check, and upload.
- Added workflow-dispatch artifact upload for dry-run testing.

kc-check-imports CI gate (NEW):
- Triggers on PRs targeting ga/** and lts/** branches.
- Fetches MachineWisdomAI/kissclaw-tools (the repo for kc-check-imports).
- Runs both --candidates (per-cherry-pick) and --final-tree (accumulated)
  modes against the v2026.4.20 baseline.
- Uploads JSON reports as workflow artifacts.
- Final-tree always runs even if per-candidate fails so reviewers see
  both views.

This wires kc-check-imports as the authoritative CI gate per plan v4
Phase 3.5. Pre-commit hook can be bypassed; CI cannot.
@timeleft-- timeleft-- merged commit 47624bb into main May 2, 2026
2 of 9 checks passed
timeleft-- added a commit that referenced this pull request May 2, 2026
Release workflow fixes:
- permissions: contents: read -> write (gh release upload requires write).
- Tarball move logic: guarded mv when src and dst names already match.
  pnpm pack already produces "<name>-<version>.tgz", which equals the
  desired "kissclaw-<version>.tgz" when package.json name is "kissclaw".
  The unguarded mv would silently fail or no-op depending on coreutils.
- Resolved release tag once via outputs, used consistently for checkout
  ref, integrity check, and upload.
- Added workflow-dispatch artifact upload for dry-run testing.

kc-check-imports CI gate (NEW):
- Triggers on PRs targeting ga/** and lts/** branches.
- Fetches MachineWisdomAI/kissclaw-tools (the repo for kc-check-imports).
- Runs both --candidates (per-cherry-pick) and --final-tree (accumulated)
  modes against the v2026.4.20 baseline.
- Uploads JSON reports as workflow artifacts.
- Final-tree always runs even if per-candidate fails so reviewers see
  both views.

This wires kc-check-imports as the authoritative CI gate per plan v4
Phase 3.5. Pre-commit hook can be bypassed; CI cannot.

(cherry picked from commit 47624bb)
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