Skip to content

fix: config validation, download hardening, builder robustness & isolated bug sweep - #249

Merged
Xiddoc merged 2 commits into
masterfrom
claude/beetroot-sweep-optimize-fnq7r0
Jun 30, 2026
Merged

fix: config validation, download hardening, builder robustness & isolated bug sweep#249
Xiddoc merged 2 commits into
masterfrom
claude/beetroot-sweep-optimize-fnq7r0

Conversation

@Xiddoc

@Xiddoc Xiddoc commented Jun 30, 2026

Copy link
Copy Markdown
Owner

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

Download hardening

Builder & rootfs robustness

Isolated bugs

Deferred (tracked, not in this PR)

Testing

Full local gate green: ruff check (src+tests), ruff format --check, mypy --strict (src+tests), pytest -p no:randomly with 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

claude added 2 commits June 30, 2026 18:35
…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
@Xiddoc
Xiddoc merged commit c154ab0 into master Jun 30, 2026
17 checks passed
@Xiddoc
Xiddoc deleted the claude/beetroot-sweep-optimize-fnq7r0 branch June 30, 2026 20:48
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.

2 participants