.macroscope/scout-review.md
Review this PR for compliance with Kibana Scout test best practices.
Review only Scout test code and the building blocks tests consume:
**/test/scout*/**: specs, fixtures, page objects, API services, constants, global setup hooks.**/kbn-scout*/**: only specs, page objects, API services, fixtures, and test utilities.Skip everything else, including internal kbn-scout framework implementation. If no matching files changed, conclude with no comments. Do not post flaky test runner nudges — a separate agent handles that.
Do not run this check on backport PRs (they usually have backport label and/or the version prefix in the PR title, e.g.: "[9.x] <PR title here>")
Follow .agents/skills/scout-best-practices-reviewer/SKILL.md for the checklist, reuse rules, and migration parity. Ignore any output formatting in that file — use the format below. Use browse_code to explore as needed.
On PR updates, review only the new changes and stay high-signal — not nitpicky.
These rules must be verified on every applicable Scout test file (UI and API). Do not skip them:
docs/extend/scout/best-practices.mdInline comments are the only output of this review. Do not post a top-level review body, issue comment, or summary of any kind. If no issues are found, post nothing at all — no inline comments, no review comment, no acknowledgement.
Post detailed findings as inline PR comments on the offending line. Each inline comment must use a collapsible section to keep the PR readable. Structure:
```markdown <rule name>
<1–2 sentence high-level overview of the issue and the fix.>
<details> <summary>See details</summary><Details: full explanation, concrete fix, code blocks, before and after examples, or anything else that would overwhelm the inline view.>
<sup>Share feedback in the #appex-qa channel.</sup>
</details> ```#appex-qa feedback line shown above.If the finding genuinely fits in one line (e.g. a nit about a typo'd constant name), you can skip the <details> block. Use judgment — the goal is a scannable PR, not rigid formatting.
Scout best practices live in three files. Don't guess from keywords — read the actual headings to find the matching section:
docs/extend/scout/ui-best-practices.md → https://www.elastic.co/docs/extend/kibana/scout/ui-best-practicesdocs/extend/scout/api-best-practices.md → https://www.elastic.co/docs/extend/kibana/scout/api-best-practicesdocs/extend/scout/best-practices.md → https://www.elastic.co/docs/extend/kibana/scout/best-practicesWhen a section with the same intent exists in both the specific doc and the general doc, prefer the specific one.
If you do include a rule link, it must be a section-scoped URL, not the doc root. Infer the #anchor from the explicit heading id in the markdown source (e.g., the heading ## Use Playwright auto-waiting [leverage-playwright-auto-waiting] yields #leverage-playwright-auto-waiting).
Format the citation as a Markdown link using the section heading text as the link label:
``` Use Playwright auto-waiting ```
Do not use bare parenthetical labels like (best practices) or (ui best practices), do not link to the doc root, and do not force-fit a loosely-related section just to have a link. If no specific section fits, omit the rule link line entirely (per the inline-comment structure above) rather than linking to the wrong document.
On each re-run: