fix(app): scope auto-compaction to the selected workspace#2687
fix(app): scope auto-compaction to the selected workspace#2687reachjalil wants to merge 1 commit into
Conversation
fraimz — ✅ PASSED1 passed · 0 failed · 0 skipped — run Full frame proof with validated screenshots: ✅ remote-auto-compaction — Auto-compaction follows the selected workspace's owning endpointInternal demo
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@reachjalil is attempting to deploy a commit to the Different AI Team on Vercel. A member of the Team first needs to authorize it. |
Evidence clarificationThe earlier automated Fraimz comment uses generic “validated screenshots” wording. This flow is actually an internal The PR body now states that limitation and links #2688 as the endpoint-owned reload prerequisite. Current code checks are green on Linux and macOS; rebase on #2688 plus live remote-worker evidence remain gates before moving this draft to ready. |
Remote workspace reliability series
This is the third PR in a focused reliability series:
Review this after #2685, #2686, and #2688. The config read/write is independently scoped, while #2688 supplies the endpoint-owned reload coordinator required before this draft should be marked ready.
What was wrong
Auto context compaction is workspace-owned configuration, but Preferences always read and wrote it through the local OpenWork client. For a remote workspace, the route combined a remote server-side workspace ID with the local server. That could show an unverified default, fail the update, or target unrelated local state.
The existing
autoCompactContextLoadedflag also becametrueafter a failed read and was not used to disable the switch. An unavailable worker therefore looked like a confirmed enabled preference.What changed
Why this shape
The client and workspace ID are passed as one target so they cannot drift independently. Loaded state is tied to endpoint identity instead of a global boolean, which makes selection changes fail closed. Async completion guards prevent stale reads and failed saves from crossing workspace boundaries.
No Den, server, IPC, database, generated client, or wire contract changes are introduced. Remote credentials remain attached only to their existing remote client and are not copied, logged, cached, or sent to a fallback endpoint.
Validation
pnpm --filter @openwork/app test— 177 passed, 0 failedpnpm --filter @openwork/app typecheck— passedpnpm --filter @openwork/app build— passedpnpm fraimz --flow remote-auto-compaction— internal deterministic flow passed: four behavior steps plus voice-over coverageThe current Fraimz flow uses focused tests and source assertions with
requiresApp: false; it does not launch a real remote worker or capture the Preferences switch. Live remote-worker evidence remains a follow-up review gate before this draft is marked ready.Review guide
Start with
docs/remote-auto-compaction.mdfor the read/write ownership model, then reviewauto-compact-context.tsand the Preferences effect/toggle insettings-route.tsx.Known follow-up before ready
#2688 captures the originating endpoint for pending reloads and prevents remote failures from using the local desktop restart fallback. Rebase this PR after #2688 and route its reload request through that captured-target helper before promoting it from draft status.