npx skills add ...
npx skills add brave/brave-core --skill check-upstream-flake
npx skills add brave/brave-core --skill check-upstream-flake
"Check if a failing test is a known upstream flake in Chromium's LUCI Analysis database. Provides flakiness statistics, verdict, and recommendation for filter file decisions. Triggers on: check upstream flake, is this test flaky upstream, check luci flakiness, upstream flake check."
Check if a failing test is a known upstream flake in the Chromium LUCI Analysis
database. This queries the REST API at analysis.api.luci.app to retrieve
historical pass/fail/flake data for a test in the Chromium CI infrastructure.
When invoked with a test name:
Arguments:
test_name (required): Test name or substring to search for--days N: Lookback window in days (default: 30, max: 90)--json: Output JSON instead of markdownExit codes:
0: Success (results found and reported)1: Error (network, API, etc.)2: No matching test IDs foundThe script produces one of five verdicts:
| Verdict | Flake Rate | Action |
|---|---|---|
| Known upstream flake | >= 5% | Safe to add to filter file. Document upstream flakiness in the filter comment. |
| Occasional upstream failures | 1-5% | Consider filtering. Document findings. May still warrant investigation. |
| Stable upstream | < 1% | Investigate Brave-specific causes. The test is stable in Chromium, so Brave code changes are likely causing the failure. |
| Insufficient data | N/A (<10 verdicts) | Cannot determine from upstream data. Manual investigation needed. |
| Not found | N/A | Test not in Chromium database. May be Brave-specific or use a different ID format. |
Flake rate is calculated as (failed + flaky) / (passed + failed + flaky).
Skipped and precluded verdicts are excluded from the rate.
brave/chromium_src/ overrides in related directoriesThe script uses the LUCI Analysis REST API (pRPC protocol):
POST https://analysis.api.luci.app/prpc/luci.analysis.v1.TestHistory/QueryTestsPOST https://analysis.api.luci.app/prpc/luci.analysis.v1.TestHistory/QueryStatsPOST https://analysis.api.luci.app/prpc/luci.analysis.v1.TestHistory/QueryNo authentication is required for public Chromium data.
Test IDs in LUCI follow the format:
ninja://{gn_path}:{target}/{TestSuite}.{TestMethod}