Skip to content

fix(bed): wait-ready probes the host engine, not the deploy's authored engine (vacuous 90s wait) #142

Open

Description

@aitrawog

Finding

The check-bed runner's wait-ready phase probes readiness with the wrong
engine for a pod: deploy whose authored engine: differs from the host-wide
engine.run. Measured while proving opencharly/charly#1109 on a pod: bed
authored engine: containerd:

  • bed_run.go's waitReady calls specexec.WaitForContainerReady(name).
  • exec/venue_wait.go resolves the probe binary from CHARLY_RUN_ENGINE
    (readinessEngine(os.Getenv("CHARLY_RUN_ENGINE"))), and the bed runner never
    sets that variable from the bed root's NodeJSON.Engine. It therefore
    defaults to podman.
  • The deployed container is in the containerd store (nerdctl ps shows
    charly-check-engine-containerd-pod; podman ps does not), so
    podman exec <name> true never succeeds and the readiness poll burns its
    full 90-second no-progress watchdog.
  • WaitForContainerReady returns no error and waitReady returns nil
    unconditionally, so [wait-ready] PASS is printed after the timeout — the
    readiness gate is vacuous for this bed and the run pays ~90 s.

The following check-live phase does use the deploy entry's resolved engine
and passes, which is why the bed can still reach a green verdict; but the
readiness gate is not gating and the delay is real.

RCA

  • Mechanism. The probe engine is a process env var that the bed runner does
    not populate from the bed's authored selector; the deploy-level engine is in
    CheckBedReply.NodeJSON.
  • Missed control. WaitForContainerReady discards its own outcome, so a
    wrong-engine (or absent) probe is indistinguishable from "not ready yet" and
    can never fail the phase.
  • Blast radius. Every pod bed whose deploy engine differs from the host
    default: a 90 s stall and a readiness assertion that cannot fail. It also
    masks a genuinely unready container until the later check-live step.
  • Root fix. Thread the bed root's NodeJSON.Engine into the readiness
    probe (a typed argument on WaitForContainerReady, or an env set around the
    wait), and make the wait return an error when its deadline elapses without
    the container becoming exec-able, so [wait-ready] can fail instead of
    passing vacuously.

This is pre-existing and separable from the engine-selector persistence fix
(opencharly/charly#1109); it is filed here rather than widened into that
cutover.

Agent: containerd-crabbox-program/engine
Assisted-by: Claude Code ollama-cloud/deepseek-v4.1-flash:cloud (analysed on a live system)

Activity

  1. added
    category:verification
    type:fix
    on Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    category:verificationtype:fix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions