Skip to content

Restore strict expectations in tests converted to Double - #751

Merged
binaryfire merged 71 commits into
0.4from
upstream-sync-2026-11-14-3
Nov 18, 2026
Merged

binaryfire merged 71 commits into
0.4from
upstream-sync-2026-11-14-3

Conversation

@binaryfire

@binaryfire binaryfire commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Double accepts unexpected calls by default and compares object arguments by value. Some tests lost checks when they moved from Mockery. They could pass if a handler received a different instance or if code called an unexpected method.

The tests now use strict doubles unless they deliberately ignore unrelated calls. They check object identity where the same request, job, connection or exception must be passed through. Tests that record arguments do so after a call matches. The suite uses Double's development branch for its fixes to expectation verification.

Several tests now check the result directly. For example, the permission scope tests exercise both integer and UUID keys, and the Reverb test checks that a subscribed socket actually receives the broadcast.

There’s also a fix for idle database connections. If releasing one lease throws, the resolver now attempts to release the remaining leases before propagating the failure. Cancellation takes precedence if cleanup encounters both cancellation and another error.

View guided diff Turn on auto-fix

Note

Convert test suite to strict Doubles and make idle-connection release failure-tolerant

  • Switches test doubles across the framework test suite to strict mode, so unconfigured calls to mocks now fail the tests. Many expectations also switch to Argument::same() to require exact object instances for exceptions, jobs, connections, and events.
  • Replaces placeholder assertTrue(true) patterns with real assertions, expectNotToPerformAssertions(), or Argument::capture() plus post-call checks.
  • Changes jasonmccreary/double to dev-master in composer.json to support the strict-double setup.
  • Fixes ConnectionResolver::releaseIdleConnections() in ConnectionResolver.php: it now catches each releaseIfIdle() failure, continues the loop, prefers cancellation, and throws the first retained failure after the loop.
  • Risk: the strict doubles may surface previously unnoticed interactions as test failures; releaseIdleConnections() now defers the first failure until all idle connections are released instead of aborting mid-loop.

Macroscope summarized 3dab76a.

A failed pool release previously left later idle leases in the coroutine context holding their physical sessions. Attempt each release before propagating the first failure, giving a caller cancellation precedence as in terminal connection cleanup.

Exercise the public database manager with two failing leases to check that both are visited and that the correct exception reaches the caller.
The released version can lose expectation failures caught by application code. Use the development branch containing the final-verification fix so forbidden calls still fail their tests.
Distinguish value comparison from the exact-instance matcher so converting a Mockery expectation preserves identity where the test relies on it.
Role assignment dispatches the event as one argument. Match that call so the never expectation directly identifies a forbidden dispatch when the event has no listeners.
QueueManager must supply the application that owns each connection. Match the exact instance when assigning or replacing it so the expectations remain meaningful even when two containers have equal state.
The SDK handler records a command before rejecting it with a queued exception. Check its name after the exception reaches the caller so a different failing operation cannot satisfy the deletion test.
An empty AWS mock handler throws before recording the command. Its last-command value cannot show whether a send was attempted here. Keep the checks for the original preparation failure and the events delivered for each outstanding job.
A predicate can be evaluated again to explain a mismatch. Keep the SQLite state check free of side effects and record the update in the response callback so the operation log reflects accepted calls.
Group the Double verification trait alphabetically with the database, Redis and rate limiter test traits. Describe the unlink fixture in terms of the deletion batches it records.
Preserve the unexpected-call checks of plain Mockery mocks when converting them to Double. Record arguments and call effects only after an expectation matches, since Double can evaluate predicates while considering other expectations or explaining a mismatch.
Use the same default for Hypervel tests and tests imported from upstream. Keep loose behavior where a test deliberately permits unrelated calls.
Configure the test doubles used by model gateways, tool execution and service clients to reject unconfigured calls. Keep each test’s existing return values, ordering and required interactions.
Check the exact user sent to credential validation, password rehashing and token storage. Record remembered logins only when the expected dispatch occurs. Use strict doubles for configured collaborators, retaining the intentionally loose store validator, and verify the actual cached result and no-op guard behavior.
Reject unconfigured collaborator calls in the broadcaster tests. Capture Mercure updates after the publish expectation matches, so diagnostic matcher evaluations cannot change the value inspected by the test.
Check the queued batch chain and its trailing closure, and verify the serialized options passed to the PostgreSQL insert. Require the original job on forwarded dispatches and forbid all instances of faked job classes from reaching the real dispatcher.
Check the event, inverse-relation callback, validation input and SQS cleanup exception that each double actually received. Keep existing type and value assertions, and reject unrelated calls on the configured collaborators.
Read forwarded IP headers in the response callback of each matched Algolia search. Keep the argument matchers free of side effects so evaluating candidate calls cannot add duplicate observations.
Register one finite factory expectation for each test and return its connection proxies in order. This catches extra lookups while preserving the distinct clients used in read, write and retry phases.
Clarify why normalized policy guesses prevent duplicate worker-lifetime instances. Mark the intentional store-wide event behavior next to the ported cache assertion so future upstream updates preserve it.
Require the repository selected by the user provider for both cache fills. In broadcasting, verify the rescued exception by identity and forbid reporting any exception on cancellation.
Make unexpected calls to the Redis collaborators fail, including in the tag rewrite integration test. Let Redis exceptions retain their trace when flushing a missing tag and check that the other tag still holds its value.
Select strict mode on store, lock and command doubles. Require interval error reporting before exercising the cache, while matching restored exceptions by class and message. Remove unconditional assertions where the existing call expectations or failure checks already cover the behavior.
Use strict doubles in the pool fixture and its connection and idle monitor tests. This makes additional calls during checkout, keepalive and release visible to those tests.
Require the scheduled event, application and reported exception to be the original instances. Share the scheduling process fixture so each strict double allows the stop call Symfony makes on destruction.
Require the same command to be unregistered when signal handling finishes. Give the prohibition message a real null output and keep command interactions explicit across the console fixtures.
Reject unconfigured calls to contextual binding and cookie collaborators. Express the timer no-throw case directly through PHPUnit when clearing a nonexistent timer.
Require exception handlers to receive the original failure from lifecycle hooks and coroutine cleanup. Make unexpected interactions with the workers, waiters and signal collaborators fail at the call site.
Declare strict mode for the collaborators exercised by collection creation and transformation. Unexpected calls can then fail even when the transformed return value would still match.
Remove the unconditional assertion. A failure during termination now reaches PHPUnit directly, and the test declares that normal return is the expected outcome.
Reject unexpected interactions during client discovery and launch. Allow the stop call made by the Symfony process destructor while verifying how the database command builds and runs the client.
…hing

