Skip to content

fix(mcp): normalize form elicitation schemas#1278

Merged
joshuajbouw merged 2 commits into
mainfrom
fix/codex-mcp-elicitation-schema
Jul 19, 2026
Merged

fix(mcp): normalize form elicitation schemas#1278
joshuajbouw merged 2 commits into
mainfrom
fix/codex-mcp-elicitation-schema

Conversation

@joshuajbouw

Copy link
Copy Markdown
Member

Linked Issue

Closes #1277

Summary

Normalizes Astrid MCP form elicitation schemas so strict clients such as Codex can present ingress, capsule-grant, and capability-approval prompts instead of rejecting them before authorization.

Changes

  • route all three typed MCP form flows through one compatibility helper
  • remove only optional top-level title and description schema annotations
  • preserve rmcp capability checks, typed response decoding, and fail-secure handling
  • add regression coverage for the exact serialized top-level schema keys
  • document the compatibility fix under [Unreleased]

Verification

  • cargo fmt --all -- --check
  • cargo test -p astrid commands::mcp -- --nocapture (56 passed)
  • cargo clippy -p astrid --all-features -- -D warnings
  • cargo test --workspace -- --quiet (full workspace passed; rerun outside the filesystem sandbox for localhost-bind tests)
  • live AOS/Codex MCP transport: the fixed binary emitted requestedSchema with only properties, required, and type; an explicit allow: true response authorized list_skills and returned a successful tool result

Checklist

  • Linked to an issue
  • CHANGELOG.md updated (entry under [Unreleased] — or [Unreleased] rolled into a version section for a release PR; not applicable to docs/CI-only changes)

Copilot AI review requested due to automatic review settings July 19, 2026 18:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR normalizes the Astrid CLI’s MCP typed form elicitation schemas to be compatible with strict MCP clients (e.g., Codex) that reject optional top-level JSON Schema annotations before authorization can proceed.

Changes:

  • Introduces a shared form_elicitation::elicit<T>() helper that strips top-level title/description while preserving typed decoding and fail-secure behavior.
  • Routes ingress consent, capsule grant-on-use, and capability approval prompts through the shared helper.
  • Adds regression tests for the serialized top-level schema keys and documents the fix in CHANGELOG.md.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
crates/astrid-cli/src/commands/mcp/mod.rs Registers the new shared form_elicitation module.
crates/astrid-cli/src/commands/mcp/ingress.rs Switches ingress consent elicitation to use the compatibility helper.
crates/astrid-cli/src/commands/mcp/grant.rs Switches grant-on-use elicitation to use the compatibility helper.
crates/astrid-cli/src/commands/mcp/elicit.rs Switches capability approval elicitation to use the compatibility helper.
crates/astrid-cli/src/commands/mcp/form_elicitation.rs Adds schema-normalizing elicitation implementation plus targeted regression coverage.
CHANGELOG.md Documents the interoperability fix under [Unreleased].

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread crates/astrid-cli/src/commands/mcp/form_elicitation.rs
@joshuajbouw
joshuajbouw merged commit d511972 into main Jul 19, 2026
21 checks passed
@joshuajbouw
joshuajbouw deleted the fix/codex-mcp-elicitation-schema branch July 19, 2026 19:40
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.

fix(mcp): emit Codex-compatible form elicitation schemas

2 participants