Commit Graph
5 Commits
Author SHA1 Message Date
weichen 12a53b0285 Enforce the runtime concurrency cap at queue claim time
Why: F12 - claims counted only per-agent in-flight tasks, so two agents
on one runtime could exceed the runtime cap; count errors were ignored
and silently allowed claims.
Evidence: queue tests pass incl. dual-bound, concurrent-claim and
forced-count-failure cases (verify-u9.json, exit=0).
Impact: single atomic conditional UPDATE; lease and reclaim rules kept.
Refs: feature/agent-stack-audit-remediation-b2 U9
2026-10-22 02:57:17 +00:00
weichen cf83d30743 Persist collaboration state and surface persistence failures
Why: F11 - SQLite runs lost mailbox/handoffs/board across restarts,
identical JSON entries collapsed during decode, and checkpoint or
terminal-save failures were swallowed behind success events.
Evidence: store and checkpoint tests pass incl. injected-failure and
round-trip tables (verify-u8.json, exit=0); schema migration preserves
rows.
Impact: runs survive restarts with collaboration state; save failures
are visible before any completion event; async/on_exit semantics kept.
Refs: feature/agent-stack-audit-remediation-b2 U8
2026-10-22 02:57:17 +00:00
weichen 0f1daa8b89 Align the SQLite run store test with honest step failures
Why: the U3B semantics change removed the failed-with-patches
promotion; TestEngineRunsOnSQLiteStore still encoded the old behavior
and failed under the fixed engine.
Evidence: repair receipt success; sqlite store tests pass
(verify-u3br2.json).
Impact: test-only change.
Refs: feature/agent-stack-audit-remediation-b1 U3B repair
2026-10-21 18:05:51 +00:00
weichen 90ac98ea65 Converge run persistence on SQLite through the Store port
ci / vet-and-test (pull_request) Successful in 23s
ci / docker-checkout-hostgateway (pull_request) Successful in 1s
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
2026-10-07 10:29:47 +00:00
weichenandCursor a182d7662b Move cross-library squad code into adapter modules
Why: the squad core has to compile without agent-native or agent-intent. Ports stay in the core; adapters and the CLI own the concrete clients.
Evidence: GOWORK=off go test -count=1 ./squad/ ./store/ ./textextract/ ./schema/ passed, and the intent, sqlite, native, and cmd modules passed their own go test.
Impact: core go.mod keeps error-code-system only. Nested gitlinks stay. Callers register the native backend through agent-squad/adapters/native.
Refs: D1
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-03 13:40:58 +00:00