Check prompt completions and reported errors after the calls under test. Preserve the timestamp value at the scheduler call and inspect the pagination options passed to the search engine.
Let the same scope test run against standard, team and custom permission models. This replaces a passing placeholder and checks inverse scope behavior on UUIDs as well. Verify the teams-disabled migration leaves the team column absent.
Make request and response collaborators strict and check the response carried by request exceptions. Express void capability checks directly when normal return is the result under test.
Require the original cancellation or cleanup exception at the reporting boundary. Verify deferred telemetry forwards the original callbacks, instruments, log record and context.
Check the exact request, user and cache repository when credentials are validated and token state is invalidated. Reject unconfigured calls on the authentication collaborators.
Check both dispatched notification jobs after dispatch and require the original notification and recipient. Exercise fake and real process results through their fluent return values.
Check partial publication order when the exception is reported. Capture the settled result and inspect the worker options supplied by the console command without running assertions inside matchers.
Require the original Beanstalk job and SQS cleanup failure. Forbid resolving the overflow cache on release cancellation, and check Redis bulk script arguments after publication.
Freeze the pruning cutoff so a zero-hour argument has an observable result. Keep the real dispatcher for ordinary retries, and verify selected dispatches and daemon failures explicitly in worker tests.
Use strict collaborators for job dispatch, queue routing, state changes and batches. Verify custom collection restoration and require cancellation to propagate through sync payload serialization.
Configure the cluster mode once on the strict limiter fixture. Keep the real pool context key and check that registering event callbacks leaves an unbound event dispatcher alone.
Check that a subscriber receives messages for its channel and that releasing an unclaimed slot preserves the connection cap on both storage backends. Check which application, payload and shutdown errors are forwarded.
Verify that a route added to a compiled collection is available by name and that Scout’s no-op engines leave the stored model in place. Make the intended collaborator interactions explicit.
Require configured calls in the transport and session tests and match forwarded requests and failures by identity. This catches substitutions that compare equal.
Verify the value returned by the Timebox callback and that Sleep callbacks stay idle outside fake mode. Match the actual queued jobs and reported exceptions.
Record skip callbacks and check them after processing the attributes so missing callbacks fail the tests. Verify the queue payload hook consumed its one-time binding and check the output and exception sent to the console handler.
Match the query and values passed through to the ordinary presence verifier. Count each rejected condition after catching the expected type error and make the no-throw constructor checks explicit.
Verify that composers receive the view being rendered and custom engines receive the registered resolver. Require configured interactions from the view and watcher collaborators.
Bind the handlers under test in an isolated container so service resolution and the exception-reporting fallback run normally. Check cancellation and listener failures by identity and make the expected log calls explicit.
@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Restore strict Double expectations and release all idle database leases

🧪 Tests 🐞 Bug fix 📝 Documentation ⚙️ Configuration changes 🕐 40+ Minutes

Grey Divider

AI Description

• Make Double-based tests reject unexpected calls and verify exact object identity where required.
• Replace no-op assertions with observable outcomes, including permission scopes and Reverb
 delivery.
• Continue releasing idle database leases after failures, prioritizing cancellation when propagating
 errors.
Diagram

