Skip to content

Propagate active call cancellation into component host imports - #29

Merged
Joshua Tenner (jtenner) merged 2 commits into
mainfrom
codex/component-host-call-cancellation
Oct 5, 2026
Merged

Joshua Tenner (jtenner) merged 2 commits into
mainfrom
codex/component-host-call-cancellation

Conversation

@jtenner

@jtenner jtenner commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator

Component host callbacks currently inherit the context used to instantiate the component. Canceling a later Instance.Call therefore does not cancel a blocking host import, and a retained callback context remains live after its invocation ends.

This change lazily obtains the active invocation context for direct and forwarded host imports, while preserving instance context values and caller identity. The first commit proves the lost cancellation and deadline; the second fixes it.

Validation: full tests, full race suite, vet, Go 1.22, Windows/macOS builds, and component fixture validation. Independent review approved tree 00ce741c938f1e79aeddf77b90e05643d2ba096f; the published tree is identical. Unqueried callbacks improve from 10 to 9 allocations per call. Querying cancellation uses 11 rather than 10 allocations for the scoped resolver state.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-05T11:43:16.165869Z 7029aff PR opened
🔒 Security Review ✅ Completed 2026-10-05T11:50:21.868792Z 7029aff PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@jtenner
Joshua Tenner (jtenner) merged commit e43b64c into main Oct 5, 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.

1 participant