Why: Q1 WP5 - platform's SQLite becomes an implementation of the
squad Store port so run state and orchestration state live in one
database, and platform's in-process execution goes through the
Executor port instead of bypassing it (X6).
Evidence: all five modules go vet clean and go test ok, including
engine-on-SQLite (state in DB, no run-level JSON files, second
engine recovers from the same DB), SQLiteStore round trip, and the
full squad compatibility net.
Impact: runState/hitlGate exported so the port is implementable;
Options.Store wires into engineDeps; leader persistence and
checkpoints route through the port; PrepareWorkspace no longer
writes run-level JSON (st.save owns it); platform RunInProcess
takes squad.Executor (callers updated); serve mounts the engine on
platform's RunStore - single orchestration.db for both.
Refs: Documents proposal 2026-10-07-agent-stack-n1q1i1-plans.md Q1 WP5
weichen
merged commit eba77e782f into main2026-10-07 10:31:16 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Q1 增量四(收官):SQLite 收编为 Store 实现、双真相源合一、X6(WP5)
按 Documents 提案
2026-10-07-agent-stack-n1q1i1-plans.md§3.2 落地 Q1 的 WP5。至此 Q1 七个工作包全部落地。改动
runState/hitlGate导出为RunState/HitlGate(WP4 埋的缺陷——外部包无法实现带未导出类型的端口)。机械重命名,套件证实行为中性。SQLiteStore(adapters/sqlite/runstore.go):squad.Store 的 SQLite 实现——squad_run_state/gate/checkpoint/leader四表与平台既有 23 表同库;Options.Store接线进 engineDeps;leader 持久化与 superstep 检查点也改道端口(此前检查点写死 FileStore)。PrepareWorkspace不再直写 run 级 JSON(由 st.save() 经端口统一落盘,否则 SQLite 后端会漏一份到文件)。platform.RunInProcess签名stream llm.StreamFunc→exec squad.Executor——执行走小队 Executor 端口(nil 即 fail-closed),不再绕过端口直驱 agent-native runtime;cli 冒烟与测试调用方改经脚本执行器注入。过程中抓到并修掉一个真实陷阱:脚本执行器必须逐调用返回拷贝(共享指针会跨步骤串味,已有注释)。orchestration.db、引擎直接用plat.RunStore()并复用同一连接挂平台——运行状态与编排状态同一个 SQLite 文件(验收第三条)。验证
TestSQLiteStoreRoundTrip(run/gate/checkpoint/leader 全链路 + 缺失语义与文件态一致);TestEngineRunsOnSQLiteStore(验收第三条实证):引擎注入 SQLiteStore 跑通蓝图,run 级 JSON 不落盘、状态经端口读回、检查点入库、第二引擎同库 Inspect 可用;Q1 验收三条终态
主任务:Dev 仓
feature/agent-stack-q1。