Skip to content

Slice 4d.1 — mcpServerRefs plural CRD field + admission CEL - #291

Merged
Pal Lakatos-Toth (pallakatos) merged 2 commits into
devfrom
slice-4d.1-mcp-server-refs-plural
May 13, 2026
Merged

Pal Lakatos-Toth (pallakatos) merged 2 commits into
devfrom
slice-4d.1-mcp-server-refs-plural

Conversation

@pallakatos

Copy link
Copy Markdown
Collaborator

Closes Slice 4 DoD #2 (mcpServerRef singular deprecation).

Adds GovernanceConfig.mcpServerRefs (Vec<LocalObjectRef>) alongside the existing singular mcpServerRef, which is now deprecated and honored as a length-1 alias via effective_mcp_server_refs().

Controller-side

  • New reason constants MCP_SINGULAR_DEPRECATED + PLURAL_MCP_SERVERS_UNSUPPORTED_YET in status/conditions.rs::reason.
  • 6 new unit tests covering shim precedence (3 cases), camelCase wire key, omit-when-empty, plural-wins-when-both-set. Controller suite: 555 passing.

Admission CEL on deploy/helm/azureclaw/templates/crd.yaml

  • Mutex: singular and plural cannot both be set.
  • maxItems: 8 (router-side scheme is sized for this).
  • Per-name uniqueness across mcpServerRefs.

Out of scope (queued for Slice 4d.2)

Verification

  • cargo test --release --package azureclaw-controller --bins → 555 passed.
  • cargo clippy --release --package azureclaw-controller --all-targets -- -D warnings → clean.
  • cargo fmt --check -p azureclaw-controller → clean.

Pal Lakatos-Toth and others added 2 commits May 13, 2026 19:46
Closes Slice 4 DoD #2 (mcpServerRef singular deprecation). Adds
GovernanceConfig.mcpServerRefs (Vec<LocalObjectRef>) alongside the
existing singular mcpServerRef, which is now deprecated and honored
as a length-1 alias via effective_mcp_server_refs().

Controller-side changes:
- New constants MCP_SINGULAR_DEPRECATED + PLURAL_MCP_SERVERS_UNSUPPORTED_YET
  in status/conditions.rs::reason.
- Reconciler mirror loop refactored to iterate effective_mcp_server_refs().
  Singular-field use emits tracing::warn with McpSingularDeprecated.
  len > 1 short-circuits via degrade! macro until Slice 4d.2 wires
  per-server addressing — principles §3 honest 'not-yet-enforced' signal.
- 6 new unit tests: shim precedence (3 cases) + camelCase + omit-when-empty
  + plural-wins-when-both-set. Controller suite: 555 passing.

Admission CEL on deploy/helm/azureclaw/templates/crd.yaml:
- Mutex: singular and plural cannot both be set.
- maxItems: 8 (router-side scheme is sized for this).
- Per-name uniqueness across mcpServerRefs.

Out of scope for 4d.1 (queued for 4d.2):
- Per-server jwks-{name}.json / tools-{name}.json file scheme.
- Router-side McpServerRegistry + namespaced tool dispatch.
- Stale-file sweep (DoD #6).
- e2e fixture with ≥ 3 servers (DoD #1).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pallakatos
Pal Lakatos-Toth (pallakatos) merged commit 4806c3b into dev May 13, 2026
21 checks passed
@pallakatos
Pal Lakatos-Toth (pallakatos) deleted the slice-4d.1-mcp-server-refs-plural branch May 13, 2026 18:37
Pal Lakatos-Toth (pallakatos) pushed a commit that referenced this pull request May 13, 2026
Slice 4d.1 landed on dev (PR #291) while slice-4d.2 was open; both
touched the same three files. Keep the Slice 4d.2 version everywhere:
plural per-server loop, no PluralMcpServersUnsupportedYet degrade,
CRD doc comment pointing forward to 4d.3.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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