Repository navigation
feat: same refusal code and detail on CLI and MCP, blocking-assets lookup, named change-log actor - #907
Merged
Conversation
…e blocking-assets lookup, name the actor
- kernel: own the error code and detail mapping in kernel/error_codes.py; the
server keeps only the HTTP status and retry-after, REST bodies are unchanged
- mcp: the error envelope carries code and detail
- cli: a refusal under --json prints {error: {code, message, detail}} on stdout
- mcp, cli: list_blocking_assets and 'schema blocking-assets' for the assets
that stop a schema change
- datasets: the change log names the surface that made the change (rest, cli,
mcp) from one definition
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A refusal now says the same thing on every surface, the assets that block a schema change can be listed from the CLI and MCP, and the dataset change log names the surface that made each change.
kernel/error_codes.py); the server keeps only the HTTP status andRetry-After. REST bodies are unchanged. MCP errors now carrycodeanddetail. Under--json, a CLI refusal prints{"error": {"code", "message", "detail"}}on stdout (it printed nothing before); the message stays on stderr and the exit code stays 1.list_blocking_assetsand CLI commandvisionset schema blocking-assets, the counterparts ofPOST /projects/{id}/schema/blocking-assets, with paging and awireprojection. The tool count in the docs is now 61 offered by default and 65 in all.DatasetActordefinition in the kernel (rest,cli,mcp). REST now writesrestwhere it wrote null. A direct SDK call that passes no actor still writes null, and existing rows are unchanged.Addresses findings 1, 4 and 5 of #884; the rest of that tracker is untouched.
Notes for review
--jsonin a context variable that is reset at the start of every invocation, so a usage error cannot leak it into the next command.messageis the full error text; REST still sends only the reason for a media error.export --check --jsonprints its report insideopened_workspace; if closing the workspace raised a refusal there, stdout would carry a second document. No current path does.Verification
tests/kernel,tests/server,tests/mcp,tests/cli,tests/architecture,tests/exampleson the rebased branch: 3957 passed, 14 skipped.local-inference, 4960 passed without;mypy src/visionsetclean on a base install.ruff checkandruff format --checkclean; the four import contracts kept;scripts/export_mcp_tools.py --checkpasses; the docs link and sidebar tests pass.