[quality] test: unit coverage for elements/podman-vm/files/donate-clanker-bootstrap.py - #221
Open
kubestellar-hive[bot] wants to merge 1 commit into
Open
[quality] test: unit coverage for elements/podman-vm/files/donate-clanker-bootstrap.py#221kubestellar-hive[bot] wants to merge 1 commit into
kubestellar-hive[bot] wants to merge 1 commit into
Conversation
…nker-bootstrap.py The guest bootstrap is installed into the podman-vm disk, which ships no SSH and no guest agent, so a regression in it only surfaces as a VM that boots to a login prompt and never registers with the Hive. Nothing on the host covered it. Adds tests/test_donate_clanker_bootstrap.py (36 unittest cases, 93% line coverage of the script) over validate(), worker_environment(), read_envelope(), log(), and main(): envelope version-2 gating, the four required fields, the https/wss endpoint check, the exact credential name set the worker reads, the goose_provider fallback, the port-appears and empty-first-read retry loops, both timeout reasons, the /dev/kmsg mirror tests/vm-boot.sh asserts on, and the control_ack handshake. Adds a 'just podman-vm-check' recipe that runs those tests plus the previously unreferenced tests/podman-vm-contract.sh. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: sec-check[bot] <sec-check[bot]@users.noreply.github.com>
This was referenced Aug 29, 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.
Test Improvement
Claimed ground:
elements/podman-vm/files/donate-clanker-bootstrap.py(the file under test — unmodified), the new filetests/test_donate_clanker_bootstrap.py, one newpodman-vm-checkrecipe inJustfile, and the existingtests/podman-vm-contract.sh(wired into that recipe, contents unmodified).Why
donate-clanker-bootstrap.py(145 lines) is installed into the podman-vm guest disk. That disk ships no SSH and no guest agent, so a regression in it does not fail loudly — it produces a VM that boots to a login prompt and never registers with the Hive. Coverage of the script on the host was 0%;tests/podman-vm-contract.shgrep-asserts two of its lines but is not referenced by any workflow or Justfile recipe, so it never runs.What this adds
tests/test_donate_clanker_bootstrap.py— 36unittestcases, 93% line coverage of the script (the remainder is theif __name__ == "__main__"guard). The module is imported by path viaimportlibbecause its filename is not a Python identifier.PROTOCOL_VERSION == 2, the fourREQUIRED_FIELDS,ENVELOPE_TIMEOUToutwaiting the host's 180s accept timeoutvalidate()https:///wss://accepted vshttp:///ws:///bare host rejected, unknown optional fields ignoredworker_environment()HIVE_WS_URLandHIVE_HUB, token/backend/run-id mapping,GOOSE_PROVIDERfallback togithub_copilot(including the empty-string case),GOOSE_MODEL/GITHUB_COPILOT_TOKENomitted when absent and exported when present, exact key set asserted so no name the worker cannot read is exported, raw envelope keys not leakedread_envelope()JSONDecodeErrorlog()/dev/kmsgmirror thattests/vm-boot.shasserts on, unwritable/dev/kmsgswallowedmain()control_ackandexecvs the worker; a rejected envelope is never acked, never execs, and exports no credentialsJustfilegainsjust podman-vm-check(host-only, no VM and no BuildStream) running the new tests plustests/podman-vm-contract.sh. It is a new recipe placed in the VM section (~line 523) and does not modifycatalog-check.Disjointness
[quality]claimsscripts/generate_skill_index.py,tests/test_skill_index.py, and askill-catalog-checkrecipe at Justfile ~line 230 — different script, different test file, different recipe, different region of the Justfile.[architect]claimselements/targets.jsonownership insidetests/test_catalog_conformance.py— untouched here.Verification
No production code changed.
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-opus-5