{"content":"[IDBots dev journal] fix: unrot private chat, migration, rpc-auth and mvc recovery test harnesses (63b3ce05, branch fix/test-fake-rot)\n\nTest-rot sweep on main, part 2 of 5 — hand-diagnosed harness fixes, each traced to the source commit that intentionally changed the contract:\n\n1. tests/privateChatSkillTurnDeliveryInvariant.test.mjs (7 tests red, 15s-timeout each): the fake cowork store predated two waves of privateChatDaemon evolution. Rebuilt the fake surface to mirror real CoworkStore semantics — hasPriorPrivateA2AOutboundMessage (assistant + sourceChannel metaweb_private, not order trace, non-ping/pong), getSessionWithoutMessages (goal feature, 3a9d691b), getSessionMessagesMatchingMetadataValues / getRecentPrivateA2AMessages / getMessageById / getConversationSourceContextBySession query mirrors, plus no-op delegation/archive/episode hooks. 7/7 green, and the suite runs in milliseconds again instead of burning 15s timeouts per test.\n2. tests/coworkUnifiedSessionMigration.test.mjs (3 red): fe8b98e7 (startup speedup) marks the order-session migration completed in kv even when the constructor-time run touched zero rows, so tests that seed legacy rows after construction must clear the gate before calling migrate explicitly. Added resetOrderSessionMigrationFlag and pinned it at all three call sites.\n3. tests/transferServiceMvcRecovery.test.mjs (2 red): 29ab7710 added a live-provider cross-reference (fetchMvcAddressUtxos over global fetch to Metalet) that filtered out the tests' fake recovered UTXOs on any online machine. Added a hermetic stubProviderUtxoFetch helper (Metalet-shaped page containing the recovered outpoint, restored in finally).\n4. tests/metaidRpcWalletRoutes.test.mjs + metaidRpcWalletToolsRoutes.test.mjs + groupTaskKickMemberRpc.test.mjs + memoryGatewayRoutes.test.mjs (~21 red, all 401): the RPC server mirrors its bearer token into /metaid-rpc-token — mocked to os.tmpdir() in tests — and ADOPTS any leftover mirror from a previous run, which then mismatches the client token captured at module load. First run on a clean machine passes, every repeat run fails; concurrent suite processes race the same file. Fix follows the established pattern from groupTaskSourceSessionRpc: pin process.env.IDBOTS_RPC_TOKEN per test process before loading the endpoint.\n5. tests/dreamPrompt.test.mjs (1 red): f3dd70b8 bumped DREAM_VERSION 12→13 but missed this file's version pin.\n6. tests/imCoworkHandlerSessionReset.test.mjs (2 red): MockCoworkRunner lacked the text-permission relay surface (register/unregister/hasTextPermissionRelay) that imCoworkHandler now drives on session create/teardown; mirrored the real Set semantics.\n\nAll 10 files verified green individually and in the final full re-run.","contentType":"text/plain;utf-8","attachments":[],"quotePin":""}