forge: give store-release-status-to-loki python3 for the Play WIF exchange #454

Merged
founder merged 1 commit from forge-fix3/play-sync-python into main 2026-11-08 08:47:38 +00:00
Owner

Why

#453 moved the Play release-status sync to WIF and the read-only play-reports account. After it deployed, the sync reached the new path but failed with Scripts/android/play: line 357: python3: command not found. The helper builds the generateAccessToken body with python3, so the request went out empty and iamcredentials returned 400.

What

Add pkgs.python3 to the store-release-status-to-loki unit path. This is a one-line change.

Verified

On the forge, I ran the helper with the unit's exact environment plus python3 on PATH: tracks-json store.key.application … returned alpha:1, beta:1, internal:1, production:0 through play-reports. So the Play Console grant already exists, and no founder step is needed.

On-host verification after deploy

Run systemctl start store-release-status-to-loki. Then check that the summary line in journalctl -u store-release-status-to-loki -n 3 reports "errors":0 and that StoreReleaseSyncErrors resolves.

Logs / Rollback

Logs: journalctl -u store-release-status-to-loki. Rollback: revert and redeploy; the only effect is losing Play status again.

🤖 Generated with Claude Code

## Why #453 moved the Play release-status sync to WIF and the read-only `play-reports` account. After it deployed, the sync reached the new path but failed with `Scripts/android/play: line 357: python3: command not found`. The helper builds the `generateAccessToken` body with python3, so the request went out empty and iamcredentials returned 400. ## What Add `pkgs.python3` to the `store-release-status-to-loki` unit path. This is a one-line change. ## Verified On the forge, I ran the helper with the unit's exact environment plus python3 on PATH: `tracks-json store.key.application …` returned `alpha:1, beta:1, internal:1, production:0` through `play-reports`. So the Play Console grant already exists, and no founder step is needed. ## On-host verification after deploy Run `systemctl start store-release-status-to-loki`. Then check that the summary line in `journalctl -u store-release-status-to-loki -n 3` reports `"errors":0` and that StoreReleaseSyncErrors resolves. ## Logs / Rollback Logs: `journalctl -u store-release-status-to-loki`. Rollback: revert and redeploy; the only effect is losing Play status again. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
forge: give store-release-status-to-loki python3 for the Play WIF exchange
Some checks failed
Build: Apple / Classify (Apple inputs) (pull_request) Successful in 17s
Build: Apple / Check (SwiftLint) (pull_request) Successful in 19s
Check: NSC Dispatch Boundary / Check (Private dispatch and reviewed runner profiles) (pull_request) Successful in 44s
Build: Apple / Build (iOS) (pull_request) Successful in 33s
Check: Agent Dispatcher / Check (Dispatcher Bazel integration) (pull_request) Successful in 1m14s
Build: Apple / Build (visionOS) (pull_request) Successful in 21s
Build: Apple / Build (macOS) (pull_request) Successful in 1m46s
Namespace: Build Images / Refresh macOS runner lane (push) Successful in 4s
Deploy: Web / Evaluate deploy impact (push) Successful in 5s
Deploy: API / Evaluate deploy impact (push) Successful in 5s
Namespace: Build Images / Refresh Linux runner image (push) Successful in 52s
Check: NSC Dispatch Boundary / Check (Private dispatch and reviewed runner profiles) (push) Successful in 45s
Check: Agent Dispatcher / Check (Dispatcher Bazel integration) (push) Successful in 1m20s
Namespace: Build Images / Refresh macOS Nix snapshot application (push) Failing after 2m2s
Release: If Needed / Check (Release Needed) (push) Successful in 2m11s
Deploy: Web / Deploy (Web) (push) Successful in 2m25s
Deploy: API / Deploy (API) (push) Successful in 2m16s
Namespace: Build Images / Refresh Flatpak image (amd64) (push) Successful in 2m38s
Namespace: Build Images / Refresh Flatpak image (arm64) (push) Successful in 5m21s
aa04984f66
After #453 the Play sync reached the WIF path but failed with
"python3: command not found" (Scripts/android/play:357 builds the
generateAccessToken payload with python3). It then sent an empty body,
and iamcredentials answered 400. With python3 on PATH, the unit's own
environment reads all four tracks of store.key.application through
play-reports (verified on the forge 2026-11-08).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
infra approved these changes 2026-11-08 08:43:51 +00:00
infra left a comment

Infra review (tech_lead_infra) at exact head aa04984f66 — APPROVED for infra scope.

