Skip to content

fix(pod): a rebuild tolerates a check SKIP, and its bed arm asserts the real header and the update exit - #112

Merged
github-actions[bot] merged 2 commits into
mainfrom
fix/rebuild-tolerates-check-skip
Nov 28, 2026
Merged

github-actions[bot] merged 2 commits into
mainfrom
fix/rebuild-tolerates-check-skip

Conversation

@aitrawog

Copy link
Copy Markdown
Contributor

Summary

Two halves of one defect (opencharly/charly#1327), proven together on the bed that reported it.

1. The rebuild no longer fails on a non-result. plugin-deploy-pod ran charly check box <box>
after box build and returned ANY error — including the deliberate SKIP status 3 that
opencharly/plugin-check#110 defines as "this phase asserted nothing". A project whose boxes carry no
plan steps therefore could not be rebuilt at all, after the build had already succeeded:

if r, err := podCli(ctx, exec, false, false, "check", "box", baseRef); err != nil {
    // exit 3 is the DELIBERATE skip — a non-result, not a failure (plugin-check#110)
    if r.ExitCode != checkSkipExit { return nil, err }
}

Only the skip status is tolerated; every other non-zero exit stays fatal.

2. The bed arm now asserts what the generator emits, and that the update succeeded. It grepped for
--- Building overlay-base --- while the build emits --- Building overlay-base (base …; builders none) ---, so it reported "did not build" on a run where both stages were in the log; and it ignored the
update's exit status, so fixing only the pattern would have turned it green over a rebuild that failed.

How tested

$ charly -C <this worktree> box validate
charly box validate: OK — checked 3 candies, 2 boxes, 10 deploys, 6 distros, 7 builders; 0 warnings, 0 errors

$ cd candy/plugin-deploy-pod && go build ./...
(exit 0)
$ go test ./...
ok  	github.com/opencharly/plugin-deploy-pod/candy/plugin-deploy-pod	0.684s

The bed, GREEN, on the disposable target with the charly#1324 head's stamped binary
(2026.332.1120) — the changed arm executing at the real boundary:

[deploy-add]        PASS after 2.093s
[bring-up-members]  PASS after 3ms
[check-live]        PASS after 30.054s
[update]            PASS after 2.687s
[cleanup]           PASS after 1.727s
[cleanup-members]   PASS after 0s
charly check run check-pod-rebuild-build: PASS (steps=6)

The changed arm, at STEP level, from the same run's check-live log
(.check/check-pod-rebuild-build/2026.332.1510/check-live.log) — the six bracketed names above are the
runner's PHASES; these are the steps inside check-live:

PASS  check a deploy that names no box the project declares REFUSES `update --build` …  [rebuild-refuses-a-boxless-deploy]
PASS  check a deploy whose recorded image IS a declared box actually BUILDS it under `update --build` …  [rebuild-builds-a-declared-box]
PASS  check both disposable subjects are removed again, so the bed leaves nothing running  [rebuild-cleaned-up]  exit=0
3 steps: 3 passed, 0 failed, 0 skipped

Provenance — the changed source is the PLUGIN, and the run proves it recompiled this branch. The bed
ran against this checkout, and the loader's view hash differs from main's cached view:

main's cached view:  plugin-deploy-pod-0498c8b3c8ad47bb
this run's view:     plugin-deploy-pod-7e9c47a829071222  (build sha256:a7d7c447f830d…)

The charly binary (2026.332.1120, the charly#1324 head) is the check RUNNER; the changed
lifecycle.go is compiled into the plugin the bed loaded.

The discriminator — the same bed BEFORE these two halves, on the same host:

--- Building overlay-base (base docker.io/library/fedora:43; builders none) ---
--- Building overlay-npm-builder (base docker.io/library/fedora:43; builders none) ---
SKIPPED — no plan steps resolved for this image … (opencharly/plugin-check#110)
charly: error: command "update": … charly check box overlay-base: charly subcommand exited 3
FAIL [rebuild-builds-a-declared-box]  exit=1, want 0 (stderr: )
FAIL (steps=5)

Same arm, same target: red before, green after.

Spike

Candidates for "a rebuild must not die on a check that asserted nothing", each measured:

# Candidate Instrument and pasted result Verdict
A tolerate check box exit 3 in the rebuild path (this diff) the green bed run above (3 steps: 3 passed, 0 failed, 0 skipped) and go test ./... green works — adopted
B make charly check box exit 0 when a phase skips spiked on the real artifact:
$ charly -C <this project> check box overlay-base
Image: localhost/overlay-base:2026.332.1510
No plan steps defined for this image.
SKIPPED — no plan steps resolved for this image: this phase asserted nothing …
$ echo $?   → 3

B is exactly that 3 → 0 rewrite | rejected: every skip would read as an assertion in every bed |
| C | drop the post-build check box altogether | spiked on the same call against a box that HAS steps:

$ charly -C <this project> check box overlay-npm-builder
1 step: 1 passed, 0 failed, 0 skipped
$ echo $?   → 0

that verification is what C deletes | rejected |

Winner: A — the rebuild keeps its verification, and only the non-result stops being fatal.

Rulebook compliance

  • R0 — /charly-internals:plugin, /charly-check:check, /charly-internals:strict-policy, /charly-internals:git-workflow.
  • R1 — the anomaly is root-caused to two mechanisms, both fixed here, and filed as opencharly/charly#1327.
  • R2 — one skip-status constant and one assertion site each; nothing duplicated.
  • R3 — no workaround: the product is fixed and the arm is made STRICTER, not looser.
  • R4 — the arm's message now matches the artifact it inspects.
  • R5 — the old exact literal is replaced by the real prefix.
  • R6 — feat/ branch, append-only commits, no destructive git.
  • R7 — the arm fails before and passes after, at the real boundary (both pasted).
  • R8 — no service mocked; the bed ran on a disposable GPU/host target.
  • R9 — the bed ran with the CalVer-stamped binary 2026.332.1120 built from the charly#1324 head.
  • R10 — check-pod-rebuild-build on its disposable: true target, fresh, PASS (steps=6).
  • R11 — no DESIGN surface: an error-code tolerance and a bed assertion.
  • R12 — the spike round is above, with B and C rejected on measured grounds.

Plan conformance

Winning candidate: A — tolerate only the skip status; assert the real header prefix and the update's exit status.
No DESIGN-governed surface.

Change classification

No breaking change. A rebuild gains tolerance for a status that means "nothing was asserted"; the
bed's assertion becomes stricter.

Filed issues

Agent: cdi-audit · Claude Code session f760307f-53b4-4f48-87da-00f95e5300ed
Assisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated)

…the update's exit status

rebuild-builds-a-declared-box grepped for '--- Building overlay-base ---' while the generator emits '--- Building overlay-base (base ...; builders none) ---', so the arm reported 'did not build' on a run where both build stages are in the log (opencharly/charly#1327).

It also ignored the update's exit status: with the prefix fixed alone it would have gone green over a rebuild that failed after building. The arm now asserts both.

Assisted-by: Claude Code deepseek-v4.1-flash:cloud (syntax check only)
rebuild ran 'charly check box <box>' after 'box build' and returned ANY error, so a box whose plan resolves nothing — a deliberate SKIP recorded as exit 3 (opencharly/plugin-check#110) — aborted 'update --build' AFTER the build had succeeded. Measured on the check-pod-rebuild-build bed: 'charly: error: command "update": ... charly check box overlay-base: charly subcommand exited 3' (opencharly/charly#1327).

Only the skip status is tolerated; every other non-zero exit stays fatal.

Assisted-by: Claude Code deepseek-v4.1-flash:cloud (syntax check only)
@github-actions

Copy link
Copy Markdown

Review — PASS

Head SHA: 40de8d6b7967e5cdd272c20e4b6a830b6c184689 (branch: fix/rebuild-tolerates-check-skip)

Security screen: PASS — no secrets/egress, no weakened guardrails (the tolerance is scoped to the single checkSkipExit = 3 skip status; the bed arm is made stricter, not looser), no supply-chain change.
Checklist: All applicable rules PASS or NA. The diff and body are internally consistent: the two halves (skip tolerance in lifecycle.go; real-header + update_rc assertion in charly.yml) are both required for the bed to go green, the discriminator proves it red before, the spike names and measures three candidates with pasted output and adopts the implemented winner, R10 coverage is the modified check-pod-rebuild-build bed (fails without the fix), placement is a candy, and the footer carries a well-formed Agent: + Assisted-by: pair.

Non-blocking, tool-limited note (no re-run possible): the Assisted-by: model string deepseek-v4.1-flash:cloud cannot be independently verified, and the body's R6 line labels the branch feat/ while it is actually fix/; neither affects the diff, the pasted evidence, or the verdict.

Verdict: PASS


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

View action run

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