Skip to content

[OMEGA-635] Fix: reject malformed MeTTa shell calls and report shell failures. - #482

Open
timur-ashkenov wants to merge 3 commits into
BGI-Foundry:mainfrom
timur-ashkenov:fix/shell-quote-parsing
Open

timur-ashkenov wants to merge 3 commits into
BGI-Foundry:mainfrom
timur-ashkenov:fix/shell-quote-parsing

Conversation

@timur-ashkenov

Copy link
Copy Markdown
Collaborator

Description

Fixes OMEGA-635. When unescaped quotes split a command into multiple arguments in a top-level MeTTa (shell ...) call, Omega reports a syntax error before execution. When a shell command exits with a nonzero status, Omega reports the exit code and captured output to the agent. Exit codes 124 and 137 retain their existing timeout_error behavior.

How Has This Been Tested?

  • Verified that curl -s -H exits with status 2 in the original Docker image, where Omega reported SUCCESS. With the fix, the agent receives ALERT_FAILED with exit code 2.
  • Ran regression tests covering quoted shell arguments, malformed MeTTa calls, invalid JSON tool arguments, and timeout exit codes.
  • Sent one live request to GLM-5.2 through OpenRouter and replayed its tool call on both versions. In both cases, the local HTTP server received the complete Authorization: Bearer TEST header.

Checklist

  • PR contains autogenerated code
  • Self-review completed
  • Test scenarios above are passed with the version of the code from PR

This branch has not been deployed

No deployments
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