fix(ci): load automerge credentials from runner env #837
No reviewers
Labels
No labels
W6d-automerge-calibration
agent/claude-code
agent/codex
agent/hermes
agent/iskra
agent/ollama
agent/patchwarden
automerge-candidate
class/security-sensitive
cutover-gate
dependency/blocked
dependency/blocks-others
dependency/cross-repo
dependency/needs-confirmation
domain:agents
domain:ci
domain:docs
domain:forgejo
domain:infra
domain:memory
domain:runtime
domain:signal
domain:ux
flow/architecture
flow/blocked
flow/deployed
flow/done
flow/implementation
flow/intake
flow/maintained
flow/observed
flow/ready
flow/refining
flow/retired
flow/review
iterating
judge/codex-candidate
judge/hermes-candidate
judge/low-confidence
judge/needs-refinement
judge/operator-needed
judge/p0
judge/p1
judge/p2
judge/p3
judge/park
judge/patchwarden-candidate
judge/stale-priority
kind/adr
kind/bug
kind/chore
kind/feature
kind/infra
kind/ops
kind/refactor
kind/research
large-impact
merge/auto
merge/manual
merge/manual-dependency-conflict
merge/manual-failing-tests
merge/manual-merge-conflict
merge/manual-missing-review
merge/manual-operator-preference
merge/manual-red-zone
merge/manual-security-sensitive
merge/manual-unclear-scope
merge/manual-unknown
meta
mode:operator-only
mode:patchwarden-iskra-approved
mode:safe-auto
needs-operator-decision
needs-triage
not-ready
observed/erroring
observed/needs-followup
observed/pending
observed/retire-candidate
observed/unused
observed/used
operator-emotional
owner-attention
phase/02
phase/03
priority:p0
priority:p1
priority:p2
priority:p3
proposed
ready-for-agent
ready-for-operator
recovery
review:claude-reviewed
review:codex-reviewed
review:dziadek-reviewed
review:needs-human
risk/exposure
risk/process
risk/product
risk/runtime
safety:external-write
safety:no-prod-mutation
safety:prod-impact
safety:secret-touch
size/large
size/medium
size/small
size/tiny
size/unknown
source/adr
source/agent-generated
source/manual
source/operator-chat
source/voice-note
status:blocked
status:codex-ready
status:merged:pending-evidence
status:needs-evidence
status:operator-needed
status:parked
tier/full
tier/lite
tier/stacked
tier:0-platform-substrate
tier:1-iskra-value-layer
tier:2-tools-products-modules
type:bug
type:chore
type:docs
type:feat
type:policy
type:research
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pdurlej/platform!837
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "codex/w6d-automerge-token-bridge"
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?
Canary status: missing - fire canary 3+3 manually before merge
Canary Context Pack
Product story
W6d is supposed to let Patchwarden-approved platform PRs move without Piotr having to babysit every merge. The previous pilot reached readiness but could not execute because the merge token was not available to the workflow.
What changed
automerge-pilotnow loads a runner-localPLATFORM_AUTOMERGE_ENVfile ondeploy-hostduring trustedworkflow_dispatchruns.write_canary_env.py.PLATFORM_AUTOMERGE_READ_TOKENandPLATFORM_AUTOMERGE_BOT_TOKENare exported for later automerge steps.Why it changed
The runner had a valid-looking canary env path, but the W6d workflow expected
PLATFORM_AUTOMERGE_BOT_TOKENin its own job environment. Adding it to the general PR-sanity env would widen the trust boundary, because pull-request workflows source that file for model review/comments.Files touched
.forgejo/workflows/automerge-pilot.ymlcontrol-plane/platformctl/tests/test_forgejo_ci_scripts_contract.pyrunbooks/forgejo-actions-runner.mdRelevant context
write_canary_env.pyRuntime evidence
Local only in this PR. Prior read-only rs2000 audit found
PLATFORM_AUTOMERGE_BOT_TOKENmissing from the runner env whileFORGEJO_TOKEN_*values existed. Runtime regeneration is still required after merge.Known constraints
PLATFORM_AUTOMERGE_BOT_TOKENinPLATFORMCTL_CANARY_ENV.Explicit out-of-scope
Requested decision
Approve this repo contract change, then regenerate
PLATFORM_AUTOMERGE_ENVon rs2000 and rerun W6d against #826.Merge blockers
PLATFORM_AUTOMERGE_BOT_TOKENto pull_request jobs.Spec sources read
.forgejo/workflows/automerge-pilot.yml- W6d workflow contract.control-plane/platformctl/ci/write_canary_env.py- runner env bridge metadata and rendering.control-plane/platformctl/tests/test_forgejo_ci_scripts_contract.py- workflow contract tests.runbooks/forgejo-actions-runner.md- runner/local env operating contract.docs/ci/README.mdanddocs/ci/runner-contract.md- current CI env boundary references.Verification
PYTHONPATH=control-plane python3 -m pytest control-plane/platformctl/tests/test_forgejo_ci_scripts_contract.py -k 'automerge_pilot or write_canary_env'PYTHONPATH=control-plane python3 -m pytest control-plane/platformctl/tests/test_forgejo_ci_scripts_contract.pyPYTHONPATH=control-plane python3 -m pytest control-plane/platformctl/tests/test_automerge_actor.py control-plane/platformctl/tests/test_forgejo_ci_scripts_contract.pygit diff --checkRefs #823
Refs #826
Superseded: this PR was opened with the wrong local Forgejo credential (
ollama) from the Codex workstation. Recreating with thecodexactor for audit-trail correctness.Patchwarden PR sanity
Verdict: BLOCKED - deterministic blocker found.
Next step: Fix the deterministic blocker(s), push a new head, and rerun PR sanity.
8373981be464493fb1a62408a5ab65488220c546383blockeddegradedmissingglm-5.2:cloud,deepseek-v4-pro:cloud,kimi-k2.7:cloudWhat I checked
3blocked3Approval Handoff
not_ready_deterministic_blockerRequired Fixes
blockersecurity-sensitive-label-missingSecurity-sensitive change missing class/security-sensitive label -.forgejo/workflows/automerge-pilot.yml.forgejo/workflows/automerge-pilot.ymlclass/security-sensitiveand route through the full security-sensitive review lane before merge.Non-blocking Notes
infosensitive-path-touchedSensitive path touched -.forgejo/workflows/automerge-pilot.yml.forgejo/workflows/automerge-pilot.ymlReviewer Details
Model reviewer lanes
global-glm/glm-5.2:cloudStatus:
okVerdict:
OKlowSourcing entire env file widens in-step trust surface beyond the two intended tokens.forgejo/workflows/automerge-pilot.yml:set -a/. "$PLATFORM_AUTOMERGE_ENV"/set +aimports every variable in the file into the step's process environment, then onlyPLATFORM_AUTOMERGE_READ_TOKENandPLATFORM_AUTOMERGE_BOT_TOKEN``lowSilent no-op when PLATFORM_AUTOMERGE_ENV unset may mask misconfiguration on trusted dispatch.forgejo/workflows/automerge-pilot.yml:if [ -z "${PLATFORM_AUTOMERGE_ENV:-}" ]; then echo "::notice::..."; exit 0; ficontinues readiness without the bot token, deferring failure to downstream automerge steps where the root cause is lessglobal-deepseek/deepseek-v4-pro:cloudokOKredteam/kimi-k2.7:clouderror-Policy notes
Pull request closed