Skip to content

TriOSKitTests: 25 test files excluded from CI - 15 do not compile, 10 fail #1089

Description

@gHashTag

The merge in #1087 brought 36 test files across from the browseros tree. CI
never built them there, so nothing caught the drift. They are excluded by name
in apps/trios-macos/Package.swift so the gap stays countable rather than
silent. Sixteen files / 120 tests do run and pass.

Group 1 - do not compile (15)

Almost all one shape: the sources became actor-isolated, and the tests still
call them synchronously (call to actor-isolated instance method ... in a synchronous context, 'await' in an autoclosure). Fixing these means making
the test methods async and awaiting through.

ChatAttachmentImporterSafePathTests, ChatFailureTests, ChatRequestSizerTests,
LocalAuthProviderTests, LogsTabViewTests, MemoryStoreEncryptionTests,
ModelContextServiceTests, ModelReliabilityServiceTests,
PredictiveWarmupCacheTests, PredictiveWarmupRefresherTests,
PredictiveWarmupSchedulerTests, ProviderCircuitBreakerTests,
SSETransportTests, StreamingContextWatchdogIntegrationTests,
StreamingContextWatchdogTests

The rest is API that moved underneath them: SafeFilePathError's cases were
redesigned (.outsideBaseDirectory -> .pathOutsideBase(String)), and
ChatPersisterProtocol / ModelHealthServiceProtocol /
AgentMemoryStoreProtocol gained requirements the mocks never grew.

Group 2 - compile, run, fail (10)

ChatRequestBuilderTests, ConversationEncryptionTests,
HotkeyAnalyticsEncryptionTests, MemoryStoreFTSTests,
ModelConfigurationStoreCrossProviderTests, ModelCostServiceTests,
ModelHealthServiceTests, ModelReliabilityServiceCrossProviderTests,
TriOSEncryptionTests, WarmupVolatilityTrackerTests

Ordinary assertion drift, ~33 cases.

One name deserves clearing before anyone reads this list and worries.
TriOSEncryptionTests.testTamperDetection fails on the error's type, not on
the tampering. XCTAssertThrowsError passes - AES-GCM does reject the flipped
byte. The test then asserts the thrown error is a TriOSEncryptionError, where
CryptoKit throws its own authenticationFailure. Tamper detection works.

Two related fixes already landed in #1087

  • MockURLProtocol and URLSessionConfiguration.mockProtocolConfiguration()
    lived inside SSETransportTests.swift. Excluding that file took the helper
    with it and broke three suites that had nothing wrong with them, so the helper
    now has its own file.
  • ProjectPaths.buildVariant consults the environment when there is no bundle
    to ask. Under swift test it used to report prod, take the Keychain path,
    and block in SecItemCopyMatching on a password dialog - a hang, not a
    failure. CI sets TRIOS_VARIANT=dev.

Done when

Each file is either fixed and removed from the exclude: list, or deleted with
a reason. The list in Package.swift should reach empty.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions