Skip to content

fix: close the 3 remaining review findings (config_hash mask, podman localhost/, rootless caveats)#71

Merged
Pyronewbic merged 1 commit into
mainfrom
fix/post-review-cleanup
Jul 6, 2026
Merged

fix: close the 3 remaining review findings (config_hash mask, podman localhost/, rootless caveats)#71
Pyronewbic merged 1 commit into
mainfrom
fix/post-review-cleanup

Conversation

@Pyronewbic

Copy link
Copy Markdown
Owner

Post-review cleanup of the pre-existing findings review-launcher surfaced on #67. The HIGH one (rootless chown) shipped as #69; these are the remaining five, none regressions, bundled per the one-PR decision.

Fix 1 — config_hash failure masked in build() (LOW, bash-3.2)

local args=(--label "sluice.confighash=$(config_hash)" ...) returns local's own exit 0, so a failing hash (shasum rc 127) baked an empty confighash label under set -e — after which every maybe_build saw a mismatch and rebuilt silently. Hoisted to local _chash; _chash="$(config_hash)" (mirroring maybe_build), the failure now propagates and the build dies.

Fix 2 — podman localhost/ image-name prefix breaks ls/prune (MEDIUM)

sluice ls/prune seed from image ls --format '{{.Repository}}'; podman prints localhost/sluice-foo, which then mismatched the canonical sluice-foo in the ps status filter, box_blocked_count, the ${#sluice-} receipt slug, and remove_box_volumes's label — so on podman boxes never showed running, last_receipt/state_dir were wrong, and overlay volumes leaked on prune. Both seeds now sed 's,^localhost/,,' (a no-op on docker).

Fix 3 — surface the 3 rootless-podman limitations (3× LOW)

A shared _rootless_podman helper (also DRYs #69's detection) drives new sluice doctor caveats: pids/memory caps enforce only with cgroups-v2 + systemd delegation; host ports <1024 can't bind (flagged per configured port); netfilter modules must be loaded. Additive "rootless_podman" JSON field for parity; docs/hardening.md documents all three (the module one is doc-only — the host-side doctor can't probe the box's future netns).

Tests / verification

  • verify-build-hash-unit.bats (new): a failing config_hash aborts the build under set -e; structural hoist check.
  • verify-ls-egress-unit.bats: a localhost/-prefixed image resolves to the canonical name + state_dir; structural (both seeds strip).
  • verify-doctor-checks.bats: rootless caveats appear (fake podman on PATH), docker emits none, JSON rootless_podman true/false.
  • Unit 318 green, acceptance 16 green, build-check + lint clean. Podman-specific behavior rides the best-effort podman CI leg (integration signal, same as fix(podman): keep host repo ownership on rootless podman via keep-id #69).

…localhost/, rootless caveats)

Post-review cleanup of the pre-existing findings review-launcher surfaced on #67
(the HIGH chown one shipped as #69); none are regressions.

- build(): hoist `_chash="$(config_hash)"` out of the `local args=(...)` array.
  local returns 0, so a failing hash (shasum rc 127) baked an empty confighash
  label under set -e, after which every maybe_build silently rebuilt. Assigned
  alone the failure propagates and the build dies.
- ls/prune: strip podman's `localhost/` image-name prefix at the two `image ls`
  seeds so the name matches the canonical sluice-<slug> everywhere downstream
  (ps status filter, box_blocked_count, the ${#sluice-} receipt slug,
  remove_box_volumes label) - it was breaking all of them on podman. No-op on
  docker (never emits the prefix).
- doctor: a shared _rootless_podman helper surfaces the rootless-podman host
  limits - pids/memory caps need cgroups-v2 + systemd delegation, ports <1024
  can't bind (flagged per configured port), netfilter modules must be loaded;
  additive rootless_podman JSON field; docs/hardening.md documents all three.

Tests: verify-build-hash-unit.bats (new), + podman-prefix and rootless-doctor
cases in verify-ls-egress-unit / verify-doctor-checks. Unit 318 green,
acceptance 16 green; podman-specific paths ride the best-effort podman CI leg.
@Pyronewbic Pyronewbic merged commit c2c2ee8 into main Jul 6, 2026
9 checks passed
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