refactor(forgejo): share actor token helpers #747
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pdurlej/platform!747
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "codex/issues/726-forgejo-helper-cleanup"
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
Stacked on #746 (
codex/openai-saver-pilot). Do not merge before #746 lands, or rebase/retarget this branch ontomainafter #746 is merged.Canary Context Pack
Product story
Forgejo service-actor tooling should resolve one token env name per actor everywhere. This removes the latent failure where
platform-orchestratorcan work in one control-plane path and silently miss its token in another.What changed
platformctl.tools.forgejo_helperswithforgejo_token_env_name,resolve_forgejo_actor_token, and sharedverify_forgejo_actor.run_review.py,pr_sanity.py, CLI identity doctor, and identity doctor CLI through the shared helper._emitno-op branch, reusedEXIT_UNKNOWN_PARTIALas the CLI unknown-state code, and importedfcntlonce in telemetry.platform-orchestratorresolvingFORGEJO_TOKEN_PLATFORM_ORCHESTRATORin PR sanity and review comment paths.Why it changed
Issue #726 identified inconsistent
.upper()vs.upper().replace('-', '_')token lookup across Forgejo write helpers.Files touched
control-plane/platformctl/tools/forgejo_helpers.pycontrol-plane/platformctl/tools/run_review.pycontrol-plane/platformctl/ci/pr_sanity.pycontrol-plane/platformctl/tools/identity_doctor.pycontrol-plane/platformctl/cli.pycontrol-plane/platformctl/telemetry.pycontrol-plane/platformctl/tests/test_forgejo_helpers.pycontrol-plane/platformctl/tests/test_glm_comment_hook.pycontrol-plane/platformctl/tests/test_pr_sanity.pyRelevant context
state/waves/2026-06-08-openai-saver-deslop/codex/codex-packet.mdRuntime evidence
No runtime mutation. Local test evidence only.
Known constraints
This touches Forgejo token resolution and actor verification, so route as
class/security-sensitiveand require full canary.Explicit out-of-scope
Requested decision
Review the stacked diff after #746, then rebase/retarget to
mainor merge in order.Merge blockers
mainSpec sources read
state/waves/2026-06-08-openai-saver-deslop/codex/codex-packet.md: pilot execution packetcontrol-plane/platformctl/tools/run_review.py: token lookup and actor verification call sitescontrol-plane/platformctl/ci/pr_sanity.py: PR sanity comment/review token pathscontrol-plane/platformctl/cli.py: identity doctor token lookup and_emitcontrol-plane/platformctl/tools/identity_doctor.py: Forgejo actor checkcontrol-plane/platformctl/telemetry.py: duplicated localfcntlimportcontrol-plane/platformctl/tests/test_pr_sanity.py: regression coveragecontrol-plane/platformctl/tests/test_glm_comment_hook.py: regression coverageRefs #726
Patchwarden PR sanity
advisory_findings747088448211e9e5c8527be034685501b792bfb1a12presentDeterministic findings
No deterministic findings.
Model reviewers
global-glm/glm-5.1:cloudStatus:
okVerdict:
NOT_OKhighBreaking change: pr_sanity.py env var name normalization differs from prior behaviorpr_sanity.py lines 628,640 previously usedf"FORGEJO_TOKEN_{actor.upper()}"(no replace), now usesresolve_forgejo_actor_tokenwhich applies.replace('-', '_'). For actor='platform-orchestrator', old env wasFORGEJO_TOKEN_PLATFORM-OR`highCanary 3+3 not run on security-sensitive token resolution changePR description states 'Canary status: missing — fire canary 3+3 manually before merge' and 'class/security-sensitive'. Token resolution is security-critical path.lowidentity_doctor success detail now uses actor param instead of API-returned loginidentity_doctor.py line 84: old code returnedf"login={login}"using the value from API response, new code returnsf"login={actor}"using the parameter. While equivalent after verification passes, this loses the defense-in-depth propertglobal-deepseek/deepseek-v4-pro:cloudStatus:
okVerdict:
OKlowExit code constant may differ from original valuecontrol-plane/platformctl/cli.py: removed localEXIT_UNKNOWN_STATE = 8and importedEXIT_UNKNOWN_PARTIAL as EXIT_UNKNOWN_STATEfrom.plan. The value ofEXIT_UNKNOWN_PARTIALis not visible in the diff; if it differs from 8, scripts rEXIT_UNKNOWN_PARTIALinplan.pyequals 8, or document the change if intentional.lowActor verification timeout increased in run_review.pycontrol-plane/platformctl/tools/run_review.py: old local_verify_actordefaulted totimeout_s=10; new sharedverify_forgejo_actordefaults to 15. Call sites inrun_review.pydo not override, so timeout changes from 10s to 15s.redteam/kimi-k2.6:cloudokOKPolicy notes
PLATFORMCTL_PR_SANITY_REDTEAM_MODELis configured.