Skip to content

feat: add error_context to v2 result execution and report schema - #208

Merged
prostoandrei merged 3 commits into
masterfrom
AICP-31
Jul 31, 2026
Merged

feat: add error_context to v2 result execution and report schema#208
prostoandrei merged 3 commits into
masterfrom
AICP-31

Conversation

@prostoandrei

@prostoandrei prostoandrei commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Why

Playwright ≥ 1.51 writes an error-context.md for each failed test (error details, ARIA page snapshot, source frame) — meant to be pasted into an AI agent or bug report. Today reporters can only send it as an opaque file attachment, so reading it means downloading the file from storage. No error_context concept existed in the specs.

What

Adds a nullable, write-only error_context string next to stacktrace:

  • testops-api/v2/schemas/ResultExecution.yaml — public API v2 (single + bulk)
  • report/schemas/result.yaml — report file format, keeps reporters-validator in sync

Values over 262144 chars are truncated server-side (request still succeeds). Also documents the bulk endpoint's 413, which was previously undocumented.

Notes

  • Purely additive and optional; the report schema has no additionalProperties: false, so existing reports keep validating.
  • npm run validate (spectral) passes.
  • Merging publishes docs to ReadMe.io immediately — best merged once qase-tms/app#3640 is queued to deploy, otherwise the API silently drops the field.

Rollout (AICP-31)

  1. this PR (specs)
  2. qase-tms/app#3640 — storage, validation, internal endpoint, Copy button
  3. qase-tms/qase-javascript#993 — regenerated v2 client, commons model, Playwright reporter

App must reach production before a reporter release: its own e2e suite reports to production Qase.

Playwright >= 1.51 writes an error-context.md for every failed test (test info,
error details, page snapshot). Reporters could only upload it as an opaque file
attachment, so there was no way to get the raw text onto the clipboard.

Adds a nullable error_context string to v2 ResultExecution, alongside stacktrace,
and the same field to the report file format so reporters and the report validator
stay in sync. Capped at 262144 characters.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@prostoandrei prostoandrei self-assigned this Jul 30, 2026
Andrei Vaganov and others added 2 commits July 30, 2026 12:02
The endpoint rejects a whole batch with 413 on two guards, neither of
which was in the spec: more than 2000 results (pre-existing), and the
aggregate execution.error_context budget added alongside this field.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Over-cap values are truncated silently and the request still succeeds,
which the previous wording left open to reading as a rejection. Also
note that the captured context can include rendered page content, and
that the field is not returned by the result read endpoints.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@prostoandrei
prostoandrei merged commit 407cc57 into master Jul 31, 2026
2 checks passed
@prostoandrei
prostoandrei deleted the AICP-31 branch July 31, 2026 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants