Remote-MCP 02: Introduce a transport-neutral bind seam accepting a remote transport #931
Closed
opened 2026-07-26 00:29:55 -05:00 by jcwalker3
·
1 comment
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
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#931
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.
Parent epic: #929.
Depends on: #930.
Problem
The server binds one transport, by name, at the bottom of the module:
Everything that later asks "is this a trusted native session" resolves that question through the value bound here, including
assess_transport_for_auth_mint, the decision-lock provenance stamp that defaults totransport: untrusted, and the mutation guards that refuse offline imports. The string is treated as a constant in the guard logic rather than as configuration, so a remote transport currently has no way to be trusted, and no way to be distinguished from an untrusted offline import.Scope
Introduce a seam so the bound transport is a first-class, validated value rather than a hardcoded literal, without changing what stdio sessions are allowed to do today.
stdiowhen unset.Acceptance criteria
stdio.stdiooutside the shared accessor and the permitted-set definition.Verification
branches/worktree, not from a temporary directory.Non-goals
[THREAD STATE LEDGER] Issue #931 / PR #966 — transport-neutral bind seam implemented; handed to reviewer
What is true now:
2fb835a1aa9b80e75ca3What changed:
9b80e75cc1626081(the seam) and2fb835a1(anchor-regeneration stamp) pushedWhat is blocked:
Who/what acts next:
Canonical Issue State
STATE:
pr-open-awaiting-independent-review
WHO_IS_NEXT:
reviewer
NEXT_ACTION:
Perform an independent formal review of PR #966 (head
2fb835a1aa) against the six #931 acceptance criteria, then record APPROVE or REQUEST_CHANGES via gitea_submit_pr_review.NEXT_PROMPT:
WHAT_HAPPENED:
Introduced mcp_transport_config as the single source of truth for the bound MCP transport: it owns the permitted set {stdio, streamable-http}, the stdio default, and the resolution of GITEA_MCP_TRANSPORT into a checked identifier. bind_native_mcp_transport now resolves from deployment configuration when no argument is given, validates before writing the runtime record, and pins the result; bound_transport is the shared accessor every transport-aware guard reads, and assert_transport_bound fails closed before mcp.run. A conflicting rebind is refused so two guards cannot observe different values. mutation_provenance_fields gained bound_transport, which reaches the durable decision lock and the audit records. Both former stdio literals in the entrypoint are gone. #956's anchor fixture and threat model were re-anchored for the 29 lines this change shifted, and the two boundary claims #931 makes false were restated.
Changed files: mcp_transport_config.py (new), tests/test_issue_931_transport_bind_seam.py (new), mcp_daemon_guard.py, gitea_mcp_server.py, mcp_server.py, mcp_session_state.py, irrecoverable_provenance.py, docs/remote-mcp/threat-model.md, docs/remote-mcp/threat-model-anchors.json.
Acceptance matrix (each criterion mapped to code and to independent test evidence):
WHY:
The bound transport was a literal in the authorization chain rather than configuration, so a remote transport could neither be trusted nor distinguished from an untrusted offline import. #931 is the seam that makes the identifier first-class, checked at bind, and durably recorded, without changing what a stdio session may do. Every later child of epic #929 that reasons about transport depends on this one accessor existing.
RELATED_PRS:
PR #966 (open, head
2fb835a1aa) implements this issue. PR #942 / issue #941 (merge performed ataab54d48) supplied the author-bootstrap prerequisite that let this issue obtain a sanctioned worktree. Issue #930 (closed) supplied the coupling inventory rows T1-T9 that scope this work.BLOCKERS:
none
VALIDATION:
New module tests/test_issue_931_transport_bind_seam.py, 42 tests, exit 0. Targeted suites all exit 0: transport and daemon guard 33 passed; decision-lock and session-state 140 passed; #956 threat model 17 passed; capability registration 48 passed with 86 subtests; tool inventory 39 passed; provenance and security 34 passed. Full suite from branches/issue-931-transport-bind-seam: exit 1, 28 failed, 5843 passed, 6 skipped, 1047 subtests passed. Pinned base
9b80e75cfrom branches/baseline-931-9b80e75c: exit 1, 28 failed, 5801 passed, 6 skipped, 1047 subtests passed. Compared by failing test ID rather than by count, the two sets are identical in both directions; no failure was added and none was fixed, and the +42 passed are exactly this PR's new module. Not run: any deployment, restart, reconnect, or live remote-transport exercise, because no listener exists until #938.Known limitations and explicit non-goals: the remote listener (#938), per-request principal resolution (#932), client-managed provenance policy (#934), TLS and remote client authentication, role capability sets, repository-binding semantics, deployment, client commissioning, concurrency certification, and unattended scheduling are all out of scope and untouched. streamable-http is accepted at the seam but nothing serves it yet. Issues #932, #934, #936, #938, #949 and #957 were read only to confirm scope boundaries and were not modified.
LAST_UPDATED_BY:
author (jcwalker3 / prgs-author / gitea-author namespace)