Skip to content

fix(ci): isolate diagnostics delivery tests and include pretest suites in shards - #1240

Merged
khaira777 merged 1 commit into
mainfrom
fm/fix-diagnostics-ci-main
Oct 20, 2026
Merged

khaira777 merged 1 commit into
mainfrom
fm/fix-diagnostics-ci-main

Conversation

@khaira777

Copy link
Copy Markdown
Contributor

Summary

Fixes broken diagnostics delivery tests and ensures all test suites stranded in pretest are covered by CI test runner shards.

Root Cause

  1. Commit 57888fa3 (PR fix(diagnostics): isolate test telemetry and improve cashier error reporting #1213) introduced isTelemetrySuppressed(), which suppresses diagnostics delivery during tests unless FLO_TELEMETRY_DEV=1. tests/diagnostics-outbox-bounds.test.ts and tests/diagnostic-wire-producer.test.ts mock network transport to test online draining and wire payloads, but were missing FLO_TELEMETRY_DEV=1.
  2. In package.json, 6 test suites (test:expenses, test:diagnostics, test:reports-export, test:category-addon-groups, test:addon-inventory-db, test:addon-inventory-api) were placed in pretest rather than test. scripts/ci/run-test-shard.cjs parses the test script, so these suites were excluded from PR CI test shards and only executed during full matrix runs on push to main.

Changes

  • tests/diagnostics-outbox-bounds.test.ts: set FLO_TELEMETRY_DEV=1 and FLO_MATRIX_OFFLINE=1 during test run, restoring environment on completion. Online draining sections toggle FLO_MATRIX_OFFLINE to allow mocked network transport.
  • tests/diagnostic-wire-producer.test.ts: set FLO_TELEMETRY_DEV=1 inside try alongside unsetting FLO_MATRIX_OFFLINE, restoring on finally.
  • package.json: moved the 6 test suites from pretest to test so they are executed across CI test shards and in full test runs.

@coderabbitai

coderabbitai Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: FreeOpenSourcePOS/FloCafe/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f0cf0c54-5307-47ca-8c7d-72d9a16663cc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@khaira777
khaira777 merged commit 48f4004 into main Oct 20, 2026
23 checks passed
@khaira777
khaira777 deleted the fm/fix-diagnostics-ci-main branch October 20, 2026 14:04
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