Skip to content

fix(workflows): reject lossy oversized args - #200

Merged
somewan820 merged 1 commit into
openpi-dev:mainfrom
testikun:fix/workflow-args-fail-closed
Aug 26, 2026
Merged

somewan820 merged 1 commit into
openpi-dev:mainfrom
testikun:fix/workflow-args-fail-closed

Conversation

@testikun

Copy link
Copy Markdown
Collaborator

Closes #175

Summary

  • Replace lossy safeStringify with complete, bounded argument encoding before the sandbox child starts.
  • Fail closed for byte, string, node, and depth limits with a bounded error that identifies the limit and path.
  • Preserve large strings that fit the IPC budget instead of silently truncating them.
  • Add sandbox and workflow-tool regression coverage for valid JSON strings, raw strings, exact boundaries, and the no-child/no-journal failure path.

Validation

  • bun run check (run with Bun 1.3.14; existing Effect type-safety warnings only)
  • Node tests: 886 passed
  • Vitest: 30 passed
  • Focused sandbox tests: 27 passed

Authoritative workflow args are now encoded with encodeCompleteJson; lossy projections remain reserved for display/output paths.

@somewan820
somewan820 self-requested a review August 26, 2026 03:18
@somewan820

Copy link
Copy Markdown
Collaborator

Review completed. I found no blocking correctness, security, or lifecycle issues.
encodeCompleteJson now rejects oversized workflow args before sandbox execution, and the added coverage verifies byte/string/node/depth limits, raw strings, and the no-child/no-journal failure path.
Node 22, Node 24, bun run check, and the full test suite pass.

LGTM from my side.

@somewan820
somewan820 merged commit eee39b9 into openpi-dev:main Aug 26, 2026
2 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.

workflows: oversized args 被截断对象替换后仍继续执行

2 participants