feat(hooks): align PostRunPayload with InvocationContext (ITL-531)#237
Merged
eywalker merged 9 commits intoJul 21, 2026
Conversation
kurodo3
Bot
force-pushed
the
eywalker/itl-531-align-postrunpayload-with-sideeffectpod-invocationcontext
branch
from
July 21, 2026 07:02
8a0317c to
5cf597d
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
…to leaf module (ITL-531) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove unused _serialize_component import from side_effects.py, update the module docstring to omit re-exported types, and add internal constructor parameters to InvocationContext.Args section. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…(ITL-531) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Thread run_id into _build_post_run_payload and call _build_invocation_context so every PostRunPayload carries a fully-populated InvocationContext with pipeline_run_id, invocation hash, and format_id support.
…ding Update _invoke_with_hooks and _async_invoke_with_hooks docstrings in function_pod.py and cached_function_pod.py to accurately reflect that run_id is now forwarded to PostRunPayload.invocation_context, not just process_data / unused. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…lic API Extend test_public_api_imports to cover the two new exports added by ITL-531. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
kurodo3
Bot
force-pushed
the
eywalker/itl-531-align-postrunpayload-with-sideeffectpod-invocationcontext
branch
from
July 21, 2026 09:46
5cf597d to
2fda992
Compare
eywalker
approved these changes
Jul 21, 2026
eywalker
deleted the
eywalker/itl-531-align-postrunpayload-with-sideeffectpod-invocationcontext
branch
July 21, 2026 16:09
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
InvocationContextandInvocationHashConfigfromside_effects.pyinto a new stdlib-only leaf modulesrc/orcapod/invocation.py, breaking a potential circular-import pathinvocation_context: InvocationContext | None = NonetoPostRunPayload, giving post-run hook authors access to the same deterministic invocation hash,format_id(), andpipeline_run_idthatSideEffectPoduser functions already receiverun_idthrough_build_post_run_payloadin both_FunctionPodBaseandCachedFunctionPodsoInvocationContextis always built and populated for every function pod invocation (not just ctx-aware ones)InvocationContextandInvocationHashConfigfrom theorcapodpublic APITest plan
TestInvocationContextOnPayload(always present, deterministic hash,format_idencoding,pipeline_run_idisNonestandalone, error payload has context)test_public_api_importsextended to assertInvocationContextandInvocationHashConfigCloses ITL-531
🤖 Generated with Claude Code