Skip to content

mcpx: SourceSHA256 provenance fingerprint + adapter manual update (salvage from #9041) - #10989

Merged
dezren39 merged 1 commit into
mainfrom
queue/18906-9172-mcpx-salvage
Nov 17, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/18906-9172-mcpx-salvage

Conversation

@dezren39

@dezren39 dezren39 commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Closes #9172.

Ports the two additive salvage items from superseded PR #9041 (head cf7a74e, recovered via the PR ref after its branch was deleted) into the canonical #9161 implementation on main, and answers the issue's third question with a test:

  1. SourceSHA256 provenance fingerprint — adapter.Provenance gains sourceSha256: the hex SHA-256 of the exact source text a declaration was generated from, so re-importing the same source is recognisably the same generation. Main's source-neutral shape now carries its source text from each producer (completion file bytes, probe output, man rendering, captured --help — top-level then each subcommand's, in order), and both provenance construction sites (the source ladder and --completion <file>) record the fingerprint via one helper. A --bare declaration has no source text and records none.
  2. Built-in manual — the adapter manual entry now describes deterministic generation + provenance/drift and the --completion input, and its examples gain mcpx adapter import git and mcpx adapter import --completion <file>.
  3. Stderr version drift — main's runCapture already merges stderr into the captured output, so a binary whose --version writes to stderr already compares without drift; PR mcpx: adapter import generation from completions, man and --help (#1962) #9041's regression test is ported (adapted to main's versionDrift) to pin the behavior.

Tests (oracles are independent of the code under test):

  • TestBuildCompletionFileImport now asserts the fingerprint equals SHA-256 of the fixture file's own bytes.
  • New TestGeneratedImportRecordsSourceFingerprint: the help-rung fingerprint equals SHA-256 of the fake binary's exact --help outputs, and is stable across re-import.
  • New TestVersionDriftReadsStderrVersion: a stderr-version binary compares without drift.

go build ./... and the full pkgs/mcpx test suite pass; the targeted cli/adapter packages pass (32s/0.1s).


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

@dezren39
dezren39 requested a review from a team as a code owner November 17, 2026 05:18
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

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

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-17T05:18:51.855015Z
We couldn’t complete this review. Comment @codex review to try again.
8546b80 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Nov 17, 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 26 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: 6628cffe-de91-4997-9a95-7e7ee852af6e
Commits

Reviewing files that changed from the base of the PR and between 4009442 and 8546b80.

Files selected for processing: 6

  • pkgs/mcpx/internal/adapter/adapter.go
  • pkgs/mcpx/internal/cli/adapter_import.go
  • pkgs/mcpx/internal/cli/adapter_import_gen2_test.go
  • pkgs/mcpx/internal/cli/adapter_import_gen_test.go
  • pkgs/mcpx/internal/cli/adapter_import_parse.go
  • pkgs/mcpx/internal/cli/manual.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

@dezren39

Copy link
Copy Markdown
Member Author

Codex review disposition (queue worker, lane any-g, task 18906): Codex review is quota-exhausted fleet-wide and did not run on this PR; it presented no findings to address. Verification stands on the local evidence in the PR body: pkgs/mcpx internal/cli and internal/adapter suites fully green (including the three new/extended oracle tests), go build clean, and the only full-suite failures (internal/defaults guard, internal/e2e restart/identity, daemon termination) reproduce identically on a pristine origin/main worktree at the PR base commit 71e7ac3 -- pre-existing, unrelated to this change.

@dezren39
dezren39 merged commit acf3a48 into main Nov 17, 2026
1 check passed
@dezren39
dezren39 deleted the queue/18906-9172-mcpx-salvage branch November 17, 2026 05:25
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: port salvage from superseded PR #9041 — SourceSHA256 provenance fingerprint + adapter manual update

1 participant