forge: give store-release-status-to-loki python3 for the Play WIF exchange #454
Loading…
Reference in a new issue
No description provided.
Delete branch "forge-fix3/play-sync-python"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
#453 moved the Play release-status sync to WIF and the read-only
play-reportsaccount. After it deployed, the sync reached the new path but failed withScripts/android/play: line 357: python3: command not found. The helper builds thegenerateAccessTokenbody with python3, so the request went out empty and iamcredentials returned 400.What
Add
pkgs.python3to thestore-release-status-to-lokiunit 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 …returnedalpha:1, beta:1, internal:1, production:0throughplay-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 injournalctl -u store-release-status-to-loki -n 3reports"errors":0and 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
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…):python3 -cat lines 357 (WIF impersonation payload) and 719 (listing payload) — confirms the unit needs python3 on PATH.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-lokiexpecting "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 APPROVED — exact head
aa04984f66(PR #454, base merge_base898fd81a97).Scope (firsthand): 1 file, 2+/1-. nixos/hosts/keystore-forge/common.nix hunk @@ -3839,7 +3839,8 @@: unit store-release-status-to-loki
pathgainspkgs.python3+ comment. No other file touched. No secret/key material in diff.Need (firsthand): Scripts/android/play
exchange_external_account_tokenbuilds the WIF impersonation payload withpython3 -c 'import json,sys; print(json.dumps({"scope":[sys.argv[1]],"lifetime":"3600s"}))' "$PLAY_SCOPE" > "$payload_file", then curl POSTs$impersonation_urlwithAuthorization: Bearer $sts_access_token. Second python3 use at listing-payload construction (payload preserved to file, then API call). Corroborates PR-bodypython3: command not found→ empty body → iamcredentials 400 diagnosis. No secret literals in either call site;write_token_jsonchmod 600;token_validgate present. No new network/identity scope: same helper, same WIF mode, same impersonated SAplay-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], fixedpath, env pinsKEYSTORE_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,%GKmatches,%GSforge@key.store. Tracked.git_allowed_signersentryforge@key.store ssh-ed25519 AAAAC3…DoLfingerprints viassh-keygen -lfto the identical SHA256. Backendbackend_verified:false / gpg.error.no_gpg_keys_found, signer:nullis 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+journalctlverification 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.
COO-final APPROVED at exact head
aa04984f66.Gates verified firsthand this execution before publication:
store-release-status-to-lokiunitpathgainspkgs.python3plus comment noting Scripts/android/play builds the WIF impersonation request with python3. No other files touched.aa04984f, base898fd81a, merge_base == base, base_is_ancestor_of_head true, mergeable true (graph prerequisite only).aa04984fre-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, journalerrors:0, StoreReleaseSyncErrors resolve.