Skip to content

mcpx: Phase 2 of #2209 — one predicate vocabulary: route scattered revision comparisons through internal/spec #2211

Closed

Description

@dezren39

Phase 2 of design #2209 (origin #1974, ex-nix#307). Independent of Phase 1. Design doc: files/designs/code-mcpx-spec-revision-choice.md in the keep-the-four-repos-healthy goal workspace.

Scope

One predicate vocabulary for revision comparisons, exactly as internal/spec's package comment already prescribes ("Code asks the active Policy … never by comparing date strings in place"). Today the predicates spec.AtOrAfter/Before/Only/Between have zero callers outside internal/spec, and comparisons are scattered:

  • internal/mcpserver/revisions.go:40-44 defines a package-local AtLeast duplicating spec.AtOrAfter's semantics, used by Defines and internal/mcpserver/conn.go. Make it delegate to spec.AtOrAfter, or delete it in favour of direct predicate use at the call sites. (internal/mcpserver already imports internal/spec — see relay.go.)
  • internal/mcpserver/server.go:1285 Modern() is a raw version >= "2026-07-28" — use spec.AtOrAfter("2026-07-28").
  • internal/mcpclient/modern.go CallerLegacy uses a raw v < "2026-07-28" — use spec.Before("2026-07-28").
  • internal/mcpclient/client.go:455 uses a raw ir.ProtocolVersion >= "2025-03-26" — use spec.AtOrAfter.

Semantics are identical today (revisions are ISO dates and compare lexically; both forms reject the empty string), so this is a refactor, not a behaviour change. Out of scope, named deliberately: genuine identity equalities such as internal/mcpclient/request.go:54 (negotiated == one specific revision) stay as they are.

Acceptance criteria

  • No package outside internal/spec implements its own revision-ordering comparison; mcpserver.AtLeast delegates or is gone
  • Modern(), CallerLegacy, and the client.go:455 check go through internal/spec predicates
  • No test changes its verdict (full pkgs/mcpx suite in CI); any test that does change is a stop-and-report, not an adjustment
  • No behaviour change: nothing about what mcpx sends, accepts, or answers is different

Activity

  1. added
    task/triageQueue packet kind: verify, reproduce, and route this item
    priority/normalOrdinary priority (the default)
    on Oct 29, 2026
  2. developing-today commented on Oct 29, 2026

    @developing-today
    Contributor
  3. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    Design #2209 filed today (origin #1974). This phase is a sub-issue of #2209 and is independent of Phase 1. Triage packet enqueued: pilot task 3319 (queue=repo-health-code-pilot, status=queued, verified). Decision is recorded on #2209.

  4. dezren39 commented on Oct 30, 2026

    @dezren39
    MemberAuthor

    Agent note — picked up (queue task 3319, openchamber scheduled lane)

    Claimed 2026-10-30 ~11:48Z. Triage pass: Phase 2 scope checked against current origin/main, verdict follows in the next note.

  5. dezren39 commented on Oct 30, 2026

    @dezren39
    MemberAuthor

    Agent note — triage verdict: scope CONFIRMED (queue task 3319)

    Checked against current origin/main (2026-10-30 ~11:50Z):

    • spec.AtOrAfter/Before/Only/Between have zero callers outside internal/spec — only spec.Current().Governs() is consulted (relay.go:106, client.go:556) plus Order()/StrictTable() reporting. Confirmed.
    • All four scattered sites present: package-local AtLeast (mcpserver/revisions.go, keeps empty-returns-false semantics), Modern() as version >= "2026-07-28" (server.go:1311), CallerLegacy as v != "" && v < "2026-07-28" (modern.go:246), >= "2025-03-26" gate in client.go. Confirmed.
    • Phase independently landable (mechanical refactor, test-pinned acceptance). Confirmed.

    Sharp edges for the implementation pass (settled as must-cover, not open):

    • Empty-string semantics must survive verbatim at every site — AtLeast("")==false, CallerLegacy requires non-empty. Cover each with an edge test; the no-verdict-change acceptance is the gate.
    • Design line pins drifted since 319e6c2 — re-pin every cited site.
    • The four design open questions stay explicitly OPEN for implementation judgment; no triage-side shrinking.

    Follow-up: implementation packet enqueued as queue task 3939. Lane note: laptop gh token was stale here; notes posted with transient GH_TOKEN from vault key github-cli.hosts-yml.

  6. added
    work/assignedQueue worker lifecycle state
    and removed on Oct 30, 2026
  7. 1 remaining item

  8. dezren39 commented on Oct 30, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · triaged

  9. dezren39 commented on Oct 30, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  10. dezren39 commented on Oct 30, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

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

Metadata

Metadata

Assignees

Labels

app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day of workkind/enhancementpriority/normalOrdinary priority (the default)source/design-architectFiled by the repo design architect jobtask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions