Repository navigation
chore: add official Cloudflare PiHarness spike - #437
Merged
Merged
Conversation
Comment on lines
+76
to
+77
| if (request.method === "GET" && path[3] === "operations" && path[4]) { | ||
| return Response.json(await this.harness.wait(path[4], { signal: request.signal })); |
Contributor
There was a problem hiding this comment.
🟨 Unbounded operation IDs reach operation waits
A request with an oversized or malformed operationId reaches harness.wait without the submit endpoint's validation. Untrusted IDs can consume resources or cause unexpected errors instead of returning a validation response.
Was this helpful? React with 👍 or 👎 to provide feedback.
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.
变更
新增隔离的 Cloudflare Spike,验证官方
agents@0.26.0的PiHarness + Lifecycle能否承载 Pi Durable。一个具名 Durable Object 持有一个 Harness,通过 HTTP 提交、查询操作和输出原生 Pi 事件流;稳定 operation ID 支持重试去重。SQLite 适配与 alarm 唤醒直接使用官方实现。本地 workerd 实验覆盖双客户端观察、重连快照、观察者退出后继续执行、整个 runtime 重建后的数据保持,以及专用恢复 fixture 中的安全工具重放和不安全工具中断。恢复测试等待新实例主动报告操作完成后才查询结果,避免查询本身制造恢复证据。
范围是本地确定性 faux 模型;未部署云端、未调用真实 LLM,也未接入现有 Pace / Web / TUI 协议。运行指南和证据边界见
docs/research/durable-cloudflare-spike.md。现有生产会话路径无修改。验证
bun run typecheck、bun run lint、bun run test、bun run build通过;168 个测试文件、1977 项测试。bun run typecheck、bun run test、bun run build通过;2 个文件、6 项测试。恢复实验使用 SDK 原始约 30 秒 alarm,未修改内部时钟。bun install --frozen-lockfile通过;Worker 构建为 Wrangler dry-run,没有上传。wrangler devHTTP 冒烟通过:首次接受、结果完成、重复提交拒绝重复接受、事件快照只有一条用户输入。依赖与 bundle 固定到当前实验版本;
PiHarness为 Beta。恢复 fixture 与 HTTP 网关使用不同 Worker 入口,结果不应解读为生产容灾验收。