mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #1410] [MERGED] Restore custom_tool_script_unsupported error parity #5077
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#5077
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1410
Author: @Romuromylus
Created: 5/27/2026
Status: ✅ Merged
Merged: 5/27/2026
Merged by: @Romuromylus
Base:
refactor← Head:fix/refactor-custom-tools-script-error-parity📝 Commits (2)
4b857d9Restore custom_tool_script_unsupported error parity3c18afcMap custom_tool_script_unsupported to HTTP 422 in dispatch📊 Changes
2 files changed (+7 additions, -2 deletions)
View changed files
📝
src-tauri/src/commands/storage/custom_tools.rs(+6 -2)📝
src-tauri/src/http_server.rs(+1 -0)📄 Description
Why this change
The
script_execution_type_returns_actionable_errortest atsrc-tauri/src/commands/storage/custom_tools.rs:150is currently red on every open PR againstrefactor. The test asserts a specific error contract for legacy script-type custom tools:error.code == "custom_tool_script_unsupported""legacy script"or"script executionType")"Webhook"or"webhook")The recent "Restore refactor parity features" commit (
d1df27c2) replaced the"script"arm ofexecute_custom_toolwith:That breaks all four assertions (wrong code, no tool name, no legacy-script wording, no Webhook hint). It is also internally misleading: the Rust path still returns
Errfor script tools rather than handing off to any TypeScript runtime, so a UI that surfaces this error verbatim tells the user "scripts are executed by TS" right before refusing to run them.What changed
Restored the actionable error contract the test pins:
One file, 6 insertions / 2 deletions.
Verification
cargo test --manifest-path src-tauri/Cargo.toml --lib storage_commands::custom_tools::tests::script_execution_type_returns_actionable_errorpasses locally.refactorwere blocked by the Rust Capability Layer check failing on this exact test. After this lands they unblock.Open question
I left
scriptExecutionEnabled: trueincustom_tool_capabilities(custom_tools.rs:9) untouched. The "parity features" commit flipped it fromfalsetotrue, but the Rust path still returns the error above. If the intent of the flip was "TS will execute scripts and the Rust path will only fire as a fallback for some narrow case", the capabilities flag is correct as-is. If the intent was simply that scripts now work and the flag should follow, the flag should revert tofalse(and the test then captures the contract that legacy script tools are still rejected by the Rust path for any UI that bypasses the TS executor). Happy to push a follow-up commit either way once you tell me which.Linked
Unblocks #1406 and #1407.
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.