docs(cli): add env vars reference and clarify Playwright include scope#1318
Open
stefanjudis wants to merge 6 commits into
Open
docs(cli): add env vars reference and clarify Playwright include scope#1318stefanjudis wants to merge 6 commits into
stefanjudis wants to merge 6 commits into
Conversation
Add a `configure-environment` reference covering built-in vars Checkly injects at runtime, user-defined variable scopes, reference syntax, and the `checkly env` CLI, with cross-links from API/browser/multistep/ Playwright reference docs. Rewrite the `PlaywrightCheck.include` JSDoc and reference to call out that it's only for non-code assets read via `fs` — test files and imports are bundled automatically — and that globs resolve relative to the Playwright config directory.
…licy A custom `alertChannels` array on a `CheckGroupV2` is silently ignored unless `alertEscalationPolicy` is also set — individual check settings take over instead. Spell this out in the check-groups reference so agents don't write groups with non-functioning alert channels.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds/updates AI-context and JSDoc documentation to better explain (1) runtime environment variables and variable/secret scoping, and (2) the intended usage of Playwright include (non-code assets only), plus a CheckGroupV2 alert-channel gotcha.
Changes:
- Added a new
configure-environmentreference covering built-in env vars, user-defined vars/secrets, reference syntax, andcheckly envCLI usage. - Clarified
PlaywrightCheck.includescope (non-code assets read viafs) across JSDoc, AI reference docs, and the embedded example config. - Updated multiple configure references to cross-link the new environment documentation and documented the CheckGroupV2
alertChannels+alertEscalationPolicyinteraction.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/cli/src/constructs/playwright-check.ts | Updates include JSDoc guidance and example usage for Playwright check suites. |
| packages/cli/src/ai-context/references/configure-playwright-checks.md | Adds explicit guidance on include scope and links to the env-var reference. |
| packages/cli/src/ai-context/references/configure-multistep-checks.md | Links to the env-var reference. |
| packages/cli/src/ai-context/references/configure-environment.md | New reference documenting built-in/runtime and user-defined environment variables. |
| packages/cli/src/ai-context/references/configure-check-groups.md | Documents CheckGroupV2 alert channel behavior requiring alertEscalationPolicy. |
| packages/cli/src/ai-context/references/configure-browser-checks.md | Links to the env-var reference. |
| packages/cli/src/ai-context/references/configure-api-checks.md | Links to the env-var reference and clarifies Handlebars vs JS env-var usage. |
| packages/cli/src/ai-context/context.ts | Registers the new configure-environment reference and updates the Playwright example snippet. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
1 similar comment
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Affected Components
Notes for the Reviewer
Three AI-context updates so the generated
checklyskill teaches agents the right things:configure-environmentreference. Covers built-in env vars Checkly injects at runtime (CHECK_ID,CHECK_NAME,REGION,RUNTIME_VERSION, theCHECKLY_*family on Playwright Check Suites, etc.), user-defined variables/secrets at global/group/check scope, theprocess.envvs{{handlebars}}reference syntax, and thecheckly envCLI for managing global vars. Cross-links added from the API, browser, multistep, and Playwright reference docs.PlaywrightCheck.includedocs. The JSDoc, reference doc, and example all previously suggestedincludewas for test files and utilities. In practice imports and Playwright project discovery already bundle those —includeis only useful for non-code assets read viafsat runtime (JSON fixtures, markdown, snapshots). Globs resolve relative to the directory ofplaywrightConfigPath, which the docs now spell out.alertChannelsarray on aCheckGroupV2is silently ignored unlessalertEscalationPolicyis also set — individual check settings take over instead. The check-groups reference now spells this out, withalertEscalationPolicy: 'global'andAlertEscalationBuilderas the two ways to satisfy it. See https://www.checklyhq.com/docs/constructs/check-group-v2/#param-alert-escalation-policy.No new dependencies. No behavior change in the CLI itself — only JSDoc and AI-context source.