Skip to content

fix: restore main unit tests broken by #25610 and vendor the 404'd onnxruntime SwiftPM wrapper - #25669

Merged
Git-on-my-level merged 4 commits into
mainfrom
lane/main-unit-repair
Nov 18, 2026
Merged

Git-on-my-level merged 4 commits into
mainfrom
lane/main-unit-repair

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

What changed and why

Main at 44d0a4f still fails two backend unit tests that #25610's selective CI did not run, so every PR that merges main inherits red shards (for example #25630 shards 2 and 4):

  • test_account_gate_busy_http.py::test_conversation_delete_route_maps_takeover_to_409: fix: surface conversation delete outcomes and clear stale rows #25610 added a tombstone short-circuit (conversation_tombstones.is_deleted) ahead of the delete route. The test did not stub it, so it reached the real Firestore client in the no-ADC unit sandbox. The test now stubs it as live.
  • test_desktop_rest_inventory.py::test_apiclient_swift_line_count_ratchet: fix: surface conversation delete outcomes and clear stale rows #25610 grew APIClient.swift to 1521 lines (max 1500). deleteConversation and conversationDeleteRetryDelay move verbatim into APIClient+ConversationDelete.swift (same extension APIClient, internal helpers only). APIClient.swift is now 1468 lines.

The other six #25610 failures were already fixed on main by #25658 and #25661.

Product invariants affected

INV-AUTH-1: APIClient.swift is under the auth-session invariant. The moved deleteConversation is unchanged and keeps the same owner-bound auth path (resolvedRequestAuthPolicy, validateExpectedOwner, performAuthenticatedData); no auth, session or owner-transition behavior changes.

How it was verified

  • pytest tests/unit/test_account_gate_busy_http.py tests/unit/test_desktop_rest_inventory.py tests/unit/test_delete_conversation_cancels_task_reminders.py via omi-heavy: 28 passed.
  • swift test --filter APIClientConversationDeleteTests in desktop/macos/Desktop: the whole package compiled and 8 tests passed. Note: https://github.com/microsoft/onnxruntime-swift-package-manager.git currently returns "Repository not found" on a fresh clone, so this ran offline (--skip-update) from the existing SwiftPM repository cache.

UI evidence

UI-Evidence: none -- non-UI Swift file move (no View declarations) and a backend test stub

Failure class (fixes)

Failure-Class: none

Desktop dependency outage (added after first CI run)

github.com/microsoft/onnxruntime-swift-package-manager now returns 404, so Desktop Swift CI fails on every PR that touches desktop/macos (main stays green only because its pushes skip the desktop build). This PR vendors the wrapper at the exact pinned revision b7fb7f7 (1.24.2, MIT) under desktop/macos/vendor/onnxruntime-swift-package-manager/ and depends on it by path. The ONNX Runtime binary still comes from download.onnxruntime.ai, checked against its upstream SHA256. Provenance and rollback: VENDORED.md in that directory.

Verified locally: cold swift package resolve (empty cache, no URL rewrite), swift build, swift test --filter APIClientConversationDeleteTests (8 pass).

Git-on-my-level and others added 4 commits November 18, 2026 14:50
Stub the new tombstone short-circuit in the account-gate 409 delete test, and
move deleteConversation and its retry helper verbatim into
APIClient+ConversationDelete.swift so APIClient.swift is back under the
1500-line ratchet.

Failure-Class: none

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Panel review-20261118t081048-8e66 F1: new Swift sources belong in a feature
directory (desktop/macos/AGENTS.md); sibling APIClient extensions already
live in Sources/Services/APIClient/. Flow coverage path updated.

Failure-Class: layout-rule
Co-Authored-By: Claude Opus 5.5 <[email protected]>
… 404

github.com/microsoft/onnxruntime-swift-package-manager returns "Repository
not found" since 2026-11-18, so every desktop build without a warm SwiftPM
cache fails to resolve (Desktop Swift CI on any PR that touches desktop/macos).

Vendor the wrapper at the pinned revision b7fb7f7 (1.24.2, MIT) under
desktop/macos/vendor/ and depend on it by path. The ONNX Runtime binary is
still downloaded from download.onnxruntime.ai with its upstream SHA256
checksum. Verified: cold `swift package resolve` with an empty cache,
`swift build`, and APIClientConversationDeleteTests (8 pass).

Rollback: restore the .package(url:) line, re-resolve, delete the vendor dir.

Failure-Class: external-dependency-removed
Co-Authored-By: Claude Opus 5.5 <[email protected]>
… checks

Upstream files carry trailing whitespace; keep them byte-identical to the
pinned revision instead of reformatting third-party sources. Model files are
marked binary.

Failure-Class: external-dependency-removed
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Git-on-my-level Git-on-my-level changed the title fix(test): restore main unit tests broken by #25610 fix: restore main unit tests broken by #25610 and vendor the 404'd onnxruntime SwiftPM wrapper Nov 18, 2026
@Git-on-my-level
Git-on-my-level merged commit 828de3b into main Nov 18, 2026
67 checks passed
@Git-on-my-level
Git-on-my-level deleted the lane/main-unit-repair branch November 18, 2026 10:33
@Git-on-my-level

Copy link
Copy Markdown
Member Author

TRIAGE review-20261118t100237-0f82: F1 deferred (follow-up). A diff confined to desktop/macos/vendor/ selects no Desktop Swift build or test lane, so a future in-place refresh of the vendored onnxruntime wrapper could merge uncompiled. Follow-up: add the vendor prefix to DESKTOP_SWIFT_TEST_INPUTS (scripts/pre_push_ci_prediction.py) and to the Desktop Swift change filter. Until then, any refresh should also touch Desktop/Package.swift so the build runs.

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