Add Tauri/GPUI shell contract tests for deeplink, tray, and search cores
Summary
Problem: ANLG-320 Phase 1 requires contract tests proving the Tauri plugins and the GPUI shell interpret the same inputs identically through the extracted core crates. Until now each adapter only had its own ad-hoc tests, so the two shells could drift silently (e.g. one treating a URL as a share-open and the other as a focus request).
Fix: Each core crate owns golden fixtures and exposes them behind a contract-fixtures feature (anlg_<core>::contract::*_cases()); both adapters consume the same fixtures in their tests.
deeplink-core:tests/fixtures/deeplink_contract.json(24 URLs across allDeepLinkvariants ×anarlog/-staging/-devschemes, share/open, malformed, redaction) andcallback_contract.json(6parse_callback/render_html_from_callbackcases). Asserted by the core, byplugins/deeplink2(new pureclassify(url) -> Classifiedseam thatprocess_urlnow calls;Invalidcarries the parse error), and bydesktop-gpui::deeplink::classifyplusscheme(bundle_id).tray-core:tests/fixtures/tray_contract.json(8 cases foragenda_sections,menu_bar_title,next_schedule_refresh_ms), asserted by the core and by the GPUIEventRow -> TrayScheduleEventconversion. The Tauri tray plugin receives already-converted events, so it has no adapter-side seam to test.search-index:contractmodule with a fixed en/ko/ja document set and requests (term, phrase, created_at range, CJK, limit, no-match) asserting hit order and highlight ranges; addsCollections::reloadso freshly indexed docs are visible deterministically. Neither the tantivy plugin nor GPUI has a thin request-mapping wrapper, so this is core-only.
No shell divergences were found; all fixtures pin current core behavior.
Verification
cargo test --locked -p deeplink-core -p tray-core -p search-index(15 / 14 / 25 tests)cargo clippy --locked -p deeplink-core -p tray-core -p search-index --all-targets --no-deps -- -D warningscargo test --locked -p tauri-plugin-deeplink2 -p tauri-plugin-anlg-tray(8 / 12) and clippy-D warningson deeplink2- In the ubuntu-24.04 CI-equivalent container:
cargo test --locked -p desktop-gpui deeplink(8),... tray(4),cargo clippy --locked -p desktop-gpui --all-targets --no-deps -- -D warnings pnpm exec dprint fmt/rustfmt --edition 2024on changed files
Link to Devin session: https://app.devin.ai/sessions/f83ed73d85c648fcbdbd041cd4f15720
Open in Devin Desktop: https://app.devin.ai/desktop/session/f83ed73d85c648fcbdbd041cd4f15720?variant=devin
Requested by: @ComputelessComputer