fix(components): fence workspace sidebar scope - #55
Merged
Conversation
Publish workspace identity atomically and require route, runtime, and metadata ownership to agree before starting or rendering workspace-scoped sidebar data. Model: GPT-5
Model: gpt-5.6-sol
Reject a same-slug cached runtime once the published workspace identity resolves to a different ID, while preserving offline-first startup before that identity is available. Model: GPT-5
Model: gpt-5.6-sol
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Author type
Problem / pressure
During a workspace route transition, the route can already target workspace B while the shared workspace identity, runtime, or metadata projection still belongs to workspace A. The state normally converges to B, but consumers can start requests, subscriptions, or effects against the previous workspace during that transient window. Delayed organization work can also attempt to publish an obsolete result after a newer transition has begun.
Summary
Before / after
Test plan
pnpm --filter @lody/components typecheckagent-browser: the pre-fix consumer semantics reproduced both unsafe enabled windows, while the current implementation failed closed and recovered after state convergenceoxlinton changed TypeScript filesprettier --checkon changed filestsr generategit diff --checkAgent handoff
Instructions for reviewing agents
workspace-context.ts,use-resolved-workspace-scope.ts, anduseOrganization.tstogether, then verify every migrated consumer fails closed without blocking provider-external runtime setup.Authoring context
Sharing consent (author side)
N/A/ redacted