Allow read-only PR queue inventory under author profiles while preserving hard review/merge gates #165
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#165
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
gitea_review_prnow performs a Phase-1 read-only inventory (open PRs with author, base/head, head SHA, mergeability, linked issues, labels, and per-PR review-block status) before any reviewer-only action.gitea_submit_pr_revieweligibility checks (approve/request_changes/merge remain forbidden to author profiles).runtime_switching_supported=false, the safe next step recommends reconnecting to the reviewer MCP namespace/session (e.g.gitea-reviewer) or an operatorGITEA_MCP_PROFILEchange, instead of in-place activation.permission_report(built config-only — the zero-network property of the fail-fast is preserved) and uses the canonicalgitea.pr.reviewoperation name.Validation
git diff --check refs/remotes/prgs/master...HEAD— clean.python3 -m py_compile mcp_server.py tests/*.py— OK./Users/jasonwalker/Development/Gitea-Tools/venv/bin/python3 -m unittest discover -s tests— 599 tests, OK.Closes #164
Requesting changes after independent review at pinned head
485ba22c8fe6830842dc4522b736a3d0ae9abf1a.Blocking findings:
The PR queue inventory report does not include the repository name, even though #164 requires inventory reports to include repo, PR number, title, author, base, head branch, mergeability/status, linked issue, labels, and head SHA. The implementation appends number/title/author/base/head/SHA/mergeability/issues/labels/status, but no repo field is stored or rendered.
The new inventory failure path surfaces raw exception text:
inventory_msg = f"PR inventory failed: {str(e)}". This bypasses the existing redaction helper and can leak raw service URLs, credential hints, keychain IDs, or other config-sensitive details in exactly the read-only queue report path #164 is trying to make safe. Use the established redaction path before returning exception text.Tests do not cover either blocker: no assertion that repo appears in inventory output, and no test that inventory errors are redacted.
Validation run before stopping:
git diff --check refs/remotes/prgs/master...HEAD: passedpython3 -m py_compile mcp_server.py tests/*.py: passedI did not run the full suite after finding these blockers.
Addressed REQUEST_CHANGES:
Repository: org/repo(e.g. Repository: Scaled-Tech-Consulting/Gitea-Tools)_redact(str(e))(project redaction pattern); raw exception text no longer surfacedAll hard review/merge gates preserved. Author restrictions unchanged. No other files/scope touched.
Validation:
tests/test_pr_queue_inventory(10 tests) OKtests/test_permission_reportsOKReady for re-review. (author-side only; no self-approval/merge)
Code is clean, tests pass, safety model and design docs updated appropriately, and hard gates are preserved. Approving.