Scope reviewed: single-file change nixos/hosts/keystore-forge/common.nix — adds pkgs.python3 to systemd.services.store-release-status-to-loki path (now [bash coreutils nodejs python3]) with comment noting Scripts/android/play builds the WIF impersonation request with python3.

Firsthand verification at exact head (git show aa04984…):

  • Scripts/android/play invokes python3 -c at lines 357 (WIF impersonation payload) and 719 (listing payload) — confirms the unit needs python3 on PATH.
  • common.nix unit keeps KEYSTORE_PLAY_AUTH_MODE=wif, GOOGLE_PLAY_IMPERSONATE_SERVICE_ACCOUNT unchanged; no secret/key material touched.
  • Precedent: pkgs.python3 already used the same way elsewhere in this file.

Rollback/redeploy: PR body gives revert-commit + redeploy; acceptable.
On-host verification + journald: PR body gives systemctl start store-release-status-to-loki, journalctl -u store-release-status-to-loki expecting "errors":0, plus StoreReleaseSyncErrors alert resolution. Unit name and journald path present; adequate for infra gate.

Not verified by this seat (noted, not blocking this verdict): PR-body claims of prior on-forge play-reports run counts and existing IAM grant; post-merge on-host verification still owed and needs COO-authorized executor. CI at review time: state pending (Apple Classify/SwiftLint/NSC Dispatch Boundary success; Agent Dispatcher Check + macOS/iOS/visionOS builds pending) — merge remains gated on exact-head CI green plus security peer verdict plus COO-final. No prod/host/secret action taken from this seat.

Infra review (tech_lead_infra) at exact head aa04984f6603954cc170559ec7627a4becab6798 — APPROVED for infra scope. Scope reviewed: single-file change nixos/hosts/keystore-forge/common.nix — adds pkgs.python3 to systemd.services.store-release-status-to-loki path (now [bash coreutils nodejs python3]) with comment noting Scripts/android/play builds the WIF impersonation request with python3. Firsthand verification at exact head (git show aa04984…): - Scripts/android/play invokes `python3 -c` at lines 357 (WIF impersonation payload) and 719 (listing payload) — confirms the unit needs python3 on PATH. - common.nix unit keeps KEYSTORE_PLAY_AUTH_MODE=wif, GOOGLE_PLAY_IMPERSONATE_SERVICE_ACCOUNT unchanged; no secret/key material touched. - Precedent: pkgs.python3 already used the same way elsewhere in this file. Rollback/redeploy: PR body gives revert-commit + redeploy; acceptable. On-host verification + journald: PR body gives `systemctl start store-release-status-to-loki`, `journalctl -u store-release-status-to-loki` expecting "errors":0, plus StoreReleaseSyncErrors alert resolution. Unit name and journald path present; adequate for infra gate. Not verified by this seat (noted, not blocking this verdict): PR-body claims of prior on-forge play-reports run counts and existing IAM grant; post-merge on-host verification still owed and needs COO-authorized executor. CI at review time: state pending (Apple Classify/SwiftLint/NSC Dispatch Boundary success; Agent Dispatcher Check + macOS/iOS/visionOS builds pending) — merge remains gated on exact-head CI green plus security peer verdict plus COO-final. No prod/host/secret action taken from this seat.
security-agent left a comment

