Skip to content

Fix issues found by an Opus review pass - #12

Merged
michaelmagan merged 1 commit into
mainfrom
fix-review-findings
Aug 26, 2026
Merged

Fix issues found by an Opus review pass#12
michaelmagan merged 1 commit into
mainfrom
fix-review-findings

Conversation

@michaelmagan

Copy link
Copy Markdown
Contributor

Three Opus review agents went over the workflows, CLI source, and the ClawHub/Hermes skill built this session. Real findings, fixed here:

Critical

bump-homebrew.yml and clawhub-publish.yml triggered on release: published, but release.yml creates that release with the default GITHUB_TOKEN — GitHub doesn't let events from that token trigger other workflows. Confirmed by run history: zero release-event runs ever existed for either workflow. Both are now called directly as jobs (workflow_call) right after npm publish, so the publish → Homebrew/ClawHub chain actually fires.

High

  • bump-homebrew.yml: a failed curl (404, wrong version) silently hashed the error body as a fake sha256 and opened a plausible-looking bad PR. Now fails loudly and validates the tarball.
  • templates/crud lived at the repo root, not inside skills/charming/ — ClawHub and Hermes only sync skills/<name>/, so the template the skill tells agents to "always copy, never free-hand" was invisible to both. Moved in.
  • The template's 4s poll did a full #app replace, wiping half-typed input and cutting the undo-toast window short every ~4s. Split into a persistent #toast + a narrower re-rendered container, per the skill's own re-render rule.

Medium

  • CLI_VERSION was a hardcoded literal, already stale one release behind — mislabeled agent-context output and every pairing token. Now read from package.json.
  • --timeout was missing from globalFlags in argv.ts — errored as an unknown command when placed before the subcommand, unlike --base-url/--token. Added, with a regression test.
  • README.md said "Not published yet" on the live npm package page.
  • Template interpolated item.id/item.text into innerHTML unescaped — stored XSS in every app copied from it. Escaped.
  • ${{ inputs.version }} interpolated directly into shell in bump-homebrew.yml; moved through env: and validated as bare semver.
  • The formula sed rewrite could silently no-op if the formula's format ever shifted; now asserted.

Verified

  • bun run check — clean, 112 tests.
  • Rebuilt, packed, and globally installed the tarball fresh: --version and agent-context both report 0.1.1, --timeout works before the subcommand, template ships under skills/charming/templates/crud.
  • Re-ran clawhub sync --dry-run against the moved skill folder — resolves correctly (6 files, status: update).

Deferred (cosmetic, listed not fixed)

Stale @usecharming/cli name in bun.lock, release.yml step ordering, no concurrency: group on the release workflows.

… and the skill

Critical: bump-homebrew.yml and clawhub-publish.yml never actually ran on
a real release. Both trigger on release: published, but release.yml
creates that release with the default GITHUB_TOKEN, and GitHub does not
let events from that token trigger other workflows. Both are now called
directly as jobs (workflow_call) right after npm publish, instead of
relying on the release event.

Other fixes:
- bump-homebrew.yml: curl now fails loudly on a bad download instead of
  hashing an error body as a fake sha256; version is validated as bare
  semver and passed through env: instead of interpolated into the shell;
  the formula sed rewrite is now asserted to have actually taken.
- src/commands.ts: CLI_VERSION was a hardcoded literal that was already
  stale one release behind, mislabeling agent-context output and every
  pairing token. Now read from package.json like --version already is.
- src/argv.ts: --timeout was missing from the recognized global flags,
  so it errored as an unknown command when placed before the subcommand,
  unlike --base-url and --token.
- README.md: still said "Not published yet" on the actual npm package
  page for a package that's been live for two releases.
- skills/charming/templates/crud moved from the repo root into the skill
  folder — ClawHub and Hermes only sync skills/<name>/, so the template
  the skill tells agents to always copy was invisible to both.
- templates/crud/ui.js: the 4s poll did a full #app innerHTML replace,
  wiping half-typed input and cutting the undo toast's display window
  short every time it fired. #toast and the list are now separate,
  independently-updated containers, and in-progress input in #add-input
  is preserved across a background refresh. item.id/item.text are now
  HTML-escaped before interpolation (was unescaped, stored XSS in every
  app copied from the template).

Verified: bun run check passes clean (112 tests). Rebuilt, packed, and
globally installed the tarball fresh — confirmed --version and
agent-context both report 0.1.1, --timeout works before the subcommand,
and the template ships under skills/charming/templates/crud. Re-ran a
clawhub sync dry-run against the moved skill folder — still resolves
correctly (6 files, status: update).

Not fixed (cosmetic, deferred): stale @usecharming/cli name in
bun.lock, workflow step ordering in release.yml, no concurrency group
on the release workflows.
@michaelmagan
michaelmagan merged commit 081400a into main Aug 26, 2026
3 checks passed
@michaelmagan
michaelmagan deleted the fix-review-findings branch August 26, 2026 23:14
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