Skip to content

fix(doctor): print warnings as warnings, and open a sandbox's banner last (#462) - #466

Merged
edgehero merged 1 commit into
mainfrom
fix/462-doctor-warnings-sandbox-banner
Sep 28, 2026
Merged

edgehero merged 1 commit into
mainfrom
fix/462-doctor-warnings-sandbox-banner

Conversation

@edgehero

Copy link
Copy Markdown
Owner

Closes #462.

doctor: warnings that printed as passes

render prints ⚠ with a fix only for { ok: false, warn: true }, which never fails doctor's exit code. Twelve checks returned { ok: true, warn: true } and printed a green ✓ with no fix. That is more than the eight the issue listed: four compute ok or warn. Each is now decided on one rule:

  • Warning (⚠ with its fix): something the operator configured is broken or does nothing, and they can change it.
    • symlinked skills that are skipped
    • an injected skill whose ai-trigger: allow is never read
    • a broken wait profile no trigger names
    • PI_SESSION_MAX_CONTEXT_PCT
    • a one-shot trigger with PI_TRIGGERS_FILE unset
    • a scoped limit naming a folder no trigger runs in
  • Fact line (✓, advice moved into the label): a trade the operator chose.
    • GitLab's api scope
    • PI_SECRET_RESOLVER_ROOTS
    • local secret binding
    • persisted transcripts
    • run.replicas
    • retained workspaces

Every one is pinned through render() with its exact text.

sandbox: the banner after the last refusal

pi-dispatch sandbox <id> printed "opening pi-sandbox-... exit the shell to dispose of it." before refusing with "network already exists". beforeLaunch now runs right before the launch: after the network is created, and inside the try whose finally removes it. A refused open never prints the banner, and the admin panel gets the same order.

Found while verifying #453 and #446 (round ledger)

  • Podman's stopped and restarting proxy states read ✗ in doctor, since a crash loop fails every job. A transient stopping stays ⚠. The worker's retry mapping is unchanged.
  • up shows only runnable consent lines: a read-only network inspect first, and the create line only when the network is missing.
  • A proxy stale on its image, entrypoint or command is offered its replace even while a mount cannot be compared. A mounts-only question with an unknown mount is still refused, and doctor then gives the manual commands.
  • A pinned sandbox tombstone held back by a manifest-less directory is restored in the same sweep pass, not the next one.

Specs

DES-CONTAINER-BACKEND-REGISTRY, DES-PODMAN-STACK-AS-QUADLET-UNITS, INT-SANDBOX-CONTRACT, INT-EGRESS-POLICY-CONTRACT, REQ-DEPLOYMENT-BOOTSTRAP.

@edgehero
edgehero force-pushed the fix/462-doctor-warnings-sandbox-banner branch 2 times, most recently from 16833de to 746ec5d Compare September 28, 2026 08:03
…last (#462)

doctor's render prints ⚠ and a fix only for { ok: false, warn: true };
twelve checks returned { ok: true, warn: true } and printed a green ✓
with no fix. Each is now decided: a warning (⚠ with its fix, never
failing doctor's exit) when something the operator configured is
broken or does nothing and they can change it; a fact line (✓, advice
in the label) when it is a trade they chose. Every one is pinned
through render().

pi-dispatch sandbox printed its opening banner before refusals such as
"network already exists"; beforeLaunch now runs right before the
launch, after the network is created and inside the try that removes
it, so a refused open never claims it is opening.

Also, from the #453 and #446 rounds: Podman's `stopped` and
`restarting` proxy states read ✗ in doctor (a crash loop fails every
job); up shows only runnable consent lines (the network create line
only when the network is missing); a proxy stale on its image,
entrypoint or command is offered its replace even while a mount cannot
be compared; and a pinned sandbox tombstone held by a manifest-less
directory is restored in the same sweep pass.

Review round 1: the context-bound line is a fact line; a broken GitHub App
id or private key under GITHUB_AUTH_SOURCE=app is a failure (the worker
refuses to boot on it); Podman's proxy label prints its raw state; up
re-checks the egress network at run time; the sandbox sweep asks the
runtime before deleting any directory, manifest or not; the --fix
re-check counts passes, warnings and failures apart.

Specs: DES-CONTAINER-BACKEND-REGISTRY, DES-PODMAN-STACK-AS-QUADLET-UNITS,
INT-SANDBOX-CONTRACT, INT-EGRESS-POLICY-CONTRACT, REQ-DEPLOYMENT-BOOTSTRAP.

Signed-off-by: Rob Boerman <robboerman@live.nl>
@edgehero
edgehero force-pushed the fix/462-doctor-warnings-sandbox-banner branch from 746ec5d to 6f7ba7f Compare September 28, 2026 08:24
@edgehero
edgehero merged commit 797d2d5 into main Sep 28, 2026
7 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.

doctor prints eight warnings as passes, and sandbox prints its banner before a refusal

1 participant