fix(settings): sync auto-settle and other shared preferences across environments (#9147)

Co-authored-by: Claude Fable 5.1 <[email protected]>
This commit is contained in:
Theo BrowneandClaude Fable 5.1 authored and GitHub committed 2026-09-01 18:18:20 -07:00
1 parent 5014e5fcdd
commit 8efd4e95fc
10 files changed
+489 -44

No files matched your search

+4 -1
View File
@@ -88,7 +88,10 @@ A turn is complete when its session leaves `running` status, projected by
`settledTurnStateForSessionStatus` in [`projector.ts`][projector]. Checkpoint work settling later
does not define turn end.
Thread settlement is server-owned. Per-environment settings control PR and inactivity settlement.
Thread settlement is server-owned. Each server's own settings control PR and inactivity
settlement. Those keys are user preferences, so clients write them to every connected environment
(`SHARED_SERVER_SETTING_KEYS` in `packages/client-runtime/src/state/sharedSettings.ts`) and warn
when a connected environment drifts.
[`ThreadSettlementReactor`][settlement] checks threads at startup, when those settings change, and
once per minute, including when no client is connected. It dispatches the guarded internal
`thread.auto-settle` command, which uses the existing settlement event lifecycle. Automatic