Repository navigation
fix(mcp): close bounded discovery audit gaps - #253
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
🔍 Devin Review: 1 flag
Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
There was a problem hiding this comment.
Reviewed at 3ca319a. The three changes are the right ones and small; requesting changes for four items, all quick.
Required
-
The Amp pin points at an unmerged upstream commit.
src/amp/provider-origin.jsonand the header now name7c9ef71c…, which is the head of an open upstream pull request, not a commit on the upstream main branch. I checked the bytes: the upstream file at that commit hashes to the recordede04b1980…and the vendored file below the header matches it, so the copy itself is faithful. But the pin is this repository's provenance record, and a pull request head can change or be squashed into a different commit. This part can merge only after the upstream change is on its main branch, withcommitset to that commit (the sha256 stays the same if the file does). Either keep it here and this PR waits for upstream, or move the Amp commit to its own PR so the other two fixes do not wait. Your choice; say which. -
The inbox fallback is silent and the comment above it is now wrong (
src/mcp/relay-participants.ts,inbox)..catch(() => [])drops every failure of the sender lookup, including a rejected credential, without a trace, so an operator cannot tell a slow relay from a broken one. Log one fixedconsole.warnline with the operation and the error class (the same pattern asownerEnrichmentFailed; no names, no tokens). And update the comment that says every fallible read finishes before any acknowledgement and that a failed enrichment leaves deliveries pending: the required reads still do, the sender address lookup is now optional and bounded. Assert the warning line in the new test. -
Say where a client finds the restriction. The group now answers
available, and a client that reads onlystatussees no restriction. Addrestricted_toolsto thedescribe_capabilitiestool description (it currently speaks of unavailable or restricted groups only), and confirm in the PR description that the hosted edition's change uses the same field name and the same{ name, reason }shape. If the two differ, align them before either merges. -
PR description. It carries an internal tracker id in two places, and the generated summary below it repeats it. Please remove it from the description; this repository is public. The commit message is fine.
Requested
-
A test at the inbox level where the lookup never resolves: the call returns within the budget with
sender_address: nulland the deliveries are acknowledged once on the following call. The client-level abort test and the 503 inbox test each cover half of this. -
The same gap exists one group over: on a managed connection without a verified chat identity,
spawn_relay_agentneeds that identity for the requester and is refused, whilehosted_launchreportsavailablewith nothing restricted. Fine as a follow-up; say in the description whether you take it here or not.
Checked and sound: the actor-dependent list is right (every tool in it resolves the managed chat identity first, and the two directory reads go through a path that does not); the one-second signal covers all chunks of the lookup together; a lookup that fails after the response headers is caught by the same fallback; sender_address is already nullable for clients; the CHANGELOG bullets describe the unreleased behaviour as it will ship.
Not run locally at this head, since a new head follows; the required check on 3ca319a was still running when I wrote this. I run typecheck and the amp, messaging and mcp suites on the head that answers these items.
There was a problem hiding this comment.
Re-reviewed at da055ad. Read of the diff only; I run the local checks on the head that contains main and the final pin.
Answered:
- Inbox sender enrichment now writes one fixed warning line (operation and error class) on a failed or timed-out lookup, the comment above the read states which reads are required and which is optional, and the test asserts the exact warning.
- The
describe_capabilitiesdescription namesrestricted_toolsand its{ name, reason }entries, with an assertion on the advertised description. - The inbox-level test with a lookup that never resolves returns within the budget, leaves the delivery pending, and acknowledges it once on the following call.
- The tracker id is out of the description, and
hosted_launchis stated as a separate follow-up.
Still open, so my changes-requested review stays:
- Description: remove the hosted pull request number in the "Cross-repo contract" section. "Matches the hosted edition exactly: an array of
{ name: string, reason: string }entries" says everything a reader of this repository needs. - Merge main. The branch conflicts with main (CHANGELOG). Merge, do not rebase, and keep every Unreleased entry.
- Amp provenance. Agreed as you describe it: this stays held until the upstream change is on its main branch, then
src/amp/provider-origin.jsonnames that main commit and the header hash is re-checked. I verify the hash against the upstream file at that commit before approving.
Send the exact head once 2 and 3 are in; 1 can be edited now.
|
Addressed review 5979951270 at da055ad.
Local verification on this head: npm run typecheck; test/mcp.test.ts 57/57. Exact-head CI is expected to rerun; merge-train:hold remains. |
…duals # Conflicts: # CHANGELOG.md # src/mcp/relay-participants.ts
|
Reviewer follow-up: the public description no longer names the hosted PR. Current main is merged without rebasing at exact head |
There was a problem hiding this comment.
Re-review at 088d3d8 (merge of main into the branch).
Merge resolution: correct. The combined diff touches only CHANGELOG.md and src/mcp/relay-participants.ts as conflicts. Both warning helpers are kept (inboxSenderEnrichmentFailed and sessionEnrichmentFailed), the roster's synced-session lookup from main is intact, and every Unreleased bullet from main is still present next to this PR's entries. Nothing else from main was altered.
Local checks on this exact head (run serially, separate from CI):
tsc --noEmit: cleantest/amp.test.ts: 16/16test/messaging.test.ts: 33/33test/mcp.test.ts: 59/59
Exact-head CI: the import verifier is green; "Typecheck and test" was still running when I wrote this.
Still open before I approve:
- The description's "Cross-repo contract" section still names a pull request number from the hosted repository. Please replace it with plain wording, for example "
restricted_toolsmatches the hosted edition exactly: an array of{ name, reason }entries." src/amp/provider-origin.jsonstill names the head of the open upstream pull request (relayhistory #594). As agreed, this waits until that change is on the upstream main branch and the pin names that main commit. If the file content is unchanged the sha256 stayse04b1980…; I check it against the upstream file at the pinned commit.
No source change is requested beyond the pin. My earlier change request stays in place until 1 and 2 are done.
…duals # Conflicts: # CHANGELOG.md
There was a problem hiding this comment.
Approving at 5bbd73c. This replaces my earlier changes-requested review.
Checked on this exact head:
- Amp provenance.
src/amp/provider-origin.jsonnow names the upstream main commit 703d9f115a31551e70a9f7207be1ede9fe2f0c74, the merge commit of AgentWorkforce/relayhistory#594. I fetchedsdk-ts/src/amp-source.tsat that commit: its sha256 is e04b19806ce728976feb4a8f06fc84ac54a101255b29c2f45ebfad4c5d9d5853, the value in the manifest and in the generated header ofsrc/amp/provider.ts. - Main merge. The head is a two-parent merge with current main (no rebase).
src/mcp/relay-participants.tskeeps both the inbox sender-lookup bound from this PR and the session-enrichment reason from main;src/mcp/relay-messaging.tsequals main; the CHANGELOG keeps main's wording of the session-summaries entry and this PR's three entries. - Scope. Ten files differ from main, the same set as at the previously reviewed head.
- Local, serial:
tsc --noEmitclean;test/amp.test.ts16/16,test/messaging.test.ts33/33,test/mcp.test.ts59/59. - CI on this head: Typecheck and test, and the import verifier harness, both succeeded. No unresolved threads.
The hold label stays; merging waits for the repository owner's OK.
Closes three exact-head MCP audit residuals after #252.
Changes:
Cross-repo contract:
Verification:
No deploy, release, migration, credential, image, or flag action is included.