test(managed-agent): declare v2 reader in cleanup-conflict MySql IT (#16372)

`HostedCleanupRetentionMySqlIT.cleanupAdmissionConflictIsReturnedOverHttpOnMySql`
expects 409 `managed_session_cleanup_conflict`, but its commit carries a
`hosted.cleanup` event, which `ManagedHostedRecoveryRecords.requiresVersionTwo`
classifies as requiring storage v2. `JournalCommit` then calls
`readerVersion.requireReadable(2)` before the cleanup-conflict check, and the
request never set the `X-Qwen-Managed-Max-Readable-Storage-Version` header, so
`ManagedSessionReaderVersion` defaulted the ceiling to 1 and threw
`managed_session_reader_version_unsupported` first. The 2026-11-04 nightly
failed on exactly that mismatch.

Declare the v2 reader ceiling (the same header `ManagedSessionStoreIntegrationTest`
uses when it expects the commit to be accepted) so the request reaches the
cleanup-admission path the test actually exercises.

Co-authored-by: Qwen-Coder <[email protected]>
This commit is contained in:
易良andQwen-Coder authored and GitHub committed 2026-11-05 16:27:17 +08:00
1 parent 2f4608c00b
commit feb06ca823
1 file changed
+1
@@ -50,6 +50,7 @@ class HostedCleanupRetentionMySqlIT extends HostedCleanupRetentionTest {
.header("Content-Type", "application/json")
.header(TenantContextFilter.HEADER, "tenant")
.header(ManagedSessionStoreModels.WRITER_TOKEN_HEADER, ExtensionRecordJournal.TOKEN)
.header("X-Qwen-Managed-Max-Readable-Storage-Version", "2")
.POST(HttpRequest.BodyPublishers.ofString(json.writeValueAsString(request))).build(),
HttpResponse.BodyHandlers.ofString());
assertThat(response.statusCode()).as(route).isEqualTo(409);