Skip to content

Reject unsupported output fields before dispatch - #165

Merged
deverman merged 1 commit into
masterfrom
issue/161-reject-output-fields
Jul 25, 2026
Merged

Reject unsupported output fields before dispatch#165
deverman merged 1 commit into
masterfrom
issue/161-reject-output-fields

Conversation

@deverman

Copy link
Copy Markdown
Owner

Closes #161

What changed

  • Adds one authoritative output-field catalog shared by MCP and CLI read paths.
  • Rejects unknown or mixed valid/invalid fields values before Bridge dispatch
    for list_tasks, get_task, list_projects, and list_folders.
  • Publishes valid field names as MCP schema enums.
  • Keeps list_tags.fields rejected until Add parent-aware tag search and hierarchy to list_tags #70 introduces that separate query
    surface.
  • Adds direct MCP boundary, schema, shared-catalog, and CLI regression coverage.

Why

Unknown field names previously reached output shaping, where they were silently
ignored. A client could therefore receive a plausible successful response and
reason as though the requested value had been inspected. The new contract fails
closed with the tool name, unsupported values, and supported alternatives.

No OmniFocus task names, project names, notes, IDs, or other personal content
are included.

User impact

Mistyped or invented fields now fail immediately and clearly instead of
returning incomplete-looking success. Models can discover the valid
case-sensitive values directly from the tool schema.

Catalog measurement

  • Equivalent catalog before field enums: 30,426 bytes
  • Catalog after field enums: 31,082 bytes
  • Increase: 656 bytes

The tool count is unchanged.

Validation

  • swift run focusrelay-dev validate --impact server-wire
    • 179 tests passed
    • release build passed
    • live Bridge tests correctly reported as skipped at this tier
  • Direct MCP invalid/mixed field coverage passed for every current read-field
    tool.
  • list_tags.fields fail-closed coverage passed.
  • CLI invalid-field repro failed before Bridge access with the actionable
    validation error.
  • git diff --check passed.

One direct swift test invocation initially hit SwiftPM's nested sandbox-exec
manifest restriction; the same targeted regression passed outside the managed
workspace sandbox.

@deverman
deverman marked this pull request as ready for review July 25, 2026 10:02
@deverman
deverman merged commit 25d4be8 into master Jul 25, 2026
4 checks passed
@deverman
deverman deleted the issue/161-reject-output-fields branch August 3, 2026 00:06
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.

Reject unsupported output fields in list tool requests

1 participant