Skip to content

FileStep has no optional, so a secret delivery decides #SecretUse.optional at compile time (residual race) #363

Open

Description

@aitrawog

Finding

#SecretUse.optional means "a missing source does not fail the deployment" (DESIGN.md:735: "the key is readable when the host had one"). It cannot be expressed on the step that performs the delivery: spec.FileStep is {Source, Dest, Mode, Owner, CandyName} and kit.walkFile fails hard when Source is unreadable.

So the tolerance is decided at COMPILE time (deploykit.CompileSecretSteps, opencharly/sdk, P07 unit 2b): an optional entry whose host source is unreadable is skipped, a required one is an error. That covers the case DESIGN names, and it is the only shape-free option today.

The residual race: the source is stat'ed at compile and read at realize. An optional entry whose host file disappears in between fails the deploy at realize instead of being skipped. The window is one command invocation, so it is small — but it is a behaviour difference from the declaration, and it is named in the code comment rather than hidden.

Asks

  1. optional?: bool on the File step (the #InstallStepView File shape and spec.FileStep), so walkFile can skip an unreadable source instead of failing.
  2. Then CompileSecretSteps emits the step unconditionally and the compile-time stat goes away — one authority for the tolerance instead of two.
  3. A test for walkFile in both directions (optional+missing skips, required+missing errors), since walkFile currently has no compiled-plan caller at all (P07 unit 2b is its first; the only other construction of a FileStep was the wire decoder).

Filed while landing P07 unit 2b.

Agent: audit-protocol
Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (syntax check only)

Activity

  1. added
    category:runtime
    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:runtimetype:fix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions