Repository navigation
test(android): validate release version format, not a fixed 1.4.2/13 baseline - #22
Merged
Merged
Conversation
…baseline The v1.4.3 release tag run failed on exactly two stale assertions in release-automation.test.mjs that pinned the previous production version (versionName 1.4.2 / versionCode 13) as a permanent baseline. The release workflow intentionally bumps versionName/versionCode for every production release (1.4.1/12, 1.4.2/13, 1.4.3/14, ...), so no test may treat any of them as permanent. Tests now validate FORMAT / STRUCTURE instead: - 'parses the real android/app/build.gradle': versionName exists and matches MAJOR.MINOR.PATCH; versionCode exists and is a positive integer. No exact-value assertions. - 'production baseline ... (1.4.2 / 13)' replaced with a future-proof check: build.gradle declares exactly one versionName and one versionCode, versionName is valid semver, versionCode is a positive integer within the Android signed 32-bit bound. CI organization (release gates unchanged / strengthened): - split the combined 'App logic + Worker API tests' checks job into separate 'worker-api' and 'android-app' jobs so a failing run always names the culprit; the release job needs both suites + release-apk, so both still gate releases. Android version bumps can no longer make a Worker API test failure look like a Worker problem (and vice versa). - the existing worker/test/app-update.test.cjs suite (previously not run in CI) is now part of the worker-api job. No changes to versionName/versionCode, the v1.4.3 tag, the release workflow's version/package/signing gates, the updater, Worker app-update logic, or any signing configuration. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
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.
Problem
The
v1.4.3release tag run failed in the combined "App logic + Worker API tests" job on exactly 2 stale Android tests (Worker API tests passed). Both pinned the previous production version as a permanent baseline:parses the real android/app/build.gradle→ assertedversionName === '1.4.2',versionCode === 13production baseline versions in build.gradle are unchanged (1.4.2 / 13)→ asserted the literal1.4.2 / 13stringsBut the release workflow intentionally bumps versionName/versionCode for every production release (1.4.1/12 → 1.4.2/13 → 1.4.3/14 → …). No test should treat any shipped version as permanent.
Fix (tests now validate format / structure)
android-app/test/release-automation.test.mjs:versionNameexists and matchesMAJOR.MINOR.PATCHversionCodeexists and is a positive integerversionNameand exactly oneversionCodedeclaration (the release job grepshead -1, so duplicates would silently diverge)versionNameis valid semverversionCodeis a positive integer within the Android signed 32-bit bound1.4.2/13baseline remains anywhere in the test suites (the remaining1.4.2/13mentions are updater fixture data in isolated test files, not baselines).CI organization (clearer failure attribution)
.github/workflows/android-apk.yml:checksjob into two separate jobs:worker-api— "Worker API tests" (all 7 existing Worker suites +app-update.test.cjs, which existed but was never run in CI)android-app— "Android app logic + UI smoke tests"releasejob still gates on both test suites +release-apk(needs: worker-api, android-app, release-apk) — every release invariant is preserved:vMAJOR.MINOR.PATCHtag format, tag == Gradle versionName, APK versionName == tag, APK versionCode == Gradle versionCode, package ==com.dsmnru.pyq, signed APK,versionCode: Nin the release body.Verification
npm test --prefix android-app→ 105 passed, 0 failedworker.test.js,app-update.test.cjs,frontend-smoke-test.cjs(50),paper-smoke-test.cjs(18),contribution-points-test.cjs(65),duplicate-detection-test.cjs(45),duplicate-index-freshness-test.cjs(13),admin-ia-test.cjs(68) → all passNot touched
versionName/versionCode in build.gradle, the
v1.4.3tag/release, updater / update.js / native.js / DsmnruAppPlugin / Worker app-update logic / upload-Gofile / Firestore / Resend / Firebase auth / website / signing configuration.