MCP Control Plane: charter-compliant autonomous task selection (umbrella) #989
Open
opened 2026-07-31 10:14:52 -05:00 by jcwalker3
·
0 comments
No Branch/Tag Specified
master
fix/issue-987-native-mcp-bootstrap
feat/issue-985-project-scoped-launcher-identity
fix/issue-983-cross-repo-base-ref
feat/issue-980-stale-worker-retirement
fix/issue-975-client-identity-heartbeat
fix/issue-973-cross-repo-canonical-roots
fix/issue-970-safely-resolve-missing-worktrees
fix/issue-969-native-mcp-bootstrap
feat/issue-664-break-glass-restart
feat/issue-708-mcp-namespace-attachment
feat/issue-665-restart-audit
fix/issue-700-durable-walls
fix/issue-704-prevent-env-workspace-bindings
feat/issue-707-cross-project-boundaries
fix/issue-690-review-profile-switch-guard
fix/issue-953-bootstrap-lock-provenance
feat/issue-949-native-fleet-inventory
fix/issue-943-runtime-context-helpers
fix/issue-945-owning-pr-renewal-evidence
fix/issue-941-scope-guard-bootstrap-wiring
docs/issue-930-remote-mcp-coupling-inventory
fix/issue-892-author-bootstrap-deadlock
fix/issue-686-detect-reject-manual-mcp
fix/issue-672-mcp-config-drift
fix/issue-689-deterministic-mcp-namespace
feat/issue-666-concurrent-mcp-restart-tests
feat/issue-659-maintenance-drain-mode
feat/issue-648-notifications-console
fix/issue-670-direct-master-incident
feat/issue-644-console-recovery
feat/issue-650-providers-insights
feat/issue-669-scoped-component-recovery
docs/issue-668-mcp-ha-rolling-restart
feat/issue-667-console-restart-controls
feat/issue-645-linkage-console
feat/issue-643-request-preview-initiate
fix/issue-897-permission-stale-runtime-classification
feat/issue-641-runtime-session-view
feat/issue-663-restart-classes
feat/issue-661-drain-proof-hard-gate
fix/issue-854-semantic-container-exclusion
issue-640
fix/issue-682-starlette-httpx2
v1.1.0
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
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
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
Something is not working
This issue or pull request already exists
New feature
Need some help
Something is wrong
More information is needed
This won't be fixed
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Scaled-Tech-Consulting/Gitea-Tools#989
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.
Problem
The approved charter requires every worker to follow inspect -> choose -> derive role -> validate -> claim -> work -> release -> reassess. A worker begins uncommitted, inspects authoritative Gitea state, compares candidates, chooses independently, derives a temporary role from that choice, asks the MCP to validate, claims, completes one bounded cycle, releases, and reassesses.
The implemented system runs a different order: a worker starts inside a role-bound namespace and obtains its task from a controller-owned allocator. Task selection, role derivation, and claim authority therefore sit in the wrong components.
This umbrella coordinates the architecture and sequencing that corrects it. It is not a rewrite of the safety substrate.
Charter connection
Supports all twelve fundamental-workflow steps and governs remediation needed to operationalize non-negotiable principles 1 through 14. Directly governed by:
Verified current gap
Verified against live state at master
0ba19c8436d292c813ff04d34cdf82cf23a0adc0:Role-bound worker entry. Every namespace binds a fixed role profile at session start; identity surfaces report a role kind before any task is chosen. There is no neutral entry.
Allocator-selected work under #600. The allocator's contract instructs workers not to self-select and to call it instead; with apply enabled it atomically assigns and leases. Closed issue #600 states "LLMs should not manually choose a PR/issue when using the standard workflow" and "The allocator must reserve the selected item atomically before returning it."
Role-oriented recommendations under #605. The only unified queue surface emits a primary next-safe-action and per-role next targets. Closed issue #605 requires "exact prompts for next safe author/reviewer/merger/controller action" and records that "assignment still goes through the allocator (#600)."
Database-authoritative claims. Workflow leases report
authoritative_source: control_plane_db,file_lock_only: false,comment_lease_only: false. Active ownership is not machine-discoverable in Gitea.Incomplete neutral project-state inspection. The neutral list operations express none of priority, urgency, impact, claims, or dependencies. The issue listing exposes no pagination inputs and no completeness metadata and truncates silently — a request limited to 50 returned exactly 50 with no signal. The only surface asserting inventory completeness is the non-neutral dashboard.
Missing authoritative state. The repository label catalog contains no representation for priority, urgency, project impact, or blocked-pending-clarification. Dependencies exist durably but in the control plane, not Gitea. Active claims are exposed only in aggregate.
Missing sanctioned relationship-write operations. No native operation creates a Gitea parent/child or hard-dependency relationship. The dependency-edge listing is read-only and its contract states edges are recorded by the allocator — so the only mechanism that currently produces dependency edges is the component this program removes from normal operation.
Unsafe conflation of commenting with title/body editing. Capability resolution maps the issue-edit task to the issue-comment permission, and no distinct issue-edit permission exists in any profile. Comment authority is being accepted as proof of authority to rewrite an issue's title and body.
Safety-infrastructure status
Substantial reusable safety infrastructure exists, but individual guarantees must be verified and may remain pending, incomplete, or defective.
No child may assume a guarantee holds because a related issue or tool exists.
Verified reusable mechanisms — observed live during this program: authenticated identity and identity match; repository and session binding; the master-parity mutation gate with enforcement flag; runtime provenance; capability resolution and per-profile allow and forbid sets; caller-addressable lock and lease acquisition writing durable control-plane rows; author-versus-approver eligibility refusal; typed fail-closed refusals reporting no mutation performed.
Claimed but unverified: exact-head approval enforcement and approval invalidation after new commits — specified in #916, which is open with no labels, no comments, and no linked pull request; no enforcement path was inspected. Handoff durability. Reconciliation completeness.
Open remediation: #793 read-side generation unchecked in mutation verification; #792 terminal retirement unimplemented; #952 inspector, dashboard, resolver, and executor disagree on one lease state; #890 seven ownership stores disagree; #891 four-step finalization not transactional, requiring #816; #889 capability-call adjacency; #895 failure reporting lost after a hard stop; #873 author workflow loading.
New requirements introduced by this program: Gitea-authoritative active-claim record and reconciliation; field authorities for priority, dependencies, urgency, impact, readiness, clarification state, and claims; the blocked-pending-clarification marker; sanctioned structured relationship operations; a distinct issue-edit permission; neutral worker entry and task-scoped capability lifecycle; unified neutral inventory; unified validate-and-claim; the thin worker surface; allocator-first and role-first removal.
Scope
Establish the target architecture and the authority boundaries between the LLM, Gitea, the Gitea MCP, and the Control Plane. Define the remediation sequence and the integration gates. Link the bounded implementation issues. Prevent any child from independently reintroducing allocator-first or role-first behaviour. Track completion of the program.
Authority boundaries, binding on every child:
Integration gates. Children 1 through 5 must all integrate before certification under #963.
Non-goals
Functional requirements
The program is complete when a general worker executes the charter order end to end using only sanctioned native operations, and the MCP validates without allocating.
Anti-regression rule. No child may introduce, restore, or preserve: MCP-side ranking or recommendation on a normal worker path; a role or task-scoped capability bound before task selection; an active claim whose sole durable authority is the control-plane database; a rejection payload naming a substitute task; automatic retry of a failed claim; or a rollback path restoring allocator assignment.
Safety and authority boundaries
Preserve existing guarantees as classified above, verifying rather than assuming. Defective implementations may be corrected where a verified defect requires it.
Acceptance criteria
Required tests and validation
Linkage integrity across children. An anti-regression contract test asserting no normal worker path requires the allocator and no normal path emits a recommended task. Per-gate evidence recorded in Gitea.
Dependencies
Until Child 1 delivers sanctioned structured relationship operations, the references below are informative bootstrap evidence only. They must not be treated as machine-enforced hard dependencies. Child 1 must backfill the appropriate structured relationships.
Children 1 through 5. Consumed, not restated: #889, #890, #891, #895, #873, #952, #792, #793, #816. Referenced: #916, #963, #964, #987. Behaviour superseded by Child 5: #600, #605.
Deferred certification revision — #963. The approved expansion of #963 remains pending and was deliberately not applied. Capability resolution currently routes issue editing through the issue-comment permission, and no distinct issue-edit permission exists, so title and body edit authority is not safely established. #963 may be revised only after Child 1 delivers the distinct edit permission and the author profile is intentionally granted it. When revised, #963 must preserve its existing five-client canary and negative-suite requirements and must add one-worker, two-worker, four-worker, and 10-consecutive-cycle charter certification requirements.
#916. Exact-head enforcement remains pending or Unverified unless later authoritative evidence proves delivery. #916 is untouched and remains so until Child 1 establishes the sanctioned blocked-pending-clarification marker and policy.
Compatibility and rollout
Children 1 through 3 are additive. Compatibility is proven by schema-compatibility and semantic contract tests under deterministic fixtures with nondeterministic values normalized — never by literal byte comparison of live responses, which legitimately carry changing project state. Intentional breaking changes require explicit versioning and a documented migration.
Allocator behaviour with apply enabled assigns and leases work and is therefore authoritative allocation, not advisory. Only a read-only, non-assigning invocation may be retained, and only outside the normal worker path.
Rollback behavior
Disabling the new workflow stops autonomous cycles safely: admit no new claims; allow an in-flight cycle to finish only while every identity, capability, parity, ownership, and lease gate remains valid; otherwise fail closed, record a durable handoff, release safely, and halt. Rollback must never restore allocator-selected assignment, allocator-created claims, permanent roles, or role-first task discovery.
Documentation requirements
One architecture document covering the authority table, the charter order, the integration gates, and the safety-classification table above.
Completion evidence
Child issue numbers, per-gate evidence, merge commits, the anti-regression test result, the reclassification of each relied-upon guarantee, the structured-relationship backfill, and the #963 certification result — all recorded on this issue.
Reusable existing issues, PRs, and primitives
#889, #890, #891, #895, #873, #952, #792, #793, #816, #916, #963, #964, #987. Live primitives: issue locking; reviewer and merger lease acquisition and adoption; task capability resolution; PR eligibility checking; master-parity assessment; dependency-edge listing; workflow-lease listing; PR review-feedback reading.
Fundamental-workflow stage supported
All stages — inspect -> choose -> derive role -> validate -> claim -> work -> release -> reassess. This issue owns architecture and sequencing only.
Implementation authorization
This umbrella coordinates architecture and sequencing and does not authorize implementation. Per AGENTS.md, work begins only under a bounded child issue, and every implementation PR must reference that child.
Bootstrap note
Child issues created during bootstrap reference this umbrella by issue number in their bodies. Those references are informative bootstrap evidence only. No native structured parent/child or dependency relationship was established, because no sanctioned relationship-write operation exists. Child 1 delivers those operations and backfills the relationships.