From 44b8b84078fc34952c54b0c4b4ebddbb50d3dc20 Mon Sep 17 00:00:00 2001 From: Andrei Vaganov Date: Mon, 27 Jul 2026 13:09:10 +0200 Subject: [PATCH 1/3] feat: add error_context to v2 result execution and report schema 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 --- report/schemas/result.yaml | 6 ++++++ testops-api/v2/schemas/ResultExecution.yaml | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/report/schemas/result.yaml b/report/schemas/result.yaml index b7b9f10..d0a1b86 100644 --- a/report/schemas/result.yaml +++ b/report/schemas/result.yaml @@ -21,6 +21,12 @@ properties: stacktrace: type: string nullable: true + error_context: + type: string + nullable: true + description: >- + Free-form failure context captured by the reporter. For Playwright this is the content + of error-context.md. Truncated at 262144 characters. thread: type: string nullable: true diff --git a/testops-api/v2/schemas/ResultExecution.yaml b/testops-api/v2/schemas/ResultExecution.yaml index ffe7224..5375d7a 100644 --- a/testops-api/v2/schemas/ResultExecution.yaml +++ b/testops-api/v2/schemas/ResultExecution.yaml @@ -21,6 +21,13 @@ properties: stacktrace: type: string nullable: true + error_context: + type: string + nullable: true + description: >- + Free-form failure context captured by the reporter. For Playwright this is the content of + error-context.md (test info, error details, page snapshot). Stored verbatim so it can be + copied as raw text. Truncated at 262144 characters. thread: type: string nullable: true From 5809bf56f2aa8418219c9f32711409cbe60a9b6e Mon Sep 17 00:00:00 2001 From: Andrei Vaganov Date: Thu, 30 Jul 2026 12:02:26 +0200 Subject: [PATCH 2/3] docs: document 413 on v2 bulk results endpoint 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) --- testops-api/v2/paths/results_bulk.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/testops-api/v2/paths/results_bulk.yaml b/testops-api/v2/paths/results_bulk.yaml index 5d78a16..e8308a5 100644 --- a/testops-api/v2/paths/results_bulk.yaml +++ b/testops-api/v2/paths/results_bulk.yaml @@ -45,5 +45,10 @@ post: description: Forbidden "404": description: Not Found + "413": + description: | + Payload Too Large. Returned when the request contains more than 2000 results, or when the + combined length of `execution.error_context` across the batch exceeds 4194304 characters. + In both cases the whole batch is rejected — no results are created. "422": description: Unprocessable Entity From 37fa3b0b77bcb12c7957cfc422b5ce8ce072a6a2 Mon Sep 17 00:00:00 2001 From: Andrei Vaganov Date: Thu, 30 Jul 2026 12:06:53 +0200 Subject: [PATCH 3/3] docs: clarify error_context truncation, sensitivity and write-only scope 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) --- report/schemas/result.yaml | 3 ++- testops-api/v2/schemas/ResultExecution.yaml | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/report/schemas/result.yaml b/report/schemas/result.yaml index d0a1b86..a31d22f 100644 --- a/report/schemas/result.yaml +++ b/report/schemas/result.yaml @@ -26,7 +26,8 @@ properties: nullable: true description: >- Free-form failure context captured by the reporter. For Playwright this is the content - of error-context.md. Truncated at 262144 characters. + of error-context.md, which may include rendered page content. Reporters may truncate + long values; Qase truncates at 262144 characters on upload. thread: type: string nullable: true diff --git a/testops-api/v2/schemas/ResultExecution.yaml b/testops-api/v2/schemas/ResultExecution.yaml index 5375d7a..dd23e8e 100644 --- a/testops-api/v2/schemas/ResultExecution.yaml +++ b/testops-api/v2/schemas/ResultExecution.yaml @@ -26,8 +26,10 @@ properties: nullable: true description: >- Free-form failure context captured by the reporter. For Playwright this is the content of - error-context.md (test info, error details, page snapshot). Stored verbatim so it can be - copied as raw text. Truncated at 262144 characters. + error-context.md (test info, error details, page snapshot), so it may include rendered page + content. Stored verbatim so it can be copied as raw text. Values longer than 262144 + characters are silently truncated by Qase and the request still succeeds. Write-only — not + returned by the result read endpoints. thread: type: string nullable: true