Skip to content

fix(workflows): bound handoff metadata budgets - #143

Merged
tt-a1i merged 3 commits into
openpi-dev:mainfrom
testikun:fix/workflow-handoff-byte-budget
Aug 25, 2026
Merged

tt-a1i merged 3 commits into
openpi-dev:mainfrom
testikun:fix/workflow-handoff-byte-budget

Conversation

@testikun

Copy link
Copy Markdown
Collaborator

Closes #117

Summary

  • Reject impossible handoff configurations whose mandatory prefix and section headers cannot fit within maxTotalBytes.
  • Bound protocol-relative result artifact identifiers to 256 UTF-8 bytes and charge actual header bytes against the shared handoff budget.
  • Make zero-byte and tiny UTF-8 projections fail closed without exceeding their budget.
  • Validate handoff metadata before consuming a result token.

Validation

  • bun run check
  • Node tests: 916 passed
  • Vitest: 30 passed
  • Focused handoff/projection tests: 19 passed

The artifact identifier bound follows the existing OpenPI dashboard projection and the identifier-size boundaries used by Codex; the body budget still accounts for actual metadata overhead dynamically.

@tt-a1i
tt-a1i merged commit 9d1e23b into openpi-dev:main Aug 25, 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: handoff can exceed maxTotalBytes via mandatory headers (unvalidated impossible config)

2 participants