[9.6] [Accessibility] Remove flights sample data via API in a11y teardown (#300490) #300623
All Vouch review confidence checks passed
Residual risk 0.43 = Change Risk (0.52) × (1 − Review Confidence (0.17)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 14% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #300623"
general
weight: 0.35
github-actions[bot]
Backport
This will backport the following commits from
mainto9.6:- [[Accessibility] Remove flights sample data via API in a11y teardown (#300490)](https://github.com/elastic/kibana/pull/300490)
<!--- Backport version: 12.1.2 -->
Questions ?
Please refer to the Backport tool documentation
<!--BACKPORT [{"author":{"name":"Kibana Machine","email":"42973632+kibanamachine@users.noreply.github.com"},"sourceCommit":{"committedDate":"2026-10-26T16:37:31Z","message":"[Accessibility] Remove flights sample data via API in a11y teardown (#300490)\n\nFixes #299110\n\n### Summary\n\n- The
a11y tests using flights sample dataafterhook removed the\nsample data through the Home UI and then polled the card's\ndata-statusattribute for 118 s. The card never leftinstalled, so\nmocha's 120 shookTimeoutfired first, FTR aborted the config, and all\n7Management data viewsa11y specs were recorded asskipped.\n- Tear the data set down throughDELETE /api/sample_data/flights\ninstead, per Prefer Kibana APIs over UI for setup and\nteardown.\nThis removes the browser, the click, and the card's status mirror from\nthe teardown path entirely.\n-kibanaServer.uiSettings.unset('defaultIndex')replaces what the UI\nremoval did on the client\n(services.tsx);\nwithout itdefaultIndexwould keep pointing at the flights data view\nthat the followingsavedObjects.cleandeletes.\n-beforestays on the UI: it is not what failed, and its install path\nwrites thedefaultIndexthe dashboard and visualize specs run against.\n\n### Context\n\n- This patch follows the investigator's proposed\nfix,\nbut not its root-cause mechanism. That comment states Kibana's ops\nmetrics reportrequests.total = 0for seven consecutive 10 s windows\nafter the click, concluding theDELETEnever left the browser. The job\nlog contains no ops-metrics lines at all — the 12 periodicproc\n[kibana]lines inside theafterhook are Elasticsearch\n_monitoring/bulkdeprecation warnings, emitted on the same 10 s\ncadence. The earlier comment on this\nissue\nblamed an unboundedp-retrybackoff inpollForRemoval, and the\nfirst fixer\npass\nrefuted it on that same unsupported reading. Neither mechanism is\nestablished.\n- What the captured FTR debug log does show\n(target/test_failures/.logon the failing job): the Remove button was\nfound and clicked at00:02:01without error,Waiting up to 120000ms\nfor flights sample data to be removed...at00:02:02, then 976\nconsecutiveSample data installed: truepolls through00:03:59. No\nbrowser console error for/api/sample_data(only three unrelated\n/internal/security/user_profile404s) and no error toast.\n- The test cannot tell what state it is in.data-statusis React\nstate on the card footer\n(footer/index.tsx)\nthat only flips onceonRemovefires — whichuseRemovecalls after\nboth theDELETEand a client-side poll resolve — andEuiButtonEmpty\nisLoadingkeepsremoveSampleDataSetflightsmounted while removing\n(remove_footer.tsx).\nSo removal pending and removal never started are indistinguishable\nfrom this signal, there is no screenshot for a hook failure, and there\nis no recovery path from either. Rather than keep guessing between them,\nthis drops the dependency on that signal.\n- The failure message carries no information, which is why three\npasses over this issue could not name the mechanism:\nremoveSampleDataSetwaits120_000ms\n(home_page.ts)\nand FTR'smochaOpts.hookTimeoutdefaults to120_000, so mocha always\nwins and the error is a bareERR_MOCHA_TIMEOUTinstead oftimed out\nwaiting for flights sample data to be removed.\n- No coverage is lost. Removing flights through the UI is what\nsample_data_install.spec.ts\nexists to assert; this a11y suite only consumes the data.\n- Reported twice onkibana-on-merge: main, build\n113296\n(2026-10-20) and 9.6, build\n113976\n(2026-10-26). Both retried jobs passed, so removal itself works — the\nteardown just converts an intermittent hiccup into a config-wide abort.\n- Several x-pack a11y suites share this UI-teardown shape and deserve\nthe same treatment; this patch stays on the failing file.\n\n<details>\n<summary>Verification</summary>\n\n#### Verified locally\n\n- ✅ Passed:node scripts/eslint\nsrc/platform/test/accessibility/apps/index.ts\n- ✅ Passed: confirmedsupertestis registered for this config —\nsrc/platform/test/accessibility/services/index.tsspreads\nsrc/platform/test/functional/services, which registers it at\nservices/index.ts:96. The call mirrors the existing helper at\nx-pack/platform/test/functional/services/sample_data/test_resources.ts:26-33.\n\n#### Not verified locally\n\n- The suite itself was not run: FTR needs a live Elasticsearch + Kibana,\nwhich this environment does not provide.\n- Type checking was left to CI.\n-DELETE /api/sample_data/flightsreturns204only when the data set\nis installed, which thebeforehook guarantees; the stricter\n.expect(204)was not exercised against a real server here.\n\n</details>\n\n> [!IMPORTANT]\n> The flaky test runner may verify the PR, but the owning team is\nresponsible the next steps:\n>\n> - Review and merge it (update the branch or add missing labels if\nneeded)\n> - Make changes (check out the branch locally, or ask@copilotif\nCopilot is enabled on your account)\n> - Close it if it is not worth shipping (share feedback in #kibana-qa)\n\n> Generated by Flaky Test\nFixer for\n#299110 · claude · opus · 421.2 AIC · ⌖ 57.4 AIC · ⊞ 15.2K ·\n◷\n\n\n\n\n\n\nCo-authored-by: Claude Opus 4.8 <noreply@anthropic.com>","sha":"eb9ab15b42ebda9e3ea5a0fe6de349184ad88e53","branchLabelMapping":{"^v9.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:QA","release_note:skip","backport:version","flaky-test-fixer","flaky-fix-check:passed","v9.6.0","v9.5.6","v9.4.9","v9.7.0"],"title":"[Accessibility] Remove flights sample data via API in a11y teardown","number":300490,"url":"https://github.com/elastic/kibana/pull/300490","mergeCommit":{"message":"[Accessibility] Remove flights sample data via API in a11y teardown (#300490)\n\nFixes #299110\n\n### Summary\n\n- Thea11y tests using flights sample dataafterhook removed the\nsample data through the Home UI and then polled the card's\ndata-statusattribute for 118 s. The card never leftinstalled, so\nmocha's 120 shookTimeoutfired first, FTR aborted the config, and all\n7Management data viewsa11y specs were recorded asskipped.\n- Tear the data set down throughDELETE /api/sample_data/flights\ninstead, per Prefer Kibana APIs over UI for setup and\nteardown.\nThis removes the browser, the click, and the card's status mirror from\nthe teardown path entirely.\n-kibanaServer.uiSettings.unset('defaultIndex')replaces what the UI\nremoval did on the client\n(services.tsx);\nwithout itdefaultIndexwould keep pointing at the flights data view\nthat the followingsavedObjects.cleandeletes.\n-beforestays on the UI: it is not what failed, and its install path\nwrites thedefaultIndexthe dashboard and visualize specs run against.\n\n### Context\n\n- This patch follows the investigator's proposed\nfix,\nbut not its root-cause mechanism. That comment states Kibana's ops\nmetrics reportrequests.total = 0for seven consecutive 10 s windows\nafter the click, concluding theDELETEnever left the browser. The job\nlog contains no ops-metrics lines at all — the 12 periodicproc\n[kibana]lines inside theafterhook are Elasticsearch\n_monitoring/bulkdeprecation warnings, emitted on the same 10 s\ncadence. The earlier comment on this\nissue\nblamed an unboundedp-retrybackoff inpollForRemoval, and the\nfirst fixer\npass\nrefuted it on that same unsupported reading. Neither mechanism is\nestablished.\n- What the captured FTR debug log does show\n(target/test_failures/.log on the failing job): the Remove button was\nfound and clicked at00:02:01without error,Waiting up to 120000ms\nfor flights sample data to be removed...at00:02:02, then 976\nconsecutiveSample data installed: truepolls through00:03:59. No\nbrowser console error for/api/sample_data(only three unrelated\n/internal/security/user_profile404s) and no error toast.\n- The test cannot tell what state it is in.data-statusis React\nstate on the card footer\n(footer/index.tsx)\nthat only flips onceonRemovefires — whichuseRemovecalls after\nboth theDELETEand a client-side poll resolve — andEuiButtonEmpty\nisLoadingkeepsremoveSampleDataSetflightsmounted while removing\n(remove_footer.tsx).\nSo removal pending and removal never started are indistinguishable\nfrom this signal, there is no screenshot for a hook failure, and there\nis no recovery path from either. Rather than keep guessing between them,\nthis drops the dependency on that signal.\n- The failure message carries no information, which is why three\npasses over this issue could not name the mechanism:\nremoveSampleDataSetwaits120_000ms\n(home_page.ts)\nand FTR'smochaOpts.hookTimeoutdefaults to120_000, so mocha always\nwins and the error is a bareERR_MOCHA_TIMEOUTinstead oftimed out\nwaiting for flights sample data to be removed.\n- No coverage is lost. Removing flights through the UI is what\nsample_data_install.spec.ts\nexists to assert; this a11y suite only consumes the data.\n- Reported twice onkibana-on-merge: main, build\n113296\n(2026-10-20) and 9.6, build\n113976\n(2026-10-26). Both retried jobs passed, so removal itself works — the\nteardown just converts an intermittent hiccup into a config-wide abort.\n- Several x-pack a11y suites share this UI-teardown shape and deserve\nthe same treatment; this patch stays on the failing file.\n\n<details>\n<summary>Verification</summary>\n\n#### Verified locally\n\n- ✅ Passed:node scripts/eslint\nsrc/platform/test/accessibility/apps/index.ts\n- ✅ Passed: confirmedsupertestis registered for this config —\nsrc/platform/test/accessibility/services/index.tsspreads\nsrc/platform/test/functional/services, which registers it at\nservices/index.ts:96. The call mirrors the existing helper at\nx-pack/platform/test/functional/services/sample_data/test_resources.ts:26-33.\n\n#### Not verified locally\n\n- The suite itself was not run: FTR needs a live Elasticsearch + Kibana,\nwhich this environment does not provide.\n- Type checking was left to CI.\n-DELETE /api/sample_data/flightsreturns204only when the data set\nis installed, which thebeforehook guarantees; the stricter\n.expect(204)was not exercised against a real server here.\n\n</details>\n\n> [!IMPORTANT]\n> The flaky test runner may verify the PR, but the owning team is\nresponsible the next steps:\n>\n> - Review and merge it (update the branch or add missing labels if\nneeded)\n> - Make changes (check out the branch locally, or ask@copilotif\nCopilot is enabled on your account)\n> - Close it if it is not worth shipping (share feedback in #kibana-qa)\n\n> Generated by Flaky Test\nFixer for\n#299110 · claude · opus · 421.2 AIC · ⌖ 57.4 AIC · ⊞ 15.2K ·\n◷\n\n\n\n\n\n\nCo-authored-by: Claude Opus 4.8 <noreply@anthropic.com>","sha":"eb9ab15b42ebda9e3ea5a0fe6de349184ad88e53"}},"sourceBranch":"main","suggestedTargetBranches":["9.6","9.5","9.4"],"targetPullRequestStates":[{"branch":"9.6","label":"v9.6.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.5","label":"v9.5.6","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.4","label":"v9.4.9","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.7.0","branchLabelMappingKey":"^v9.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/300490","number":300490,"mergeCommit":{"message":"[Accessibility] Remove flights sample data via API in a11y teardown (#300490)\n\nFixes #299110\n\n### Summary\n\n- Thea11y tests using flights sample dataafterhook removed the\nsample data through the Home UI and then polled the card's\ndata-statusattribute for 118 s. The card never leftinstalled, so\nmocha's 120 shookTimeoutfired first, FTR aborted the config, and all\n7Management data viewsa11y specs were recorded asskipped.\n- Tear the data set down throughDELETE /api/sample_data/flights\ninstead, per Prefer Kibana APIs over UI for setup and\nteardown.\nThis removes the browser, the click, and the card's status mirror from\nthe teardown path entirely.\n-kibanaServer.uiSettings.unset('defaultIndex')replaces what the UI\nremoval did on the client\n(services.tsx);\nwithout itdefaultIndexwould keep pointing at the flights data view\nthat the followingsavedObjects.cleandeletes.\n-beforestays on the UI: it is not what failed, and its install path\nwrites thedefaultIndexthe dashboard and visualize specs run against.\n\n### Context\n\n- This patch follows the investigator's proposed\nfix,\nbut not its root-cause mechanism. That comment states Kibana's ops\nmetrics reportrequests.total = 0for seven consecutive 10 s windows\nafter the click, concluding theDELETEnever left the browser. The job\nlog contains no ops-metrics lines at all — the 12 periodicproc\n[kibana]lines inside theafterhook are Elasticsearch\n_monitoring/bulkdeprecation warnings, emitted on the same 10 s\ncadence. The earlier comment on this\nissue\nblamed an unboundedp-retrybackoff inpollForRemoval, and the\nfirst fixer\npass\nrefuted it on that same unsupported reading. Neither mechanism is\nestablished.\n- What the captured FTR debug log does show\n(target/test_failures/.logon the failing job): the Remove button was\nfound and clicked at00:02:01without error,Waiting up to 120000ms\nfor flights sample data to be removed...at00:02:02, then 976\nconsecutiveSample data installed: truepolls through00:03:59. No\nbrowser console error for/api/sample_data(only three unrelated\n/internal/security/user_profile404s) and no error toast.\n- The test cannot tell what state it is in.data-statusis React\nstate on the card footer\n(footer/index.tsx)\nthat only flips onceonRemovefires — whichuseRemovecalls after\nboth theDELETEand a client-side poll resolve — andEuiButtonEmpty\nisLoadingkeepsremoveSampleDataSetflightsmounted while removing\n(remove_footer.tsx).\nSo removal pending and removal never started are indistinguishable\nfrom this signal, there is no screenshot for a hook failure, and there\nis no recovery path from either. Rather than keep guessing between them,\nthis drops the dependency on that signal.\n- The failure message carries no information, which is why three\npasses over this issue could not name the mechanism:\nremoveSampleDataSetwaits120_000ms\n(home_page.ts)\nand FTR'smochaOpts.hookTimeoutdefaults to120_000, so mocha always\nwins and the error is a bareERR_MOCHA_TIMEOUTinstead oftimed out\nwaiting for flights sample data to be removed.\n- No coverage is lost. Removing flights through the UI* is what\nsample_data_install.spec.ts\nexists to assert; this a11y suite only consumes the data.\n- Reported twice onkibana-on-merge: main, build\n113296\n(2026-10-20) and 9.6, build\n113976\n(2026-10-26). Both retried jobs passed, so removal itself works — the\nteardown just converts an intermittent hiccup into a config-wide abort.\n- Several x-pack a11y suites share this UI-teardown shape and deserve\nthe same treatment; this patch stays on the failing file.\n\n<details>\n<summary>Verification</summary>\n\n#### Verified locally\n\n- ✅ Passed:node scripts/eslint\nsrc/platform/test/accessibility/apps/index.ts\n- ✅ Passed: confirmedsupertestis registered for this config —\nsrc/platform/test/accessibility/services/index.tsspreads\nsrc/platform/test/functional/services, which registers it at\nservices/index.ts:96. The call mirrors the existing helper at\nx-pack/platform/test/functional/services/sample_data/test_resources.ts:26-33.\n\n#### Not verified locally\n\n- The suite itself was not run: FTR needs a live Elasticsearch + Kibana,\nwhich this environment does not provide.\n- Type checking was left to CI.\n-DELETE /api/sample_data/flightsreturns204only when the data set\nis installed, which thebeforehook guarantees; the stricter\n.expect(204)was not exercised against a real server here.\n\n</details>\n\n> [!IMPORTANT]\n> The flaky test runner may verify the PR, but the owning team is\nresponsible the next steps:\n>\n> - Review and merge it (update the branch or add missing labels if\nneeded)\n> - Make changes (check out the branch locally, or ask@copilotif\nCopilot is enabled on your account)\n> - Close it if it is not worth shipping (share feedback in #kibana-qa)\n\n> Generated by Flaky Test\nFixer for\n#299110 · claude · opus · 421.2 AIC · ⌖ 57.4 AIC · ⊞ 15.2K ·\n◷\n\n\n\n\n\n\nCo-authored-by: Claude Opus 4.8 <noreply@anthropic.com>","sha":"eb9ab15b42ebda9e3ea5a0fe6de349184ad88e53"}}]}] BACKPORT-->