diff --git a/backend/tests/Taskdeck.Api.Tests/AutomationProposalRepositoryIntegrationTests.cs b/backend/tests/Taskdeck.Api.Tests/AutomationProposalRepositoryIntegrationTests.cs index 80ef58986..663350afd 100644 --- a/backend/tests/Taskdeck.Api.Tests/AutomationProposalRepositoryIntegrationTests.cs +++ b/backend/tests/Taskdeck.Api.Tests/AutomationProposalRepositoryIntegrationTests.cs @@ -941,8 +941,15 @@ public async Task GetExpiredAsync_WithExpiresAtInTheFuture_ShouldNotReturnAsExpi var results = (await repo.GetExpiredAsync()).Expirable.ToList(); - results.Should().NotContain(p => p.Id == unexpired.Id, "ExpiresAt is 30 minutes in the future"); - results.Should().Contain(p => p.Id == expired.Id, "ExpiresAt is 30 minutes in the past"); + // GetExpiredAsync intentionally scans the shared per-class database. Keep failure output + // attributable to this test without changing the repository query or hiding its result. + const string correlationPrefix = "corr-boundary-"; + var ownedResults = results + .Where(proposal => proposal.CorrelationId.StartsWith(correlationPrefix, StringComparison.Ordinal)) + .ToList(); + + ownedResults.Should().NotContain(p => p.Id == unexpired.Id, "ExpiresAt is 30 minutes in the future"); + ownedResults.Should().Contain(p => p.Id == expired.Id, "ExpiresAt is 30 minutes in the past"); } [Fact]