Skip to content

test(interactive): record ChatGPT-authored response bound to FlowKit Pending (M-level) - #11

Merged
rockyshi1993 merged 18 commits into
mainfrom
test/s13-chatgpt-tool-bridge
Nov 12, 2026
Merged

rockyshi1993 merged 18 commits into
mainfrom
test/s13-chatgpt-tool-bridge

Conversation

@rockyshi1993

@rockyshi1993 rockyshi1993 commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Scope

Preserve a reproducible M-level ChatGPT-authored response → exact FlowKit Pending → trusted Host acceptance experiment.

  • Phase 1 publishes the actual Public Pending and exact requestId / taskDigest in CI output.
  • A ChatGPT-authored response is returned through an authenticated GitHub tool action, then stored as a fixture.
  • Phase 2 deterministically recreates the same Pending, verifies runId/requestId/taskDigest, and exercises Host signature/CAS, duplicate Ack and SQLite close/reopen.
  • docs/interactive-chatgpt-response-evidence.md records the evidence boundary and preparation procedure.

Important evidence boundary

This is NOT a FlowKit native JavaScript-tool invocation and NOT native S13. The model returns its response through a GitHub tool action; the test replays that response through FlowKit. There is no independent provider/session attestation, and no Grok Build/Codex native-tool proof. Native Host S13 remains BLOCKED.

Phase 1 and Phase 2 are separate Actions invocations with separate temporary SQLite databases. Phase 2 reconstructs the deterministic Pending and tests restart within its own DB; it does not continue the physical DB from Phase 1.

Test gate

Normal CI requires the complete response fixture. The no-fixture preparation path is available only when explicitly invoked with FLOWKIT_S13_PREPARE=1; it cannot silently produce a green normal CI run.

Verification

  • Current exact PR HEAD: c9b6033c8302cbb205f251f68aba2f45222d7191.
  • Actions run 43182753787: 7/7 jobs successful (Ubuntu/Windows × Node 22.13.0/24.22.1, two Linux Host OS-user jobs, website).
  • Both Node 22 matrix cells report 387/387 tests; Node 24 matrix jobs also passed.
  • No production Core, ABI, Store schema or Host security semantics changed.

Note

Medium Risk
The coordinator start() snapshot change affects durable State and start-intent hashing at run creation; incorrect copying could break idempotency or capacity handling, though scope is limited to that path.

Overview
Adds M-level ChatGPT acceptance: workflows, recorded turn fixtures, and docs/interactive-chatgpt-response-evidence.md that bind a real model response to an exact Pending (runId / requestId / taskDigest) and replay it through the trusted Host—not native S13.

The only production change fixes R04 in coordinator.start(): deep-copy caller state and startIntent before the first await so mutations after the call cannot alter the initial checkpoint or startKey idempotency.