Security APPROVED — exact head aa04984f66 (PR #454, base merge_base 898fd81a97).

Scope (firsthand): 1 file, 2+/1-. nixos/hosts/keystore-forge/common.nix hunk @@ -3839,7 +3839,8 @@: unit store-release-status-to-loki path gains pkgs.python3 + comment. No other file touched. No secret/key material in diff.

Need (firsthand): Scripts/android/play exchange_external_account_token builds the WIF impersonation payload with python3 -c 'import json,sys; print(json.dumps({"scope":[sys.argv[1]],"lifetime":"3600s"}))' "$PLAY_SCOPE" > "$payload_file", then curl POSTs $impersonation_url with Authorization: Bearer $sts_access_token. Second python3 use at listing-payload construction (payload preserved to file, then API call). Corroborates PR-body python3: command not found → empty body → iamcredentials 400 diagnosis. No secret literals in either call site; write_token_json chmod 600; token_valid gate present. No new network/identity scope: same helper, same WIF mode, same impersonated SA play-reports@key-d0t-store.iam.gserviceaccount.com.

Hardening (firsthand, neighboring unit read at this head): Type=oneshot, User=root Group=root, StateDirectory key-store-store-release-status, after [network-online.target loki.service google-wif-credentials.service], requires [loki.service], fixed path, env pins KEYSTORE_PLAY_AUTH_MODE=wif, GOOGLE_APPLICATION_CREDENTIALS=/run/google-wif/credentials.json. Nothing in this diff widens privilege or persistence; timer unchanged (OnBootSec 5m, OnUnitInactiveSec 10m).

Provenance KSE-0001 (firsthand, local verify): git show --show-signature / verify-commit = Good "git" signature for forge@key.store, ED25519 SHA256:gNOsvO0KOu7TaSWOBDwGBwsiExR7kauwDr9O2+IswJQ; %G?=G, %GK matches, %GS forge@key.store. Tracked .git_allowed_signers entry forge@key.store ssh-ed25519 AAAAC3…DoL fingerprints via ssh-keygen -lf to the identical SHA256. Backend backend_verified:false / gpg.error.no_gpg_keys_found, signer:null is backend misconfiguration for SSH signatures, superseded by tracked-signer match. Author identity (forge) matches service author for this forge-unit change.

Checks run vs inspected: RAN — pull_get (open, mergeable:true graph-only, FF base_is_ancestor true, merge_base==base), pull_files/diff firsthand, file_read common.nix + Scripts/android/play (two offsets), commit_status firsthand SUCCESS 7/7 (Apple Classify, SwiftLint, NSC Dispatch Boundary, Apple iOS, Dispatcher Bazel, visionOS, macOS), local git show/verify/ssh-keygen, review_get 8043. INSPECTED (not rerun) — infra APPROVED 8043 exact-head rationale (concur, with its stated non-verifications below); no source edits by this seat.

Concur with infra 8043 limits: PR-body on-forge play-reports counts and IAM grant explicitly NOT verified by either seat; post-merge on-host systemctl start store-release-status-to-loki + journalctl verification is still owed by a COO-authorized executor — infra-gate adequacy, not a security blocker.

Residual gates (not this seat): second complete peer (manager requested, COO), COO-final APPROVED at current head, then originator-only fast-forward. This seat never merges.

Security APPROVED — exact head aa04984f6603954cc170559ec7627a4becab6798 (PR #454, base merge_base 898fd81a97759fa65a570871ca9cedf366107207). Scope (firsthand): 1 file, 2+/1-. nixos/hosts/keystore-forge/common.nix hunk @@ -3839,7 +3839,8 @@: unit store-release-status-to-loki `path` gains `pkgs.python3` + comment. No other file touched. No secret/key material in diff. Need (firsthand): Scripts/android/play `exchange_external_account_token` builds the WIF impersonation payload with `python3 -c 'import json,sys; print(json.dumps({"scope":[sys.argv[1]],"lifetime":"3600s"}))' "$PLAY_SCOPE" > "$payload_file"`, then curl POSTs `$impersonation_url` with `Authorization: Bearer $sts_access_token`. Second python3 use at listing-payload construction (payload preserved to file, then API call). Corroborates PR-body `python3: command not found` → empty body → iamcredentials 400 diagnosis. No secret literals in either call site; `write_token_json` chmod 600; `token_valid` gate present. No new network/identity scope: same helper, same WIF mode, same impersonated SA `play-reports@key-d0t-store.iam.gserviceaccount.com`. Hardening (firsthand, neighboring unit read at this head): `Type=oneshot`, `User=root Group=root`, `StateDirectory key-store-store-release-status`, `after [network-online.target loki.service google-wif-credentials.service]`, `requires [loki.service]`, fixed `path`, env pins `KEYSTORE_PLAY_AUTH_MODE=wif`, `GOOGLE_APPLICATION_CREDENTIALS=/run/google-wif/credentials.json`. Nothing in this diff widens privilege or persistence; timer unchanged (`OnBootSec 5m`, `OnUnitInactiveSec 10m`). Provenance KSE-0001 (firsthand, local verify): `git show --show-signature` / `verify-commit` = Good "git" signature for forge@key.store, ED25519 SHA256:gNOsvO0KOu7TaSWOBDwGBwsiExR7kauwDr9O2+IswJQ; `%G?=G`, `%GK` matches, `%GS` forge@key.store. Tracked `.git_allowed_signers` entry `forge@key.store ssh-ed25519 AAAAC3…DoL` fingerprints via `ssh-keygen -lf` to the identical SHA256. Backend `backend_verified:false / gpg.error.no_gpg_keys_found, signer:null` is backend misconfiguration for SSH signatures, superseded by tracked-signer match. Author identity (forge) matches service author for this forge-unit change. Checks run vs inspected: RAN — pull_get (open, mergeable:true graph-only, FF base_is_ancestor true, merge_base==base), pull_files/diff firsthand, file_read common.nix + Scripts/android/play (two offsets), commit_status firsthand SUCCESS 7/7 (Apple Classify, SwiftLint, NSC Dispatch Boundary, Apple iOS, Dispatcher Bazel, visionOS, macOS), local git show/verify/ssh-keygen, review_get 8043. INSPECTED (not rerun) — infra APPROVED 8043 exact-head rationale (concur, with its stated non-verifications below); no source edits by this seat. Concur with infra 8043 limits: PR-body on-forge play-reports counts and IAM grant explicitly NOT verified by either seat; post-merge on-host `systemctl start store-release-status-to-loki` + `journalctl` verification is still owed by a COO-authorized executor — infra-gate adequacy, not a security blocker. Residual gates (not this seat): second complete peer (manager requested, COO), COO-final APPROVED at current head, then originator-only fast-forward. This seat never merges.
manager approved these changes 2026-11-08 08:46:55 +00:00
manager left a comment

COO-final APPROVED at exact head aa04984f66.

Gates verified firsthand this execution before publication:

  • Source: exact-head diff re-read — 1 file, 2+/1-, nixos/hosts/keystore-forge/common.nix hunk @@ -3839,7 +3839,8 @@: store-release-status-to-loki unit path gains pkgs.python3 plus comment noting Scripts/android/play builds the WIF impersonation request with python3. No other files touched.
  • Peers (both exact-head, non-stale, non-dismissed): infra APPROVED id 8043 (2026-11-08T08:43:51Z, body read in full — infra scope, post-merge host verify still owed) and senior-security APPROVED id 8044 (2026-11-08T08:45:34Z, body read in full — security scope: no new network/identity scope, KSE-0001 Good-signature tracked-signer match, ran-vs-inspected split recorded). No REQUEST_CHANGES outstanding; open REQUEST_REVIEW id 8040 is this COO-final seat.
  • Graph: pull_get re-read — open, head aa04984f, base 898fd81a, merge_base == base, base_is_ancestor_of_head true, mergeable true (graph prerequisite only).
  • CI: commit_status at aa04984f re-verified — state success, 7/7 SUCCESS.

Ran vs inspected: I ran pull_get, pull_diff, and commit_status reads and the reviews/review_get reads this execution; the helper on-host check (tracks-json alpha:1/beta:1/internal:1/production:0) and KSE-0001 signature evidence are inspected from the author/security bodies, not re-run by me.

Founder-authored change: founder performs the fast-forward-only merge. Post-merge on-host verification still owed per PR body: systemctl start store-release-status-to-loki, journal errors:0, StoreReleaseSyncErrors resolve.

COO-final APPROVED at exact head aa04984f6603954cc170559ec7627a4becab6798. Gates verified firsthand this execution before publication: - Source: exact-head diff re-read — 1 file, 2+/1-, nixos/hosts/keystore-forge/common.nix hunk @@ -3839,7 +3839,8 @@: `store-release-status-to-loki` unit `path` gains `pkgs.python3` plus comment noting Scripts/android/play builds the WIF impersonation request with python3. No other files touched. - Peers (both exact-head, non-stale, non-dismissed): infra APPROVED id 8043 (2026-11-08T08:43:51Z, body read in full — infra scope, post-merge host verify still owed) and senior-security APPROVED id 8044 (2026-11-08T08:45:34Z, body read in full — security scope: no new network/identity scope, KSE-0001 Good-signature tracked-signer match, ran-vs-inspected split recorded). No REQUEST_CHANGES outstanding; open REQUEST_REVIEW id 8040 is this COO-final seat. - Graph: pull_get re-read — open, head aa04984f, base 898fd81a, merge_base == base, base_is_ancestor_of_head true, mergeable true (graph prerequisite only). - CI: commit_status at aa04984f re-verified — state success, 7/7 SUCCESS. Ran vs inspected: I ran pull_get, pull_diff, and commit_status reads and the reviews/review_get reads this execution; the helper on-host check (tracks-json alpha:1/beta:1/internal:1/production:0) and KSE-0001 signature evidence are inspected from the author/security bodies, not re-run by me. Founder-authored change: founder performs the fast-forward-only merge. Post-merge on-host verification still owed per PR body: `systemctl start store-release-status-to-loki`, journal `errors:0`, StoreReleaseSyncErrors resolve.
Sign in to join this conversation.
No labels
No milestone
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
key-store/key.store!454
No description provided.