feat(control-plane): add authoritative native MCP fleet inventory and duplicate-process detection #949
Open
opened 2026-07-27 21:04:33 -05:00 by jcwalker3
·
2 comments
No Branch/Tag Specified
master
feat/issue-664-break-glass-restart
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
feat/issue-708-mcp-namespace-attachment
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
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
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#949
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.
Related: #900, #948, #686, #689, #708, #634, #636, #430, #887, #929
Problem
The canonical workflow can independently prove revision parity through the five role namespaces, but no sanctioned native capability currently provides authoritative fleet-level evidence for:
Consequently, an LLM cannot satisfy the strict five-process/single-cohort safety gate without relying on shell process inspection, cached JSON, source inspection, or caller-supplied evidence. Those substitutes are not authoritative workflow evidence.
The nearest existing native surface is
gitea_assess_mcp_namespace_health, and it is not a substitute: it is scoped to a single named namespace, and it acceptsprocess,probe_result, andregistered_toolsfrom the caller. A capability whose inputs are supplied by the party it is meant to constrain cannot serve as authoritative fleet evidence.gitea_get_runtime_contextandgitea_assess_master_parityare likewise per-process — each proves something about the server answering the call, and nothing about the other four.This gap was exposed during cross-LLM validation after PR #944. All five namespaces independently reported parity at
82d71b77028a7abd4f8ab4a4e4d89658a187f73d, but strict fleet validation remained incomplete: five independent self-reports of the same revision do not prove that exactly five processes exist, that no sixth exists, or that all five belong to one client cohort.Required behavior
Add an authoritative, read-only control-plane capability that reports:
The expected PRGS fleet is:
gitea-author/prgs-authorgitea-controller/prgs-controllergitea-reviewer/prgs-reviewergitea-merger/prgs-mergergitea-reconciler/prgs-reconcilerExposure and permissions
The capability must:
gitea-controllergitea-reconcilerunknownfromhealthySuggested structured result
Include fields equivalent to:
inventory_completeconfigured_membersrunning_membersmissing_membersduplicate_membersunexpected_membersmixed_revisionmixed_cohortsingle_cohortexactly_one_per_profilemutation_gate_satisfiedblocked_reasonExact field names may follow existing repository conventions, but equivalent evidence is required.
Acceptance criteria
Non-goals
Those are separate workflows or issues.
Duplicate verdict
NOT a duplicate. Verified by reading the bodies and acceptance criteria of #900, #948, #686, #689, #708, #634, #636, #430, and #657.
mutation_gate_satisfiedverdict.Canonical issue state
Canonical Issue State
STATE:
in-progress
WHO_IS_NEXT:
author
NEXT_ACTION:
Implement the authoritative fleet inventory on branch feat/issue-949-native-fleet-inventory: a control-plane server-runtime registry written by each server process, a pure classification module, and a read-only gitea_assess_fleet_inventory tool, with regression tests for all fourteen acceptance criteria.
NEXT_PROMPT:
WHAT_HAPPENED:
Author claimed #949, bootstrapped worktree branches/issue-949-fleet-inventory on branch feat/issue-949-native-fleet-inventory from pinned base
82d71b7702, and surveyed the existing surfaces. No competing branch, worktree, pull request, lease, or assignee exists for this issue. The only active control-plane lease is the unrelated stale author lease on PR #906, which this work leaves untouched per the stated non-goals.WHY:
Every existing surface is per-process. gitea_get_runtime_context and gitea_assess_master_parity describe only the server answering the call. gitea_assess_mcp_namespace_health accepts process, probe_result, and registered_tools from the caller, so it cannot constrain the caller. control_plane_db.sessions records allocator task sessions, not server processes: nothing in the control plane records that a given MCP server process exists at all. The fix is therefore a control-plane record each server writes about itself at native transport bind, which no caller can supply, plus a pure classifier that consumes it.
Implementation plan, mapped to the acceptance criteria:
Additional checks in scope because the classifier would otherwise report a healthy fleet on bad evidence: repository-binding mismatch per member, and role/profile mismatch between a member's namespace and its declared role. Both fail closed.
Native namespaces affected: the tool is registered once and gated on gitea.read, so it answers identically from gitea-author, gitea-controller, gitea-reviewer, gitea-merger, and gitea-reconciler. The two namespaces the issue names are covered by that superset.
Compatibility: the control-plane schema change is additive and idempotent, matching the existing migration convention; no existing table, tool signature, or result field changes. A server built before this change simply has no registry row, which the completeness check reports as incomplete evidence rather than as a healthy fleet.
Scope boundaries preserved: controller role metadata and capability routing stay with #950, synchronization and restart receipts stay with #951, and stale-lease inspection consistency stays with #952. This work records no historical restart evidence and repairs no lease.
RELATED_PRS:
None yet. One pull request will be opened from feat/issue-949-native-fleet-inventory against master.
BLOCKERS:
No blocker.
VALIDATION:
Pending. Planned evidence is the new focused test modules, then the repository full suite at the head compared against the same suite at pinned base
82d71b7702, comparing failing test identifiers rather than counts.LAST_UPDATED_BY:
author (jcwalker3, prgs-author)
Canonical Issue State
STATE:
blocked
WHO_IS_NEXT:
author
NEXT_ACTION:
Restore a create_pr-eligible durable issue lock for #949 so the already-pushed head
92615f474bcan be opened as a pull request; the implementation itself is complete and published.NEXT_PROMPT:
WHAT_HAPPENED:
The full #949 contract is implemented, committed, and published. Head
92615f474bon feat/issue-949-native-fleet-inventory adds gitea_assess_fleet_inventory, the mcp_server_runtimes control-plane registry that each server writes about itself at native transport bind, the pure classification module, the capability-map entries, and the documentation. 118 new tests pass. The repository full suite at this head is 28 failed / 5810 passed against 28 failed / 5692 passed at the pinned base, with byte-identical failing-test-identifier sets, so there are zero regressions and the passing delta is exactly the new tests.The pull request could not be created. gitea_create_pr fails closed with the #447 issue-lock provenance guard: the durable lock file lacks sanctioned lock_provenance.
WHY:
The durable lock for this issue was created by gitea_bootstrap_author_issue_worktree, whose own reported next action was to proceed directly to implementation. That tool writes a lock shape no downstream author tool accepts, and the shape cannot be upgraded once implementation work is committed:
Each of the four is fail-closed and correct in isolation. Together they leave a bootstrapped author task with no sanctioned route to a pull request. This was verified by reading issue_lock_provenance.assess_lock_file_for_create_pr, issue_lock_store.is_lease_expired, issue_lock_worktree.assess_issue_lock_worktree, and issue_lock_renewal, not inferred from the error text.
No workaround was attempted. The lock file was not edited by hand, the branch pointer was not moved to satisfy the base-equivalence check, and no fallback transport was used. This gap is a separate defect from #949 and should be filed and fixed on its own terms rather than absorbed here.
RELATED_PRS:
None. No pull request exists for #949 and none was created. The implementation is published on branch feat/issue-949-native-fleet-inventory at
92615f474b, awaiting a pull request.BLOCKERS:
Blocker classification: environment/tooling blocker. gitea_create_pr requires a durable issue lock carrying sanctioned lock_provenance and work_lease, which only gitea_lock_issue writes. This remains blocked until a sanctioned tool can mint that lock for a branch that already carries committed work, or until the gitea_bootstrap_author_issue_worktree lock shape is corrected to record lock_provenance and work_lease at creation time.
VALIDATION:
Narrow suites: tests/test_mcp_fleet_inventory.py, tests/test_control_plane_db_server_runtimes.py, tests/test_fleet_inventory_tool.py — 118 passed, 0 failed, exit 0. Adjacent suites including tests/test_control_plane_db.py, tests/test_task_capability_role_invariants.py, tests/test_mcp_namespace_health.py, tests/test_issue_686_manual_mcp_provenance.py, tests/test_restart_coordinator.py, tests/test_webui_inventory.py, tests/test_issue_695_native_transport_quarantine.py — 290 passed, 84 subtests passed, 1 failed, that one being a failure proven present at the pinned base. Full suite head: 28 failed, 5810 passed, 6 skipped, 1042 subtests. Full suite at base
82d71b7702: 28 failed, 5692 passed, 6 skipped, 1042 subtests. Sorted failing identifier sets compared with diff: identical, zero regressions. Control checkout verified clean on master throughout; the temporary base worktree used for the comparison was removed.LAST_UPDATED_BY:
author (jcwalker3, prgs-author)