Expose trusted per-response publication confirmation for native host-tool callbacks
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 38/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- backend-api-design
Hướng nghiên cứu
Start with src/sdk/python/pyo3_common/src/lib.rs and src/wasm_sandbox/src/lib.rs, then run the linked probe with the shared-api and handoff-failure cases on a suitable WHP host. Trace conversion, serialization, and native response transport ownership before defining the owning layer. Done means the contract and fault-injection coverage distinguish accepted responses from pre-acceptance failures for values and refusals.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
An embedding host may need to distinguish “the host function executed” from “its response was accepted by the native transport.” This matters when a host function has effects that must not be replayed after an ambiguous handoff, and when response-byte accounting must reflect confirmed publication.
With the Python/Wasm SDK, the registered Python callback finishes before later result conversion and serialization. I could not find a public hook that confirms acceptance of a particular complete response by the native transport. Returning from the callback, writing a response to a worker pipe, or observing eventual program completion does not expose that boundary.
Environment and source evidence
hyperlight-sandbox==0.7.0,hyperlight-sandbox-backend-wasm==0.7.0,hyperlight-sandbox-python-guest==0.7.0.- Measured family: Windows 11 x86-64/WHP, host Python 3.13.12, packaged Python guest, 400 MiB heap, 200 MiB stack,
HYPERLIGHT_MAX_SURROGATES=0; native work runs in a bounded, disposable worker process. - At the 2026-10-03 audit, the relevant Python facade, PyO3 common bridge, tool registry and Wasm implementation had identical Git blob IDs in v0.7.0 and upstream main
e38f49d149111f66ee2265c6d6c216fab62d018c.
In build_tool_registry, the handler calls the Python callback, resolves a possible coroutine, then calls py_to_json. HostState::dispatch subsequently calls serde_json::to_string. A notification inside the Python callback is therefore too early to confirm native publication.
Reproducer and observed result
A bounded research harness registers a synthetic maf_dispatch(payload: str) tool, obtains a JSON response from its parent, and emits a “prepared” marker. Its handoff-failure case then raises before native marshalling. The historical Windows run observed both host execution/response preparation and guest failure, showing why a prepared marker is insufficient. The current harness keeps publication pending rather than counting that marker as delivery.
The shared-api case, rerun on 2026-10-03 against the exact 0.7.0 trio, returned values and refusals and completed warm reuse, but still had no trusted per-response publication signal available to the parent. Our conservative accounting consequently recorded uncertain delivery and zero confirmed bytes. A same-day attempt to rerun handoff-failure failed native initialization with an allocation error; it did not reach the injection and is not claimed as fresh confirmation of that historical case.
On a suitable WHP host, the harness can be run from the linked repository revision after uv sync --locked:
uv run python scripts/probe_hyperlight_host_tools.py --live --case shared-api --case handoff-failure --output native-publication-probe.json
Use a fresh output filename. The script contains and reaps each native worker and rejects incomplete evidence. It exercises synthetic callbacks only.
Requested contract
Please expose or document a supported host-side confirmation point after complete response serialization, framing and acceptance into the native response transport. If that belongs below this SDK, guidance on the owning layer would help.
- The notification must identify the relevant callback response, so the embedding host can correlate it with its live run and sequence.
- Accepted means the transport owns the complete response; it need not prove that guest code consumed it.
- Specify conversion, serialization, publication failure and cancellation semantics, including successful acceptance followed by a later guest failure.
- Provide exactly one acceptance notification for a successfully accepted response and none for a response rejected before acceptance.
- Validate the boundary with fault injection before serialization, during publication and after acceptance, for values and error/refusal responses.
This is a request for a trusted transport observation, not automatic retries or transactions over host effects. A guest-controlled acknowledgement would not supply the required trust boundary. The embedding host can continue handling limits, authorization, run revocation and uncertain outcomes.
Downstream adoption tracker: https://github.com/sokolaidev/maf-extensions/issues/1688. No production native host-tool capability is claimed by the research harness.
Related request: https://github.com/hyperlight-dev/hyperlight-sandbox/issues/233. Publication confirmation and physical-envelope behavior are separate contracts.
- Ngôn ngữ chính
- Rust
- Star
- 83
- Fork
- 8
- Merge trung bình
- 2 ngày 20 giờ
- Pull request đã merge (30 ngày)
- 29
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của hyperlight-dev/hyperlight-sandbox
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
hyperlight-dev/hyperlight-sandbox#233 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 42/100
hyperlight-dev/hyperlight-sandbox#134 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
enhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
hyperlight-dev/hyperlight-sandbox#135 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
hyperlight-dev/hyperlight-sandbox#136 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
hyperlight-dev/hyperlight-sandbox#137 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của hyperlight-dev/hyperlight-sandbox
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
-
tests
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
vfarcic/dot-agent-deck#2512 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
pop-os/cosmic-applets#1641 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
pop-os/cosmic-store#650 ·