fix(gate): stop classifying stale-runtime blocks as permission denials (Closes #897) #901
Open
jcwalker3
wants to merge 1 commits from
fix/issue-897-permission-stale-runtime-classification into master
pull from: fix/issue-897-permission-stale-runtime-classification
merge into: :master
:master
:feat/issue-643-request-preview-initiate
:feat/issue-641-runtime-session-view
:feat/issue-663-restart-classes
:fix/issue-897-permission-stale-runtime-classification
:feat/issue-661-drain-proof-hard-gate
:fix/issue-854-semantic-container-exclusion
:issue-640
:fix/issue-682-starlette-httpx2
Labels
Clear labels
allocator
anti-stomp
architecture
bug
chore
codex
concurrency
contamination
control-plane
dashboard
database
design
documentation
enhancement
gitea
glitchtip
important
incident
incident-bridge
integration
jenkins
labels
leases
mcp
mcp-health
mcp-menu
multi-project
mutating
nice-to-have
observability
portability
preflight
protected-branch
queue
read-only
reconnect
recovery
refactor
release
reliability
resumable-review
reviewer
roadmap
safety
security
self-hosted
sentry
stale-runtime
status:blocked
status:in-progress
status:pr-open
status:ready
terminal-lock
testing
tracker
type:bug
type:feature
type:feature
type:guardrail
visibility
workflow
workflow-hardening
workflow-hardening
Controller-owned work allocator
Prevent concurrent LLM session stomping
Architecture / structural design
OpenAI Codex client / workflow session surface
Concurrent session safety
Workflow or session contamination incident
MCP control-plane coordination and allocation authority
MCP operational dashboard/queue view
Internal coordination storage (SQLite/Postgres)
Design / investigation, no implementation
Docs / runbooks
New feature or improvement
Gitea MCP workflow
GlitchTip integration
Operational or process incident requiring durable audit trail
Sentry-to-Gitea incident bridging
Integration testing
Jenkins integration
Label taxonomy management
Lease adopt/release/expire lifecycle
MCP server / tooling
MCP namespace and runtime health
MCP menu surface
Work spanning multiple monitoring projects or Gitea repos
Mutating action; requires gating
Observability, metrics, traces, error reporting
Cross-platform / portability
Shared preflight gates before mutation
Protected branch / stable-branch policy concern
Work queue visibility and allocation
Read-only, no mutation
MCP client reconnect/reload recovery path
Recovery paths for stale/foreign leases
Code refactor / restructure
Release / versioning
Reliability / failure handling
Persist and resume prepared review verdicts across sessions
Reviewer workflow tooling
Roadmap / umbrella issue
Safety rails and fail-closed mutation guards
Security / trust boundary
Self-hosted infrastructure integration
Sentry error monitoring integration
Stale backend daemon / runtime-vs-master parity failures
Issue is blocked
Issue is being worked on
Issue has an open pull request
Issue is ready for work
Terminal review lock (#332) path
Tests / test coverage
Issue tracker hygiene / meta
Bug or defect
Feature or enhancement
Feature or enhancement
Safety gate or guardrail
Workflow state visibility for LLMs/operators
Cross-tool workflow
LLM workflow coordination hardening
LLM workflow coordination hardening
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Scaled-Tech-Consulting/Gitea-Tools#901
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Closes #897.
Stale-runtime and runtime-mode mutation refusals were returned as permission denials:
permission_reportnamed a permission the active profile already held and recommendedgitea_activate_profile/ session switch. That diagnosis is wrong and the recovery is hazardous (#685 reconnect-only; #690/#714 no mid-session role switch).Changes
_build_operation_gate_refusal:blocker_kind=runtime_reconnect_requiredfor master parity staleness (parity heads + reconnect-only action; nopermission_report)blocker_kind=runtime_mode_blockedfor stable-control runtime blocks (nopermission_report)blocker_kind=permission_deniedfor true profile denials (permission_reportretained)_profile_operation_gatecollects all refusal classes (no short-circuit)_profile_permission_blockuses the typed builder (covers mark/create/mutation paths)_permission_block_reportfails closed asdiagnostic_defectwhen the active profile already holds the opTests
Role matrix: author / reviewer / merger / reconciler — stale+permitted, fresh+forbidden, stale+forbidden, create_issue regression.
Head
fix/issue-897-permission-stale-runtime-classification6e6ca9433873056c7a84d2a1ef3590323ea5a636branches/issue-897-permission-stale-runtimeCanonical PR state
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #901
issue: none
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 19262-c1d8c36e6171
worktree: branches/issue-897-permission-stale-runtime
phase: claimed
candidate_head: none
target_branch: master
target_branch_sha: none
last_activity: 2026-07-25T06:04:24Z
expires_at: 2026-07-25T06:14:24Z
blocker: none
Canonical PR State
STATE: reviewer-approved
WHO_IS_NEXT: merger
NEXT_ACTION: merge PR 901 at head
6e6ca94338NEXT_PROMPT:
WHAT_HAPPENED: Formal review completed by sysadmin under prgs-reviewer profile. PR #901 correctly addresses #897 by stopping misclassification of stale-runtime and runtime-mode refusals as permission denials.
WHY: All acceptance criteria A-H verified in code and tests. Focused test suite passed cleanly (23 tests).
ISSUE: #897
HEAD_SHA:
6e6ca94338REVIEW_STATUS: APPROVED
MERGE_READY: true
BLOCKERS: none
VALIDATION: pytest tests/test_issue_897_permission_stale_runtime_classification.py tests/test_permission_reports.py (23 passed)
LAST_UPDATED_BY: sysadmin
NATIVE_REVIEW_PROOF: transport=native_mcp; entrypoint=mcp_server; token_fingerprint=4539170d8551c07a
Detailed Review Summary
PR #901 addresses issue #897 by ensuring stale-runtime and runtime-mode refusals are properly classified as system/runtime gate failures rather than profile permission denials.
Key verifications:
blocker_kind=runtime_reconnect_required, runtime-mode refusals useblocker_kind=runtime_mode_blocked, and true profile denials useblocker_kind=permission_denied.permission_report: Stale and runtime-mode refusals do not attachpermission_reportor claim missing permissions that the active profile already holds._permission_block_reportintegrity: Flagsdiagnostic_defect: Truewhen active profile holds operation.stale_runtime_reasonsandpermission_block_reasons.gitea_mcp_server.pyandtests/test_issue_897_permission_stale_runtime_classification.py. All 23 tests pass cleanly.repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #901
issue: none
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 19262-c1d8c36e6171
worktree: branches/issue-897-permission-stale-runtime
phase: released
candidate_head: none
target_branch: master
target_branch_sha: none
last_activity: 2026-07-25T06:09:38Z
expires_at: 2026-07-25T06:19:38Z
blocker: manual-release
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.