Skip to content

fix(install): run docker ownership repair only when the tree is not user-owned - #1253

Merged
c-vigo merged 3 commits into
release/1.4.1from
bugfix/1248-docker-repair-observed-ownership
Jul 22, 2026
Merged

c-vigo merged 3 commits into
release/1.4.1from
bugfix/1248-docker-repair-observed-ownership

Conversation

@c-vigo

@c-vigo c-vigo commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

The #1235 ownership repair keyed on the runtime CLI name (RUNTIME = docker). On hosts where docker is the rootless-podman compat shim, the scaffold output is already correctly owned, and the in-container chown to the host UID maps to an unmapped subuid — flipping a working tree to UNKNOWN-owned and breaking the git phase (a regression of the #1235 fix; 1.4.0 worked).

The repair now keys on the OBSERVED post-scaffold state: it runs only when the tree contains files not owned by the invoking user (find ! -user probe, portable across GNU/BSD — no GNU-only stat -c). RUNTIME is out of the condition entirely; real docker's root-owned output still triggers the repair, and any rootless-podman flavor skips it. Warn-not-fail posture and messages unchanged.

Closes #1248
Refs #1248

Verification

  • TDD: new bats test red-first (docker runtime + user-owned tree → no repair container); existing install.sh --docker: chown scaffold output before the host-side git phase #1235 tests keep asserting the repair on root-owned output via a stubbed ownership probe
  • bats tests/bats/install.bats: 103/103 ok; full pre-commit suite green (51 hooks)
  • Live proof on a rootless-podman shim host: rc1 installer breaks (UNKNOWN-owned, no git repo); this branch's installer with identical flags yields a user-owned, git-initialized tree — matching the 1.4.0 baseline

@c-vigo
c-vigo merged commit b1f5683 into release/1.4.1 Jul 22, 2026
13 checks passed
@c-vigo
c-vigo deleted the bugfix/1248-docker-repair-observed-ownership branch July 22, 2026 16:01
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