✨ sdk: add DialContext/tcpConn and ActionContext.ShouldStop#1
Open
CodFrm wants to merge 4 commits into
Open
Conversation
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
hostCaller三方同步新增IOSetDeadline/ActionShouldStop(sdk/go/opskat/hostcall.go+hostcall_wasm.go+hostcall_stub.go)sdk/go/opskat/tcp.go:DialContext/Dial/tcpConn实现net.Conn,签名契合 kafka-goTransport.Dial,SetDeadline / SetReadDeadline / SetWriteDeadline 通过host_io_set_deadline传回宿主ActionContext.ShouldStop()供长驻 action 轮询取消(sdk/go/opskat/opskat.go)TestHost增加WithMockTCP/WithActionCancel选项,IORead/IOWrite/IOClose/IOSetDeadline 对 TCP handle 分支处理Spec: 对应 opskat repo
docs/superpowers/specs/2026-04-23-kafka-extension-design.md§2Coupling: 必须与 opskat
feature/kafka-phase1-frameworkPR 同批次 merge,否则 hostABI 错位Test plan
go test ./...全绿(8 个单测:ActionCancellation、tcpConn round-trip、SetReadDeadline、ActionContext.ShouldStop 等)GOOS=wasip1 GOARCH=wasm go build .通过go vet ./...clean