mattermost-mobile-upstream/.github/workflows
Amy Blais 65b8a408ed
Some checks failed
ci / test (push) Has been cancelled
ci / lint-typecheck (push) Has been cancelled
ci / detox-lint-typecheck (push) Has been cancelled
ci(e2e): triage CMT failures per test and add run breakdown tool (#10279) (#10282)
* ci(e2e): triage CMT failures per test and add run breakdown tool

CMT had no per-test judging: its Detox template summary jobs fail on
FAILURES > 0, so 17/642 iOS and 12/650 Android failures (plus one iOS
shard whose simulator hit NSPOSIXErrorDomain in simctl privacy) made
the latest CMT run red, as in all 9 CMT runs in the last 30 days.
Wire the existing e2e-triage composite into compatibility-matrix-
testing.yml (report-only unless E2E_TRIAGE_MODE=enforce, same gate as
PR/main), with a new triage-lanes input so CMT summarises its per-shard
contexts instead of the PR lanes.

Also add detox/utils/e2e-run-breakdown.js: groups a gh run's jobs by
framework (Detox/Maestro) and platform (iOS/iPad/Android) so failure
rates per lane no longer need TSIO or signed-in log access.



* ci(e2e): serialize CMT triage status writes and count timed-out jobs as failures

The toolkit's status publisher has no compare-and-swap, and its
status.ts requires every writer of the shared e2e-test/triage context
to hold the same non-cancelling, SHA-scoped lock. The CMT tsio-triage
matrix wrote that context in parallel with no lock. Add max-parallel: 1
so matrix entries run one at a time without discarding queued entries,
plus a job concurrency group keyed on the CMT commit SHA with
cancel-in-progress: false to serialize against triage writers from
other runs of the same commit.

Also count GitHub job conclusion timed_out as a failure in
e2e-run-breakdown; it previously fell through to other, so a timed-out
job showed as zero failures and was omitted from failingJobs.



* ci(e2e): judge CMT channel-message failures as flaky, infra, known, or suspected app bug

The CMT channel rollup only posted totals, so every red run needed a
human to open TSIO and decide whether the app broke. The rollup already
fetches each leg's TSIO consolidated payload for per-leg counts; it now
also extracts this commit's failing tests with their error text and
earlier history, and the channel message groups them: infra/environment
(server-disabled feature, simctl, network, hook timeout, setup crash, or
a sibling cascade in the same suite), flaky (passed on retry or mixed
pass/fail history), known failing (failed before this run), and
suspected app bug (first seen, no infra cause — labelled as needing a
human confirm). When TSIO has detail for fewer tests than the failing
total, the message says how many were judged.



* ci(e2e): require a valid job and suite key for CMT cascade judgements

A failure with no job and a title that reduces to an empty suite key
produced the cascade key '|', which could match an infra failure with
the same empty key and reclassify a suspected app bug as a cascade.
Build the cascade key only when both the job and the suite are
non-empty, exclude invalid keys from the infra set, and require a
valid key before reclassifying.



* ci(e2e): require corroboration before the CMT message says suspected app bug

Suspected app bug was the fallback for any first-seen failure with no
infra marker, so ordinary visibility/existence timeouts (MM-T3199,
MM-T3206, MM-70693_2 on the 833 run) were labelled app bugs on a single
observation. Now that label needs a direct content/state assertion —
never a wait expiring — plus corroboration: the same test failing on
another leg of this run, or earlier passes in TSIO history now failing
that assertion. Everything weaker lands in a new Needs a closer look
bucket that names why the evidence is insufficient.



* ci(e2e): tighten CMT judgement corroboration (legs, run attempts, matcher text)

Three review fixes in cmt-channel-notify:
- alsoFailedElsewhere counted an empty job name as a second leg, so one
  real leg plus a missing job name could promote a failure to suspected
  app bug. Only non-empty job names are tracked now.
- The consolidated endpoint ignores gh_run_attempt (verified live:
  gh_run_attempt=99 returns full data, run_attempt=99 returns none), so
  fetchConsolidated now sends run_attempt. failuresFromConsolidated also
  excludes every attempt of this GitHub run from previousStatuses, so a
  pass in attempt 1 cannot corroborate an app-bug call in attempt 2.
- Removed 'doesn't match the selected view' from the timing patterns so
  a matcher mismatch that carries a direct assertion (toHaveText and
  friends) can reach the hard-assertion gate instead of being dismissed
  as a timing wait.



---------


(cherry picked from commit 3927243232)

Co-authored-by: yasser khan <attitude3cena.yf@gmail.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-10-27 08:47:12 +02:00
..
build-android-beta.yml Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
build-android-release.yml Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
build-ios-beta.yml Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
build-ios-release.yml Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
build-pr.yml test(detox): re-submit RF→Detox migration without unintended UI changes (#9847) 2026-06-19 22:44:02 +05:30
ci.yml fix: Product fixes to run e2e tests (#10081) 2026-08-26 16:12:37 +05:30
cmt-provisioner.yml feat(e2e): Integrate TSIO reporting (#9925) 2026-07-23 06:43:28 +00:00
codeql-analysis.yml Bump the github-actions-updates group across 5 directories with 6 updates (#8613) 2025-02-19 14:28:06 +02:00
compatibility-matrix-testing.yml ci(e2e): triage CMT failures per test and add run breakdown tool (#10279) (#10282) 2026-10-27 08:47:12 +02:00
docs-impact-review.yml Update docs impact review workflow to Claude Sonnet 4.6 (#9840) 2026-06-16 10:38:51 +00:00
e2e-android-template.yml test(e2e): fix main-branch E2E flakes and make a killed shard report red (#10161) 2026-09-17 16:25:02 +05:30
e2e-detox-pr.yml Fix/detox hittest cluster (#10023) 2026-08-27 08:58:03 +05:30
e2e-detox.yml chore(e2e): Cache app builds. Skip E2E on docs only PR. (#9930) 2026-08-04 19:13:39 +05:30
e2e-ios-template.yml test(e2e): fix main-branch E2E flakes and make a killed shard report red (#10161) 2026-09-17 16:25:02 +05:30
e2e-label-manager.yml chore(e2e): Cache app builds. Skip E2E on docs only PR. (#9930) 2026-08-04 19:13:39 +05:30
e2e-maestro-pr.yml ci(e2e): make E2E/Override waive checks instead of cancelling runs (#9975) 2026-07-31 14:22:19 +02:00
e2e-maestro-template.yml test(e2e): make CMT and PR E2E green (absorbs #10186) (#10184) 2026-09-22 12:33:09 +05:30
github-release.yml ci(release): bump setup-ruby so 3.2.11 from .ruby-version resolves (#10162) 2026-09-16 10:05:57 +03:00
pr-test-analysis-override.yml feat(workflow): pr test analysis (#9690) 2026-04-17 09:13:08 +08:00
pr-test-analysis.yml feat(workflow): pr test analysis (#9690) 2026-04-17 09:13:08 +08:00
validate-intune-clean.yml feat(iOS): Add Microsoft Intune MAM integration with multi-server support (#9312) 2025-12-10 13:07:28 +02:00