fix: config validation, download hardening, builder robustness & isolated bug sweep - #249
Merged
Merged
Conversation
…ated bug sweep Second sweep batch (27 fixes) across config/ports validation, the download path, the redroid/vm builder, and several isolated correctness bugs. config & ports: - reject well-known ports mapping with a non-canonical guest port; require frida_control alongside frida (#195) - dedup the legacy ports-migration note per resolved path (#202) - accept Docker's documented memswap_limit: -1 (#215) - flag a non-empty modules: list as inert under binder: vm (#200) - validate frida.sha256 as 64-char hex at load time (#194) - warn when a pinned gapps_vendor overrides the minimal/full intent (#220) - remove the dead _MIGRATION_REQUIRED_VERSIONS constant (#242) - magisk-config.sh: observe the magisk --sqlite exit status under set -eu (#239) downloads: - stage into a process-unique temp file before the atomic rename so concurrent fetches can't poison the cache (#185) - stream-decompress frida/modules instead of buffering full payloads (#227) - bound frida .xz decompression output to avoid OOM (#228) - strip query/fragment from module URL basenames so the flash glob matches (#168) builder & rootfs: - pinned-sha256 verify the kernel source tarball before compiling (#184) - write the rootfs .android-version marker before the image rename, and record the actually-baked image version (#234, #187) - validate REDROID_TAR exists in preflight (#186) - docker-daemon preflight for beetroot build (#193) - shell-quote build-context paths in the kernel compile (#208) - force BuildKit for COPY --chmod (#229) - euid preflight for the local rootfs bake (#231) - fcntl.flock the shared clone dir against concurrent builds (#232) - add a repo-root .dockerignore (#207) isolated bugs: - adb mid-batch offline-abort row is stage-neutral and retains the adb error (#223) - render ls/modes tables losslessly off-TTY (#204) - compose.logs() raises on a non-zero exit in non-follow mode (#218) - absolute-path contract for user_config/registry/cache dirs on relative XDG (#225) - atomic write for the materialised compose/vm-asset cache (#226) - snapshot/restore: backend reconcile (#171), overlap guard on non-existent target (#172), self-inclusion guard at any depth (#173) All covered by new tests; full gate green (ruff, mypy --strict src+tests, pytest 100% line+branch (1828 passed), shellcheck/shfmt, yamllint, actionlint, zizmor, codespell, deptry, uv lock, changelog lint). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P1YsNMpGizhSDDPCBu5cut
… row The #223 fix added an `if adb_error:` branch; the falsy branch (empty underlying adb error → bare stage-neutral detail) was unexercised, dropping coverage to 99.98% and failing the CI 100% gate. Add a focused unit test. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P1YsNMpGizhSDDPCBu5cut
This was referenced Jun 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Second batch of the automated codebase sweep — 27 fixes across config/ports validation, the download path, the redroid/vm builder, and several isolated correctness bugs. Implemented by 9 file-disjoint parallel agents, each gate-verified, then integrated with two hand-completed fixes (#200, #223) that crossed agent file-ownership boundaries.
Fixes by area
Config & ports validation
ports:mapping with a non-canonical guest port; requirefrida_controlalongsidefrida-1(unlimited swap), with no way to express it #215 accept Docker's documentedmemswap_limit: -1(unlimited swap)modules:list as inert underbinder: vmfrida.sha256as 64-char hex at load time (Module.sha256 half tracked as follow-up)gapps_vendoroverrides theminimal/fullintent_MIGRATION_REQUIRED_VERSIONSconstantmagisk-config.sh: observe themagisk --sqliteexit status underset -euDownload hardening
.xzdecompression output (OOM / zip-bomb hardening) — Security*.zipflash glob never matches, so the module is silently never flashed #168 strip query/fragment from module-URL basenames so the*.zipflash glob matchesBuilder & rootfs robustness
.android-versionmarker before the image rename; record the actually-baked image versiondocker load#186 validateREDROID_TARexists in preflightbeetroot build(redroid base image) has no Docker-daemon preflight, giving a generic command-failed error on a daemonless host #193 docker-daemon preflight forbeetroot buildbeetroot buildnever forces BuildKit, aborting on a BuildKit-disabled host #229 force BuildKit for theCOPY --chmodDockerfilebeetroot builduses a single fixed per-user clone dir with rm -rf + clone and no lock, so concurrent builds corrupt each other #232fcntl.flockthe shared clone dir against concurrent buildsbeetroot buildships the entire repo root (.venv, .git, instance dirs) as build context for a ~20 KB COPY set #207 add a repo-root.dockerignoreIsolated bugs
ls/modestables losslessly off-TTYcompose.logs()raises on a non-zero exit in non-follow mode$XDG_*_HOMEDeferred (tracked, not in this PR)
(package, process)remodel) — genuinely cross-cutting (env format consumed byapi.py/vm.pyand asserted in multiple tests); needs a focused PR.module.sha256validation — bogus-digest test fixtures need updating first.Testing
Full local gate green:
ruff check(src+tests),ruff format --check,mypy --strict(src+tests),pytest -p no:randomlywith 100% line+branch coverage (1828 passed, 6 docker-daemon skips),shellcheck/shfmt,yamllint,actionlint,zizmor,codespell,deptry,uv lock --check, changelog lint.🤖 Generated with Claude Code
https://claude.ai/code/session_01P1YsNMpGizhSDDPCBu5cut
Generated by Claude Code