Skip to content

fix(deploykit): point a registry-image ref at the verb that works - #528

Merged
github-actions[bot] merged 1 commit into
mainfrom
fix/image-ref-remediation
Nov 15, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
fix/image-ref-remediation

Conversation

@aitrawog

Copy link
Copy Markdown
Contributor

Summary

RejectImageRefAsDeployName correctly refuses a tagged registry image ref used as a deploy name, and its
remediation then sent the operator to a verb that cannot work:

charly deploy add <name> ghcr.io/org/name:tag

deploy add takes a project box or candy ref, so a registry image ref fails there with
not found as a box or candy — measured on opencharly/plugin-fleet#51. The operator's first error therefore cost
them a second one.

The route that exists is charly deploy from-box <ref> [<name>], whose own help reads "Full image ref (local or
registry)"
. Measured on this host:

$ charly deploy from-box ghcr.io/opencharly/openwebui:2026.317.2254 f25proof
# accepts the ref and proceeds to the image's baked env inputs
# (rc=1 only because it then asks for the required WEBUI_ADMIN_EMAIL)

So the defect is the SENTENCE, and this PR fixes the sentence — the refusal itself is unchanged, and the message
now names deploy from-box while saying why deploy add does not apply.

How tested

Head f933a79 (fix/image-ref-remediation off fresh origin/main).

$ go test ./deploykit/ -run 'TestRejectImageRefAsDeployName'
ok  	github.com/opencharly/sdk/deploykit	0.004s

$ go test ./deploykit/
ok  	github.com/opencharly/sdk/deploykit	9.255s

The remediation is asserted by its own test, because a user-visible sentence is an artifact and this one had been
sending people to a dead end:

  • TestRejectImageRefAsDeployName_NamesTheWorkingVerb — the message contains charly deploy from-box <the ref> and
    does NOT contain charly deploy add;
  • TestRejectImageRefAsDeployName_LeavesNamesAlone — a plain name, a bare name with a tag (fedora:43) and a
    github repo ref (which pins with @version) are still NOT rejected.

The live deploy from-box measurement above is the finding that made this a one-line fix instead of a new ref
form:
I had started implementing a fifth RefSourceImage in plugin-fleet, reverted it when the from-box help
line showed the capability already exists (R2 — one implementation per behaviour, and mine would have been a
duplicate), and confirmed it by running the verb.

Rulebook compliance

  • R0 — git-workflow, root-cause-analyzer, deploy/local-deploy context loaded before acting.
  • R1 — the finding is plugin-fleet#51; the message is the fix, and the refusal is untouched.
  • R2 — the duplicate capability I had begun (RefSourceImage + a resolver form) was REVERTED rather than
    shipped beside from-box.
  • R3 — no workaround: the message names a real verb that I executed.
  • R4 — the product (the CLI's own error text) is what changed; every documented command still works with only
    the charly binary.
  • R5 — the wrong sentence is deleted, not deprecated.
  • R6 — a branch off fresh origin/main, one appended commit, message via -F, no force-push.
  • R7 — the emitted artifact (the error sentence) is asserted at its real boundary: the string the operator sees.
  • R8 — no live service involved; the from-box measurement is a real invocation, not a mock.
  • R9 — no charly binary in this repo's gate.
  • R10 — SDK-class change: go test ./deploykit/ green on the committed tree; this is a message, so no bed
    applies and none is claimed.

Change classification

Error-text only. No API, schema or behaviour change: the same inputs are refused, the refusal now names the verb
that works. Consumers see a better sentence and nothing else. Rollback is the single commit.

Filed issues

Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)

`RejectImageRefAsDeployName` refuses a tagged registry image ref used as a
deploy name, and its remediation said:

    charly deploy add <name> ghcr.io/org/name:tag

which cannot work: `deploy add` takes a PROJECT box or candy ref, so a registry
ref fails there with "not found as a box or candy" -- measured on
opencharly/plugin-fleet#51. The operator therefore hit a second failure by
following the first error's advice.

The route that exists is `charly deploy from-box <ref> [<name>]`, whose own help
says "Full image ref (local or registry)". Measured on this host:

    $ charly deploy from-box ghcr.io/opencharly/openwebui:2026.317.2254 f25proof
    # accepts the ref and proceeds to the image's baked env inputs
    # (rc=1 only for the required WEBUI_ADMIN_EMAIL it asked for)

So the fix is the SENTENCE: name `deploy from-box`, and say why `deploy add`
does not apply. The refusal itself is unchanged.

The remediation is asserted by its own test -- a user-visible sentence is an
artifact, and this one had been sending people to a dead end.

Refs opencharly/plugin-fleet#51

Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)
@github-actions

Copy link
Copy Markdown

Review — PASS

Head SHA: f933a7904abde99c14158c8040835497b918d248 (branch: fix/image-ref-remediation)

Security screen: PASS — message-only change plus a test; no scope mismatch, no secrets/egress, no guardrail weakening, no new deps.
Checklist: All applicable rules PASS or NA (message-string change in deploykit, go test-gated; the new tests assert the remediation and would fail on the old string, so R10 coverage holds; the deploy add parenthetical in the new text is explanatory and does not re-introduce the dead-end verb path — the test's charly deploy add check correctly passes against it).

Non-blocking note (rulebook gap, not a block): the checklist's "How tested" wording assumes a bed/disposable target for every code change; for an SDK library whose gate is go test the body's "no bed applies" is a reasonable N/A, but AGENTS.md does not state this exemption explicitly.

Verdict: PASS


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) November 15, 2026 12:07
@github-actions
github-actions Bot merged commit 501be4a into main Nov 15, 2026
8 checks passed
charly-auto-merge Bot added a commit that referenced this pull request Nov 15, 2026
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