Skip to content

feat(pm-console): the Android app is built on every change and released by Actions, and the site hands the release out - #12770

Merged
dezren39 merged 4 commits into
mainfrom
claude/pm-android-release
Nov 23, 2026
Merged

dezren39 merged 4 commits into
mainfrom
claude/pm-android-release

Conversation

@dezren39

@dezren39 dezren39 commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

What was asked

"Ensure apk is built automatically by github actions and automatically released."

What this does

Built automatically. The workflow was manual. It now runs on every push to main that touches the app, and by hand. Under the CI policy this is a release, not CI, so it keeps a push trigger limited to main and to the app's own files; the policy's table and its list of deploys say so.

Each build can install over the last. The version code was fixed at 3, so no build could ever have updated another. A build now takes its version from its commit: a code that rises with the commit's time, and a name that says the day and the commit. The branch build of this change came out as versionCode='21756193' versionName='2026.11.23-5bd2637', read from the APK itself with aapt2.

Released automatically, when signed. pm-stack/console/android/release.sh publishes a signed build twice, with nobody involved:

  • pm-console-android-v<code>: that build. Once made it is never changed.
  • pm-console-android: one address that always holds the newest build and is never taken back to an older one.

Each carries pm-console.apk, pm-console.apk.sha256 and a version.json. Neither is marked as the repository's latest release, since other things here have releases of their own.

Handed out without the laptop. /console/pm-console.apk (owner only) is now first the build at the release's fixed address, fetched by the edge and checked against the release's own version.json. If none is published, or it does not arrive as described, it is the laptop's build or the copy of it at Cloudflare, as before. The Phones page says which build the download is and who made it.

What it does not do: give GitHub the signing key

Signing needs the app's key, which is on the laptop and nowhere else. The workflow signs as soon as the pm-console-android environment holds it (two secrets, named in the workflow and the README). Until then a build is unsigned, kept as an artifact, and the run says nothing was released.

I built a switch in the console that had the laptop hand the key over, limited to runs on main. The session's safety check refused the commit that carried it, as it had earlier refused setting repository secrets from the laptop, so that mechanism is not in this pull request and nothing automated here holds or moves the key. Putting the key into the environment is the owner's to do by hand. The README says where and what.

Checked

  • The branch build in Actions: run 45096972036, unsigned as expected, release step skipped, version read back from the APK.
  • release.test.sh (new, run by pm-stack-tests): release.sh against a stand-in for gh that keeps releases in a directory and logs every call. Fifteen planted faults, each caught: the fixed address going back to an older build, the description put up before the build, either release marked as latest, the fixed release left a draft, the tag not moved or its failure failing the run, a rerun changing a numbered release, any code, name or commit id accepted, an incomplete numbered release built upon, a wrong sha256, the numbered release at the wrong commit.
  • bun test: 182 pass. Eleven planted faults in the edge's hand-out, each caught: the release not preferred, the file not checked (two ways), a mismatch trusted for ten minutes, GitHub asked on every request, the release forgotten or not retried when GitHub is out of reach, a withdrawn release kept, a description that is not one taken, the app crediting the wrong source.
  • Workflow lint and the CI policy check pass.

Not checked

  • A signed build released against the real GitHub. It cannot run until the key is in the environment. The gh calls release.sh makes are the ones the laptop's manual upload already used against the same draft release, plus create, edit and a tag move.
  • The edge fetching a real release, for the same reason: none is published yet. Until one is, GitHub answers 404 and the download is what it was.

Generated by Claude Code


Start Proof
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…released by Actions

The workflow was manual, and its build was signed and uploaded by hand
on the machine that holds the key.

- It runs on every push to main that touches the app, and by hand.
- A build names its own version from its commit: a code that rises
  with the commit's time, so each build installs over the one before.
  The code was fixed at 3, so no build could have updated another.
- With the signing key in the pm-console-android environment (an
  environment so that only runs on main can read it), the build is
  signed, checked against the certificate the site lists, and released
  with nobody involved (release.sh): as pm-console-android-v<code>,
  which is never changed again, and as pm-console-android, one address
  that always holds the newest build and is never taken back to an
  older one. Each carries the APK, its sha256 and a version.json.
- Without the key the build is unsigned, kept as an artifact, and the
  run says nothing was released.

release.sh is tested against a stand-in for gh; the CI policy's table
now gives the workflow its push venue.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YLT5K1QVuzZjfWGFhXSSNF
…ut the laptop

/console/pm-console.apk (owner only) is first the build at the
release's fixed address, fetched by the edge and checked against the
release's own version.json. If none is published, or it did not arrive
as described (GitHub out of reach, or a new build half put up), it is
the laptop's build or the copy of it at Cloudflare, as before.

GitHub is asked what the release holds at most every ten minutes; out
of reach, what it last said stands and it is tried again each minute. A
description that does not match its file is read again at the next
request. The Phones page says which build the download is and who made
it.

The workflow and the READMEs now say plainly how the signing key gets
to GitHub: by the owner's hand, into the pm-console-android
environment. Nothing automated holds or moves it.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YLT5K1QVuzZjfWGFhXSSNF
@dezren39
dezren39 requested a review from a team as a code owner November 23, 2026 02:04
@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

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.

2 participants