From b5d91be791740858caffa15f288619f71b607e33 Mon Sep 17 00:00:00 2001 From: Cameron Cooke Date: Thu, 30 Apr 2026 11:28:24 +0100 Subject: [PATCH 1/3] docs(size-analysis): Document status check rules API Document how external CI consumers can fetch Size Analysis status check rules and interpret the machine-readable filter response. Cover filter grouping semantics, decoded literal values, invalid filter handling, and artifact type mapping. Refs EME-1061 Co-Authored-By: OpenAI Codex --- docs/product/size-analysis/integrating-into-ci.mdx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/product/size-analysis/integrating-into-ci.mdx b/docs/product/size-analysis/integrating-into-ci.mdx index 20eea84e131ab..5d1113aa4b00f 100644 --- a/docs/product/size-analysis/integrating-into-ci.mdx +++ b/docs/product/size-analysis/integrating-into-ci.mdx @@ -152,6 +152,14 @@ Rules are evaluated independently. If any rule's threshold is exceeded, the stat - If status checks are **enabled** but **no rules are configured**, checks will post as **neutral** (won't block PRs) but will still show size change information - If rules are configured, checks will pass or fail based on whether thresholds are exceeded +### Fetching Status Check Rules for External CI + +If you're consuming the `size_analysis.completed` webhook in your own CI, you can fetch the project's current status check rule config from the [Size Analysis status check rules API](/api/mobile-builds/retrieve-size-analysis-status-check-rules-for-a-project/). + +Use this when you want external CI to evaluate the same thresholds that Sentry uses for Size Analysis status checks, without duplicating rule configuration outside Sentry. The API reference documents the response shape, filter operators, AND/OR grouping semantics, wildcard matching behavior, and invalid-filter handling. + +The endpoint returns the **current project configuration**, not a historical snapshot from when the webhook was emitted. If rules change between webhook delivery and your API request, you'll receive the updated rules. + ## Troubleshooting ### Not Seeing Status Checks From 14c475d12ab272dbee653a240a6e51e3bfa0a763 Mon Sep 17 00:00:00 2001 From: Cameron Cooke Date: Thu, 30 Apr 2026 14:40:08 +0100 Subject: [PATCH 2/3] docs(size-analysis): Avoid generated API link before schema lands --- docs/product/size-analysis/integrating-into-ci.mdx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/product/size-analysis/integrating-into-ci.mdx b/docs/product/size-analysis/integrating-into-ci.mdx index 5d1113aa4b00f..cc81f5d5f3750 100644 --- a/docs/product/size-analysis/integrating-into-ci.mdx +++ b/docs/product/size-analysis/integrating-into-ci.mdx @@ -154,9 +154,13 @@ Rules are evaluated independently. If any rule's threshold is exceeded, the stat ### Fetching Status Check Rules for External CI -If you're consuming the `size_analysis.completed` webhook in your own CI, you can fetch the project's current status check rule config from the [Size Analysis status check rules API](/api/mobile-builds/retrieve-size-analysis-status-check-rules-for-a-project/). +If you're consuming the `size_analysis.completed` webhook in your own CI, you can fetch the project's current status check rule config from the Size Analysis status check rules API: -Use this when you want external CI to evaluate the same thresholds that Sentry uses for Size Analysis status checks, without duplicating rule configuration outside Sentry. The API reference documents the response shape, filter operators, AND/OR grouping semantics, wildcard matching behavior, and invalid-filter handling. +```http +GET /api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/preprod/size-analysis/status-check-rules/ +``` + +Use this when you want external CI to evaluate the same thresholds that Sentry uses for Size Analysis status checks, without duplicating rule configuration outside Sentry. Once the generated API reference is available, it will document the response shape, filter operators, AND/OR grouping semantics, wildcard matching behavior, and invalid-filter handling. The endpoint returns the **current project configuration**, not a historical snapshot from when the webhook was emitted. If rules change between webhook delivery and your API request, you'll receive the updated rules. From 24a0fa357c989f372e1662dabfe3c7f8a256c38b Mon Sep 17 00:00:00 2001 From: Cameron Cooke Date: Thu, 30 Apr 2026 14:55:19 +0100 Subject: [PATCH 3/3] docs(size-analysis): Correct webhook event name --- docs/product/size-analysis/integrating-into-ci.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/product/size-analysis/integrating-into-ci.mdx b/docs/product/size-analysis/integrating-into-ci.mdx index cc81f5d5f3750..5486e696f3f35 100644 --- a/docs/product/size-analysis/integrating-into-ci.mdx +++ b/docs/product/size-analysis/integrating-into-ci.mdx @@ -154,7 +154,7 @@ Rules are evaluated independently. If any rule's threshold is exceeded, the stat ### Fetching Status Check Rules for External CI -If you're consuming the `size_analysis.completed` webhook in your own CI, you can fetch the project's current status check rule config from the Size Analysis status check rules API: +If you're consuming the `preprod_artifact.size_analysis_completed` webhook in your own CI, you can fetch the project's current status check rule config from the Size Analysis status check rules API: ```http GET /api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/preprod/size-analysis/status-check-rules/