Skip to content

P0: canonicalize Nexus public connector host source and block GOVERNED direct merges #245

Description

@James3014

Parent semantic contract

Cross-repo implementation owner for James3014/Nexus-new#1096.

This Issue does not create a second Nexus merge authority. Nexus-new #1096 remains the semantic/acceptance owner for the invariant:

GOVERNED -> standing grant + github_complete_pull_request -> existing exact-head/CAS merge core.

Proven source-lineage defect

The physical public Nexus connector merge sink is not owned by current James3014/devspace/main.

Fresh evidence on 2026-09-25:

  • current DevSpace GitHub main: 27f69e16a4d9bb5123850c8d4457eb735c4cb868;
  • running current Dev MCP build: devspace-1.0.7-89828be8, source 89828be8705913cd251b3855c6bcaa7526fa5ce2;
  • neither current main nor that current runtime lineage contains nexus-gateway-proxy.ts, git-pr-merge.ts, git_merge_pull_request, or github_complete_pull_request;
  • the actual public Nexus connector host source is local checkout /Users/jameschen/Workspace/nexus-devspace-mcp, branch nexus/mcp-tools-v1;
  • installed package identity records source 08c3595cbdb44bd685d476703b674cc5fc30683e;
  • local branch history contains 14f46b4 feat(mcp): add git_merge_pull_request protected fallback merge tool, b89ce89 feat: add canonical Nexus gateway proxy mode, and 0aa2868 feat(nexus): integrate verified host-generation completion lineage;
  • local checkout origin points back to itself, and 08c3595... is not present in current James3014/devspace GitHub history.

Therefore the production-affecting connector has a local-only / non-durable source lineage. A governance fix merged only to Nexus-new or current DevSpace main can truthfully pass source CI while leaving the physical public merge sink unchanged.

Goal

Close both defects in one host implementation line:

  1. make the source that builds/activates the Nexus public connector durable and traceable from an Owner-controlled GitHub source/ref;
  2. physically prevent the public direct git_merge_pull_request action from merging a PR whose exact nexus.merge_lane_binding.v1 declares GOVERNED;
  3. preserve github_complete_pull_request as the only public host path that may reach a GOVERNED merge after canonical Nexus standing-grant/completion validation;
  4. keep the existing exact-base/head/check/CAS merge core as the sole physical merge implementation.

Required implementation semantics

  • Do not add a caller-supplied boolean/string such as completion=true, internal=true, or execution_lane=... as authority; public callers must not be able to spoof completion-loop provenance.
  • Public direct merge must fresh-read the exact PR binding before the merge effect.
  • DIRECT_CANONICAL and DIRECT_DELEGATED remain allowed through the existing direct path when their normal exact checks pass.
  • GOVERNED on the public direct sink fails closed before merge effect.
  • The governed completion action may delegate to the same merge core through an internal trusted call boundary; no second merge implementation.
  • Missing/malformed/unknown lane binding fails closed according to the accepted Nexus merge-lane contract.
  • Keep #1095 as historical negative-control evidence; do not rewrite its authority history.

Mandatory negative control

Equivalent of Nexus-new PR #1095:

  • lane: GOVERNED
  • historical head: c632f1e031cd24d33d7ec2e29140562735431959
  • historical base: 2115949ec83943010a9fa3672a077e0c1d8c4e06

A public direct merge request with an equivalent GOVERNED binding must be rejected before any GitHub merge call.

Source-lineage acceptance

Before claiming completion, prove:

  • exact GitHub repository/ref/commit that owns the connector host source;
  • package/build identity points to that durable source;
  • installed/loaded public connector generation readback matches the accepted source;
  • local-only nexus/mcp-tools-v1 is no longer an untracked production authority source (either migrated/adopted or explicitly retired after equivalent durable source exists).

Non-goals

  • no new Planner/Router/standing-grant evaluator;
  • no second merge core;
  • no weakening of exact-head/CAS, required checks, or Owner confirmation;
  • no retroactive authority fabrication for #1095;
  • no provider/runtime architecture expansion;
  • no automatic successor work.

AUTO_CHAIN=false.

Exact next gate:

D0_FREEZE_PUBLIC_CONNECTOR_CANONICAL_SOURCE_AND_SINGLE_MERGE_EFFECT_OWNER

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions