Severity
Medium — wrong-org queries and result rows displayed and persisted under the new org's key.
What happens
When workspaceKey changes (org switch), both effects run in the same commit with the render's workspaceLoaded still true, so the persist effect immediately writes the old org's tabs under the new org's key before the async load resolves. If the new org has no saved workspace, the stale tabs (and, since QueryScreen's key query-1 is unchanged, its loaded result rows) are displayed and permanently saved as the new org's workspace — exportable under the wrong org context.
Evidence
src/ui/screens/ExportScreen.tsx:63-82
Suggested fix
Gate the save effect with a ref reset synchronously when workspaceKey changes, and reset tabs to defaults when the new key has no saved workspace.
Environment
Commit 74cf21b (main), WaveLink 0.6.0. Found in the 2026-08-31 adversarial audit (code-verified).
Severity
Medium — wrong-org queries and result rows displayed and persisted under the new org's key.
What happens
When
workspaceKeychanges (org switch), both effects run in the same commit with the render'sworkspaceLoadedstill true, so the persist effect immediately writes the old org's tabs under the new org's key before the async load resolves. If the new org has no saved workspace, the stale tabs (and, since QueryScreen's keyquery-1is unchanged, its loaded result rows) are displayed and permanently saved as the new org's workspace — exportable under the wrong org context.Evidence
src/ui/screens/ExportScreen.tsx:63-82Suggested fix
Gate the save effect with a ref reset synchronously when
workspaceKeychanges, and reset tabs to defaults when the new key has no saved workspace.Environment
Commit
74cf21b(main), WaveLink 0.6.0. Found in the 2026-08-31 adversarial audit (code-verified).