CI and test wiring expand coverage: npm test includes tests/integration/*, the Host isolation job runs npm ci plus m6-e2e with FLOWKIT_M6_ISOLATION, and new integration pieces include m6-ledger-boundary and the scripted m6-worker fixture. A large set of acceptance, Phase 2 audit, and verification docs/evidence is added alongside.

Reviewed by Cursor Bugbot for commit c9b6033. Bugbot is set up for automated code reviews on this repo. Configure here.

Copy link
Copy Markdown
Contributor Author

S13 自主接入实测 — 证据、独立复审与裁决(2026-11-11)

结论:当前 ChatGPT 模型确实参与了真实 FlowKit JavaScript 工具执行链,闭环功能验证 PASS;但该测试不构成 Codex 原生 S13 验收,PR 保持 Draft。

两段真实操作证据

阶段 A:由真实源码发布 Pending

  • PR 最初 HEAD 98387df8e6921216a0c4945394ce5fdd75add287 的 Actions 42956481857 首轮 Ubuntu Node24 Job 产出 S13_CHATGPT_PUBLIC_TASK。
  • 原生 compileInteractive 从仓库中的 examples/interactive/s13-chatgpt.workflow.js 编译 Condition→Agent→Terminal 到 JavaScript Program;Host SQLite 先持久化 Pending,再由 getPublicAgentTask 输出只包含白名单字段的公开任务。
  • 真实 requestId:req:6bed7ea39b96e81b99100ffe69bb174ba38533d42f3bbdbefad6239cee0ac829。
  • 公开任务摘要:sha256:96733a8e513b08020acc42ef5dabd93413d52b452d8b982d40afcf3b81ac2876。
  • 日志记录:初次 waiting revision 5,Journal 6 条。

阶段 B:真实 ChatGPT 在阅读阶段 A 的输出后回复

  • 当前对话中的 ChatGPT 模型读取上述真实、已发布的 Agent Task,然后通过已连接 GitHub 工具调用写入 tests/fixtures/s13-chatgpt-reply.json,提交 2595be0b5f781e674b6a2a0a043cd15b37efab4b。不是预先写死的脚本 worker,也不是执行测试时由假模型自动生成。
  • 回复中绑定真实 runId + requestId + taskDigest,结构化 summary/nextAction/flowkitBoundary 三项回答由模型生成。
  • 最终 HEAD eac72c66a33e8a6411aa8748240abe9146d0c4c0 的 Actions 42957070193:7/7 jobs completed/success,Ubuntu/Windows × Node22/24 各 358/358 PASS、0 fail、0 skip,每组都出现 S13_CHATGPT_TOOL_BRIDGE_COMPLETED。两项 Linux Host 跨 UID 安全专项和网站构建成功。
  • Host 关闭/重开同一 Job 的 SQLite 数据库,从持久化 Pending 恢复,核验任务摘要和 requestId,伪造签名拒绝无 CAS,Host 生成真实 Ed25519 签名提交模型回复,完成到 succeeded/done,acceptedRevision=6,Journal 12 条且连续,重复回执返回原始 Ack,无额外 revision。
  • CI 中非公开字段的测试值是每次 CI 运行随机生成,且不输出到公开任务,模型读取的仅是授权 Pending。

必须写清的验收边界

  1. ChatGPT 在对话中真实使用了工具:GH 文件写入工具调用有对话及 GitHub commit 证据,GitHub Actions 确实通过 Node.js 运行了本仓库的 FlowKit Program 和 Host。没有本地 Codex CLI,也没有凭空声称已调用 Codex API。
  2. 不是完整的 S13 原生模型宿主认证:Host 仅能校验已提交的 GitHub 文件与 Pending identity;GitHub 工具提交不能独立证明 ChatGPT 提供商原生会话身份/模型来源。Host 用 ephemeral 私钥做的 Ed25519 签名只证明 Host 对回复作出确认,不能弥补来源认证。
  3. 两次不同 Actions 没有复用同一个物理 SQLite 数据库:第一段只产出公开任务供模型消费;第二段用相同 Program/Run identity 重新产生 Pending,之后在该 CI Job 内确实关闭并重开同一 SQLite 数据库,验证恢复。不能写成“跨 Actions 保留同一物理 DB 断点续跑”。
  4. ChatGPT 没有成为完全自动递归调用的 Codex Agent Host;需要真实 Codex/Claude/Grok 或原生 ChatGPT provider/session 认证链的 JS 工具调用日志和 Host provenance 对接,才能将 M6 S13 从 BLOCKED 变成 PASS。
  5. 测试模型回复固定绑定 Program 和任务 hash,若 DSL/编译器变化,需重新产生真实 Pending 并重新模型验收。这属于一次性准入证据,不宜将本 PR 的快照误称为永久通用回归 fixture。

源码复审裁决

只修改 4 个测试/示例文件(工作流定义、公开 Skill、模型回复 fixture、Host 测试);0 生产运行时/ABI/API/DB 变更,未引入 Context、模型代理服务、用户产物存储、自动部署。

判定:ChatGPT 自主工具链可行性验证 PASS;M6 S13 原生宿主/独立来源认证仍 BLOCKED。
本 PR 保持 Draft 并保存真实证据,未经完整 S13 验收不得把它并入 M6 正式验收/将 #7 转 Ready。

Copy link
Copy Markdown
Contributor Author

验证覆盖范围重新审计(2026-11-11):不可把一次模型回合扩大为复杂 S13 验收

复审裁决:此 PR 只证明一条 ChatGPT 参与的简单模型工具桥接 Happy Path,不能作为复杂工作流验收,也不能使 M6 S13 PASS。

A. PR #11 究竟验证了什么

  • 用户真实 ChatGPT 模型只生成过一份 summary/nextAction/flowkitBoundary JSON 回答,读取的是第一次 Actions 发布的授权 Condition(true) -> Agent(review) 的单个 Pending。
  • 用户对话中的 GitHub 工具将这份结果写入 tests/fixtures/s13-chatgpt-reply.json,之后 4 种 OS/Node CI 环境使用的是同一份固定结果,不是 4 次独立实际模型调用。
  • 第二次 Actions 使用与第一次相同的 Program/runId/requestId/taskDigest 重新创建其自己的 SQLite Run;在第二次执行的单个 Job 内关闭/重开该 SQLite DB,模拟恢复。两次 CI 不共享实体数据库。
  • 验证了 Host 公开输入白名单、真实 JS Program 与 Pending、结构化小结果、Ed25519 证明、无效签名拒绝、CAS、最终 succeeded、Journal 连续、历史 duplicate Ack。没有真实模型执行失败/重试、链式多 Agent、多个实际条件分支、模型工具反复循环、并发模型会话、真实 Provider 来源认证或单个 Grok/Codex 原生 JS 工具会话。
  • 最终 CI 42957070193 7/7 成功,4 矩阵各 358/358,但数字包含全仓库编译/契约/Standard/Interactive 等测试,不是 358 条 S13 场景。

B. 与其他测试不可混同

  • 主分支 M4/M5/S07 测试确实覆盖 条件路由、Schema 失败与有限重试、SIGKILL 恢复、独立进程 CAS 竞争、重复回执、错租户/错签名/泄漏拒绝、容量退出、21 Agent 连续回执的 SQLite Ledger 等,均为自动化/脚本场景而非真实模型多轮。
  • M6 Draft PR #7 有 10 条真实 JS Host + scripted worker 集成场景,以及 S07 正向修复回归;包括阶段预算 1/128、Host kill/restart、source/Skill/Program/policy drift、Standard State parity、Condition 缺失错误等。但不是实际 Codex/Grok 模型。
  • P0-A Interactive 只实现 Condition/Agent/Terminal,Human/Action/Verification/Loop/Parallel 处于后续 P0-B/P1/P2;不能将 Standard 支持或编译器静态拒绝冒充 Interactive 动态复杂验证。

C. 建议冻结的 P0-A 复杂验收集合(12 条,先用脚本覆盖逆境、再选 3–5 条由真实 Grok Build 验证)

  1. 真实模型多 Agent 串行:至少 4 个 Agent + 2 个 Condition,前后依赖与结果字段严格传递;模型不能越过 Program 直接跳转。
  2. 动态路线覆盖:分别触发真/假/默认路径与缺失 when 输入;不应执行未选中的 Agent。
  3. Schema 负例/恢复:真实模型先输出错误结构 → 验证拒绝 → requestId/attempt 更新 → 再输出正确结果。
  4. 受信 Host 失败回执:模拟 Provider 超时/超限并按重试上限结束;不能让模型自称失败就获得执行权。
  5. 崩溃/恢复:至少在 Pending 发布后、接纳前、验证/State 提交前 SIGKILL;恢复后原请求身份及期望 CAS 不变。
  6. 重复与竞争:双 Host/并发重复回执、消息丢失、历史 Ack;State 只能提交一次,不声称 Provider 恰好调用一次。
  7. 版本与篡改:Program/Skill/Host binding policy/source drift;禁止继续执行变化的输入,State/Journal 不被修改。
  8. 安全/越权:签名无效、跨租户、私钥/数据库访问、公开任务白名单/敏感上下文;OS 隔离独立验证。
  9. 容量:1.75 MiB 活跃空间、2 MiB 硬上限、正常 256 KiB 结果、超过限额后的明确终态与未认证大回执拒绝。
  10. 长链压力:20–50 Agent 的脚本结果、数百阶段 CAS/Journal/Receipt、重启后的连续性与空间开销;不要求真实模型调用 50 次。
  11. 预算和确定性:maxStagesPerCall=1 vs 128 的最终 State/终态等价,调度和重试恢复不依赖预算。
  12. 原生模型宿主:真实 Grok Build 或 Codex 的同一宿主会话中模型→JS 工具→Pending→模型结果→Host 审计,记录原生工具日志及可独立验证的 Provider/session 来源;否则 S13 仍 BLOCKED。

每条用例必须记录:scenarioId / Program hash / 宿主与模型版本 / 实际执行次数与工具日志 / 正反预期 / Run 状态及 Journal / Node22/24 Ubuntu/Windows 结果 / 证据链接 / 结论 PASS-PARTIAL-BLOCKED-FAIL。不应在没有这些材料时报告“复杂场景验证通过”。

本次只作覆盖复审与验收建议,不擅自扩大已有 PR 的代码范围、不合并、不修改 main。

Add current-main M6 scripted Host integration coverage, root-discovery fixtures, Linux cross-UID CI, and the full Interactive delivery roadmap. This is test/CI/documentation only and does not complete native-host C12/S13 or M6 final acceptance.
Add the reviewed Trusted Host V2 threat model, deployment profiles, security acceptance matrix, and explicit Phase 2 limitations. This is documentation-only: it does not implement Host isolation, Grok native provenance, Windows ACL enforcement, or Phase 3/4 runtime changes. F-02 and F-04 remain pending real validation; F-07 formal V0.3/V0.6-R5 conformance remains blocked. Merge does not authorize Phase 3 or claim C12/S13/M6 acceptance.
…dit plan

Record independently validated Requirements V0.3 and Technical Design V0.6-R5 originals, limited Core PoC results and Phase 2 traceability roadmap. Reconcile the previously confirmed M1–M6 P0-A plan and existing M1–M5 implementation. Documentation only: no Core/API/Program ABI/Store schema changes, no Phase 3 authorization, no C12/S13 or full conformance PASS claim.
* docs(interactive): add source-backed T/R/S crosswalk and initial P0-A gap findings

* docs(interactive): document Host/Public terminal State projection contract difference

* docs(interactive): record async Store contract divergence from confirmed V0.6-R5

* docs(interactive): add Phase 2 R2 code-evidence review and R04 mutation findings

* docs(interactive): link R04 independent regression PR and retrigger Phase 2 CI
…idence

* docs(interactive): record local verification of PR 16 and 17

The report keeps the PR heads, commands, R04 failure output, the
snapshot fix result, and the merge recommendation. Raw decisive logs
are stored beside it. No product code changes.

* docs(interactive): record that Actions for PR 16-19 are still queued

The 13:15 +08 reconfirm keeps all four draft PRs unmerged.
Run status is queued with an empty conclusion. That is not a matrix pass
and not a proven Actions outage.
start() copied caller-owned State and startIntent only after
loadInteractiveProgram resolved. That await yields even when the loader
is already settled, so a caller could change both objects before the
Checkpoint and startIntentHash were created. Copy both with the existing
bounded canonical snapshot first, and preserve the initial-State capacity
error. Later Store writes use those copies.

Includes the R04 regression tests from PR #17.
@rockyshi1993 rockyshi1993 changed the title test(interactive): real ChatGPT tool-turn → public Pending → signed Host CAS test(interactive): record ChatGPT-authored response bound to FlowKit Pending (M-level) Nov 12, 2026
* test(interactive): freeze C01-C12 scenario matrix and scripted/live/native evidence separation

* test(interactive): C01-C04,C10,C11 scripted complex runs with real Program signed Host and SQLite

* test(interactive): C01/C03 live multi-Agent two-Condition workflow definition

* test(interactive): real ChatGPT multi-Agent 5-turn replay bridge with schema rejection and SQLite reopen

* test(c01-live): actual ChatGPT requirements analysis bound to published Pending #1

* test(c01-live): ChatGPT architecture response to real dependent Pending #2

* test(c01-live): actual ChatGPT implementation plan from real Pending #3

* test(c03-live): ChatGPT deliberately submits invalid reviewApproved type to test real retry Pending

* test(c01-live): genuine ChatGPT corrected review after real attempt-2 Pending #5

* docs(interactive): record C01-C12 detailed scripted and five-turn real ChatGPT evidence with open native gates

* test(interactive): extend complex P0-A acceptance with C13-C20 interleavings

* docs(interactive): extend risk-mapped C13-C24 acceptance and native-host gates

* test(interactive): inspect durable Store state while Pending frame intentionally redacts State

* test(interactive): verify C16 durable Checkpoint while Pending frame hides private State

* docs(interactive): record independently checked 7/7 CI and C13-C24 layered verdict

* test(interactive): rebase M6 Host integration on current main

Add current-main M6 scripted Host integration coverage, root-discovery fixtures, Linux cross-UID CI, and the full Interactive delivery roadmap. This is test/CI/documentation only and does not complete native-host C12/S13 or M6 final acceptance.

* docs(interactive): add Trusted Host V2 conditional security design

Add the reviewed Trusted Host V2 threat model, deployment profiles, security acceptance matrix, and explicit Phase 2 limitations. This is documentation-only: it does not implement Host isolation, Grok native provenance, Windows ACL enforcement, or Phase 3/4 runtime changes. F-02 and F-04 remain pending real validation; F-07 formal V0.3/V0.6-R5 conformance remains blocked. Merge does not authorize Phase 3 or claim C12/S13/M6 acceptance.

* docs(interactive): recover frozen baselines and establish evidence audit plan

Record independently validated Requirements V0.3 and Technical Design V0.6-R5 originals, limited Core PoC results and Phase 2 traceability roadmap. Reconcile the previously confirmed M1–M6 P0-A plan and existing M1–M5 implementation. Documentation only: no Core/API/Program ABI/Store schema changes, no Phase 3 authorization, no C12/S13 or full conformance PASS claim.

* docs(interactive): archive Phase 2 formal conformance R1/R2 audit

* docs(interactive): add source-backed T/R/S crosswalk and initial P0-A gap findings

* docs(interactive): document Host/Public terminal State projection contract difference

* docs(interactive): record async Store contract divergence from confirmed V0.6-R5

* docs(interactive): add Phase 2 R2 code-evidence review and R04 mutation findings

* docs(interactive): link R04 independent regression PR and retrigger Phase 2 CI

* docs(interactive): archive local R04 reproduction and verification evidence

* docs(interactive): record local verification of PR 16 and 17

The report keeps the PR heads, commands, R04 failure output, the
snapshot fix result, and the merge recommendation. Raw decisive logs
are stored beside it. No product code changes.

* docs(interactive): record that Actions for PR 16-19 are still queued

The 13:15 +08 reconfirm keeps all four draft PRs unmerged.
Run status is queued with an empty conclusion. That is not a matrix pass
and not a proven Actions outage.

* fix(interactive): snapshot start inputs before first await (R04)

start() copied caller-owned State and startIntent only after
loadInteractiveProgram resolved. That await yields even when the loader
is already settled, so a caller could change both objects before the
Checkpoint and startIntentHash were created. Copy both with the existing
bounded canonical snapshot first, and preserve the initial-State capacity
error. Later Store writes use those copies.

Includes the R04 regression tests from PR #17.

* test(interactive): require complete recorded ChatGPT responses in normal CI

* docs(interactive): clarify recorded model-response evidence tier
@rockyshi1993
rockyshi1993 marked this pull request as ready for review November 12, 2026 08:29

@rockyshi1993 rockyshi1993 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maintainer self-review completed against the current-main merge tree and exact PR HEAD. The unique files are a workflow example, public Skill, response fixture, test and evidence documentation; no production Core/ABI/Store schema changes. The test explicitly distinguishes a GitHub-tool-delivered ChatGPT-authored response from a FlowKit native JS-tool invocation and native S13. Normal CI now requires the full response fixture; only FLOWKIT_S13_PREPARE=1 permits a preparation-only run. Exact HEAD Actions run 43182753787 passed all 7/7 jobs; all four OS/Node verify cells passed, with 387/387 tests in the Node 22 cells. This is M-level recorded response evidence only; C12/S13 native Host remains BLOCKED.

@rockyshi1993
rockyshi1993 merged commit 81c7839 into main Nov 12, 2026
9 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