Skip to content

fix(skill-build): use --host/--port for thv serve and correct health-check path#17

Merged
ChrisJBurns merged 1 commit into
mainfrom
fix/skill-build-serve-flags
Jun 17, 2026
Merged

fix(skill-build): use --host/--port for thv serve and correct health-check path#17
ChrisJBurns merged 1 commit into
mainfrom
fix/skill-build-serve-flags

Conversation

@ChrisJBurns

Copy link
Copy Markdown
Contributor

Summary

Fixes the skill-build action, which is broken at runtime with Error: unknown flag: --address. Verified against the ToolHive v0.29.1 source (cmd/thv/app/server.go, pkg/api/server.go, pkg/api/v1/healthcheck.go).

Closes #16.

Root cause

The action installs thv@latest and starts a daemon to serve thv skill build/thv skill push. It passed CI at merge time (2026-03-10) but upstream thv later drifted, breaking three things — only the first is fatal:

  1. thv serve --address no longer exists 🔴 — serve registers --host (default 127.0.0.1) and --port (default 8080), not --address. This is the reported hard failure.
  2. Wrong health-check path 🟠 — the readiness probe polled /api/v1beta/health, but the health route is mounted at top-level /health. The old path 404s and would have timed out the 30s wait even after fixing the flag.
  3. Health gated on container runtime 🟡 — /health returns 503 unless a container runtime (Docker/Podman) is running, and curl -sf fails on 503. Skill build/push only package OCI artifacts (via go-containerregistry) and don't need a runtime, so readiness should not depend on it.

Changes

  • thv serve --address "127.0.0.1:${PORT}"thv serve --host "127.0.0.1" --port "${PORT}"
  • Readiness probes now hit /health and accept any HTTP response (including 503) as "daemon up" — which also unblocks runners without Docker (relates to macOS: Container runtime not available for Toolhive #3).
  • Added a daily schedule trigger to test.yml so future breakage from upstream thv@latest releases is caught proactively rather than at the next push. (The test-skill-build-action job already existed; it simply hadn't re-run since the upstream change.)

Testing

  • thv serve flags, the /health mount point, and the 503-without-runtime behavior were confirmed directly in the ToolHive v0.29.1 source.
  • CI on this PR exercises test-skill-build-action end-to-end against thv@latest.

🤖 Generated with Claude Code

…path

The skill-build action started the ToolHive daemon with
`thv serve --address`, a flag no released thv supports, so daemon
startup failed with "unknown flag: --address" (closes #16). Upstream
thv exposes `--host`/`--port` for `thv serve`.

Two further latent bugs from upstream drift are fixed alongside it:

- The readiness probe polled `/api/v1beta/health`, but the health
  route is mounted at top-level `/health`. The old path 404s, which
  would have timed out the 30s wait even after the flag fix.
- `/health` returns 503 when no container runtime is present, and
  `curl -sf` fails on 503. Skill build/push only package OCI
  artifacts and do not need a container runtime, so readiness now
  treats any HTTP response (including 503) as "daemon up". This also
  unblocks runners without Docker (relates to #3).

Adds a daily scheduled CI run so future breakage from upstream
ToolHive "latest" releases is caught proactively rather than at the
next push.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ChrisJBurns ChrisJBurns merged commit 9dc5ad7 into main Jun 17, 2026
12 of 14 checks passed
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.

toolhive-actions/skill-build@v0.0.5 is broken due to "unknown flag --address"

2 participants