Skip to content

Answer a schema write with the change set it joined #2615

Closed

Description

@pournasserian

Part of #2423 (F-MCP). A follow-up from the review of #2520 (SCH-05).

Since #2520, create_content_type and revise_content_type let the content type directory record the operation. The tool answers with the change set by reading it again after the write commits, and for a session_id it reads the session's open set. Between the write and that read, the same agent can submit the set, or a concurrent write can open the session's next one:

  • If the set was submitted, a write that committed is answered with change_set_not_found. The agent may then retry and store a second draft of the same change.
  • If the next set was opened, ProposedWrite does not find the item's operation in it and throws.

Scope

  • The content type write tells its caller which change set it joined, so the tool answers from that set rather than from a second lookup by session.
  • The answer reads the set by its id. A set submitted in the meantime still answers with the write's operation and the set's new state.

Out of scope

  • Entry writes, which add their operation through IChangeSetDirectory and already answer with the set it returns.

Acceptance

  • A schema write whose session set is submitted before the tool reads it back answers with the write's version and that set's id.
  • A schema write whose session's next set was opened concurrently answers with the set it joined and does not throw.
  • All of the above passes on SQLite and PostgreSQL.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:mcpMCP server and agent credentials (MCP)type:featureNew capabilityv2FluentCMS v2 (v2 branch)

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions