GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||
GeezerVison is showing github.com — mcpx: argument rules — per-tool/per-argument JSON Schema call constraints (#1986) by dezren39 · Pull Request #2855 · developing-today/code Conversation
|
|
Warning Review limit reachedYou'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 59 minutes. View limit details
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. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Codex Review SummaryThis 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. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: 845a1135c9
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Parked by queue task 3282 (lane D): CI is green and the PR is mergeable, but the completed Codex review has 6 unresolved findings (3 P1, 3 P2 — listed on #1986's latest agent note). Per the fleet Codex gate, this PR must not merge until each finding is fixed or reply-dispositioned on its thread. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
🤖 Agent note · parked
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: 4d70270eef
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: f8c862eb80
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: 352eab30ee
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: 397cfd75d4
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: 3b120260d5
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
…aints (#1986) Phase 2 of the write-policy design (#2126), gated on Phase 1 (#1979, landed today): argumentRules in a server mcpx block or the pool block, keys matched exactly as tools/excludeTools, values JSON Schema compiled by internal/schemaval. Rules only tighten: pool + server + layered-file rules all apply (allOf; same-key layers compose rather than replace). Evaluated in applyWritePolicy through the policy Evaluator ArgumentRules hook, in #2126 order (hidden -> ledger stub -> rules -> write mode -> floor), before the pool is touched. Refusals are ErrArgumentRuleDenied: daemon 400 in the HiddenTool style naming argument path, sent value, constraint, and rule origin (file, server, key); MCP pass-through renders it as an isError result via the existing dispatch. Advertising: Registry.Tools and CodegenNamespaces fold matching rules into the advertised inputSchema as allOf (keyword-ranked search strips all schemas for size, as before). Dead rules warn once per registry lifetime at load, after Warm, and on tools list_changed. Docs beside Hiding tools in docs/configuration.md, incl. server-default and free-form-argument cautions. Tests: config worked examples (all four from #1986), violation naming, load-time errors (bad schema, non-RE2 key pattern, lookahead schema pattern), pool/server/layered composition through Resolve and mergeExtras, dead-rule detection, effective-schema shape; daemon gate tests (refusal with no write policy configured, conforming pass, rules before mode under allow, failureStatus 400). Verified on laptop: go build ./..., go vet, full internal/config and internal/daemon suites pass.
- config: preserve server-level argumentRules across config layers when a nearer file redefines a server (rules only tighten) - config: advertised effective schema keeps the upstream schema at the root (type: object, properties and x-mcp-header annotations reachable); rules join as allOf members referencing namespaced scoped copies in root $defs so local references keep their scope - config: layered merge of same-key rules composes via the same scoping, so rules with local $defs refs still compile merged - config: Check judges a null argument value as the empty object that will actually be sent upstream - daemon: dead-rule re-check after list_changed runs against a refreshed catalog (coalesced per server), not the invalidated cache that still holds the previous tool list Tests: new regression tests in internal/config for nil args, effective-schema root/refs, merged $defs rules, and layered server-rule survival; existing config suite and the daemon list-changed/race tests pass.
P2 (codegen): render() returned only the allOf members of an effective schema, dropping the upstream root properties/required that EffectiveSchema keeps beside it -- mcpx types hid required arguments and generated clients could reject valid literals. The renderer now intersects the sibling root constraints with the rule members (TestAllOfKeepsSiblingRootProperties). P1 (daemon): the tools/list_changed handler refreshed schemas solely for the dead-rule diagnostic; RefreshSchemas borrows the pool schema key, so on a session-scoped server at max 1 the acquisition evicted the caller's live session. The handler now only notes a pending re-check (and only for servers that have argument rules); the check discharges at the next genuine catalog observation -- Warm, or a guarded call's own refresh -- and warnDeadArgumentRulesFor refuses to judge from the stale pre-change list (zero cache timestamp). Tests: TestDeadRuleRecheckDefersUntilFreshCatalogObserved, TestDeadRuleRecheckNotNotedWithoutRules. Verified on laptop: go test ./internal/codegen/ ./internal/daemon/ PASS.
Codex round 3 (P2): hasLocalRef/rewriteLocalRefs descended into const/enum payloads, so merging a rule like {const: {$ref: #/ok}} with a nearer layer rewrote the literal permitted value to #/$defs/far$doc/ok -- the merged rule then forbade the value the farther rule permitted and permitted an invented one, breaking the rules-only-tighten promise. Ref discovery and rewriting now stop at literal instance-data keys (const, enum, default, examples, example); schema-valued locations are still re-based. Test: TestMergedRulesPreserveLiteralRefValues. Verified on laptop: go test ./internal/config/ PASS.
Codex round 4 (3 P2s), all in hasLocalRef/rewriteLocalRefs: (1) the literal-payload skip from round 3 was context-blind -- it also skipped schemas stored under a property or definition NAMED default/const/enum, leaving their $refs unrebased and breaking load; the traversal now walks name maps (properties, patternProperties, $defs, definitions, dependentSchemas) in name position, where every value is a schema whatever its key spells. (2) A subschema carrying its own $id is a separate resource whose refs resolve against it: rewrite returns such subtrees verbatim instead of prefixing their refs into the composition root. (3) Plain-name fragments (#anchor) are not JSON Pointers: only "#" and "#/" refs are re-based; anchor refs are left alone and still resolve document-wide in the copy. Tests: TestMergedRulesTraversePropertyNamesNotKeywords, TestMergedRulesRespectSchemaIDBoundaries, TestMergedRulesPreserveAnchorReferences; round-3 literal test and the full internal/config suite still pass on the laptop.
…am $defs; codegen honors rule-required under allOf (#1986)
…, scope $dynamicRef like $ref, preserve upstream unevaluatedProperties boundary in EffectiveSchema (#1986)
a49415d to
aae32b8
Compare
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: aae32b864c
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.