Skip to content

mcpx: route revision comparisons through internal/spec predicates (#2211) - #2849

Merged
dezren39 merged 1 commit into
mainfrom
queue/3952-2211-spec-predicates
Oct 30, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/3952-2211-spec-predicates

Conversation

@dezren39

@dezren39 dezren39 commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Phase 2 of #2209 — one predicate vocabulary for revision comparisons, per the triage verdict on #2211 (queue task 3952).

Changes (pure refactor, semantics identical — both forms reject the empty revision and compare ISO dates lexically):

  • internal/mcpserver/revisions.go — AtLeast now delegates to spec.AtOrAfter (call sites in conn.go and Defines unchanged).
  • internal/mcpserver/server.go — Modern() via spec.AtOrAfter("2026-07-28").
  • internal/mcpclient/modern.go — CallerLegacy via spec.Before("2026-07-28"); also elicitModeDeclared's Negotiated >= "2025-11-25" via spec.AtOrAfter — a fifth site with the identical pattern in a triage-named file, found on current main (line drift since triage).
  • internal/mcpclient/client.go — the standalone-GET listen check via spec.AtOrAfter("2025-03-26").

After this change, no file in internal/mcpserver or internal/mcpclient (outside internal/spec itself) contains a raw revision-date ordering comparison.

Deliberately left alone: internal/daemon/hooks.go:291 (era.Negotiated >= "2025-11-25") — it deliberately treats an empty Negotiated as passing (era.Negotiated == "" || ...), which the spec predicates do not express, and it sits outside the packages triage named for this phase. Flagging it here for a follow-up decision rather than silently expanding scope or changing its semantics.

Verification: full pkgs/mcpx suite runs in CI on this PR per fleet policy; acceptance requires every test verdict unchanged — any changed verdict is a stop-and-report, not an adjustment.

Closes #2211 (on merge).


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

)

Phase 2 of #2209: mcpserver.AtLeast delegates to spec.AtOrAfter; Modern(), CallerLegacy, the client.go listen check, and elicitModeDeclared (same file/pattern, found on current main) go through spec predicates. Pure refactor, semantics identical (empty revision rejected by both forms). daemon/hooks.go:291 left alone: it deliberately treats an empty Negotiated as passing, which spec predicates do not express, and it sits outside the triage-named packages.
@dezren39
dezren39 requested a review from a team as a code owner October 30, 2026 22:26
@coderabbitai

coderabbitai Bot commented Oct 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 34 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 111f2a95-6e6d-4aff-b4cf-b2111874f3b8
Commits

Reviewing files that changed from the base of the PR and between f318fd5 and f1c413a.

Files selected for processing: 4
  • pkgs/mcpx/internal/mcpclient/client.go
  • pkgs/mcpx/internal/mcpclient/modern.go
  • pkgs/mcpx/internal/mcpserver/revisions.go
  • pkgs/mcpx/internal/mcpserver/server.go
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T22:27:37.300244Z f1c413a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant