Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/opencode/src/tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7623,6 +7623,7 @@ describe('auth.loader', () => {
// Establish the plugin's actual route before testing a quota-only write.
const response = await loaded.fetch(MESSAGES_URL, EMPTY_POST)
expect(response.status).toBe(200)
await plugin.__fallbackRefreshReady
await drainSidebarWrites()
expect((await getSidebarState()).activeId).toBe('fallback-1')
if (clearExistingRouting) {
Expand Down Expand Up @@ -7663,6 +7664,9 @@ describe('auth.loader', () => {
actionId: 'quota-refresh',
})
expect(refreshed.ok).toBe(true)
// Quota polls return before publishing to the pool config. Drain those
// writes so a pending rename cannot recreate the file during the swap.
await plugin.__scopedRuntime.drainQuotaPublications()
// Replace the shared pool config JSON file with a directory so later
// account reads fail instead of returning an outdated snapshot.
const accountFile = migratedPool?.paths.config
Expand Down
Loading