Skip to content

Reduce copies in agent invocation hot path - #3831

Open
vigoo wants to merge 1 commit into
mainfrom
gol-479-reduce-invocation-copies
Open

Reduce copies in agent invocation hot path#3831
vigoo wants to merge 1 commit into
mainfrom
gol-479-reduce-invocation-copies

Conversation

@vigoo

@vigoo vigoo commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • validate agent invocation inputs by reference, avoiding SchemaValue cloning while preserving affine stream handles
  • decode protobuf input once, borrow it through schema fallback validation, then move it into the invocation
  • canonicalize durable stream inputs during a single schema-aware encoding traversal while preserving size-limit precedence and mapping order
  • move oplog payloads into the cache after reference-based serialization and remove redundant invocation reconstruction, payload, context, and started-entry clones
  • preserve manual-update idempotency semantics and existing durable invocation behavior

Verification

  • cargo fmt -p golem-common -p golem-worker-executor --check
  • cargo clippy -p golem-common -p golem-worker-executor --all-targets --no-deps -- -D warnings
  • cargo check -p golem-common -p golem-worker-executor --all-targets
  • focused golem-common and golem-worker-executor unit tests covering borrowed validation, one-pass stream canonicalization, size precedence, move-aware oplog uploads, and manual updates

Resolves GOL-479

@vigoo
vigoo requested a review from a team September 4, 2026 12:42
@netlify

netlify Bot commented Sep 4, 2026

Copy link
Copy Markdown

Deploy Preview for golemcloud canceled.

Name Link
🔨 Latest commit 1e2fdb4
🔍 Latest deploy log https://app.netlify.com/projects/golemcloud/deploys/6a9abcbc56b9000008573a91

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