Skip to content

Final-verification findings: unquoted PI_BACKEND_FLOOR refused by doctor, cancel wording, foreground worker vs doctor's .env #477

Closed

Description

@edgehero

Three defects found by the round-446 final verification on pd-fedora (main f0db57e):

  1. doctor refuses the documented unquoted PI_BACKEND_FLOOR. PI_BACKEND_FLOOR=isolation=enforced in .env is the form docs/podman.md and .env.example show. Doctor gives a false ✗ ("in a form ... (quotes, a $, a space)"), then says "✓ PI_BACKEND_FLOOR is not set" and never judges the floor. UNQUOTED_PLAIN (worker/src/env-file.mjs ~1439) rejects an = inside a value, though no loader treats an interior = specially. Since doctor judges many service keys from its shell while the service reads them from .env #471, every service key doctor resolves goes through that reader. The service itself reads the value correctly.
  2. cancel says a job "never ran" when it did. On a job waiting to retry after a failed attempt, which has a run record and a retained sandbox, it prints "removed ... (delayed): it never ran; no record written" (worker/src/cancel-cli.mjs ~115).
  3. A worker started by hand takes VALKEY_URL only from its shell, while doctor judges .env. In the deployment folder, doctor judged .env's Valkey (port 16592) and ended with "Start the worker with pi-dispatch worker". That worker, started by hand, dialled 127.0.0.1:6379. run, status and cancel read .env since fix(worker): the Valkey pi-dispatch starts gets a per-deployment password (#468) #475, so the foreground worker, or the advice doctor gives, must agree with what doctor judged.

To do: fix all three and pin each. For (3), decide between two options and say why:

  • the foreground worker reads the deployment .env through the same resolver, with the shell winning where set;
  • doctor's advice names how to start a worker that sees .env.

Activity

  1. edgehero commented on Sep 29, 2026

    @edgehero
    OwnerAuthor

    Fixed in #478 (merged).

    The three findings:

    • Interior = in .env: an interior = in an unquoted .env value now reads as plain, as every loader reads it, so doctor judges the documented PI_BACKEND_FLOOR=isolation=enforced.
    • cancel wording: cancel words a job from its attempts. "It never ran" appears only when the job made no attempts.
    • Doctor's ready line: when doctor used values from .env, its ready line names the service that reads them, with the right restart command for each scope. Making the foreground worker load .env was rejected, because it would drain the queue under the shell's venue and floor.

    The PR's gate also found and fixed:

    • VALKEY_URL database: a database path that is not a number, or a database the server does not have, is now refused. Before, the client crashed or silently used database 0.
    • Accepted URL forms: /01 and valkey:// still work.
    • .env writer: it now writes only what the reader reads back plainly.
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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions