Skip to content

fix(run): default service version to registry default; add ministack#366

Open
abezzub-dr wants to merge 4 commits into
majorcontext:mainfrom
abezzub-dr:fix/ministack-service-support
Open

fix(run): default service version to registry default; add ministack#366
abezzub-dr wants to merge 4 commits into
majorcontext:mainfrom
abezzub-dr:fix/ministack-service-support

Conversation

@abezzub-dr
Copy link
Copy Markdown
Contributor

@abezzub-dr abezzub-dr commented Jun 2, 2026

Summary

Two fixes surfaced while wiring up ministack service support.

1. Empty image tag for versionless service deps

A service dependency declared without an explicit version (e.g. ministack instead of ministack@latest) left ServiceConfig.Version empty, so the image reference was built as repo: — which both runtimes reject with invalid reference format.

buildServiceConfig now falls back to the registry default, matching every other version-resolution path (deps.resolve, dockerfile, script, builder). The services path was the lone copy missing this fallback, and it's also the only path that turns a version into a container image tag — which is why versionless runtimes/meta deps (pnpm, cli-essentials) never hit it.

Covered by TestBuildServiceConfigDefaultsVersion.

2. ministack registry entry + readiness command

Added the ministack service entry. The readiness command uses python3 (the image ships no curl/wget) against /_ministack/health, mirroring the image's own Docker HEALTHCHECK. Verified by running the image directly.

Test plan

  • go test ./internal/run/ ./internal/deps/ — pass
  • Manually ran ministackorg/ministack:latest: confirmed curl/wget absent, python3 present, /_ministack/health returns 200, and the readiness command exits 0 via sh -c.

Notes / follow-ups (not in this PR)

  • services.<name>.image override is documented (02-moat-yaml.md) but not wired into buildServiceConfig (only spec.Service.Image is read). Separate pre-existing bug.
  • The "version or default" idiom is duplicated across ~5 sites; could be consolidated into a helper. Left as-is to keep this fix minimal.

🤖 Generated with Claude Code

Service dependencies declared without an explicit version (e.g. `ministack`
rather than `ministack@latest`) produced an empty image tag, so the runtime
rejected the reference with "invalid reference format". buildServiceConfig
now falls back to the registry `default`, matching the Dockerfile/install
resolution paths (deps.resolve, dockerfile, script, builder).

Also add the `ministack` service registry entry. Its readiness command uses
python (the image ships no curl/wget) against /_ministack/health, mirroring
the image's own Docker HEALTHCHECK.
- Bound the ministack readiness probe with timeout=2 so a stalled
  connection cannot consume the full 30s readiness window in one
  attempt.
- Add ministack to the Available services and readiness-checks tables.
- Add a registry smoke test for ministack covering image, port, env
  prefix, readiness, and default version.
- Use require.True for the GetSpec ok return in the services test for
  a clearer failure message.
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