refactor(orchestration): derive thread settled state on the server

Settled classification used to be re-derived per client (inactivity window,
PR state, clock hacks), with real drift between web and mobile. The server
is now the single author of settled state: a ThreadAutoSettleReactor sweep
dispatches thread.settle for quiet threads and merged/closed PRs, the
auto-settle window moved to ServerSettings, and clients just read
settledOverride.

Includes the review-hardening rounds: settledAt derived in the decider from
read-model activity (unforgeable, restart-safe via a projected
latestUserMessageAt stamp, revert-consistent, clock-skew clamped), only
live-confirmed PR states act as settle authority (cached open/closed/no-PR
re-verify with cooldown), fail-safe settings reads, and capability-gated
settings UI with blur-committed input.

Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
Theo BrowneandClaude Fable 5 committed 2026-08-14 18:06:26 -07:00
1 parent 57a299a785
commit 8b8bec71c5
46 files changed
+1611 -824

No files matched your search

+3 -3
View File
@@ -189,9 +189,9 @@ it.layer(NodeServices.layer)("external package dependency closure", (it) => {
if (!manifest) continue;
const declared = {
...(manifest.dependencies ?? {}),
...(manifest.optionalDependencies ?? {}),
...(manifest.peerDependencies ?? {}),
...manifest.dependencies,
...manifest.optionalDependencies,
...manifest.peerDependencies,
};
for (const dependency of Object.keys(declared)) {
if (!isRuntimeExternal(dependency)) {