Skip to content

test(android): validate release version format, not a fixed 1.4.2/13 baseline - #22

Merged
Lav-developer merged 1 commit into
android-appfrom
arena/01a09c24-pyq
Sep 13, 2026
Merged

Lav-developer merged 1 commit into
android-appfrom
arena/01a09c24-pyq

Conversation

@arena-ai-coding-agent

Copy link
Copy Markdown
Contributor

Problem

The v1.4.3 release 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 → asserted versionName === '1.4.2', versionCode === 13
  • production baseline versions in build.gradle are unchanged (1.4.2 / 13) → asserted the literal 1.4.2 / 13 strings

But 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:

  1. "parses the real android/app/build.gradle" now verifies:
    • versionName exists and matches MAJOR.MINOR.PATCH
    • versionCode exists and is a positive integer
    • no exact-value assertions
  2. The fixed-baseline test is replaced by a future-proof structural check:
    • build.gradle contains exactly one versionName and exactly one versionCode declaration (the release job greps head -1, so duplicates would silently diverge)
    • versionName is valid semver
    • versionCode is a positive integer within the Android signed 32-bit bound
  3. No 1.4.2 / 13 baseline remains anywhere in the test suites (the remaining 1.4.2/13 mentions are updater fixture data in isolated test files, not baselines).

CI organization (clearer failure attribution)

.github/workflows/android-apk.yml:

  • Split the combined checks job 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"
  • A failing run now always names the culprit. Android version bumps can no longer be confused with Worker API failures, and vice versa. Worker API tests were not weakened or modified.
  • The release job still gates on both test suites + release-apk (needs: worker-api, android-app, release-apk) — every release invariant is preserved: vMAJOR.MINOR.PATCH tag format, tag == Gradle versionName, APK versionName == tag, APK versionCode == Gradle versionCode, package == com.dsmnru.pyq, signed APK, versionCode: N in the release body.

Verification

  • npm test --prefix android-app → 105 passed, 0 failed
  • Worker suites: worker.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 pass

Not touched

versionName/versionCode in build.gradle, the v1.4.3 tag/release, updater / update.js / native.js / DsmnruAppPlugin / Worker app-update logic / upload-Gofile / Firestore / Resend / Firebase auth / website / signing configuration.

…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>
@Lav-developer
Lav-developer merged commit 4092849 into android-app Sep 13, 2026
6 checks passed
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.

1 participant