Skip to content

fix: checkpoint worker before native stop#1033

Merged
wbugitlab1 merged 2 commits into
mainfrom
issue/338-stop-order-data-loss
Jun 20, 2026
Merged

fix: checkpoint worker before native stop#1033
wbugitlab1 merged 2 commits into
mainfrom
issue/338-stop-order-data-loss

Conversation

@wbugitlab1

Copy link
Copy Markdown
Owner

Summary

  • add worker-owned mem::shutdown-flush plus authenticated POST /agentmemory/shutdown/flush
  • flush BM25/vector index state before native stop signals worker or engine processes
  • make Windows non-force stop fail closed when persistence cannot be confirmed, while --force warns clearly
  • gate shutdown flush until persisted indexes are loaded or a complete rebuild is available

Fixes #338.

Verification

  • corepack pnpm run lint
  • corepack pnpm exec vitest run test/index-persistence.test.ts test/search.test.ts test/shutdown-flush.test.ts test/api-boundary-coverage.test.ts test/cli-stop-port-detection.test.ts test/reconnect-registration.test.ts test/engine-launch.test.ts test/runtime-config.test.ts test/cli-iii-config.test.ts test/consistency.test.ts
  • corepack pnpm run build
  • corepack pnpm test
  • semgrep scan --config p/default --error --metrics=off .
  • gitleaks protect --staged --redact

@wbugitlab1 wbugitlab1 merged commit 2ecbe54 into main Jun 20, 2026
2 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.

All data lost on restart — stop order kills iii engine before worker can flush

1 participant