feat: block vague-reference issue creation with content preflight (Closes #582) #586
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#586
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
Adds a pre-create content gate to
gitea_create_issuethat fails closed withBLOCKED + DIAGNOSEwhen an issue's title/body is a vague placeholder reference to out-of-band draft content — "the drafted issue", "the prepared issue", "the issue we discussed", "the previous draft" — and no durable source pointer is present. Implements the #582 rule that an LLM must never fabricate issue content from stale chat memory.Closes #582
Changes
issue_content_gate.py(new):assess_issue_content/pre_create_issue_content_gate.#582,comment 8155, checked-in file path, URL, scratchpad path) — a pointer means the content is retrievable, so it is allowed.gitea_mcp_server.py: runs the gate after preflight purity, before duplicate search; returnsBLOCKED + DIAGNOSEnaming the exact vague/missing fields. Newallow_incomplete_contentoperator override (off by default). Empty body is NOT required — explicit title-only creation stays allowed, so existing callers keep working.tests/test_issue_content_gate.py(new): unit coverage for normalization, pointer detection, vague detection, and the assessment; MCP integration proving a vague prompt blocks without any API call, concrete content creates, and the override creates.create-issue.md: new §14a documenting the enforced preflight with valid/invalid prompt examples.Acceptance criteria mapping (#582)
issue_content_gatewired intogitea_create_issue.BLOCKED + DIAGNOSEwith exact fields when content is unavailable → block path listsmissing_fields/vague_fieldsand a diagnose string.Validation
tests/test_issue_content_gate.pyandtests/test_llm_workflow_split.pypass (63 passed) against the branch.py_compileclean.Note:
tests/test_mcp_server.py::TestMergePR::test_unknown_profile_blocksfails on this branch AND on unmodified master (reproduces with that file alone) — a pre-existing intra-file global-state leak in the review-mutation ledger (#332), untouched by this change. Diagnosed for separate tracking; not introduced here.Add a pre-create content gate to gitea_create_issue that fails closed with BLOCKED + DIAGNOSE when the title/body is a vague reference to out-of-band draft content ("the drafted issue", "the prepared issue", "the issue we discussed", "the previous draft") and no durable source pointer (existing issue/PR/comment, checked-in file, URL, or scratchpad path) is present. - issue_content_gate.py: assess_issue_content / pre_create_issue_content_gate with vague-phrase detection, durable-source-pointer escape hatch, and a domination check so long specific bodies are not falsely blocked. - gitea_create_issue: runs the gate after preflight purity, before duplicate search; new allow_incomplete_content override (off by default). Title-only creation stays allowed (no empty-body requirement) to preserve behavior. - tests/test_issue_content_gate.py: unit + MCP integration coverage. - create-issue.md: documents the enforced preflight with valid/invalid prompt examples. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #586
issue: #582
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 55582-e2f5256acef3
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr-586-issue-582
phase: claimed
candidate_head:
5debfcf178target_branch: master
target_branch_sha: none
last_activity: 2026-07-09T18:06:00Z
expires_at: 2026-07-09T20:06:00Z
blocker: none
Canonical PR State
STATE: approved
WHO_IS_NEXT: merger
NEXT_ACTION: merge PR #586 at expected head
5debfcf178after explicit operator authorizationNEXT_PROMPT:
WHAT_HAPPENED: Reviewed PR #586 for Issue #582. Adds issue_content_gate pre-create fail-closed for vague draft references without durable source pointers; wires into gitea_create_issue with BLOCKED+DIAGNOSE; docs §14a; tests pass. APPROVE at pinned head.
WHY: LLMs must not fabricate issues from stale chat memory; gate enforces durable content or source pointer with operator override only.
ISSUE: #582
HEAD_SHA:
5debfcf178REVIEW_STATUS: approved
MERGE_READY: yes
BLOCKERS: none
VALIDATION: pytest tests/test_issue_content_gate.py tests/test_llm_workflow_split.py -q -> 63 passed (6 subtests); worktree branches/review-pr-586-issue-582
LAST_UPDATED_BY: sysadmin (prgs-reviewer)
Review findings
adopted_at: 2026-07-09T18:19:02Z
adopted_by_identity: sysadmin
adopted_by_profile: prgs-merger
adopted_from_session_id: 55582-e2f5256acef3
adopted_from_profile: prgs-reviewer
adopted_from_reviewer_identity: sysadmin
adopted_from_comment_id: 8408
adoption_reason: merger-handoff-approved-head
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #586
issue: #582
reviewer_identity: sysadmin
profile: prgs-merger
session_id: 4927-7c2ab1af97cc
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/merge-pr-586
phase: adopted
candidate_head:
5debfcf178target_branch: master
target_branch_sha: none
last_activity: 2026-07-09T18:19:02Z
expires_at: 2026-07-09T20:19:02Z
blocker: none
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #586
issue: #582
reviewer_identity: sysadmin
profile: prgs-merger
session_id: 4927-7c2ab1af97cc
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/merge-pr-586
phase: released
candidate_head:
5debfcf178target_branch: master
target_branch_sha: none
last_activity: 2026-07-09T18:25:18Z
expires_at: 2026-07-09T20:25:18Z
blocker: post-merge-moot