Skip to content

fix(envelope): fail on unparseable adapter output - #987

Merged
aaronjmars merged 2 commits into
aeonfun:mainfrom
keyurbodar:fix/reject-invalid-harness-output
Aug 30, 2026
Merged

fix(envelope): fail on unparseable adapter output#987
aaronjmars merged 2 commits into
aeonfun:mainfrom
keyurbodar:fix/reject-invalid-harness-output

Conversation

@keyurbodar

Copy link
Copy Markdown
Contributor

Summary

Reject malformed adapter output instead of fabricating a successful 0/0 envelope.

Problem

When an adapter emitted empty, invalid, or otherwise unparseable output, wrap_raw_output converted it into a schema-valid success envelope. The workflow then reported a green run, published the raw blob as the skill result, and recorded zero token usage.

This could cause broken runs to be scored, published, or consumed by downstream chain steps as successful work.

Fix

  • Make wrap_raw_output retain diagnostic output on stderr and return exit status 3.
  • Propagate failure from generic run-harness validation and adapter-specific fallback paths.
  • Withhold invalid output from successful workflow result capture.
  • Update workflow diagnostics and stale comments.
  • Add regression coverage for exit status, stdout withholding, diagnostics, and generic propagation.

Testing

  • bash scripts/tests/test_harness_envelope.sh
  • bash scripts/tests/test_cursor_adapter.sh
  • bash scripts/tests/test_hermes_adapter.sh
  • bash scripts/tests/test_harness_adapter_grok.sh
  • bash scripts/tests/test_run_harness_sandbox_gate.sh
  • bash -n on all edited shell scripts

keyurbodar and others added 2 commits August 30, 2026 22:24
Resolve glm.sh modify/delete: GLM moved to the Claude gateway in aeonfun#990,
so the adapter file stays deleted. Envelope fail-closed is unchanged.

Co-Authored-By: Grok <noreply@x.ai>
@aaronjmars
aaronjmars merged commit d28801b into aeonfun:main Aug 30, 2026
3 checks passed
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.

2 participants