Skip to content

feat(mcpx): toolViews slice 1 — rename/pin/hide on alias views (#1933) - #2976

Merged
dezren39 merged 33 commits into
mainfrom
queue/3230-1933-toolviews-slice1
Nov 2, 2026
Merged

dezren39 merged 33 commits into
mainfrom
queue/3230-1933-toolviews-slice1

Conversation

@dezren39

@dezren39 dezren39 commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Slice 1 of #1933 (Approach B, per triage task 2829): declared toolViews on alias (aliasOf) views. This PR references #1933 and does not close it — slice 2 (cross-server virtual namespaces) stays there.

What

  • config — mcpx.toolViews map on a server's extras: each entry names a target tool via from (rename), may pin fixed arguments, may hide pinned properties, and may override description. Structural validation at resolve: toolViews requires aliasOf, from is required, and hide may only list pinned properties.
  • Listings — a non-empty toolViews map IS the view's allowlist: visibleTools materialises exactly the named tools under their view names (sorted, deterministic), with the description override applied and hidden properties removed from the exposed inputSchema (properties + required). Unrenamed tools/excludeTools behaviour is unchanged for servers without toolViews.
  • Calls — resolveAndGuard translates a view call to the target's real name with pinned arguments merged over the caller's (a pin wins), so the write policy, the destructive floor, the pool, and history/diagnostics all work with the real name and the effective args, on every call path (Call, CallReporting, CallAsk). The target's real name is not callable through the view (VisibleTool answers in view names).
  • Load validation — when the target's schemas are cached, registry load rejects an unknown from target or a pin of an argument the target schema does not declare, naming the server and view.

Tests

The tailscale shape from #1933 end to end at the daemon level: an alias view exposing exactly listTailnet (from list_tailnets) and listHostnames (from list_devices, tailnet pinned to - and hidden) — listings, schema hiding, pin merging (caller cannot override), guard behaviour (view name passes, real name is HiddenTool), plus config resolve/visibility and validation tests.

Verified on the laptop worktree: go test ./internal/config/ ./internal/daemon/ — both pass in full. CI is the remaining verification.

Queue task 3230 · issue #1933 (stays open for slice 2)


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

Summary by CodeRabbit

  • New Features
    • Create named tool views for aliases with custom descriptions, hidden pinned properties, and preset arguments.
    • Views appear under their configured names, and pinned values take precedence over caller-supplied values.
    • Advertised schemas reflect pinned arguments and relevant requirements, dependencies, and constraints.
  • Bug Fixes
    • Calls through views use the target tool and merged arguments when applying policies and invoking the tool.
    • Configuration parsing preserves precise numeric values and rejects trailing or additional JSON documents.
  • Validation
    • Invalid tool views are rejected during configuration resolution or registry updates.

@dezren39
dezren39 requested a review from a team as a code owner October 31, 2026 07:01
@coderabbitai

coderabbitai Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Caution

Review failed

The pull request is closed.

Recent review info
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: 8691b0ec-fee7-405c-882e-fc6ad9cc9440
Commits

Reviewing files that changed from the base of the PR and between c1b9052 and 59e5c62.

Files selected for processing: 10
  • pkgs/mcpx/internal/config/argumentrules.go
  • pkgs/mcpx/internal/config/argumentrules_test.go
  • pkgs/mcpx/internal/config/config.go
  • pkgs/mcpx/internal/config/parse_pin_test.go
  • pkgs/mcpx/internal/config/profile_test.go
  • pkgs/mcpx/internal/daemon/input_required.go
  • pkgs/mcpx/internal/daemon/registry.go
  • pkgs/mcpx/internal/daemon/reload.go
  • pkgs/mcpx/internal/daemon/routes_proto.go
  • pkgs/mcpx/internal/daemon/toolviews_test.go

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

The change adds alias-specific tool views with configurable target tools, pinned arguments, hidden schema properties, and description overrides. The registry lists and validates views, projects advertised schemas, and dispatches calls using the target tool and merged arguments.

Changes: Alias Tool Views

Layer / File(s) Summary
Tool-view configuration
pkgs/mcpx/internal/config/config.go, pkgs/mcpx/internal/config/parse_pin_test.go, pkgs/mcpx/internal/config/profile_test.go
Configuration adds tool-view declarations, validates their shape, and applies alias visibility rules. JSON parsing preserves exact numbers and rejects trailing data.
Pinned schema projection
pkgs/mcpx/internal/config/argumentrules.go, pkgs/mcpx/internal/config/argumentrules_test.go
Pinned projections remove requirements satisfied by pins and project constraints involving applicators, references, dependencies, property counts, and conditions. Tests cover dialects, resources, and visible versus hidden pins.
View listing and validation
pkgs/mcpx/internal/daemon/registry.go, pkgs/mcpx/internal/daemon/reload.go, pkgs/mcpx/internal/daemon/toolviews_test.go
The registry lists aliases with projected schemas and validates targets and pins against cached schemas. Reload validates views before replacing registry state.
Pinned call dispatch
pkgs/mcpx/internal/daemon/registry.go, pkgs/mcpx/internal/daemon/input_required.go, pkgs/mcpx/internal/daemon/routes_proto.go, pkgs/mcpx/internal/daemon/toolviews_test.go
Call paths resolve view names to target tools, merge pinned arguments, and pass the effective tool and arguments through guards to the pool.

Estimated code review effort: 4 (Complex) | ~60 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant Caller
  participant Registry
  participant Pool
  Caller->>Registry: Call with view name and arguments
  Registry->>Registry: Resolve target and merge pinned arguments
  Registry->>Pool: Dispatch effective tool and arguments
Loading

Possibly related PRs

  • developing-today/code#2829: Both changes update resolveAndGuard and its call sites; this PR resolves view targets and pinned arguments, while PR 2829 changes write-policy checks and ask/deny handling around that resolution.
Merge Risk: Moderate · up to 92a21

Resolve the schema projection and validation defects before merging: valid views can fail to load, advertised inputs can disagree with enforcement, and larger pin sets can make listings excessively expensive. Reload consistency and misleading call diagnostics also remain outstanding.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 73.91% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies the main change: adding alias tool views with rename, pin, and hide behavior. It is specific and related to the changeset.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 73.91% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 46 functions across 10 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • 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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 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-11-02T15:55:57.984351Z 92a21ec New commits
ℹ️ 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 chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8df6ccfb07

ℹ️ 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".

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".

Comment thread pkgs/mcpx/internal/daemon/registry.go Resolved
Comment thread pkgs/mcpx/internal/daemon/registry.go Resolved
Comment thread pkgs/mcpx/internal/daemon/registry.go Resolved
…iews-slice1

# Conflicts:
#	pkgs/mcpx/internal/daemon/registry.go
@dezren39

Copy link
Copy Markdown
Member Author

@codex review — main merged in (46ac651, origin/main c1b9052); the single conflict (pkgs/mcpx/internal/daemon/registry.go in NewRegistry) was resolved as a union: this branch's validateViews() error return kept, then main's warnDeadArgumentRules() call before return. Laptop targeted tests: go test ./internal/daemon/ PASS (-count=1, 47s), ./internal/config/ PASS.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 46ac651db3

ℹ️ 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".

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".

Comment thread pkgs/mcpx/internal/daemon/registry.go Resolved
Comment thread pkgs/mcpx/internal/daemon/registry.go Resolved
…ntity; preserve number precision when hiding schema props

Codex P2 x2 on merge head 46ac651 (queue task 3230):
- Tools/CodegenNamespaces advertised EffectiveSchema under the view
  alias while applyWritePolicy enforces rules under the target real
  name; advertise via ruleToolName (alias -> From) so a rule is
  neither enforced-unadvertised nor advertised-unenforced.
- hideSchemaProps decoded into map[string]any via float64, rewriting
  large integers (enum 9007199254740993 -> ...992); decode with
  UseNumber like argumentrules.go already does.
Regression tests for both in toolviews_test.go.
@dezren39

Copy link
Copy Markdown
Member Author

@codex review — both P2 findings on 46ac651 fixed in 2a9359d (replies on each thread): advertised schemas now use the enforced rule identity (alias → From), and hideSchemaProps decodes with UseNumber so large integers survive. New regression tests for both; laptop daemon+config suites pass.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2a9359d3fc

ℹ️ 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".

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".

Comment thread pkgs/mcpx/internal/daemon/registry.go Resolved
Comment thread pkgs/mcpx/internal/config/config.go Resolved
@dezren39

Copy link
Copy Markdown
Member Author

🤖 Agent note · parked

…r precision (#1933)

Codex P2s on PR #2976, round at 2a9359d:

1. Rule projection (registry.go:881 finding): EffectiveSchemaPinned in config drops pinned names from rules required/dependentRequired lists (any depth) for the advertised projection only — pins merge before enforcement, so the pin satisfies the requirement; verbatim projection against a hidden property + additionalProperties:false advertised an unsatisfiable schema. Both catalog paths (Tools and Catalog) now go through effectiveViewSchema. Enforcement unchanged.

2. Pin precision (config.go finding): config.parse decodes with json.Number (UseNumber), so an integer pin past the float64-exact range (9007199254740993) is forwarded exactly instead of rounded to 9007199254740992.

Tests: TestEffectiveSchemaPinnedDropsPinnedRequirements, TestParsePreservesPinNumberPrecision, TestAdvertisedViewSchemaDropsPinnedRuleRequirements. go test ./internal/config/ ./internal/daemon/ passes on the laptop.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ec95b52050

ℹ️ 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".

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".

Comment thread pkgs/mcpx/internal/daemon/registry.go Resolved
Comment thread pkgs/mcpx/internal/daemon/registry.go Resolved
Comment thread pkgs/mcpx/internal/config/config.go Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a215733225

ℹ️ 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".

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".

…en pins out of allOf; defer view validation on expired catalog (#1933)

Codex P2 round on PR #2976 (queue task 3230):

- config/argumentrules: stripPinnedRequirements now works at one instance scope only, following same-instance applicators (allOf/anyOf/oneOf/not/if/then/else/dependentSchemas) and never crossing into nested scopes (properties/items/$defs), so a nested property sharing a pinned name keeps its requirement.

- config/argumentrules: dependentRequired entries triggered by a pinned property promote their remaining dependencies to required -- pins merge before enforcement, so those dependencies are unconditional at runtime and the advertised schema must say so.

- daemon/registry: hideSchemaProps recurses into allOf members, so a hidden pin is projected out of same-instance constraints (was: unsatisfiable schema against additionalProperties:false).

- daemon/registry: validateViews skips servers whose cached catalog is expired instead of letting stale contents veto a reload; validation defers to the refreshed catalog.

Tests: TestEffectiveSchemaPinnedKeepsNestedScopeRequirements, TestEffectiveSchemaPinnedPromotesPinnedTriggerDependencies, TestHideSchemaPropsProjectsAllOfRequirements, TestReloadDefersViewValidationOnExpiredCatalog. go test ./internal/config/ ./internal/daemon/ passes on the laptop.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6d8011ca6d

ℹ️ 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".

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".

Comment thread pkgs/mcpx/internal/daemon/registry.go Resolved
…; collect composed pin declarations (#1933)

Codex re-review of 6d8011c raised three P2s, all in the pinned-view projection family fixed earlier in this PR:

- argumentrules: a dependentSchemas entry whose trigger is pinned now promotes its projected schema into allOf at the same instance scope (the pin always fires the trigger at enforcement, since pins merge before rules run).

- argumentrules: local $ref targets are inlined and projected at the scope the reference occupies, so requirements reached through #/$defs/... no longer survive the pinned projection unexamined; resolution is cycle-guarded.

- daemon/registry schemaProps: pin validation now collects property declarations through same-instance composition (allOf/anyOf/oneOf, if/then/else) and local references, so a view pinning an allOf-declared argument is not rejected as unknown.

Regression tests for all three. go test ./internal/config/ ./internal/daemon/ PASS on the laptop.
@dezren39

Copy link
Copy Markdown
Member Author

Codex re-review requested for head 6b0ff07: the three P2s from the 6d8011c review are fixed in that commit (composed/reference pin declarations in validateViews/schemaProps; pinned dependentSchemas promotion into allOf; local $ref inlining in the pinned projection), each with a regression test. Threads replied to and resolved. @chatgpt-codex-connector please re-review.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6b0ff07ce4

ℹ️ 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".

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".

@dezren39

Copy link
Copy Markdown
Member Author

@codex review — the P2 from the 6b0ff07 review (conjoin referenced constraints with sibling constraints) is fixed in 9c55787 with a regression test; thread replied and resolved.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9c5578716e

ℹ️ 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".

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".

…lues in the advertised projection (#1933)

Codex P2 on PR #2976: with tailnet pinned and hidden, projecting a rule if/then/else by stripping the pinned name from the condition advertised the wrong branch -- the stripped if succeeds when the caller omits tailnet, while enforcement merges the pin (tailnet=other), fails the const, and takes else. The projection now threads the pin VALUES through: when every property a condition examines is pinned and the condition compiles and evaluates cleanly against the pin instance (schemaval, local refs inlined), the decided branch folds in as an unconditional conjunct and the condition is dropped. Conditions reading caller-supplied properties, whole-instance or name-pattern shapes stay conditional under the previous name-stripping. Behavioral regressions pin both directions (pin other -> else/cursor advertised; pin prod -> then/limit advertised) plus the undecided case.
@dezren39

Copy link
Copy Markdown
Member Author

@codex review — new head 59e5c62 fixes the P2 from the 9c55787 review (pin-decided if conditions evaluated against pinned values; thread replied + resolved). Please re-review the new head.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 59e5c62849

ℹ️ 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".

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".

@dezren39

dezren39 commented Nov 2, 2026

Copy link
Copy Markdown
Member Author

🤖 Agent note · parked

@dezren39 dezren39 added queue/claimed Queue worker lifecycle state status/in-progress Queue worker lifecycle state queue/parked Queue task is parked (waiting on CI, time, or an event) status/parked Deliberately paused with a recorded resume condition and removed status/parked Deliberately paused with a recorded resume condition queue/parked Queue task is parked (waiting on CI, time, or an event) status/in-progress Queue worker lifecycle state queue/claimed Queue worker lifecycle state labels Nov 2, 2026
@dezren39 dezren39 added queue/claimed Queue worker lifecycle state status/in-progress Queue worker lifecycle state queue/parked Queue task is parked (waiting on CI, time, or an event) status/parked Deliberately paused with a recorded resume condition and removed status/parked Deliberately paused with a recorded resume condition queue/parked Queue task is parked (waiting on CI, time, or an event) status/in-progress Queue worker lifecycle state queue/claimed Queue worker lifecycle state labels Nov 2, 2026
@dezren39

dezren39 commented Nov 2, 2026

Copy link
Copy Markdown
Member Author

Queue task 5609 revalidation (repo-worker-code, 2026-11-02T15:17:59Z): PR remains OPEN at head ce1d517 against main, mergeable=CONFLICTING (mergeStateStatus DIRTY). CI run 41366817770 still shows basic lint FAIL and stress changed-tests FAIL; docs-history, plugin tests, mcpx-docs build, and CI time budget pass. No merge taken: standing criteria (green checks, mergeable) are not met, and the merge-conflict + conformance-mock repair needs a dedicated window beyond this run. Parking the queue task with this resume brief; no remote or local changes made this run.\n\n

…iews-slice1

# Conflicts:
#	pkgs/mcpx/internal/config/config.go
#	pkgs/mcpx/internal/daemon/input_required.go
#	pkgs/mcpx/internal/daemon/registry.go
#	pkgs/mcpx/internal/daemon/routes_proto.go

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 92a21ec9e6

ℹ️ 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".

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".

Comment on lines +2287 to +2290
pinnedCountConjunct(kind, n, pins[1:]))
absent := conjoinCountSchemas(
map[string]any{"not": map[string]any{"required": []any{pins[0]}}},
pinnedCountConjunct(kind, n-1, pins[1:]))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid exponential expansion of property-count projections

When a view pins several arguments and a matching rule contains minProperties or maxProperties, these two recursive calls generate every subset of pinned names on every schema listing. Running the extracted helpers with 16 pins and minProperties:1 produced a 3,930,073-byte schema in roughly 0.87 seconds, even though that constraint is always satisfied by the pins alone. Larger pin sets rapidly make catalog generation impractical or exhaust memory. Short-circuit pin-decided bounds and use a bounded-size representation for the remaining overlap-dependent constraints.

Useful? React with 👍 / 👎.

Comment on lines +1317 to +1319
m, ok := cur.(map[string]any)
if !ok {
return nil, false

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Resolve array indices in local schema pointers

For a cached tool whose root $ref is #/$defs/shared/allOf/0, with tailnet declared in that referenced member, this resolver returns false when it reaches the allOf array because every segment is required to be a map. Consequently, schemaProps reports no tailnet, and validateViews rejects an otherwise valid view pinning that argument during startup or reload. Handle numeric JSON Pointer segments in arrays rather than rejecting these valid reference targets.

Useful? React with 👍 / 👎.

Comment on lines +1283 to +1284
if sm, ok := sub.(map[string]any); ok {
collectSchemaProps(sm, root, out, resolving)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Track schema resources while collecting argument declarations

When an allOf member declares its own $id, defines $defs.need.properties.tailnet, and references #/$defs/need, this recursion retains the outer document as root. Its fragment reference therefore fails to resolve against the member's definitions, so schemaProps omits tailnet and cached-schema validation rejects a valid view pinning it. The fresh evidence beyond the earlier resource-projection fixes is this separate declaration-collection path used by validateViews; it also needs resource-aware resolution and cycle tracking.

Useful? React with 👍 / 👎.

@dezren39
dezren39 merged commit 4ab08c0 into main Nov 2, 2026
1 check failed
@dezren39
dezren39 deleted the queue/3230-1933-toolviews-slice1 branch November 2, 2026 16:03
@dezren39

dezren39 commented Nov 2, 2026

Copy link
Copy Markdown
Member Author

🤖 Agent note · done

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.

1 participant