Add Baseline CLI pipeline skeleton#337
Open
smsnedden wants to merge 1 commit into
Open
Conversation
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.
Introduces the
--baselineentry point and the initial Baseline pipeline infrastructure. When enabled, the pipeline runs after the performance navigation has completed, the browser has closed, and the HAR and metrics artifacts have been finalized.The pipeline is intentionally minimal in this PR: it establishes option plumbing, execution ordering, error isolation, and the artifact-writing convention by producing
baseline/meta.json. Feature detection, the separate detection navigation, Baseline status lookup, and final status-split reports follow in later PRs.Changes
--baselineoption--baselineCLI option, defaulting tofalse.launchTestAPI.LaunchOptions,DefaultOptions,CLIOptions, and the normalized internalTestConfig.baseline: booleanguarantee through the browser runners.Baseline pipeline (
src/baseline.ts)Adds
runBaselinePipeline, invoked during post-processing after the HAR and metrics have been written.For this initial slice, it writes:
The manifest contains:
The existing performance browser is not reused, and no separate detection browser is launched yet.
Artifact writer
Adds a reusable
writeBaselineArtifactfunction that:baseline/.baseline/detection/.JsonValuetype.Later slices can use the same writer for intermediary detection artifacts and the final reports split by Baseline status.
Error isolation
Baseline pipeline errors are logged without failing the performance test. Existing HAR, metrics, and other performance results remain available if Baseline processing fails.
Package version helper
Moves the existing package-version lookup from
index.tsinto a focused shared module so both the CLI version flag and Baseline metadata use the same implementation.Tests
Adds coverage for:
--baselineappearing in CLI help.baseline: true,false, and omitted across the browser matrix using the local delay fixture.baseline/meta.json.