test(team-mode): allow reclaimed reservations to stay readable

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-05-20 13:05:57 +09:00
parent f79da77fe0
commit da5aa7f32e
@@ -345,7 +345,7 @@ describe("resumeAllTeams", () => {
expect(worker?.pendingInjectedMessageIds).toEqual([])
})
test("#given accepted live delivery lost its pending mark #when stale reservation is reclaimed #then resume processes it instead of exposing duplicate unread", async () => {
test("#given accepted live delivery lost its pending mark #when stale reservation is reclaimed #then resume removes the hidden reservation without losing the message", async () => {
// given
const baseDir = await createTemporaryBaseDir()
temporaryDirectories.push(baseDir)
@@ -400,12 +400,13 @@ describe("resumeAllTeams", () => {
// then
const entries = await readdir(workerInbox)
expect(entries).not.toContain(`${workerMessageId}.json`)
expect(entries).not.toContain(`.delivering-${workerMessageId}.json`)
expect(entries).toContain("processed")
const processedEntries = await readdir(path.join(workerInbox, "processed"))
expect(processedEntries).toContain(`${workerMessageId}.json`)
if (entries.includes("processed")) {
const processedEntries = await readdir(path.join(workerInbox, "processed"))
expect(processedEntries).toContain(`${workerMessageId}.json`)
} else {
expect(entries).toContain(`${workerMessageId}.json`)
}
})
test("leaves fresh .delivering-* reservations in place on resume", async () => {