Repository navigation
feat(claims): browser test reports as claim evidence - #449
Merged
Merged
Conversation
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing: 2
✨ Finishing Touches
Comment |
Reviewer's GuideIntroduces a pure claims-tooling module that converts Playwright JSON reports into validated test evidence, reconciles invocation artifacts against declared manifests with explicit failure codes, and determines whether required tests passed only under eligible, successful invocations; comprehensive unit tests cover the supported and failure paths. File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
…xpected invocations reconciled, skips and flakes refused
jddunn
marked this pull request as ready for review
October 14, 2026 11:48
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
github-actions Bot
pushed a commit
that referenced
this pull request
Oct 14, 2026
## [0.13.118](v0.13.117...v0.13.118) (2026-10-14) ### feat * **claims:** browser test reports as claim evidence (#449) ([ed46090](ed46090)) ### docs * correct the GMI paper's lines on persona traits and T4 contexts (#448) ([3fbc713](3fbc713)) * fix the claims the cold read of #377 found in its files (#447) ([798ffa2](798ffa2))
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.
Summary
Adds
src/safety/claims/tooling/BrowserEvidenceReport.ts, which turns Playwright JSON reports into claim evidence. A CI run declares the invocations it expects in anInvocationManifest: eachExpectedInvocationnames its commit, its application, harness and configuration digests, whether it is eligible as evidence, and the tests it must pass in each project. Each invocation leaves its exit code, its JSON report and an identity file.normalizePlaywrightReportreads one report into a flat list of tests: the describe titles and the test's joined by>, the project, the expected and final status, every attempt with its retry, status, start time and duration, and the annotations. A report whose suites, stats, specs, tests or results lack the fields the reporter writes is refused as malformed.reconcileInvocationsmatches what each invocation left against the manifest and reports every shortfall under its own code: a missing or malformed report, an invocation the manifest does not name or one reported twice, an identity that is not the expected one, a test seen twice in one project or two tests under one spec id, stats that do not match the tests the report holds, report-level errors, a non-zero exit while every test passed, and a required test that is missing, skipped, failed, flaky or marked as an expected failure. An invocation that was cancelled or crashed before writing its report is a failure, never an empty success. A baseline invocation (not eligible) keeps its tests in the result, cannot carry a required test, and never satisfies one:requiredPassedis true only for a test that passed on every attempt, in every project it names, in an eligible invocation that exited 0.The module reads only what it is given; it touches no file and no network. This pull request adds no
exportsentry; #413 tracks the./safety/claims/toolingentry and its documentation page.Linked issues
Part of #413
Type of change
How this was verified
Unit tests in CI, in the
Test & Lintjob (run 38509387110, green on fc4fca4):src/safety/claims/tooling/__tests__/BrowserEvidenceReport.test.ts, 6 tests (normalization of the title path, every attempt and the final status; a required test that passed; a skipped, failed, flaky and expected-failure required test, each refused by its code; a missing report, a missing test, a duplicate test, a conflicting spec id and an unexpected invocation; a wrong identity, a non-zero exit with every test passed, report errors, a stats mismatch and malformed JSON; a baseline invocation kept but never satisfying a requirement). The tests were pushed ahead of the module they cover: run 38509082057 on 8c86f4f failed at the type check, only on the missing../BrowserEvidenceReport.jsand the untyped values that import left, until the module existed. In the green run,Batch-1 gated tests,Browser tests,Release dry run(release type: patch),gateandlinkspass as well. No local validation commands were run.Migration notes
None. The change adds files; existing behaviour, dependencies and the package version are unchanged.
Checklist
!before the colon for a change that breaks users (feat!:orfeat(api)!:).Summary by Sourcery
Add tooling to convert Playwright browser test reports into validated claim evidence across declared CI invocations.
New Features:
Enhancements:
Tests: