fix: api/cli/registry bridges + high-value codebase-audit fixes - #268
Merged
Conversation
Fourth sweep batch — the api/cli/registry "bridge" issues that span multiple hub files, plus the highest-value findings from the parallel codebase audit. bridges (span api/cli/registry/settings/frida_download): - Frida-less ports config no longer KeyErrors ls/status/doctor/frida-addr (#158) - ls/status reuse a single registry snapshot + memoized port index (#230) - cross-instance port-collision check moved inside the registry lock (TOCTOU) (#183) - apply() no longer clobbers a working frida-server before a re-fetch (#165) - frida-server arch auto-detects from the host (aarch64 -> android-arm64) (#189) - malformed BEETROOT_*_TIMEOUT maps to error/exit-1 instead of an import traceback that bricked even --help (#197) codebase-audit fixes: - install_frida detaches the daemon's stdio so it can't hang forever (#253) - serial_is_available/_adb_unchecked run adb with a 5s timeout (#256) - boot_cache memoizes the rootfs digest on (path,size,mtime) so warm up no longer re-hashes the multi-GB image every start (#254) - rootfs bake pins --platform=linux/amd64 (#258); verify the Docker static bundle against a pinned sha256 before extract (#262, machinery; digest TBD) - console.table markup-escapes cells/headers (#259) - module downloads validate bytes vs Content-Length (#261) - snapshot manifest written first + restore decompression-bomb cap (#265) - e2e savevm cache stores the cache-key sidecar (#260); denylist trims whitespace (#263); docs main->master links (#266) All covered by new tests; full gate green (ruff, mypy --strict src+tests, pytest 100% line+branch (1960 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
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
Fourth sweep batch — 18 fixes: the api/cli/registry "bridge" issues that span multiple hub files (so they couldn't be parallelized in earlier batches), plus the highest-value findings from the 18-agent codebase audit (filed as #252–#266). One bucket per file-disjoint area, each gate-verified, integrated cleanly.
Bridge issues (span api/cli/registry/settings/frida_download)
ports:config no longerKeyErrorsls/status/doctor/frida-addr(returns theunsupportedsentinel like the vm backend)ls/statusreuse a single registry snapshot + memoized port index (fewerinstances.jsonreads /beetroot.yamlparses) (Quality)apply()no longer clobbers a workingfrida-serverwith an empty placeholder before re-downloadfrida-serverarch auto-detects from the host (aarch64 →android-arm64) (Feature)BEETROOT_*_TIMEOUTmaps toerror:/exit-1 instead of an import-time traceback that bricked even--helpCodebase-audit fixes
install_fridadetaches the daemon's stdio so it can't hang foreverserial_is_available/_adb_uncheckedrun adb with a 5s timeout (a wedged adb no longer hangs the fleet listing)up, eroding the warm-start speedup #254 boot_cache memoizes the rootfs digest on(path,size,mtime)— warmupno longer re-hashes the multi-GB image every start (Quality)--platform=linux/amd64; Docker static bundle is downloaded and extracted into the trusted guest rootfs with no digest verification #262 verify the Docker static bundle against a pinned sha256 before extract (Security — machinery + tests; the literal default digest is a follow-up)console.table()markup-escapes cells/headers (bracketed paths no longer corrupt/crash the listing)Content-Lengthcache-keysidecar (the boot-cache was dead in CI without it)main→masterlinks (Quality)Testing
Full local gate green:
ruff,ruff format --check,mypy --strict(src+tests),pytest -p no:randomlyat 100% line+branch coverage (1960 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