Skip to content

fix(install): make dry-run offline and probe-free - #2027

Merged
gerchowl merged 5 commits into
devfrom
bugfix/2021-install-dry-run-flake
Nov 4, 2026
Merged

gerchowl merged 5 commits into
devfrom
bugfix/2021-install-dry-run-flake

Conversation

@gerchowl

@gerchowl gerchowl commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Description

Make install.sh --dry-run fast and deterministic offline. A timestamped trace reproduced a 12.857 s dry run, including 12.814 s in podman info, exceeding the existing 10 s test timeout.

Type of Change

  • feat -- New feature
  • fix -- Bug fix
  • docs -- Documentation only
  • chore -- Maintenance task (deps, config, etc.)
  • refactor -- Code restructuring (no behavior change)
  • test -- Adding or updating tests
  • ci -- CI/CD pipeline changes
  • build -- Build system or dependency changes
  • revert -- Reverts a previous commit
  • style -- Code style (formatting, whitespace)

Modifiers

  • Breaking change (!) -- This change breaks backward compatibility

Changes Made

  • Discover dry-run runtimes through PATH without daemon probes; explicit flags still win.
  • Defer GitHub default-branch lookup and remote latest release resolution; retain local checks and pins.
  • Explain deferred checks in help and output. Add PATH-shim regression coverage for all four modes, rejecting network tools and runtime invocation.
  • Show unresolved direnv releases as <latest-release> placeholders; explain PATH-only runtime selection and possible fallback on a real run.
  • Document --preview for resolved releases and runtime health, and keep direnv output free of runtime-health disclosures. Pin the container deferred-checks disclosure in regression tests.
  • Keep the 10 s timeout unchanged. Exercise remote release resolution through preview, preserving success and failure coverage.

Changelog Entry

  • Offline, probe-free installer dry runs (#2021)
    • Defer remote branch checks, latest release resolution and runtime health probes until execution.
    • Keep local version pins and explicit runtime choices in the plan; discover runtimes through PATH only.
    • Label unresolved releases as placeholders and explain runtime fallback and preview verification.

Testing

  • Round 2: mutant M5 (remove container deferred disclosure) rejected: 3 container cases failed, direnv passed (pytest exit 1); restored source.

  • Round 2: new plan/disclosure assertions failed in all four modes before implementation (exit 1).

  • Round 2: utility and direnv installer pytest tests: 69 passed (exit 0); installer Bats: 114 passed (exit 0); nix develop --command just docs exited 0.

  • RED: four new regression cases failed (exit 1), recording gh api, git ls-remote, docker info, and podman info.

  • GREEN: uv run --with pytest-xdist pytest tests/test_utils.py -n 4 with isolated external basetemp: 37 passed (exit 0).

  • nix develop --command uv run --with pytest-xdist pytest tests/test_install_direnv_host.py tests/test_utils.py -n 4 with isolated external basetemp: 69 passed (exit 0).

  • nix develop --command bats tests/bats/install.bats: 114 passed (exit 0).

  • Timestamped bash -x: before default 12.857 s / direnv 0.456 s; after default 0.045 s / direnv 0.046 s.

  • unshare -rn: before exit 1 (runtime probe); after default and direnv exit 0, 0.043 s each.

  • Tests pass locally (just test)

  • Manual testing performed (describe below)

Manual Testing Details

Ran the installer against an empty temporary target with timestamped shell tracing, then repeated with networking disabled using unshare -rn. No files were created.

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly (edit docs/templates/, then run just docs)
  • I have updated CHANGELOG.md in the [Unreleased] section (and pasted the entry above)
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Additional Notes

Refs: #2021

@gerchowl
gerchowl force-pushed the bugfix/2021-install-dry-run-flake branch from d82cb2e to f6e2105 Compare November 4, 2026 05:33
@gerchowl
gerchowl merged commit 9feb4f1 into dev Nov 4, 2026
16 checks passed
@gerchowl
gerchowl deleted the bugfix/2021-install-dry-run-flake branch November 4, 2026 05:41
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.

1 participant