Pewarta Proxy

📋 Server Request & Proxy Logs

Loading active proxy settings...
Developed by Khairul Adha (adhexa.id)
Mengambil log server...

⚙️ Pengaturan Proxy Target

Skip to content

fix(mcp): honor json schema openness in mcp output shapes - #9476

Merged
waleedlatif1 merged 5 commits into
stagingfrom
fix/mcp-open-output-shapes
Oct 30, 2026
Merged

waleedlatif1 merged 5 commits into
stagingfrom
fix/mcp-open-output-shapes

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Addresses two review threads on the release PR #871:

1. Fallback notes are graded on their exception. The ap-exceptions oracle counted add_note by tool name alone, so S13's "kept its queue; the duty holder could not be told", S10's "triaged with a note" and S5's "stopped with a note" outcomes passed with their only note on a different exception. Each of those outcomes now also carries a limits entry {tool: "add_note", where: {exceptionId}, status: 200, min: 1} for its own exception, mirroring how billing-disputes grades its notes. The cap on notes in all stays, and note wording stays ungraded.

Autopsy (rule 10). The fallback tests in acceptance.test.ts built the note as a ledger entry with empty arguments and asserted only that the fallback passed with the fault in the ledger and failed without it. Nothing moved the note to another exception, so a global count looked correct. The tests now put the exception id in the note's arguments, add S13, and require each fallback to fail when its note is on another exception. On the old oracle that assertion fails for S5, S10 and S13; on the fixed one it passes.

2. Row metadata after a restore. Arena.restoreTables restores row data only. A patched-back row keeps the updatedAt its PATCH stamps. A re-inserted row gets a new id, a new createdAt and goes to the end of the table's order. Sim's public API can't do better: no route sets either timestamp, the v1 inserts omit position and order keys, and the v1 single-row route drops afterRowId before it calls insertRow. So the change is documentation only, in the docstring and in doc 77's isolation limits. No graded build has hit this: every one settled with empty tables.

Changes

  • hidden/ap-exceptions/oracle.ts: noteOn(exceptionId) limit on the S5, S10 and S13 fallback outcomes. ApOutcome.notes is dropped because the outcome's notesMax already sets the cap.
  • test/company/acceptance.test.ts: the fallback cases carry note arguments, cover S13, and include the misplaced-note regression.
  • live/arena.ts: the restoreTables docstring states the system-field limit.
  • docs/revamp/77-company-sim-benchmark.md: grading and isolation text, a fourth isolation gap under Known limits, and a dated section "Review fixes" with the new fingerprints.

Fingerprints: ap-exceptions hiddenHash 861ec57b… (was ce98ab12…). Unchanged: visibleCorpusHash 9bddcbe0…, lead-routing 969268ac… / 50d91eca…, billing-disputes cc01c2d2… / 7490fbdb…, world module 188a4a53…, binder version 3.

Testing

  • bun test tools/bench/test/company/: 243 pass, including Sim harness checks against a Sim staging checkout. The reference passes, each mutant still fails exactly its designed scenarios, and the variants pass.
  • The regression fails on the old oracle (S5, S10 and S13 on the misplaced-note assertion) and passes on the fixed one.
  • bun run check in worker/: green. 2918 pass, 17 skip, 0 fail. It ran on Bun 1.4.4 with a fresh Postgres database, a private Redis, and SIM_REPO_PATH set to Sim origin/staging 06faa07.

Checklist

  • Targets staging (squash merge); only release PRs from staging target main (merge commit). See CONTRIBUTING.md
  • worker/ changed: bun run check passes in worker/
  • Schema changed: migration generated, lock-bounded and tested per the worker-migration skill
  • Sim-facing contract or CLI grammar changed: synced with SIM_REPO_PATH set and the companion Sim PR linked (Companion: simstudioai/sim#N), per the sim-companion skill
  • Logic bugfix: regression test that fails on the pre-fix code, plus the autopsy (AGENTS.md rule 10)

Objects without additionalProperties: false now keep their declared fields and
record that others are allowed, so references to undeclared fields lint clean
and resolve empty when missing. Arrays without items accept element paths.
Also documents the v2 execute 202 receipt returned after waitTimeoutSeconds.
@vercel

vercel Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Ignored Ignored Preview Oct 30, 2026 8:30pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the latest baseline change matches the code.

Summary

The PR keeps declared MCP output fields while allowing extra fields when the JSON Schema leaves an object open.

  • MCP output paths follow whether each JSON object is open.
  • Array output suggestions match the fields each item declares.
  • Workflow API docs explain when synchronous runs return receipts.

Reviews (4) · Last reviewed commit: "chore(lint): shrink the explicit-any bas..." · Reviewed by Greptile

@cubic-dev-ai cubic-dev-ai Bot 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.

1 issue found across 9 files

Confidence score: 3/5

  • In output-schema.ts, closed MCP objects without a properties map are treated as open, so they may allow fields the schema meant to reject. Preserve an empty properties object and only mark the object open when additionalProperties: false is absent or overridden.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/sim/lib/mcp/output-schema.ts">

<violation number="1" location="apps/sim/lib/mcp/output-schema.ts:76">
P2: Closed MCP objects without a `properties` map are still treated as open. Preserve an empty `properties` object and set `open` only when `additionalProperties: false` is absent or overridden, so `{ additionalProperties: false }` rejects undeclared paths.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/lib/mcp/output-schema.ts Resolved
A declared field named open on an open object resolved to the flag instead of
the field. Open nodes now look fields up in their properties only. A closed
object declaring no properties now rejects every field instead of saving as
untyped. Documents the NDJSON detached frame for waitTimeoutSeconds.
The connection panel listed an items child for an array whose elements are a
typed node without properties, such as an MCP array of strings or of untyped
elements, offering an invalid reference.
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot 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.

All reported issues were addressed across 11 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot 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.

No issues found across 11 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot 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.

No issues found across 12 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 9fffbcc into staging Oct 30, 2026
70 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/mcp-open-output-shapes branch October 30, 2026 20:53
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