Consequence Layer 如何處理建立 GitHub issue 請求逾時
The request timed out. Did GitHub create the issue?
Yuvin Labs 發佈採用 MIT 授權的 Consequence Layer,用來記錄獲批及已送出的操作,並透過獨立讀取 GitHub 端的資料,確認逾時後預期建立的 issue 是否存在。若缺少佐證,個案會維持未解決;隨附測試以模擬的 GitHub provider 驗證建立 issue 的流程及最終 VERIFIED 狀態。
Posted on Dec 1 Edited on Dec 1 AI-assisted
A tool call to create a GitHub issue times out. Did GitHub get it? If you send the request again, you might end up with two issues. If you move on, you might end up with none.
That’s the problem we’re working on at Yuvin Labs. We published Consequence Layer under MIT. It keeps a record of what was approved and what was sent. A separate read from the provider can show whether the expected issue exists. If the evidence is missing, the case stays unresolved.
There’s a small test you can run with Python 3.11 or newer in a virtual environment. It uses a fake GitHub provider and doesn’t need an API key or model account.
git clone https://github.com/yuvin-labs/yuvin-consequence-layer.git
cd yuvin-consequence-layer
python -m pip install -e ".[dev]"
python -m pytest -q tests/test_yuvin_github_action_pack_runtime.py::test_github_create_issue_runtime_reaches_verified_through_canonical_flow
The test starts with an action waiting for approval. After approval, it checks that one simulated issue was created and that a separate read supports the final VERIFIED state. It’s a test of that path, which is where I’d start if you want a feel for the alpha. If the setup stops you, a report with your Python version and the error would help.
I’d like to see how other people handle this with providers that take a while to show a write in a status or search endpoint. How long do you wait before handing the case back to a person?
來源:DEV Community · dev.to