Repository navigation
test(ci): cover the QA sealing gate in finalize_qa.py - #25
Merged
Merged
Conversation
finalize_qa.py decides which APK bytes are sealed for publication but had no tests. Cover the success path (seal digests, unit-test totals, no leftover staging dir) and each refusal: failed or mismatched QA/APK digests, a different source revision, missing/failing/erroring/skipped unit tests, and an already-sealed release directory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The mismatched-bytes case tampered the APK, which also breaks the QA digest, so the separate `sha != metadata['sha256']` check was never exercised alone. Add a case where the APK and qa-result.json agree but metadata.json names other bytes; removing that clause from finalize_qa.py now fails the test. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
denson9874
added a commit
that referenced
this pull request
Sep 30, 2026
…ize_qa Adapted to the product finalize_qa.py (metadata fixture carries channel=qa); passes against unmodified product code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
denson9874
pushed a commit
that referenced
this pull request
Nov 6, 2026
Source revision a1e2796, the Full APK sha256 from Jenkins build #25, and what was checked on the emulator and on a Pixel 7 Pro. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Csz3tZ1byCNq2yKBWWuS8X
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
ci/finalize_qa.pyis the last gate before a Jenkins QA build is sealed for publication, but it was the only release-path CI script without tests. This addsci/tests/test_finalize_qa.py(test-only; no production code changes).Covered:
seal.jsondigests match the sealed files, unit-test totals are summed across JUnit files, and no.preparing-*staging dir is left behind"true"), or whose SHA-256 doesn't match — including tampered APK bytesTesting
python3 -m unittest discover -s ci/tests→ 127 tests OK (122 existing + 5 new). Jenkins'Jenkinsfile.buildalready runs this discovery, so the new file is picked up automatically.skippedguard fromfinalize_qa.pymakes the new tests fail.🤖 Generated with Claude Code