Skip to content

Fixture Bridges start a real session-cache refill, so a test tap can see a stray result #978

Closed

Description

@GLinnik21

Since #973, every app frame runs the session owner's cache refill (Bridge::land_session_cache). The process-global session cache can be Unloaded: in a fresh process, or after any test that drops a TempSession or calls invalidate_for_test. Then the owner emits RefreshCache, and SessionAdapter::begin_cache_refresh submits a real job to the global storage worker. It does this even when the adapter holds Resources::Fixture. Every other adapter path that does work, such as begin_capture, does it only under Resources::Live.

The job's answer arrives as AppMsg::Session(CacheRefreshed) on a later frame, whenever the worker finishes, so every Bridge::for_test test's message stream depends on timing. home_worker_results_cross_the_addressed_dispatcher_ingest_once taps every result and expects only HubsResult. It fails with wrong result type when the answer beats its second frame. That happened in three of four CI test jobs on #977, and never locally.

Done when:

  • a fixture adapter's cache refresh is deterministic and test-controlled: Resources::Fixture submits no storage-worker job;
  • the tests that drive the refill through a Bridge keep their assertions;
  • the Home test's tap stays strict, with no cache prefill in the test;
  • a test fails deterministically on the current behaviour and passes after.

Activity

  1. added
    bug
    ui
    on Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugui

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions