Skip to content

fix(ci): propagate test failures and repair stale test fixtures - #450

Merged
dimakis merged 3 commits into
feat/mobile-provider-profilesfrom
fix/ci-test-reliability
Sep 7, 2026
Merged

fix(ci): propagate test failures and repair stale test fixtures#450
dimakis merged 3 commits into
feat/mobile-provider-profilesfrom
fix/ci-test-reliability

Conversation

@dimakis

@dimakis dimakis commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Problem and change

The CI Test step pipes Vitest output through tee under the implicit shell, so failing tests can produce a successful check. Select explicit bash, which GitHub Actions runs with pipefail, to propagate test failures. Run CI for stacked PRs as well as PRs targeting main.

Repair the existing failing test harnesses: provide the app store in page tests; mock native Watch auth and the current desktop CommandCenter; target nested file anchors and profile buttons; wait for the duplicate-send animation-frame guard; include session-state methods in route mocks; align duplicate server tests with the shipped completion-attention and deduplicated resume contracts. Replace OS watcher timing races with deterministic callback, debounce, filtering, error, and cleanup tests.

The attention assertion intentionally clarifies the existing contract: completed sessions with an unanswered assistant response remain in attention, consistent with the canonical protocol-package test. It does not change runtime behavior. Component tests share a store fixture, and auto-rename client-selection tests mock Vertex construction so CI does not attempt real ADC discovery.

This is stacked on #449 and contains only the CI/test repairs. The Vertex feature remains in #449.

Validation

  • Full local suite: 205 files, 3,206 tests passed; no unhandled errors.
  • CI shell probe: failing pipeline exits 0 under implicit bash -e and 1 with bash -eo pipefail.
  • Server/frontend type checks, lint, formatting, and whitespace checks run before commit.
  • No production runtime or provider behavior changes in this repair.

@dimakis dimakis left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Centaur Review

Found 2 issue(s).

frontend/src/pages/__tests__/CalendarView.test.tsx

Solid reliability fix — the shell: bash addition is the critical change (enables pipefail so npm test | tee no longer masks failures), and the test fixture updates correctly track component refactors. No bugs found.

  • 🔵 style (L80): The 20-line createMitzoStore boilerplate is duplicated verbatim in SessionList.test.tsx (and a third variant exists in DesktopChatView.test.tsx). Consider extracting a shared createTestStore() helper into a test-utils module to keep fixture updates in one place. [fixable]

server/__tests__/event-store.test.ts

Solid reliability fix — the shell: bash addition is the critical change (enables pipefail so npm test | tee no longer masks failures), and the test fixture updates correctly track component refactors. No bugs found.

  • 🔵 regressions (L567): This changes the documented contract from 'inactive sessions are excluded from attention' to 'inactive sessions are included'. The implementation confirms the new assertion is correct (the SQL never filtered on is_active), but this is a semantic correction, not just a stale-fixture repair — the old test was asserting a behavior the code never had. Worth noting in the PR description so reviewers understand this is an intentional contract clarification, not just a test repair.

const root = createRoot(container);
act(() => {
root.render(createElement(MemoryRouter, null, createElement(CalendarView)));
const store = createMitzoStore({

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 style: The 20-line createMitzoStore boilerplate is duplicated verbatim in SessionList.test.tsx (and a third variant exists in DesktopChatView.test.tsx). Consider extracting a shared createTestStore() helper into a test-utils module to keep fixture updates in one place. [fixable]

});

it('excludes inactive sessions', () => {
it('includes completed sessions whose assistant response still needs attention', () => {

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 regressions: This changes the documented contract from 'inactive sessions are excluded from attention' to 'inactive sessions are included'. The implementation confirms the new assertion is correct (the SQL never filtered on is_active), but this is a semantic correction, not just a stale-fixture repair — the old test was asserting a behavior the code never had. Worth noting in the PR description so reviewers understand this is an intentional contract clarification, not just a test repair.

@dimakis dimakis left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Centaur Review

LGTM — no issues found.

@dimakis
dimakis merged commit 5863117 into feat/mobile-provider-profiles Sep 7, 2026
1 check 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