fix(forgejo): add deploy runner scope doctor #286
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pdurlej/platform!286
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "codex/260/proper-fix"
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
Future agents must be able to read the deploy lane as green when it is green. Issue #260 made the deploy runner stay active but fail to pick up trusted-main jobs until the watchdog restarted it, which creates a recurring false-fire signal for every later cutover session.
What changed
scripts/forgejo/deploy-runner-scope-doctor, a check-first rs2000 tool that diagnoses the deploy runner scope invariant and, only with--apply, backs up Forgejo Actions tables before repairing the known bad runner scope.action_runnershape:rs2000-deploy-hostmust be repository-scoped asowner_id=0, repo_id=35.Why it changed
RCA found that the active deploy runner row is in a combined owner+repo scope (
owner_id=1, repo_id=35). Forgejo's Actions task-version model tracks global, owner, and repository scopes separately, not combined owner+repo polling scope. The runner can therefore cache a task version that does not change on new repository jobs; a service restart resets the cached version and makes pickup work again.Files touched
scripts/forgejo/deploy-runner-scope-doctordocs/ci/runner-contract.mdrunbooks/forgejo-actions-runner.mdtests/test_deploy_runner_scope_doctor.pyRelevant context
scripts/forgejo/deploy-runner-watchdogremains as diagnostics/belt-and-suspenders only.Runtime evidence
Read-only live check through the new script confirmed the expected repairable state:
Earlier RCA evidence on #260 showed fresh trusted-main runs stuck with
task_id=0until watchdog restart, then assigned immediately after runner restart.Known constraints
--applyis a sacred-path-adjacent production DB write and remains operator-gated at apply time.owner_id=1, repo_id=35 -> owner_id=0, repo_id=35state.0600.Explicit out-of-scope
Requested decision
Review/merge the repo-side safety tool and documentation. After merge, operator can approve the live repair separately with an explicit gate.
Merge blockers
--apply.action_runnerupdate.Spec sources read
prompts/codex-260-fix-plus-umami-probe-2026-05-14.md— dispatch and hard gates.decisions/0018-agentic-first-fix-root-causes.md— no recurring workaround framing.docs/ci/runner-contract.md— deploy runner contract update target.runbooks/forgejo-actions-runner.md— operational runbook target.scripts/forgejo/deploy-runner-watchdog— existing watchdog behavior and diagnostic context./tmp/forgejo-src/models/actions/runner.go— runner scope model used in RCA./tmp/forgejo-src/models/actions/tasks_version.go— task-version scope model used in RCA./tmp/forgejo-src/routers/api/actions/runner/runner.go— runner polling behavior used in RCA./tmp/forgejo-runner-src/internal/app/poll/poller.go— runner cached task-version behavior used in RCA.Test plan
Read-only live diagnostic:
Refs #260