graph TD
  A["Double tests"] --> B["Strict expectations"] --> C["Application components"]
  A --> D["Identity matchers"] --> C
  E["Database manager"] --> F["Idle lease cleanup"] --> G["Remaining leases"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Retain the released Double version and use manual assertions
  • ➕ Avoids a development-branch dependency.
  • ➖ Caught expectation failures can still evade final verification.
  • ➖ Requires repetitive workarounds across the suite.

Recommendation: The stricter expectations and outcome assertions are appropriate. The development-branch dependency addresses a verification gap, but should be replaced with a tagged release once the fix is published.

Files changed (528) +4947 / -5119

Bug fix (1) +11 / -1
ConnectionResolver.phpContinue idle lease cleanup after failure +11/-1

Continue idle lease cleanup after failure

• Attempts every idle lease release, then propagates the first failure unless a later failure represents cancellation.

src/database/src/ConnectionResolver.php

Tests (524) +4927 / -5113
BroadcastBatchingTest.phpTighten broadcast batching double +1/-1

Tighten broadcast batching double

• Makes the AI batching test reject unexpected interactions.

tests/Ai/BroadcastBatchingTest.php

ConcurrentToolsTest.phpTighten concurrent tool doubles +13/-13

Tighten concurrent tool doubles

• Applies strict expectations to concurrent AI tool interactions.

tests/Ai/ConcurrentToolsTest.php

CoroutineIsolationTest.phpTighten coroutine isolation doubles +9/-9

Tighten coroutine isolation doubles

• Makes isolation tests reject unconfigured AI collaborator calls.

tests/Ai/CoroutineIsolationTest.php

AgentProviderSelectionTest.phpTighten provider selection doubles +2/-2

Tighten provider selection doubles

• Strengthens expectations around agent provider selection.

tests/Ai/Feature/AgentProviderSelectionTest.php

AiManagerTest.phpTighten AI manager double +1/-1

Tighten AI manager double

• Rejects unexpected calls in the AI manager test.

tests/Ai/Feature/AiManagerTest.php

BroadcastAgentTest.phpTighten broadcast agent double +1/-1

Tighten broadcast agent double

• Rejects unconfigured collaborator calls in broadcast agent coverage.

tests/Ai/Feature/BroadcastAgentTest.php

EmbeddingsCacheTest.phpTighten embeddings cache doubles +2/-2

Tighten embeddings cache doubles

• Strengthens cache collaborator expectations.

tests/Ai/Feature/EmbeddingsCacheTest.php

FilesystemToolsTest.phpTighten filesystem tool doubles +6/-6

Tighten filesystem tool doubles

• Rejects unexpected filesystem tool interactions.

tests/Ai/Feature/FilesystemToolsTest.php

CreatesClientTest.phpTighten gateway client doubles +2/-2

Tighten gateway client doubles

• Makes gateway client construction expectations strict.

tests/Ai/Feature/Gateway/Concerns/CreatesClientTest.php

PendingProviderTest.phpTighten pending provider doubles +5/-5

Tighten pending provider doubles

• Rejects unconfigured calls during provider setup.

tests/Ai/Feature/PendingProviderTest.php

RememberConversationTest.phpTighten conversation persistence doubles +7/-7

Tighten conversation persistence doubles

• Strengthens expectations for remembered conversations.

tests/Ai/Feature/RememberConversationTest.php

DatabaseConversationStoreTest.phpTighten conversation store doubles +22/-22

Tighten conversation store doubles

• Makes database-backed conversation storage tests reject unexpected calls.

tests/Ai/Feature/Storage/DatabaseConversationStoreTest.php

StoreFakeTest.phpTighten store fake test double +1/-1

Tighten store fake test double

• Strengthens the store fake test's interaction checks.

tests/Ai/Feature/StoreFakeTest.php

ToolRequestValidationTest.phpTighten tool request validation doubles +2/-2

Tighten tool request validation doubles

• Rejects unconfigured validation collaborator calls.

tests/Ai/Feature/ToolRequestValidationTest.php

McpClientTransportTest.phpTighten MCP transport doubles +2/-2

Tighten MCP transport doubles

• Makes transport interaction expectations strict.

tests/Ai/McpClientTransportTest.php

PartitionStoreTest.phpTighten partition store double +1/-1

Tighten partition store double

• Rejects unexpected partition store calls.

tests/Ai/PartitionStoreTest.php

InvokesToolsTest.phpTighten tool invocation doubles +2/-2

Tighten tool invocation doubles

• Strengthens gateway tool invocation expectations.

tests/Ai/Unit/Gateway/InvokesToolsTest.php

RunContextTest.phpTighten run context doubles +2/-2

Tighten run context doubles

• Makes run context collaborators strict.

tests/Ai/Unit/Gateway/RunContextTest.php

TextGenerationLoopTest.phpTighten generation loop doubles +20/-20

Tighten generation loop doubles

• Rejects unexpected provider and tool calls in text generation tests.

tests/Ai/Unit/Gateway/TextGenerationLoopTest.php

AgentToolTest.phpTighten agent tool doubles +5/-5

Tighten agent tool doubles

• Strengthens agent tool interaction expectations.

tests/Ai/Unit/Tools/AgentToolTest.php

ApiRequestTest.phpTighten API request double +1/-1

Tighten API request double

• Rejects unexpected request collaborator calls.

tests/ApiClient/ApiRequestTest.php

ApiResourceTest.phpTighten API resource doubles +2/-2

Tighten API resource doubles

• Strengthens API resource interaction expectations.

tests/ApiClient/ApiResourceTest.php

AuthAccessGateTest.phpRequire strict gate event dispatch +2/-2

Require strict gate event dispatch

• Ensures gate evaluation tests reject unexpected dispatcher calls.

tests/Auth/AuthAccessGateTest.php

AuthDatabaseTokenRepositoryTest.phpTighten token repository doubles +12/-12

Tighten token repository doubles

• Strengthens database token repository interaction checks.

tests/Auth/AuthDatabaseTokenRepositoryTest.php

AuthDatabaseUserProviderTest.phpTighten database user provider doubles +22/-22

Tighten database user provider doubles

• Rejects unexpected provider collaborator calls.

tests/Auth/AuthDatabaseUserProviderTest.php

AuthEloquentUserProviderCacheTest.phpTighten cached user provider doubles +56/-56

Tighten cached user provider doubles

• Strengthens expectations across cached Eloquent user-provider paths.

tests/Auth/AuthEloquentUserProviderCacheTest.php

AuthEloquentUserProviderTest.phpTighten Eloquent user provider doubles +6/-6

Tighten Eloquent user provider doubles

• Rejects unexpected provider interactions.

tests/Auth/AuthEloquentUserProviderTest.php

AuthGuardTest.phpTighten authentication guard doubles +50/-51

Tighten authentication guard doubles

• Makes guard collaborator expectations stricter.

tests/Auth/AuthGuardTest.php

AuthManagerTest.phpTighten authentication manager doubles +54/-54

Tighten authentication manager doubles

• Rejects unconfigured manager collaborator calls.

tests/Auth/AuthManagerTest.php

AuthPasswordBrokerManagerTest.phpTighten password broker manager doubles +30/-30

Tighten password broker manager doubles

• Strengthens broker manager interaction checks.

tests/Auth/AuthPasswordBrokerManagerTest.php

AuthPasswordBrokerTest.phpTighten password broker doubles +37/-37

Tighten password broker doubles

• Rejects unexpected broker collaborator calls.

tests/Auth/AuthPasswordBrokerTest.php

AuthPasswordResetServiceProviderTest.phpTighten reset provider doubles +4/-4

Tighten reset provider doubles

• Strengthens service-provider registration expectations.

tests/Auth/AuthPasswordResetServiceProviderTest.php

AuthRequestGuardTest.phpTighten request guard doubles +16/-16

Tighten request guard doubles

• Rejects unexpected guard collaborator calls.

tests/Auth/AuthRequestGuardTest.php

AuthServiceProviderTest.phpTighten auth service provider doubles +31/-31

Tighten auth service provider doubles

• Strengthens service-provider interaction checks.

tests/Auth/AuthServiceProviderTest.php

AuthTokenGuardTest.phpTighten token guard doubles +33/-33

Tighten token guard doubles

• Rejects unexpected token-guard interactions.

tests/Auth/AuthTokenGuardTest.php

AuthenticateMiddlewareTest.phpTighten authentication middleware doubles +5/-5

Tighten authentication middleware doubles

• Strengthens middleware collaborator expectations.

tests/Auth/AuthenticateMiddlewareTest.php

AuthenticateWithBasicAuthMiddlewareTest.phpTighten basic-auth middleware doubles +7/-7

Tighten basic-auth middleware doubles

• Rejects unexpected authentication calls.

tests/Auth/AuthenticateWithBasicAuthMiddlewareTest.php

AuthorizableTest.phpTighten authorizable double +1/-1

Tighten authorizable double

• Strengthens authorization interaction checking.

tests/Auth/AuthorizableTest.php

AuthorizesRequestsTest.phpTighten request authorization double +1/-1

Tighten request authorization double

• Rejects unexpected authorization calls.

tests/Auth/AuthorizesRequestsTest.php

CacheTokenRepositoryTest.phpTighten cached token repository doubles +29/-29

Tighten cached token repository doubles

• Strengthens cached token interaction expectations.

tests/Auth/CacheTokenRepositoryTest.php

ClearResetsCommandTest.phpTighten reset cleanup doubles +6/-6

Tighten reset cleanup doubles

• Rejects unexpected command collaborator calls.

tests/Auth/ClearResetsCommandTest.php

EnsureEmailIsVerifiedTest.phpTighten email verification doubles +4/-4

Tighten email verification doubles

• Strengthens verification middleware expectations.

tests/Auth/EnsureEmailIsVerifiedTest.php

RedirectIfAuthenticatedMiddlewareTest.phpTighten authenticated redirect doubles +12/-12

Tighten authenticated redirect doubles

• Rejects unexpected middleware calls.

tests/Auth/RedirectIfAuthenticatedMiddlewareTest.php

RequirePasswordMiddlewareTest.phpTighten password middleware doubles +15/-15

Tighten password middleware doubles

• Strengthens password-confirmation interaction checks.

tests/Auth/RequirePasswordMiddlewareTest.php

TimeboxIsolationTest.phpTighten timebox isolation doubles +9/-9

Tighten timebox isolation doubles

• Rejects unexpected calls in authentication isolation tests.

tests/Auth/TimeboxIsolationTest.php

UseGuardMiddlewareTest.phpTighten guard selection doubles +2/-2

Tighten guard selection doubles

• Strengthens middleware guard-selection expectations.

tests/Auth/UseGuardMiddlewareTest.php

VerifiedEventTest.phpTighten verified event double +1/-1

Tighten verified event double

• Rejects unconfigured event collaborator calls.

tests/Auth/VerifiedEventTest.php

AblyBroadcasterTest.phpTighten Ably broadcaster doubles +2/-2

Tighten Ably broadcaster doubles

• Strengthens broadcaster interaction expectations.

tests/Broadcasting/AblyBroadcasterTest.php

BroadcastConnectionReleaseTest.phpTighten broadcast release doubles +5/-5

Tighten broadcast release doubles

• Rejects unexpected calls during connection release.

tests/Broadcasting/BroadcastConnectionReleaseTest.php

BroadcastEventTest.phpTighten broadcast event doubles +14/-14

Tighten broadcast event doubles

• Strengthens event dispatch interaction checks.

tests/Broadcasting/BroadcastEventTest.php

BroadcastPoolProxyTest.phpTighten broadcast pool proxy doubles +3/-3

Tighten broadcast pool proxy doubles

• Rejects unexpected proxy interactions.

tests/Broadcasting/BroadcastPoolProxyTest.php

BroadcasterTest.phpTighten broadcaster doubles +9/-9

Tighten broadcaster doubles

• Strengthens broadcaster call expectations.

tests/Broadcasting/BroadcasterTest.php

InteractsWithBroadcastingTest.phpTighten broadcasting interaction doubles +2/-2

Tighten broadcasting interaction doubles

• Rejects unconfigured broadcasting calls.

tests/Broadcasting/InteractsWithBroadcastingTest.php

LogBroadcasterTest.phpTighten log broadcaster doubles +2/-2

Tighten log broadcaster doubles

• Strengthens log broadcaster expectations.

tests/Broadcasting/LogBroadcasterTest.php

MercureBroadcasterTest.phpTighten Mercure broadcaster checks +5/-13

Tighten Mercure broadcaster checks

• Strengthens broadcaster expectations and removes weaker assertions.

tests/Broadcasting/MercureBroadcasterTest.php

PendingBroadcastTest.phpTighten pending broadcast doubles +5/-5

Tighten pending broadcast doubles

• Rejects unexpected pending-broadcast calls.

tests/Broadcasting/PendingBroadcastTest.php

PusherBroadcasterTest.phpTighten Pusher broadcaster doubles +5/-5

Tighten Pusher broadcaster doubles

• Strengthens Pusher interaction checks.

tests/Broadcasting/PusherBroadcasterTest.php

RedisBroadcasterTest.phpTighten Redis broadcaster doubles +10/-10

Tighten Redis broadcaster doubles

• Rejects unconfigured Redis broadcaster calls.

tests/Broadcasting/RedisBroadcasterTest.php

BusBatchTest.phpTighten batch doubles +42/-43

Tighten batch doubles

• Strengthens batch collaborator expectations and argument checks.

tests/Bus/BusBatchTest.php

BusBatchableTest.phpTighten batchable doubles +4/-4

Tighten batchable doubles

• Rejects unexpected batchable interactions.

tests/Bus/BusBatchableTest.php

BusDebounceLockTest.phpTighten debounce lock doubles +3/-3

Tighten debounce lock doubles

• Strengthens lock interaction expectations.

tests/Bus/BusDebounceLockTest.php

BusDispatcherTest.phpTighten bus dispatcher doubles +11/-11

Tighten bus dispatcher doubles

• Rejects unexpected dispatcher calls.

tests/Bus/BusDispatcherTest.php

BusPendingBatchTest.phpTighten pending batch doubles +51/-53

Tighten pending batch doubles

• Strengthens batch dispatch and callback expectations.

tests/Bus/BusPendingBatchTest.php

BusPendingDispatchTest.phpTighten pending dispatch doubles +4/-4

Tighten pending dispatch doubles

• Rejects unexpected job dispatch interactions.

tests/Bus/BusPendingDispatchTest.php

DispatchLockContextTest.phpTighten dispatch lock doubles +5/-5

Tighten dispatch lock doubles

• Strengthens lock-context interaction checks.

tests/Bus/DispatchLockContextTest.php

OutboxOptionsTest.phpTighten outbox options double +1/-1

Tighten outbox options double

• Rejects unconfigured calls in options coverage.

tests/Bus/OutboxOptionsTest.php

QueueableTest.phpTighten queueable job doubles +20/-23

Tighten queueable job doubles

• Strengthens job chaining and queueing expectations.

tests/Bus/QueueableTest.php

CacheDatabaseLockTest.phpTighten database lock doubles +16/-17

Tighten database lock doubles

• Strengthens database-backed cache lock interactions.

tests/Cache/CacheDatabaseLockTest.php

CacheDatabaseStoreTest.phpTighten database cache store doubles +19/-19

Tighten database cache store doubles

• Rejects unexpected store collaborator calls.

tests/Cache/CacheDatabaseStoreTest.php

CacheEventsTest.phpTighten cache event doubles +15/-15

Tighten cache event doubles

• Strengthens cache event dispatch checks.

tests/Cache/CacheEventsTest.php

CacheFailoverStoreTest.phpTighten failover store doubles +41/-41

Tighten failover store doubles

• Rejects unexpected primary and fallback store calls.

tests/Cache/CacheFailoverStoreTest.php

CacheFileStoreTest.phpTighten file store doubles +3/-3

Tighten file store doubles

• Strengthens file-cache interaction checks.

tests/Cache/CacheFileStoreTest.php

CacheManagerTest.phpTighten cache manager doubles +20/-20

Tighten cache manager doubles

• Rejects unexpected cache manager collaborator calls.

tests/Cache/CacheManagerTest.php

CacheMemoizedStoreTest.phpTighten memoized store doubles +6/-6

Tighten memoized store doubles

• Strengthens memoized cache interaction checks.

tests/Cache/CacheMemoizedStoreTest.php

CacheNullStoreTest.phpTighten null store double +1/-1

Tighten null store double

• Rejects unconfigured null-store calls.

tests/Cache/CacheNullStoreTest.php

CacheRedisLockTest.phpTighten Redis lock doubles +9/-9

Tighten Redis lock doubles

• Strengthens Redis lock interaction checks.

tests/Cache/CacheRedisLockTest.php

CacheRedisStoreTest.phpTighten Redis store double +1/-1

Tighten Redis store double

• Rejects unexpected Redis store interactions.

tests/Cache/CacheRedisStoreTest.php

CacheRepositoryEnumTest.phpTighten enum repository doubles +6/-6

Tighten enum repository doubles

• Strengthens enum-aware repository expectations.

tests/Cache/CacheRepositoryEnumTest.php

CacheRepositoryTest.phpTighten cache repository doubles +49/-49

Tighten cache repository doubles

• Rejects unconfigured repository collaborator calls.

tests/Cache/CacheRepositoryTest.php

CacheServiceProviderTest.phpTighten cache provider doubles +7/-7

Tighten cache provider doubles

• Strengthens provider registration checks.

tests/Cache/CacheServiceProviderTest.php

CacheStackStoreLocksTest.phpTighten stack store lock doubles +10/-10

Tighten stack store lock doubles

• Rejects unexpected lock delegation calls.

tests/Cache/CacheStackStoreLocksTest.php

CacheStackStoreTagsTest.phpTighten stack store tag doubles +17/-15

Tighten stack store tag doubles

• Strengthens tagged-cache delegation checks.

tests/Cache/CacheStackStoreTagsTest.php

CacheStackStoreTest.phpTighten stack store doubles +2/-2

Tighten stack store doubles

• Rejects unexpected stack-store calls.

tests/Cache/CacheStackStoreTest.php

CacheSwooleStoreIntervalTest.phpTighten Swoole interval doubles +12/-13

Tighten Swoole interval doubles

• Strengthens maintenance interval expectations.

tests/Cache/CacheSwooleStoreIntervalTest.php

CacheSwooleStoreTest.phpTighten Swoole store doubles +4/-4

Tighten Swoole store doubles

• Rejects unexpected Swoole store calls.

tests/Cache/CacheSwooleStoreTest.php

CacheTaggedCacheTest.phpTighten tagged cache doubles +9/-9

Tighten tagged cache doubles

• Strengthens tagged cache interactions.

tests/Cache/CacheTaggedCacheTest.php

ClearCommandTest.phpTighten cache clear doubles +5/-5

Tighten cache clear doubles

• Rejects unexpected clear-command collaborator calls.

tests/Cache/ClearCommandTest.php

ConcurrencyLimiterTest.phpTighten cache limiter double +1/-1

Tighten cache limiter double

• Strengthens limiter interaction checking.

tests/Cache/ConcurrencyLimiterTest.php

ForgetCommandTest.phpTighten cache forget doubles +4/-4

Tighten cache forget doubles

• Rejects unexpected forget-command interactions.

tests/Cache/ForgetCommandTest.php

ModelCacheCoordinatorTest.phpTighten model cache coordinator doubles +36/-36

Tighten model cache coordinator doubles

• Strengthens model cache orchestration expectations.

tests/Cache/ModelCacheCoordinatorTest.php

ModelCacheStoreValidatorTest.phpTighten model cache validation tests +11/-28

Tighten model cache validation tests

• Makes store doubles strict and removes no-op success assertions.

tests/Cache/ModelCacheStoreValidatorTest.php

PruneStaleTagsCommandTest.phpTighten stale-tag pruning doubles +9/-9

Tighten stale-tag pruning doubles

• Rejects unexpected pruning collaborator calls.

tests/Cache/PruneStaleTagsCommandTest.php

AllTaggedCacheTest.phpTighten all-tag cache doubles +35/-39

Tighten all-tag cache doubles

• Strengthens Redis all-tag operation expectations.

tests/Cache/Redis/AllTaggedCacheTest.php

AnyTaggedCacheTest.phpTighten any-tag cache doubles +43/-48

Tighten any-tag cache doubles

• Strengthens Redis any-tag operation expectations.

tests/Cache/Redis/AnyTaggedCacheTest.php

BenchmarkCommandTest.phpTighten Redis benchmark doubles +11/-11

Tighten Redis benchmark doubles

• Rejects unexpected benchmark collaborator calls.

tests/Cache/Redis/Console/BenchmarkCommandTest.php

CleanupVerificationCheckTest.phpTighten cleanup verification doubles +2/-2

Tighten cleanup verification doubles

• Strengthens Redis doctor cleanup checks.

tests/Cache/Redis/Console/Doctor/Checks/CleanupVerificationCheckTest.php

DoctorCommandTest.phpTighten Redis doctor doubles +38/-38

Tighten Redis doctor doubles

• Rejects unconfigured diagnostic collaborator calls.

tests/Cache/Redis/Console/DoctorCommandTest.php

FlushTest.phpTighten all-tag flush doubles +13/-13

Tighten all-tag flush doubles

• Strengthens Redis flush expectations.

tests/Cache/Redis/Operations/AllTag/FlushTest.php

GetEntriesTest.phpTighten all-tag retrieval doubles +2/-2

Tighten all-tag retrieval doubles

• Rejects unexpected entry retrieval calls.

tests/Cache/Redis/Operations/AllTag/GetEntriesTest.php

AddTest.phpTighten any-tag add checks +15/-26

Tighten any-tag add checks

• Strengthens Redis add expectations and removes weaker checks.

tests/Cache/Redis/Operations/AnyTag/AddTest.php

DecrementTest.phpTighten any-tag decrement checks +5/-8

Tighten any-tag decrement checks

• Strengthens Redis decrement expectations.

tests/Cache/Redis/Operations/AnyTag/DecrementTest.php

FlushTest.phpTighten any-tag flush doubles +9/-9

Tighten any-tag flush doubles

• Rejects unexpected flush interactions.

tests/Cache/Redis/Operations/AnyTag/FlushTest.php

ForeverTest.phpTighten any-tag forever checks +5/-9

Tighten any-tag forever checks

• Strengthens permanent-write expectations.

tests/Cache/Redis/Operations/AnyTag/ForeverTest.php

IncrementTest.phpTighten any-tag increment checks +5/-8

Tighten any-tag increment checks

• Strengthens increment expectations.

tests/Cache/Redis/Operations/AnyTag/IncrementTest.php

PutManyTest.phpTighten any-tag bulk write checks +3/-8

Tighten any-tag bulk write checks

• Strengthens bulk-write expectations.

tests/Cache/Redis/Operations/AnyTag/PutManyTest.php

PutTest.phpTighten any-tag write checks +12/-25

Tighten any-tag write checks

• Strengthens tagged-write expectations and removes weaker checks.

tests/Cache/Redis/Operations/AnyTag/PutTest.php

FlushTest.phpTighten Redis flush double +1/-1

Tighten Redis flush double

• Rejects unexpected flush collaborator calls.

tests/Cache/Redis/Operations/FlushTest.php

PutManyTest.phpTighten Redis bulk write checks +8/-18

Tighten Redis bulk write checks

• Strengthens bulk-write interaction expectations.

tests/Cache/Redis/Operations/PutManyTest.php

RedisCacheTestCase.phpTighten shared Redis cache double +1/-1

Tighten shared Redis cache double

• Makes a shared test double strict.

tests/Cache/Redis/RedisCacheTestCase.php

RedisStoreTest.phpTighten Redis cache store doubles +8/-8

Tighten Redis cache store doubles

• Strengthens store interaction expectations.

tests/Cache/Redis/RedisStoreTest.php

StoreContextTest.phpTighten Redis store context doubles +5/-5

Tighten Redis store context doubles

• Rejects unexpected context collaborator calls.

tests/Cache/Redis/Support/StoreContextTest.php

RegisterSwooleMaintenanceTimersTest.phpTighten maintenance timer doubles +17/-17

Tighten maintenance timer doubles

• Strengthens timer registration expectations.

tests/Cache/RegisterSwooleMaintenanceTimersTest.php

ConnectionPoolTest.phpTighten connection pool doubles +8/-8

Tighten connection pool doubles

• Rejects unexpected pool interactions.

tests/ConnectionPool/ConnectionPoolTest.php

ConnectionTest.phpTighten pooled connection doubles +47/-47

Tighten pooled connection doubles

• Strengthens connection lifecycle expectations.

tests/ConnectionPool/ConnectionTest.php

FooPool.phpTighten pool test fixture +1/-1

Tighten pool test fixture

• Makes a fixture double reject unexpected calls.

tests/ConnectionPool/Fixtures/FooPool.php

IdleConnectionMonitorTest.phpTighten idle monitor doubles +12/-12

Tighten idle monitor doubles

• Strengthens idle-connection monitoring checks.

tests/ConnectionPool/IdleConnectionMonitorTest.php

KeepaliveConnectionTest.phpTighten keepalive connection doubles +6/-6

Tighten keepalive connection doubles

• Rejects unexpected keepalive interactions.

tests/ConnectionPool/KeepaliveConnectionTest.php

CacheCommandMutexTest.phpTighten cache mutex doubles +3/-3

Tighten cache mutex doubles

• Strengthens command mutex expectations.

tests/Console/CacheCommandMutexTest.php

CommandMutexTest.phpTighten command mutex doubles +3/-3

Tighten command mutex doubles

• Rejects unexpected mutex calls.

tests/Console/CommandMutexTest.php

CommandTest.phpTighten console command doubles +18/-18

Tighten console command doubles

• Strengthens command collaborator checks.

tests/Console/CommandTest.php

InteractsWithIOTest.phpTighten console I/O checks +4/-6

Tighten console I/O checks

• Strengthens I/O expectations and removes weaker assertions.

tests/Console/Concerns/InteractsWithIOTest.php

ConfiguresPromptsTest.phpTighten prompt configuration checks +16/-20

Tighten prompt configuration checks

• Strengthens prompt collaborator expectations.

tests/Console/ConfiguresPromptsTest.php

ConsoleApplicationDeferredCallbacksTest.phpTighten deferred callback double +1/-1

Tighten deferred callback double

• Rejects unexpected deferred callback interactions.

tests/Console/ConsoleApplicationDeferredCallbacksTest.php

ConsoleApplicationTest.phpTighten console application doubles +2/-2

Tighten console application doubles

• Strengthens application call expectations.

tests/Console/ConsoleApplicationTest.php

EventsTest.phpTighten console event doubles +9/-9

Tighten console event doubles

• Rejects unconfigured console event calls.

tests/Console/Events/EventsTest.php

FooExceptionCommand.phpTighten exception command fixture +1/-1

Tighten exception command fixture

• Makes the fixture's double strict.

tests/Console/Fixtures/Commands/FooExceptionCommand.php

FooExitCommand.phpTighten exit command fixture +1/-1

Tighten exit command fixture

• Makes the fixture's double strict.

tests/Console/Fixtures/Commands/FooExitCommand.php

GeneratorCommandTest.phpTighten generator command doubles +10/-10

Tighten generator command doubles

• Strengthens file-generation interaction checks.

tests/Console/GeneratorCommandTest.php

InteractsWithSignalsTest.phpTighten signal handling expectations +7/-5

Tighten signal handling expectations

• Strengthens signal interaction checks.

tests/Console/InteractsWithSignalsTest.php

MigrationGeneratorCommandTest.phpTighten migration generator double +1/-1

Tighten migration generator double

• Rejects unexpected migration-generation calls.

tests/Console/MigrationGeneratorCommandTest.php

EventTest.phpTighten scheduled event doubles +71/-59

Tighten scheduled event doubles

• Makes mutex, process, and filesystem collaborators strict, including shared process setup.

tests/Console/Scheduling/EventTest.php

ScheduleRunCommandTest.phpTighten schedule run doubles +82/-84

Tighten schedule run doubles

• Strengthens scheduled-command interaction and argument checks.

tests/Console/Scheduling/ScheduleRunCommandTest.php

ScheduleRunContextPropagationTest.phpTighten schedule context doubles +6/-6

Tighten schedule context doubles

• Rejects unexpected context propagation calls.

tests/Console/Scheduling/ScheduleRunContextPropagationTest.php

ScheduleTest.phpTighten schedule doubles +10/-10

Tighten schedule doubles

• Strengthens schedule collaborator expectations.

tests/Console/Scheduling/ScheduleTest.php

ComponentsTest.phpTighten console component checks +4/-6

Tighten console component checks

• Strengthens component output expectations.

tests/Console/View/ComponentsTest.php

ContextualAttributeBindingTest.phpTighten contextual binding doubles +50/-50

Tighten contextual binding doubles

• Rejects unexpected container collaborator calls.

tests/Container/ContextualAttributeBindingTest.php

CookieJarTest.phpTighten cookie jar double +1/-1

Tighten cookie jar double

• Strengthens cookie-jar interaction checks.

tests/Cookie/CookieJarTest.php

AddQueuedCookiesToResponseTest.phpTighten queued-cookie double +1/-1

Tighten queued-cookie double

• Rejects unexpected middleware collaborator calls.

tests/Cookie/Middleware/AddQueuedCookiesToResponseTest.php

TimerTest.phpTighten coordinator timer doubles +6/-6

Tighten coordinator timer doubles

• Strengthens timer interaction expectations.

tests/Coordinator/TimerTest.php

LifecycleCallbackTest.phpTighten lifecycle callback doubles +4/-4

Tighten lifecycle callback doubles

• Rejects unexpected bootstrap callbacks.

tests/Core/Bootstrap/LifecycleCallbackTest.php

TaskCallbackNonCoroutineTest.phpTighten non-coroutine callback doubles +5/-5

Tighten non-coroutine callback doubles

• Strengthens task callback checks.

tests/Core/Bootstrap/TaskCallbackNonCoroutineTest.php

TaskCallbackTest.phpTighten task callback doubles +22/-22

Tighten task callback doubles

• Rejects unexpected callback interactions.

tests/Core/Bootstrap/TaskCallbackTest.php

WorkerExitCallbackTest.phpTighten worker exit doubles +7/-7

Tighten worker exit doubles

• Strengthens worker-exit callback expectations.

tests/Core/Bootstrap/WorkerExitCallbackTest.php

WorkerStartCallbackTest.phpTighten worker start doubles +11/-11

Tighten worker start doubles

• Strengthens worker-start callback expectations.

tests/Core/Bootstrap/WorkerStartCallbackTest.php

StdoutLoggerTest.phpTighten stdout logger doubles +9/-9

Tighten stdout logger doubles

• Rejects unexpected logger calls.

tests/Core/StdoutLoggerTest.php

ConcurrentTest.phpTighten concurrent coroutine checks +3/-2

Tighten concurrent coroutine checks

• Strengthens concurrency collaborator expectations.

tests/Coroutine/ConcurrentTest.php

CoroutineTest.phpTighten coroutine doubles +14/-13

Tighten coroutine doubles

• Strengthens coroutine interaction checks.

tests/Coroutine/CoroutineTest.php

ParallelTest.phpTighten parallel execution checks +3/-2

Tighten parallel execution c...

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can type 'qodo, fix this' on a finding and the fix lands right on your PR

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@greptile-apps

greptile-apps Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

[Medium impact] The changes since the previous review appear safe to merge; no new actionable issues were found.

Summary

Restores strict test doubles and exact-object checks across the test suite, and makes idle database cleanup attempt every lease before rethrowing a failure.

  • Tests across Hypervel reject unexpected calls and check captured arguments.
  • Idle database cleanup releases later leases after one release fails.
  • The test suite uses Double's development branch and documents stricter expectations.
  • The access-gate comment explains policy caching in simpler terms.

Tests were not run because dependencies are not installed.

Reviews (2) · Last reviewed commit: "Allow unrelated application reads in the..." · Reviewed by Greptile

Use a connected client in atomic mode on the default database for ordinary releases. This exercises the pool return path after clearing WATCH state and preserves the mode check.
Guzzle checks the stream timeout metadata when a read throws. Give it a negative result so the body export test exercises the original read failure and verifies that the caller keeps its open resource.
Return the route middleware for the deferred WebSocket handshake. Allow the SDK to look up its optional OTLP integration when another test has installed the process-wide propagation callback.
The caster visits several application properties. Require the failing property and the later version lookup while allowing the other reads to return their defaults.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Deploying hypervel-org with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3dab76a
Status:🚫  Build failed.

View logs

@binaryfire
binaryfire merged commit 8ff6044 into 0.4 Nov 18, 2026
51 of 52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant