Skip to content

lore deploy --dry-run runs every provider method: the runtime reads dry_run, lore hands it dry-run, and calls outside a graph never check #1022

Open

Description

@David-Noble-at-work

lore deploy --dry-run runs every provider method in the package's graph. Read in the code at d24bff32, on
feature/925-scope-not-target; not reproduced.

The runtime's skip

Under dry-run the executor narrates a provider method instead of running it: action.Do, fallibleAction.Do and
compensableAction.Do return early when Application.DryRun() is true (pkg/op/action_types.go:59, :116,
:172), and the process runner takes the same value (pkg/op/runtime_environment.go:736). Application.DryRun()
reads the application's flag map under dry_run (pkg/application/application.go:106); a test asserts that
dry-run is not honored (pkg/application/application_test.go:42).

What misses it

  • lore. executeDeployments runs each package's graph with Flags: {"dry-run": cfg.DryRun}
    (cmd/lore/lore/commands.go:266). Nothing stops first: runDeploy goes straight to it, and lore hands dry-run
    only to package scripts, as package.dry_run (cmd/lore/lore/package_context.go:52), which no package in the
    registry reads. Application.DryRun() is false, and every provider method runs.
  • devlore-test. Its runner hands the runtime the same key (cmd/devlore-test/devloretest/runner.go:263).
  • Calls made outside a graph. star's commands, codegen and the REPL call a provider method directly
    (pkg/op/starlarkbridge/go_receiver.go:933), and nothing on that path consults dry-run. Only code that checks
    for itself holds back: star's setup provider, in five places (cmd/star/provider/setup/provider.go:141), and
    commands run through the process runner, as git's are; shell.exec bypasses the runner (shell.exec bypasses pkg/process: no dry-run, no narration, and the preferred shell is never read #800). The file provider
    does not check, so --dry-run does not stop a write a star command makes.
  • writ is not affected. deploy, upgrade, decommission and secret encrypt each return before running under
    --dry-run (cmd/writ/writ/deploy/deploy.go:130), so their dry-run entry is never read. That early return is
    writ deploy --dry-run returns before the conflict pre-flight, so a dry run cannot say what stop will refuse #853's subject.

Spelling the key right would not be enough. A flag map built from the command line holds only the flags typed
(application.NewApplication stamps no others), so a dry run asked for through the environment or the
configuration file would still miss the skip. The runtime needs the resolved setting.

Ruled 2026-10-02

The owner: "I agree that dry_run belongs to the runtime and will add that other settings do too. verbosity comes to
mind." So the runtime applies dry-run whether a method is called in a graph or outside one; no graph binds it;
package.dry_run is withdrawn; providers and commands stop reading it. Then: "log the defect and include it in
lane 8."

Resolution

  • Every dry run reaches the runtime's skip, whether it was asked for on the command line, in the environment or in
    the configuration file.
  • A provider method called outside a graph is skipped under dry-run, as one in a graph is.
  • Nothing but the runtime reads dry-run: package.dry_run is gone, and star's setup provider no longer checks.
  • A test runs a graph, and a call outside one, under dry-run for each program, and fails if a provider method runs.

How the runtime receives the setting is an open question in lane 8's plan.

Related

#1011 (flag-bound settings keep the flag's hyphen), #1004 (self install and self uninstall ignore --dry-run),
#800 (shell.exec bypasses the process runner), #853 (writ deploy's dry run returns before the conflict
pre-flight), #694 (how configuration reaches a run).

Plan and design documents

Kind Document
Plan docs/plans/fix/927-env-prefix-doubled.md, lane 8 of #916
Design docs/architecture/configuration.md

Activity

  1. David-Noble-at-work commented on Nov 9, 2026

    @David-Noble-at-work
    ContributorAuthor

    star github triage sweep added this issue to Triage: devlore, for the rules it breaks:

    • severity: a Bug whose Severity is blank; a bug is Critical, High, Medium or Low
    • no-evidence: no Evidence of completion section
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions