Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

chore(devex): per-product backend coverage report on PRs (#59664)

Julian Bez6be1d327474b
diff --git a/.depot/workflows/ci-backend.yml b/.depot/workflows/ci-backend.yml
index b47bdd281063..57e91203f795 100644
--- a/.depot/workflows/ci-backend.yml
+++ b/.depot/workflows/ci-backend.yml
@@ -796,6 +796,12 @@ jobs:
--reuse-db
--durations-path ../../.test_durations
${{ needs.detect-snapshot-mode.outputs.mode == 'update' && '--snapshot-update --snapshot-warn-unused' || '' }}
+ ${{ github.event_name == 'pull_request' && '--cov=backend --cov-report=xml:coverage.xml' || '' }}
+ # turbo runs each product's backend:test with the product dir as CWD, so --cov=backend
+ # scopes coverage to that product and writes products/<name>/coverage.xml — works for
+ # bin-packed buckets (each product writes its own file) and split products (unioned later).
+ # sysmon: Python 3.12+'s low-overhead coverage backend, ~a few % vs ~20% for the C tracer.
+ COVERAGE_CORE: sysmon
run: |
set +e
pnpm turbo run backend:test ${{ matrix.filters }} --concurrency=1 --output-logs=full --force --log-order=stream ${{ matrix.pytest_args }}
@@ -1549,10 +1555,18 @@ jobs:
MODE: ${{ needs.select-tests.outputs.mode }}
CORE_FILES: ${{ needs.select-tests.outputs.core_files }}
POE_FILES: ${{ needs.select-tests.outputs.poe_files }}
+ # devex: measure core (posthog/ee) coverage on PRs to size the gap vs products. sysmon = low overhead.
+ COVERAGE_CORE: sysmon
+ COV_ARGS: ${{ github.event_name == 'pull_request' && '--cov=posthog --cov=ee --cov-config=.github/coverage-core.cfg --cov-report=xml:coverage-core.xml' || '' }}
shell: 'signal-fanout bash --noprofile --norc -eo pipefail {0}'
run: |
unset GITHUB_TOKEN # reserved var injected by Depot CI; can't override via env: (see workflow env note)
set +e
+ # Unrebased branches predate .github/coverage-core.cfg; an explicit --cov-config
+ # pointing at a missing file is a hard error, so drop coverage rather than fail.
+ if [[ -n "$COV_ARGS" && ! -f .github/coverage-core.cfg ]]; then
+ COV_ARGS=""
+ fi
# Pick the split algorithm and granularity at runtime: optimal_chunks + file
# granularity only when the installed pytest-split offers them, else
# duration_based_chunks / item. A workflow edit runs merged with master, so an
@@ -1583,6 +1597,7 @@ jobs:
pytest -v --tb=short --reuse-db -o junit_duration_report=call $targets -m "not async_migrations" \
-r fEsxX \
--junitxml=junit-core.xml \
+ $COV_ARGS \
$PYTEST_ARGS
else
pytest -v --tb=short --reuse-db -o junit_duration_report=call ${{
@@ -1606,6 +1621,7 @@ jobs:
"${SPLIT_GRANULARITY[@]}" \
-r fEsxX \
--junitxml=junit-core.xml \
+ $COV_ARGS \
$PYTEST_ARGS
fi
exit_code=$?
diff --git a/.github/coverage-core.cfg b/.github/coverage-core.cfg
new file mode 100644
index 000000000000..53ee46985b9a
--- /dev/null
+++ b/.github/coverage-core.cfg
@@ -0,0 +1,10 @@
+# Coverage config used only by the core (posthog/ee) PR coverage runs via --cov-config.
+# relative_files: store repo-relative paths (posthog/..., ee/...) instead of source-stripped
+# ones, so diff-cover matches them against git diff paths and posthog/ vs ee/ don't collide.
+# omit: the Core test segment --ignores temporal/dags (they run in the Temporal/Dagster
+# segments), so excluding them keeps changed lines there from showing as false-uncovered.
+[run]
+relative_files = True
+omit =
+ posthog/temporal/*
+ posthog/dags/*
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index 2a3973199f44..55cda75de4c3 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -40,6 +40,10 @@
**Autonomy:** Human-driven (agent-assisted) - or - Fully autonomous
+<!-- Definition of done (agents): not done until each gate below holds. Verify against the named artifact or skill — don't assume. Add gates as the PR touches more areas.
+ - Patch coverage: the lines this PR changed are covered, or the uncovered ones are justified under "How did you test this code?". Don't pad untouched code to lift the number. Check the "🧪 Backend test coverage" PR comment (and its patch-coverage artifact).
+-->
+
<!-- Keep this short: 1-3 short paragraphs or a handful of bullets — not an exhaustive log. Include:
- tools/agent used and link to session. List the agent and tool names used, but do not include tool call results.
- skills invoked: always explicitly call out any repo-provided or public skills (e.g. /django-migrations, /improving-drf-endpoints) that were invoked while producing this PR. This helps reviewers judge where and how the code was shaped by an agent.
diff --git a/.github/scripts/coverage_report.py b/.github/scripts/coverage_report.py
new file mode 100644
index 000000000000..8a9bbaa64887
--- /dev/null
+++ b/.github/scripts/coverage_report.py
@@ -0,0 +1,469 @@
+#!/usr/bin/env python3
+# /// script
+# requires-python = ">=3.11"
+# dependencies = ["diff-cover>=9,<11", "defusedxml~=0.7"]
+# ///
+"""Per-product backend coverage reporter.
+
+Reads the coverage.xml files produced by the turbo-tests product matrix (one per
+product, written into each product's working dir by `--cov=backend`), computes a
+line-coverage percentage per touched product, and renders a bar-chart summary.
+
+Only touched products run in CI, so whatever coverage.xml files are present *are*
+the touched set — no need to be told which products changed.
+
+Split products write partial coverage.xml across several shards; this unions the
+covered line numbers per source file across all shards for a product, so the
+percentage is exact rather than a per-shard average.
+
+Render-only: this script produces the markdown report and the machine-readable
+diff-cover JSON, nothing else. Posting into the shared CI report comment — and the
+comment-only-when-actionable logic — lives in .github/scripts/post-coverage-section.mjs.
+
+Near-stdlib — diff-cover for patch coverage, defusedxml for parsing artifact XML
+(semgrep blocks stdlib xml parsing; artifacts are PR-controlled input).
+"""
+
+from __future__ import annotations
+
+import os
+import re
+import sys
+import json
+import argparse
+import tempfile
+import subprocess
+from collections import defaultdict
+from dataclasses import dataclass
+from pathlib import Path
+
+# nosemgrep: python.lang.security.use-defused-xml.use-defused-xml (only used to build the output XML; all parsing goes through defusedxml)
+from xml.etree import ElementTree
+
+import defusedxml.ElementTree as DefusedElementTree
+
+BAR_WIDTH = 20
+
+
+def sanitize_path(path: str) -> str:
+ """Keep artifact-derived paths inert in markdown/HTML-comment contexts."""
+ return re.sub(r"[^A-Za-z0-9_./\- ]", "_", path).replace("--", "-")
+
+
+@dataclass
+class ProductCoverage:
+ product: str
+ covered: int
+ valid: int
+
+ @property
+ def pct(self) -> float:
+ return 100.0 * self.covered / self.valid if self.valid else 0.0
+
+
+def product_from_path(xml_path: Path) -> str | None:
+ """Derive the product name from a coverage XML path.
+
+ CI stages each file as <product>.xml (the product survives upload-artifact's
+ path collapse). Fall back to the .../products/<name>/coverage.xml layout for
+ files read straight from a checkout.
+ """
+ if xml_path.stem != "coverage":
+ return sanitize_path(xml_path.stem)
+ parts = xml_path.parts
+ if "products" in parts:
+ idx = parts.index("products")
+ if idx + 1 < len(parts):
+ return sanitize_path(parts[idx + 1])
+ return None
+
+
+def _accumulate_class_lines(
+ cls: ElementTree.Element, key: str, covered: dict[str, set[int]], valid: dict[str, set[int]]
+) -> None:
+ """Read a <class>'s <line> children into the covered/valid sets under the given key."""
+ for line in cls.iter("line"):
+ number_attr = line.get("number")
+ if number_attr is None:
+ continue
+ number = int(number_attr)
+ valid[key].add(number)
+ if int(line.get("hits", "0")) > 0:
+ covered[key].add(number)
+
+
+def parse_xml(xml_path: Path, covered_lines: dict[str, set[int]], valid_lines: dict[str, set[int]]) -> None:
+ """Accumulate covered / valid line numbers per source file from one coverage.xml."""
+ try:
+ root = DefusedElementTree.parse(xml_path).getroot()
+ except ElementTree.ParseError as exc:
+ sys.stderr.write(f"::warning::skipping unparseable {xml_path}: {exc}\n")
+ return
+
+ for cls in root.iter("class"):
+ filename = cls.get("filename")
+ if not filename:
+ continue
+ _accumulate_class_lines(cls, filename, covered_lines, valid_lines)
+
+
+# product -> filename -> set of line numbers
+LineMap = dict[str, dict[str, set[int]]]
+
+
+def aggregate(artifacts_dir: Path) -> tuple[LineMap, LineMap]:
+ """Union covered / valid line numbers per product per source file across all shard XMLs."""
+ covered: LineMap = defaultdict(lambda: defaultdict(set))
+ valid: LineMap = defaultdict(lambda: defaultdict(set))
+ for xml_path in sorted(artifacts_dir.rglob("*.xml")):
+ product = product_from_path(xml_path)
+ if not product:
+ continue
+ parse_xml(xml_path, covered[product], valid[product])
+ return covered, valid
+
+
+def collect(covered: LineMap, valid: LineMap) -> list[ProductCoverage]:
+ """Roll the per-file line sets up to one coverage figure per product."""
+ results: list[ProductCoverage] = []
+ for product in sorted(valid):
+ total_valid = sum(len(lines) for lines in valid[product].values())
+ total_covered = sum(len(lines) for lines in covered[product].values())
+ results.append(ProductCoverage(product=product, covered=total_covered, valid=total_valid))
+ return results
+
+
+def resolve_core_path(filename: str, sources: list[str], cache: dict[str, str]) -> str:
+ """Reconstruct a repo-relative path from a source-stripped core coverage filename.
+
+ Coverage stores core filenames relative to a <source> root (e.g. ``auth.py`` under source
+ ``posthog``), not repo-relative — even with relative_files. Pick the source whose joined
+ path exists in the checkout; posthog wins ties since it's the bulk of core. Coverage doesn't
+ tell us which source a given <class> actually came from, so when the same relative path
+ exists under more than one source (e.g. an ``ee/`` file shadowing a ``posthog/`` one), the
+ two classes' line data collapse into whichever source wins the tie — warn so that's visible
+ instead of a silent misattribution.
+ """
+ if filename in cache:
+ return cache[filename]
+ stripped = filename.lstrip("/")
+ resolved = stripped
+ if not stripped.startswith(("posthog/", "ee/")):
+ candidates = [
+ src
+ for src in sorted(sources, key=lambda s: 0 if s == "posthog" else 1)
+ if src and Path(src, stripped).exists()
+ ]
+ if len(candidates) > 1:
+ sys.stderr.write(
+ f"::warning::coverage path '{stripped}' exists under multiple sources "
+ f"({', '.join(candidates)}); attributing to '{candidates[0]}' — coverage may be misattributed\n"
+ )
+ resolved = (
+ f"{candidates[0]}/{stripped}" if candidates else (f"{sources[0]}/{stripped}" if sources else stripped)
+ )
+ cache[filename] = resolved
+ return resolved
+
+
+def aggregate_core(artifacts_dir: Path) -> tuple[dict[str, set[int]], dict[str, set[int]]]:
+ """Union covered / valid line numbers per file across the core (posthog/ee) coverage XMLs.
+
+ Filenames are stored relative to their <source> root (posthog or ee); each is resolved
+ back to a repo-relative path so diff-cover can match it against git diff paths.
+ """
+ covered: dict[str, set[int]] = defaultdict(set)
+ valid: dict[str, set[int]] = defaultdict(set)
+ cache: dict[str, str] = {}
+ for xml_path in sorted(artifacts_dir.rglob("*.xml")):
+ try:
+ root = DefusedElementTree.parse(xml_path).getroot()
+ except ElementTree.ParseError as exc:
+ sys.stderr.write(f"::warning::skipping unparseable {xml_path}: {exc}\n")
+ continue
+ sources = [s.text.strip() for s in root.iter("source") if s.text and s.text.strip() not in (".", "")]
+ for cls in root.iter("class"):
+ filename = cls.get("filename")
+ if not filename:
+ continue
+ repo_path = resolve_core_path(filename, sources, cache)
+ _accumulate_class_lines(cls, repo_path, covered, valid)
+ return covered, valid
+
+
+def repo_path_for(product: str, filename: str) -> str:
+ """Map a per-product coverage filename to its repo-relative path.
+
+ turbo runs each product's backend:test with ``--cov=backend``, so coverage records
+ filenames relative to ``products/<product>/backend`` (e.g. ``api.py``,
+ ``migrations/0001.py``) — the ``backend/`` source root is stripped from the stored
+ name. diff-cover matches against repo-relative ``git diff`` paths, so restore it.
+ """
+ filename = filename.lstrip("/")
+ if filename == "backend" or filename.startswith("backend/"):
+ return f"products/{product}/{filename}"
+ return f"products/{product}/backend/{filename}"
+
+
+def write_combined_cobertura(
+ covered: LineMap,
+ valid: LineMap,
+ core_covered: dict[str, set[int]],
+ core_valid: dict[str, set[int]],
+ out_path: Path,
+) -> None:
+ """Emit one repo-relative Cobertura XML (products + core) from the unioned line sets.
+
+ Product files are rewritten via repo_path_for(); core (posthog/ee) files are already
+ repo-relative. <source> points at the repo root so diff-cover matches git diff paths.
+ """
+ coverage_el = ElementTree.Element("coverage", {"version": "diff-cover-combined"})
+ ElementTree.SubElement(ElementTree.SubElement(coverage_el, "sources"), "source").text = "."
+ classes_el = ElementTree.SubElement(
+ ElementTree.SubElement(ElementTree.SubElement(coverage_el, "packages"), "package", {"name": "backend"}),
+ "classes",
+ )
+
+ def add_class(repo_path: str, covered_lines: set[int], valid_lines: set[int]) -> None:
+ class_el = ElementTree.SubElement(classes_el, "class", {"filename": repo_path, "name": Path(repo_path).name})
+ lines_el = ElementTree.SubElement(class_el, "lines")
+ for number in sorted(valid_lines):
+ hit = "1" if number in covered_lines else "0"
+ ElementTree.SubElement(lines_el, "line", {"number": str(number), "hits": hit})
+
+ for product in sorted(valid):
+ for filename in sorted(valid[product]):
+ add_class(repo_path_for(product, filename), covered[product].get(filename, set()), valid[product][filename])
+ for filename in sorted(core_valid):
+ add_class(filename, core_covered.get(filename, set()), core_valid[filename])
+
+ ElementTree.ElementTree(coverage_el).write(out_path, encoding="utf-8", xml_declaration=True)
+
+
+def run_diff_cover(combined_path: Path, compare_branch: str, json_out: Path | None) -> dict | None:
+ """Shell out to diff-cover and return its parsed JSON report, or None on any failure.
+
+ Best-effort: a missing diff-cover binary, no git history, or an empty diff all just
+ mean no patch section — never a hard error in a report-only job. When json_out is set
+ the report is also persisted there (CI uploads it as the machine-readable payload).
+ """
+ with tempfile.TemporaryDirectory() as tmp:
+ report = json_out if json_out is not None else Path(tmp) / "patch.json"
+ extra = ["--compare-branch", compare_branch, "--format", f"json:{report}"]
+ for invocation in (["diff-cover"], [sys.executable, "-m", "diff_cover.diff_cover_tool"]):
+ try:
+ proc = subprocess.run([*invocation, str(combined_path), *extra], capture_output=True, text=True)
+ except FileNotFoundError:
+ continue
+ if proc.returncode != 0:
+ sys.stderr.write(f"::warning::diff-cover exited {proc.returncode}: {proc.stderr.strip()}\n")
+ return None
+ try:
+ return json.loads(Path(report).read_text())
+ except (OSError, json.JSONDecodeError) as exc:
+ sys.stderr.write(f"::warning::could not read diff-cover JSON: {exc}\n")
+ return None
+ sys.stderr.write("::warning::diff-cover not installed — skipping patch coverage\n")
+ return None
+
+
+def diff_touches_backend(compare_branch: str) -> bool | None:
+ """Whether the diff vs compare_branch touches any measured backend path (None = can't tell).
+
+ Used when no coverage was collected at all: a diff with no backend files means there is
+ genuinely nothing to report and any stale section can be cleared, while a backend diff
+ without coverage data stays undetermined (never clear a real warning on missing data).
+ """
+ try:
+ proc = subprocess.run(
+ ["git", "diff", "--name-only", f"{compare_branch}...HEAD"], capture_output=True, text=True
+ )
+ except OSError:
+ return None
+ if proc.returncode != 0:
+ return None
+ for line in proc.stdout.splitlines():
+ path = line.strip()
+ if not path.endswith(".py"):
+ continue
+ if path.startswith(("posthog/", "ee/")) or (path.startswith("products/") and "/backend/" in path):
+ return True
+ return False
+
+
+def empty_patch_data() -> dict:
+ """A diff-cover-shaped payload for 'no measured backend lines changed'."""
+ return {"total_num_lines": 0, "total_num_violations": 0, "total_percent_covered": 100.0, "src_stats": {}}
+
+
+def bar(pct: float) -> str:
+ filled = round(pct / 100 * BAR_WIDTH)
+ return "█" * filled + "░" * (BAR_WIDTH - filled)
+
+
+def compress_ranges(numbers: list[int]) -> list[tuple[int, int]]:
+ """Collapse a line-number list into sorted (start, end) ranges."""
+ nums = sorted(set(numbers))
+ ranges: list[tuple[int, int]] = []
+ if not nums:
+ return ranges
+ start = prev = nums[0]
+ for n in nums[1:]:
+ if n == prev + 1:
+ prev = n
+ continue
+ ranges.append((start, prev))
+ start = prev = n
+ ranges.append((start, prev))
+ return ranges
+
+
+def format_line_ranges(numbers: list[int]) -> str:
+ """Render line numbers as compact ranges, e.g. [408,409,410,412] -> '408–410, 412'."""
+ return ", ".join(str(a) if a == b else f"{a}–{b}" for a, b in compress_ranges(numbers))
+
+
+def render_patch_section(data: dict) -> str:
+ """Render the human-facing patch-coverage block from diff-cover's JSON report."""
+ total_lines = int(data.get("total_num_lines", 0))
+ if not total_lines:
+ return "_No measured backend lines changed in this PR (patch coverage n/a)._"
+
+ pct = float(data.get("total_percent_covered", 0))
+ violations = int(data.get("total_num_violations", 0))
+ covered = total_lines - violations
+ header = f"**Patch coverage** — changed backend lines (products + core): `{bar(pct)}` {pct:.1f}% ({covered:,} / {total_lines:,})"
+ if not violations:
+ return f"{header}\n\nAll changed backend lines are covered ✅"
+
+ src = data.get("src_stats", {})
+ rows = ["", "| File | Patch | Uncovered changed lines |", "| --- | --- | --- |"]
+ for path in sorted(src, key=lambda p: src[p].get("percent_covered", 0)):
+ missing = format_line_ranges(src[path].get("violation_lines", []))
+ if not missing:
+ continue
+ rows.append(f"| `{sanitize_path(path)}` | {float(src[path].get('percent_covered', 0)):.1f}% | {missing} |")
+ return header + "\n" + "\n".join(rows)
+
+
+def build_agent_hint() -> str:
+ """Visible steering line pointing agents at the action + the machine-readable payload."""
+ server = os.environ.get("GITHUB_SERVER_URL", "https://github.com")
+ repo = os.environ.get("GITHUB_REPOSITORY", "")
+ run_id = os.environ.get("GITHUB_RUN_ID", "")
+ if repo and run_id:
+ payload = f"the **patch-coverage** artifact on [this run]({server}/{repo}/actions/runs/{run_id}) (`gh run download {run_id} -n patch-coverage`)"
+ else:
+ payload = "the **patch-coverage** artifact"
+ return (
+ '🤖 **Agents:** add a test covering the lines above, or note why under "How did you test '
+ f'this code?". Machine-readable gap list: {payload}, or the `coverage-data` block at the end of this comment.'
+ )
+
+
+def render_product_table(results: list[ProductCoverage]) -> list[str]:
+ """Per-product absolute coverage."""
+ rows = ["| Product | Coverage | Lines |", "| --- | --- | --- |"]
+ for r in sorted(results, key=lambda x: x.pct):
+ rows.append(f"| `{r.product}` | `{bar(r.pct)}` {r.pct:.1f}% | {r.covered:,} / {r.valid:,} |")
+ return rows
+
+
+def build_machine_block(patch_data: dict, results: list[ProductCoverage]) -> str:
+ """A hidden, compact JSON block agents can parse straight from the comment body."""
+ src = patch_data.get("src_stats", {})
+ payload = {
+ "patch": {
+ "pct": round(float(patch_data.get("total_percent_covered", 0)), 1),
+ "changed": int(patch_data.get("total_num_lines", 0)),
+ "uncovered": int(patch_data.get("total_num_violations", 0)),
+ },
+ "uncovered_lines": {
+ sanitize_path(path): [[a, b] for a, b in compress_ranges(stats.get("violation_lines", []))]
+ for path, stats in src.items()
+ if stats.get("violation_lines")
+ },
+ "products": {r.product: {"pct": round(r.pct, 1)} for r in results},
+ }
+ return f"<!-- coverage-data:{json.dumps(payload, separators=(',', ':'))} -->"
+
+
+def render_markdown(results: list[ProductCoverage], patch_data: dict | None) -> str:
+ lines = ["### 🧪 Backend test coverage", ""]
+ if not results and patch_data is None:
+ lines.append("_No backend coverage measured for this PR._")
+ return "\n".join(lines)
+
+ patch_section = (
+ render_patch_section(patch_data) if patch_data is not None else "_Patch coverage unavailable for this run._"
+ )
+ lines += [patch_section, ""]
+
+ if patch_data is not None and int(patch_data.get("total_num_violations", 0)) > 0:
+ lines += [build_agent_hint(), ""]
+
+ # Per-product table is products only — core isn't a product, and on selected-mode runs its
+ # absolute number would be partial. Core still contributes to the patch section above.
+ if results:
+ lines += ["<details>", "<summary>Per-product line coverage (touched products)</summary>", ""]
+ lines += render_product_table(results)
+ lines += ["", "</details>"]
+
+ lines += [
+ "",
+ "_Report-only. Patch coverage = changed backend lines covered vs `origin/master`. Sorted lowest first._",
+ # Known blind spots, so "uncovered" isn't read as gospel: the Django Temporal segment runs
+ # without coverage instrumentation, and core XMLs come from the PR-head tree while the diff
+ # is computed on the merge ref (line drift when master touched the same core file).
+ "_Known gaps: lines covered only by Temporal tests show as uncovered; core line numbers may drift if `master` changed the same file._",
+ ]
+ if patch_data is not None:
+ lines += ["", build_machine_block(patch_data, results)]
+ return "\n".join(lines)
+
+
+def main() -> int:
+ parser = argparse.ArgumentParser(description=__doc__)
+ parser.add_argument("--artifacts", required=True, type=Path, help="dir holding downloaded coverage-xml-* artifacts")
+ parser.add_argument("--out", type=Path, help="also write the markdown to this path")
+ parser.add_argument(
+ "--combined-out", type=Path, help="write a repo-relative combined Cobertura XML here (enables patch coverage)"
+ )
+ parser.add_argument("--compare-branch", default="origin/master", help="diff-cover compare branch")
+ parser.add_argument("--patch-json-out", type=Path, help="path for diff-cover's JSON report (machine payload)")
+ parser.add_argument(
+ "--core-artifacts", type=Path, help="dir of core (posthog/ee) coverage-core-* artifacts to include"
+ )
+ args = parser.parse_args()
+
+ covered, valid = aggregate(args.artifacts)
+
+ core_covered: dict[str, set[int]] = {}
+ core_valid: dict[str, set[int]] = {}
+ if args.core_artifacts is not None and args.core_artifacts.exists():
+ core_covered, core_valid = aggregate_core(args.core_artifacts)
+
+ results = collect(covered, valid) # per-product table is products only; core feeds patch coverage
+
+ patch_data: dict | None = None
+ if args.combined_out is not None and (results or core_valid):
+ write_combined_cobertura(covered, valid, core_covered, core_valid, args.combined_out)
+ patch_data = run_diff_cover(args.combined_out, args.compare_branch, args.patch_json_out)
+ elif not results and not core_valid and diff_touches_backend(args.compare_branch) is False:
+ # No coverage collected because nothing measured changed (e.g. a PR that dropped its
+ # backend changes) — emit an explicit zero-line payload so a stale warning section
+ # from an earlier run gets cleared rather than left standing.
+ patch_data = empty_patch_data()
+ if args.patch_json_out is not None:
+ args.patch_json_out.write_text(json.dumps(patch_data))
+
+ markdown = render_markdown(results, patch_data)
+
+ if args.out:
+ args.out.write_text(markdown)
+ sys.stdout.write(markdown + "\n")
+ return 0
+
+
+if __name__ == "__main__":
+ raise SystemExit(main())
diff --git a/.github/scripts/coverage_report.py.lock b/.github/scripts/coverage_report.py.lock
new file mode 100644
index 000000000000..2e2ecb39515a
--- /dev/null
+++ b/.github/scripts/coverage_report.py.lock
@@ -0,0 +1,186 @@
+version = 1
+revision = 3
+requires-python = ">=3.11"
+
+[options]
+exclude-newer = "0001-01-01T00:00:00Z" # This has no effect and is included for backwards compatibility when using relative exclude-newer values.
+exclude-newer-span = "P7D"
+
+[options.exclude-newer-package]
+pixelhog = false
+hogql-parser = false
+posthoganalytics = false
+django = false
+modal = false
+hogql-parser-rs = false
+
+[manifest]
+requirements = [
+ { name = "defusedxml", specifier = "~=0.7" },
+ { name = "diff-cover", specifier = ">=9,<11" },
+]
+
+[[package]]
+name = "chardet"
+version = "7.4.3"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/19/b6/9df434a8eeba2e6628c465a1dfa31034228ef79b26f76f46278f4ef7e49d/chardet-7.4.3.tar.gz", hash = "sha256:cc1d4eb92a4ec1c2df3b490836ffa46922e599d34ce0bb75cf41fd2bf6303d56", size = 784800, upload-time = "2026-04-13T21:33:39.803Z" }
+wheels = [
+ { url = "https://files.pythonhosted.org/packages/19/52/505c207f334d51e937cbaa27ff95776e16e2d120e13cbe491cd7b3a70b50/chardet-7.4.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:25a862cddc6a9ac07023e808aedd297115345fbaabc2690479481ddc0f980e09", size = 870747, upload-time = "2026-04-13T21:32:56.916Z" },
+ { url = "https://files.pythonhosted.org/packages/14/4b/d3c79495dee4831b8bebca2790e72cb90f0c5849c940570a7c7e5b70b952/chardet-7.4.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7005c88da26fd95d8abb8acbe6281d833e9a9181b03cf49b4546c4555389bd97", size = 853210, upload-time = "2026-04-13T21:32:58.309Z" },
+ { url = "https://files.pythonhosted.org/packages/b9/99/f6a822ad1bde25a4c38dc3e770485e78e0893dfd871cd6e18ed3ea3a795e/chardet-7.4.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:dc50f28bad067393cce0af9091052c3b8df7a23115afd8ba7b2e0947f0cef1f8", size = 873625, upload-time = "2026-04-13T21:32:59.606Z" },
+ { url = "https://files.pythonhosted.org/packages/b1/10/31932775c94a86814f76b41c4a772b52abfb0e6125324f32c6da1196c297/chardet-7.4.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4c3da294de1a681097848ab58bd3f2771a674f8039d2d87a5538b28856b815e9", size = 883436, upload-time = "2026-04-13T21:33:01.351Z" },
+ { url = "https://files.pythonhosted.org/packages/6c/63/0f43e3acf2c436fdb32a0f904aeb03a2904d2126eed34a042a194d235926/chardet-7.4.3-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:93c45e116dd51b66226a53ade3f9f635e870de5399b90e00ce45dcc311093bf4", size = 876589, upload-time = "2026-04-13T21:33:02.636Z" },
+ { url = "https://files.pythonhosted.org/packages/5d/a6/e9b8f8a3e99602792b01fa7d0a731737615ab56d8bfd0b52935a0ef88b85/chardet-7.4.3-cp311-cp311-win_amd64.whl", hash = "sha256:ccc1f83ab4bcfb901cf39e0c4ba6bc6e726fc6264735f10e24ceb5cb47387578", size = 941866, upload-time = "2026-04-13T21:33:04.282Z" },
+ { url = "https://files.pythonhosted.org/packages/61/33/29de185079e6675c3f375546e30a559b7ddc75ce972f18d6e566cd9ea4eb/chardet-7.4.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:75d3c65cc16bddf40b8da1fd25ba84fca5f8070f2b14e86083653c1c85aee971", size = 874870, upload-time = "2026-04-13T21:33:05.977Z" },
+ { url = "https://files.pythonhosted.org/packages/9c/2f/4c5af01fd1a7506a1d5375403d68925eac70289229492db5aa68b58103d8/chardet-7.4.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:29af5999f654e8729d251f1724a62b538b1262d9292cccaefddf8a02aae1ef6a", size = 854859, upload-time = "2026-04-13T21:33:07.381Z" },
+ { url = "https://files.pythonhosted.org/packages/36/21/edb36ad5dfa48d7f8eed97ab43931ecdaa8c15166c21b1d614967e49d681/chardet-7.4.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:626f00299ad62dfe937058a09572beed442ccc7b58f87aa667949b20fd3db235", size = 875032, upload-time = "2026-04-13T21:33:08.741Z" },
+ { url = "https://files.pythonhosted.org/packages/e5/59/a32a241d861cf180853a11c8e5a67641cb1b2af13c3a5ccce83ec07e2c9f/chardet-7.4.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9a4904dd5f071b7a7d7f50b4a67a86db3c902d243bf31708f1d5cde2f68239cb", size = 888283, upload-time = "2026-04-13T21:33:10.213Z" },
+ { url = "https://files.pythonhosted.org/packages/87/2e/e1ee6a77abf3782c00e05b89c4d4328c8353bf9500661c4348df1dd68614/chardet-7.4.3-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:5d2879598bc220689e8ce509fe9c3f37ad2fca53a36be9c9bd91abdd91dd364f", size = 879974, upload-time = "2026-04-13T21:33:11.448Z" },
+ { url = "https://files.pythonhosted.org/packages/32/60/fca69c534602a7ced04280c952a246ad1edde2a6ca3a164f65d32ac41fe7/chardet-7.4.3-cp312-cp312-win_amd64.whl", hash = "sha256:4b2799bd58e7245cfa8d4ab2e8ad1d76a5c3a5b1f32318eb6acca4c69a3e7101", size = 943973, upload-time = "2026-04-13T21:33:12.756Z" },
+ { url = "https://files.pythonhosted.org/packages/7c/43/79ac9b4db5bc87020c9dbc419125371d80882d1d197e9c4765ba8682b605/chardet-7.4.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a9e4486df251b8962e86ea9f139ca235aa6e0542a00f7844c9a04160afb99aa9", size = 873769, upload-time = "2026-04-13T21:33:14.002Z" },
+ { url = "https://files.pythonhosted.org/packages/55/5f/25bdec773905bff0ff6cf35ca73b17bd05593b4f87bd8c5fa43705f7167d/chardet-7.4.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:4fbff1907925b0c5a1064cffb5e040cd5e338585c9c552625f30de6bc2f3107a", size = 853991, upload-time = "2026-04-13T21:33:15.564Z" },
+ { url = "https://files.pythonhosted.org/packages/b4/07/a29380ee0b215d23d77733b5ad60c5c0c7969650e080c667acdf9462040d/chardet-7.4.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:365135eaf37ba65a828f8e668eb0a8c38c479dcbec724dc25f4dfd781049c357", size = 874024, upload-time = "2026-04-13T21:33:16.915Z" },
+ { url = "https://files.pythonhosted.org/packages/a8/b1/3338e121cbd4c8a126b8ccb1061170c2ce51a53f678c502793ea49c6fd6d/chardet-7.4.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bfc134b70c846c21ead8e43ada3ae1a805fff732f6922f8abcf2ff27b8f6493d", size = 887410, upload-time = "2026-04-13T21:33:18.368Z" },
+ { url = "https://files.pythonhosted.org/packages/63/1c/44a9a9e0c59c185a5d307ceaeee8768afa1558f0a24f7a4b5fa11b67586b/chardet-7.4.3-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:9acd9988a93e09390f3cd231201ea7166c415eb8da1b735928990ffc05cb9fbb", size = 879269, upload-time = "2026-04-13T21:33:20.377Z" },
+ { url = "https://files.pythonhosted.org/packages/1b/b3/5d0e77ea774bd3224321c248880ea0c0379000ac5c2bb6d77609549de247/chardet-7.4.3-cp313-cp313-win_amd64.whl", hash = "sha256:e1b98790c284ff813f18f7cf7de5f05ea2435a080030c7f1a8318f3a4f80b131", size = 944155, upload-time = "2026-04-13T21:33:21.694Z" },
+ { url = "https://files.pythonhosted.org/packages/70/a8/bf0811d859e13801279a2ae64f37a408027b282f2047bc0001c75dd356ad/chardet-7.4.3-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:d892d3dcd652fdef53e3d6327d39b17c0df40a899dfc919abaeb64c974497531", size = 872887, upload-time = "2026-04-13T21:33:23.328Z" },
+ { url = "https://files.pythonhosted.org/packages/51/ac/b9d68ebddfe1b02c77af5bf81120e12b036b4432dc6af7a303d90e2bc38b/chardet-7.4.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:acc46d1b8b7d5783216afe15db56d1c179b9a40e5a1558bc13164c4fd20674c4", size = 853964, upload-time = "2026-04-13T21:33:24.724Z" },
+ { url = "https://files.pythonhosted.org/packages/2a/81/17fa103ea9caf5d325a5e4051ab2ba65996fd66baa60b81ee41af1f54e10/chardet-7.4.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0ac3bf11c645734a1701a3804e43eabd98851838192267d08c353a834ab79fea", size = 876006, upload-time = "2026-04-13T21:33:26.098Z" },
+ { url = "https://files.pythonhosted.org/packages/c2/20/193faab46a68ea550587331a698c3dca8099f8901d10937c4443135c7ed9/chardet-7.4.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6e3bd9f936e04bae89c254262af08d9e5b98f805175ba1e29d454e6cba3107b7", size = 887680, upload-time = "2026-04-13T21:33:27.49Z" },
+ { url = "https://files.pythonhosted.org/packages/40/c6/94a3c673327392652ee8bdea9a45bc8a5f5365197a7387d68f0eed007115/chardet-7.4.3-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:27cc23da03630cdecc9aa81a895aa86629c211f995cd57651f0fbc280717bf93", size = 879865, upload-time = "2026-04-13T21:33:29.052Z" },
+ { url = "https://files.pythonhosted.org/packages/b1/2c/cad8b5e3623a987f3c930b68e2bdd06cfc388cd91cd42ed05f1227701b73/chardet-7.4.3-cp314-cp314-win_amd64.whl", hash = "sha256:b95c934b9ad59e2ba8abb9be49df70d3ad1b0d95d864b9fdb7588d4fa8bd921c", size = 939594, upload-time = "2026-04-13T21:33:31.391Z" },
+ { url = "https://files.pythonhosted.org/packages/33/e0/d06e42fd6f02a58e5e227e5106587751cb38adcff0aaf949add744b78b6e/chardet-7.4.3-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:c77867f0c1cb8bd819502249fcdc500364aedb07881e11b743726fa2148e7b6e", size = 889714, upload-time = "2026-04-13T21:33:32.772Z" },
+ { url = "https://files.pythonhosted.org/packages/d4/ed/40d091954d48abea037baae6be8fb79905e5f78d34d12ea955132c7d8011/chardet-7.4.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:cf1efeaf65a6ef2f5b9cc3a1df6f08ba2831b369ccaa4c7018eaf90aa757bb11", size = 872319, upload-time = "2026-04-13T21:33:34.427Z" },
+ { url = "https://files.pythonhosted.org/packages/bb/77/82a46821dbfbdfe062710d2bf2ede13426304e3567a23c57d919c0c31630/chardet-7.4.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9f3504c139a2ad544077dd2d9e412cd08b01786843d76997cd43bb6de311723c", size = 892021, upload-time = "2026-04-13T21:33:35.766Z" },
+ { url = "https://files.pythonhosted.org/packages/49/57/42d30c562bda5b4a839766c1aad8d5856b798ad2a1c3247b72a679afec94/chardet-7.4.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:457f619882ba66327d4d8d14c6c342269bdb1e4e1c38e8117df941d14d351b04", size = 902509, upload-time = "2026-04-13T21:33:37.096Z" },
+ { url = "https://files.pythonhosted.org/packages/8c/6c/0a40afdb50a0fe041ab95553b835a8160b6cf0e81edf2ae2fe9f5224cbf9/chardet-7.4.3-py3-none-any.whl", hash = "sha256:1173b74051570cf08099d7429d92e4882d375ad4217f92a6e5240ccfb26f231e", size = 626562, upload-time = "2026-04-13T21:33:38.559Z" },
+]
+
+[[package]]
+name = "defusedxml"
+version = "0.7.1"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/0f/d5/c66da9b79e5bdb124974bfe172b4daf3c984ebd9c2a06e2b8a4dc7331c72/defusedxml-0.7.1.tar.gz", hash = "sha256:1bb3032db185915b62d7c6209c5a8792be6a32ab2fedacc84e01b52c51aa3e69", size = 75520, upload-time = "2021-03-08T10:59:26.269Z" }
+wheels = [
+ { url = "https://files.pythonhosted.org/packages/07/6c/aa3f2f849e01cb6a001cd8554a88d4c77c5c1a31c95bdf1cf9301e6d9ef4/defusedxml-0.7.1-py2.py3-none-any.whl", hash = "sha256:a352e7e428770286cc899e2542b6cdaedb2b4953ff269a210103ec58f6198a61", size = 25604, upload-time = "2021-03-08T10:59:24.45Z" },
+]
+
+[[package]]
+name = "diff-cover"
+version = "10.3.0"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+ { name = "chardet" },
+ { name = "jinja2" },
+ { name = "pluggy" },
+ { name = "pygments" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/35/21/057e816125c162662d2a2cc2ebcd72dd333e78e51678298d07dd3146011a/diff_cover-10.3.0.tar.gz", hash = "sha256:474dbc63e815fbb7567d7b7ca5b104123e96129f25426ebdbc9a1bdbb935b2c6", size = 106546, upload-time = "2026-05-30T14:17:14.32Z" }
+wheels = [
+ { url = "https://files.pythonhosted.org/packages/83/0a/a96e57a7a3fca419cd5ceff0d13dee2166520fa67103fb82624ad64700fb/diff_cover-10.3.0-py3-none-any.whl", hash = "sha256:2e47d5ab3868d1e92131c11f364f3f4a8583c97123d3bbc6b6cc8ce0a4cc2202", size = 58989, upload-time = "2026-05-30T14:17:12.858Z" },
+]
+
+[[package]]
+name = "jinja2"
+version = "3.1.6"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+ { name = "markupsafe" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz", hash = "sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d", size = 245115, upload-time = "2025-03-05T20:05:02.478Z" }
+wheels = [
+ { url = "https://files.pythonhosted.org/packages/62/a1/3d680cbfd5f4b8f15abc1d571870c5fc3e594bb582bc3b64ea099db13e56/jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67", size = 134899, upload-time = "2025-03-05T20:05:00.369Z" },
+]
+
+[[package]]
+name = "markupsafe"
+version = "3.0.3"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz", hash = "sha256:722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698", size = 80313, upload-time = "2025-09-27T18:37:40.426Z" }
+wheels = [
+ { url = "https://files.pythonhosted.org/packages/08/db/fefacb2136439fc8dd20e797950e749aa1f4997ed584c62cfb8ef7c2be0e/markupsafe-3.0.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1cc7ea17a6824959616c525620e387f6dd30fec8cb44f649e31712db02123dad", size = 11631, upload-time = "2025-09-27T18:36:18.185Z" },
+ { url = "https://files.pythonhosted.org/packages/e1/2e/5898933336b61975ce9dc04decbc0a7f2fee78c30353c5efba7f2d6ff27a/markupsafe-3.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4bd4cd07944443f5a265608cc6aab442e4f74dff8088b0dfc8238647b8f6ae9a", size = 12058, upload-time = "2025-09-27T18:36:19.444Z" },
+ { url = "https://files.pythonhosted.org/packages/1d/09/adf2df3699d87d1d8184038df46a9c80d78c0148492323f4693df54e17bb/markupsafe-3.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6b5420a1d9450023228968e7e6a9ce57f65d148ab56d2313fcd589eee96a7a50", size = 24287, upload-time = "2025-09-27T18:36:20.768Z" },
+ { url = "https://files.pythonhosted.org/packages/30/ac/0273f6fcb5f42e314c6d8cd99effae6a5354604d461b8d392b5ec9530a54/markupsafe-3.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0bf2a864d67e76e5c9a34dc26ec616a66b9888e25e7b9460e1c76d3293bd9dbf", size = 22940, upload-time = "2025-09-27T18:36:22.249Z" },
+ { url = "https://files.pythonhosted.org/packages/19/ae/31c1be199ef767124c042c6c3e904da327a2f7f0cd63a0337e1eca2967a8/markupsafe-3.0.3-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:bc51efed119bc9cfdf792cdeaa4d67e8f6fcccab66ed4bfdd6bde3e59bfcbb2f", size = 21887, upload-time = "2025-09-27T18:36:23.535Z" },
+ { url = "https://files.pythonhosted.org/packages/b2/76/7edcab99d5349a4532a459e1fe64f0b0467a3365056ae550d3bcf3f79e1e/markupsafe-3.0.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:068f375c472b3e7acbe2d5318dea141359e6900156b5b2ba06a30b169086b91a", size = 23692, upload-time = "2025-09-27T18:36:24.823Z" },
+ { url = "https://files.pythonhosted.org/packages/a4/28/6e74cdd26d7514849143d69f0bf2399f929c37dc2b31e6829fd2045b2765/markupsafe-3.0.3-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:7be7b61bb172e1ed687f1754f8e7484f1c8019780f6f6b0786e76bb01c2ae115", size = 21471, upload-time = "2025-09-27T18:36:25.95Z" },
+ { url = "https://files.pythonhosted.org/packages/62/7e/a145f36a5c2945673e590850a6f8014318d5577ed7e5920a4b3448e0865d/markupsafe-3.0.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f9e130248f4462aaa8e2552d547f36ddadbeaa573879158d721bbd33dfe4743a", size = 22923, upload-time = "2025-09-27T18:36:27.109Z" },
+ { url = "https://files.pythonhosted.org/packages/0f/62/d9c46a7f5c9adbeeeda52f5b8d802e1094e9717705a645efc71b0913a0a8/markupsafe-3.0.3-cp311-cp311-win32.whl", hash = "sha256:0db14f5dafddbb6d9208827849fad01f1a2609380add406671a26386cdf15a19", size = 14572, upload-time = "2025-09-27T18:36:28.045Z" },
+ { url = "https://files.pythonhosted.org/packages/83/8a/4414c03d3f891739326e1783338e48fb49781cc915b2e0ee052aa490d586/markupsafe-3.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:de8a88e63464af587c950061a5e6a67d3632e36df62b986892331d4620a35c01", size = 15077, upload-time = "2025-09-27T18:36:29.025Z" },
+ { url = "https://files.pythonhosted.org/packages/35/73/893072b42e6862f319b5207adc9ae06070f095b358655f077f69a35601f0/markupsafe-3.0.3-cp311-cp311-win_arm64.whl", hash = "sha256:3b562dd9e9ea93f13d53989d23a7e775fdfd1066c33494ff43f5418bc8c58a5c", size = 13876, upload-time = "2025-09-27T18:36:29.954Z" },
+ { url = "https://files.pythonhosted.org/packages/5a/72/147da192e38635ada20e0a2e1a51cf8823d2119ce8883f7053879c2199b5/markupsafe-3.0.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d53197da72cc091b024dd97249dfc7794d6a56530370992a5e1a08983ad9230e", size = 11615, upload-time = "2025-09-27T18:36:30.854Z" },
+ { url = "https://files.pythonhosted.org/packages/9a/81/7e4e08678a1f98521201c3079f77db69fb552acd56067661f8c2f534a718/markupsafe-3.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1872df69a4de6aead3491198eaf13810b565bdbeec3ae2dc8780f14458ec73ce", size = 12020, upload-time = "2025-09-27T18:36:31.971Z" },
+ { url = "https://files.pythonhosted.org/packages/1e/2c/799f4742efc39633a1b54a92eec4082e4f815314869865d876824c257c1e/markupsafe-3.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3a7e8ae81ae39e62a41ec302f972ba6ae23a5c5396c8e60113e9066ef893da0d", size = 24332, upload-time = "2025-09-27T18:36:32.813Z" },
+ { url = "https://files.pythonhosted.org/packages/3c/2e/8d0c2ab90a8c1d9a24f0399058ab8519a3279d1bd4289511d74e909f060e/markupsafe-3.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d6dd0be5b5b189d31db7cda48b91d7e0a9795f31430b7f271219ab30f1d3ac9d", size = 22947, upload-time = "2025-09-27T18:36:33.86Z" },
+ { url = "https://files.pythonhosted.org/packages/2c/54/887f3092a85238093a0b2154bd629c89444f395618842e8b0c41783898ea/markupsafe-3.0.3-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:94c6f0bb423f739146aec64595853541634bde58b2135f27f61c1ffd1cd4d16a", size = 21962, upload-time = "2025-09-27T18:36:35.099Z" },
+ { url = "https://files.pythonhosted.org/packages/c9/2f/336b8c7b6f4a4d95e91119dc8521402461b74a485558d8f238a68312f11c/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:be8813b57049a7dc738189df53d69395eba14fb99345e0a5994914a3864c8a4b", size = 23760, upload-time = "2025-09-27T18:36:36.001Z" },
+ { url = "https://files.pythonhosted.org/packages/32/43/67935f2b7e4982ffb50a4d169b724d74b62a3964bc1a9a527f5ac4f1ee2b/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:83891d0e9fb81a825d9a6d61e3f07550ca70a076484292a70fde82c4b807286f", size = 21529, upload-time = "2025-09-27T18:36:36.906Z" },
+ { url = "https://files.pythonhosted.org/packages/89/e0/4486f11e51bbba8b0c041098859e869e304d1c261e59244baa3d295d47b7/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:77f0643abe7495da77fb436f50f8dab76dbc6e5fd25d39589a0f1fe6548bfa2b", size = 23015, upload-time = "2025-09-27T18:36:37.868Z" },
+ { url = "https://files.pythonhosted.org/packages/2f/e1/78ee7a023dac597a5825441ebd17170785a9dab23de95d2c7508ade94e0e/markupsafe-3.0.3-cp312-cp312-win32.whl", hash = "sha256:d88b440e37a16e651bda4c7c2b930eb586fd15ca7406cb39e211fcff3bf3017d", size = 14540, upload-time = "2025-09-27T18:36:38.761Z" },
+ { url = "https://files.pythonhosted.org/packages/aa/5b/bec5aa9bbbb2c946ca2733ef9c4ca91c91b6a24580193e891b5f7dbe8e1e/markupsafe-3.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:26a5784ded40c9e318cfc2bdb30fe164bdb8665ded9cd64d500a34fb42067b1c", size = 15105, upload-time = "2025-09-27T18:36:39.701Z" },
+ { url = "https://files.pythonhosted.org/packages/e5/f1/216fc1bbfd74011693a4fd837e7026152e89c4bcf3e77b6692fba9923123/markupsafe-3.0.3-cp312-cp312-win_arm64.whl", hash = "sha256:35add3b638a5d900e807944a078b51922212fb3dedb01633a8defc4b01a3c85f", size = 13906, upload-time = "2025-09-27T18:36:40.689Z" },
+ { url = "https://files.pythonhosted.org/packages/38/2f/907b9c7bbba283e68f20259574b13d005c121a0fa4c175f9bed27c4597ff/markupsafe-3.0.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e1cf1972137e83c5d4c136c43ced9ac51d0e124706ee1c8aa8532c1287fa8795", size = 11622, upload-time = "2025-09-27T18:36:41.777Z" },
+ { url = "https://files.pythonhosted.org/packages/9c/d9/5f7756922cdd676869eca1c4e3c0cd0df60ed30199ffd775e319089cb3ed/markupsafe-3.0.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:116bb52f642a37c115f517494ea5feb03889e04df47eeff5b130b1808ce7c219", size = 12029, upload-time = "2025-09-27T18:36:43.257Z" },
+ { url = "https://files.pythonhosted.org/packages/00/07/575a68c754943058c78f30db02ee03a64b3c638586fba6a6dd56830b30a3/markupsafe-3.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:133a43e73a802c5562be9bbcd03d090aa5a1fe899db609c29e8c8d815c5f6de6", size = 24374, upload-time = "2025-09-27T18:36:44.508Z" },
+ { url = "https://files.pythonhosted.org/packages/a9/21/9b05698b46f218fc0e118e1f8168395c65c8a2c750ae2bab54fc4bd4e0e8/markupsafe-3.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ccfcd093f13f0f0b7fdd0f198b90053bf7b2f02a3927a30e63f3ccc9df56b676", size = 22980, upload-time = "2025-09-27T18:36:45.385Z" },
+ { url = "https://files.pythonhosted.org/packages/7f/71/544260864f893f18b6827315b988c146b559391e6e7e8f7252839b1b846a/markupsafe-3.0.3-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:509fa21c6deb7a7a273d629cf5ec029bc209d1a51178615ddf718f5918992ab9", size = 21990, upload-time = "2025-09-27T18:36:46.916Z" },
+ { url = "https://files.pythonhosted.org/packages/c2/28/b50fc2f74d1ad761af2f5dcce7492648b983d00a65b8c0e0cb457c82ebbe/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a4afe79fb3de0b7097d81da19090f4df4f8d3a2b3adaa8764138aac2e44f3af1", size = 23784, upload-time = "2025-09-27T18:36:47.884Z" },
+ { url = "https://files.pythonhosted.org/packages/ed/76/104b2aa106a208da8b17a2fb72e033a5a9d7073c68f7e508b94916ed47a9/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:795e7751525cae078558e679d646ae45574b47ed6e7771863fcc079a6171a0fc", size = 21588, upload-time = "2025-09-27T18:36:48.82Z" },
+ { url = "https://files.pythonhosted.org/packages/b5/99/16a5eb2d140087ebd97180d95249b00a03aa87e29cc224056274f2e45fd6/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:8485f406a96febb5140bfeca44a73e3ce5116b2501ac54fe953e488fb1d03b12", size = 23041, upload-time = "2025-09-27T18:36:49.797Z" },
+ { url = "https://files.pythonhosted.org/packages/19/bc/e7140ed90c5d61d77cea142eed9f9c303f4c4806f60a1044c13e3f1471d0/markupsafe-3.0.3-cp313-cp313-win32.whl", hash = "sha256:bdd37121970bfd8be76c5fb069c7751683bdf373db1ed6c010162b2a130248ed", size = 14543, upload-time = "2025-09-27T18:36:51.584Z" },
+ { url = "https://files.pythonhosted.org/packages/05/73/c4abe620b841b6b791f2edc248f556900667a5a1cf023a6646967ae98335/markupsafe-3.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:9a1abfdc021a164803f4d485104931fb8f8c1efd55bc6b748d2f5774e78b62c5", size = 15113, upload-time = "2025-09-27T18:36:52.537Z" },
+ { url = "https://files.pythonhosted.org/packages/f0/3a/fa34a0f7cfef23cf9500d68cb7c32dd64ffd58a12b09225fb03dd37d5b80/markupsafe-3.0.3-cp313-cp313-win_arm64.whl", hash = "sha256:7e68f88e5b8799aa49c85cd116c932a1ac15caaa3f5db09087854d218359e485", size = 13911, upload-time = "2025-09-27T18:36:53.513Z" },
+ { url = "https://files.pythonhosted.org/packages/e4/d7/e05cd7efe43a88a17a37b3ae96e79a19e846f3f456fe79c57ca61356ef01/markupsafe-3.0.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:218551f6df4868a8d527e3062d0fb968682fe92054e89978594c28e642c43a73", size = 11658, upload-time = "2025-09-27T18:36:54.819Z" },
+ { url = "https://files.pythonhosted.org/packages/99/9e/e412117548182ce2148bdeacdda3bb494260c0b0184360fe0d56389b523b/markupsafe-3.0.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:3524b778fe5cfb3452a09d31e7b5adefeea8c5be1d43c4f810ba09f2ceb29d37", size = 12066, upload-time = "2025-09-27T18:36:55.714Z" },
+ { url = "https://files.pythonhosted.org/packages/bc/e6/fa0ffcda717ef64a5108eaa7b4f5ed28d56122c9a6d70ab8b72f9f715c80/markupsafe-3.0.3-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4e885a3d1efa2eadc93c894a21770e4bc67899e3543680313b09f139e149ab19", size = 25639, upload-time = "2025-09-27T18:36:56.908Z" },
+ { url = "https://files.pythonhosted.org/packages/96/ec/2102e881fe9d25fc16cb4b25d5f5cde50970967ffa5dddafdb771237062d/markupsafe-3.0.3-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8709b08f4a89aa7586de0aadc8da56180242ee0ada3999749b183aa23df95025", size = 23569, upload-time = "2025-09-27T18:36:57.913Z" },
+ { url = "https://files.pythonhosted.org/packages/4b/30/6f2fce1f1f205fc9323255b216ca8a235b15860c34b6798f810f05828e32/markupsafe-3.0.3-cp313-cp313t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:b8512a91625c9b3da6f127803b166b629725e68af71f8184ae7e7d54686a56d6", size = 23284, upload-time = "2025-09-27T18:36:58.833Z" },
+ { url = "https://files.pythonhosted.org/packages/58/47/4a0ccea4ab9f5dcb6f79c0236d954acb382202721e704223a8aafa38b5c8/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:9b79b7a16f7fedff2495d684f2b59b0457c3b493778c9eed31111be64d58279f", size = 24801, upload-time = "2025-09-27T18:36:59.739Z" },
+ { url = "https://files.pythonhosted.org/packages/6a/70/3780e9b72180b6fecb83a4814d84c3bf4b4ae4bf0b19c27196104149734c/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_riscv64.whl", hash = "sha256:12c63dfb4a98206f045aa9563db46507995f7ef6d83b2f68eda65c307c6829eb", size = 22769, upload-time = "2025-09-27T18:37:00.719Z" },
+ { url = "https://files.pythonhosted.org/packages/98/c5/c03c7f4125180fc215220c035beac6b9cb684bc7a067c84fc69414d315f5/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:8f71bc33915be5186016f675cd83a1e08523649b0e33efdb898db577ef5bb009", size = 23642, upload-time = "2025-09-27T18:37:01.673Z" },
+ { url = "https://files.pythonhosted.org/packages/80/d6/2d1b89f6ca4bff1036499b1e29a1d02d282259f3681540e16563f27ebc23/markupsafe-3.0.3-cp313-cp313t-win32.whl", hash = "sha256:69c0b73548bc525c8cb9a251cddf1931d1db4d2258e9599c28c07ef3580ef354", size = 14612, upload-time = "2025-09-27T18:37:02.639Z" },
+ { url = "https://files.pythonhosted.org/packages/2b/98/e48a4bfba0a0ffcf9925fe2d69240bfaa19c6f7507b8cd09c70684a53c1e/markupsafe-3.0.3-cp313-cp313t-win_amd64.whl", hash = "sha256:1b4b79e8ebf6b55351f0d91fe80f893b4743f104bff22e90697db1590e47a218", size = 15200, upload-time = "2025-09-27T18:37:03.582Z" },
+ { url = "https://files.pythonhosted.org/packages/0e/72/e3cc540f351f316e9ed0f092757459afbc595824ca724cbc5a5d4263713f/markupsafe-3.0.3-cp313-cp313t-win_arm64.whl", hash = "sha256:ad2cf8aa28b8c020ab2fc8287b0f823d0a7d8630784c31e9ee5edea20f406287", size = 13973, upload-time = "2025-09-27T18:37:04.929Z" },
+ { url = "https://files.pythonhosted.org/packages/33/8a/8e42d4838cd89b7dde187011e97fe6c3af66d8c044997d2183fbd6d31352/markupsafe-3.0.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:eaa9599de571d72e2daf60164784109f19978b327a3910d3e9de8c97b5b70cfe", size = 11619, upload-time = "2025-09-27T18:37:06.342Z" },
+ { url = "https://files.pythonhosted.org/packages/b5/64/7660f8a4a8e53c924d0fa05dc3a55c9cee10bbd82b11c5afb27d44b096ce/markupsafe-3.0.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c47a551199eb8eb2121d4f0f15ae0f923d31350ab9280078d1e5f12b249e0026", size = 12029, upload-time = "2025-09-27T18:37:07.213Z" },
+ { url = "https://files.pythonhosted.org/packages/da/ef/e648bfd021127bef5fa12e1720ffed0c6cbb8310c8d9bea7266337ff06de/markupsafe-3.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f34c41761022dd093b4b6896d4810782ffbabe30f2d443ff5f083e0cbbb8c737", size = 24408, upload-time = "2025-09-27T18:37:09.572Z" },
+ { url = "https://files.pythonhosted.org/packages/41/3c/a36c2450754618e62008bf7435ccb0f88053e07592e6028a34776213d877/markupsafe-3.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:457a69a9577064c05a97c41f4e65148652db078a3a509039e64d3467b9e7ef97", size = 23005, upload-time = "2025-09-27T18:37:10.58Z" },
+ { url = "https://files.pythonhosted.org/packages/bc/20/b7fdf89a8456b099837cd1dc21974632a02a999ec9bf7ca3e490aacd98e7/markupsafe-3.0.3-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e8afc3f2ccfa24215f8cb28dcf43f0113ac3c37c2f0f0806d8c70e4228c5cf4d", size = 22048, upload-time = "2025-09-27T18:37:11.547Z" },
+ { url = "https://files.pythonhosted.org/packages/9a/a7/591f592afdc734f47db08a75793a55d7fbcc6902a723ae4cfbab61010cc5/markupsafe-3.0.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:ec15a59cf5af7be74194f7ab02d0f59a62bdcf1a537677ce67a2537c9b87fcda", size = 23821, upload-time = "2025-09-27T18:37:12.48Z" },
+ { url = "https://files.pythonhosted.org/packages/7d/33/45b24e4f44195b26521bc6f1a82197118f74df348556594bd2262bda1038/markupsafe-3.0.3-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:0eb9ff8191e8498cca014656ae6b8d61f39da5f95b488805da4bb029cccbfbaf", size = 21606, upload-time = "2025-09-27T18:37:13.485Z" },
+ { url = "https://files.pythonhosted.org/packages/ff/0e/53dfaca23a69fbfbbf17a4b64072090e70717344c52eaaaa9c5ddff1e5f0/markupsafe-3.0.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:2713baf880df847f2bece4230d4d094280f4e67b1e813eec43b4c0e144a34ffe", size = 23043, upload-time = "2025-09-27T18:37:14.408Z" },
+ { url = "https://files.pythonhosted.org/packages/46/11/f333a06fc16236d5238bfe74daccbca41459dcd8d1fa952e8fbd5dccfb70/markupsafe-3.0.3-cp314-cp314-win32.whl", hash = "sha256:729586769a26dbceff69f7a7dbbf59ab6572b99d94576a5592625d5b411576b9", size = 14747, upload-time = "2025-09-27T18:37:15.36Z" },
+ { url = "https://files.pythonhosted.org/packages/28/52/182836104b33b444e400b14f797212f720cbc9ed6ba34c800639d154e821/markupsafe-3.0.3-cp314-cp314-win_amd64.whl", hash = "sha256:bdc919ead48f234740ad807933cdf545180bfbe9342c2bb451556db2ed958581", size = 15341, upload-time = "2025-09-27T18:37:16.496Z" },
+ { url = "https://files.pythonhosted.org/packages/6f/18/acf23e91bd94fd7b3031558b1f013adfa21a8e407a3fdb32745538730382/markupsafe-3.0.3-cp314-cp314-win_arm64.whl", hash = "sha256:5a7d5dc5140555cf21a6fefbdbf8723f06fcd2f63ef108f2854de715e4422cb4", size = 14073, upload-time = "2025-09-27T18:37:17.476Z" },
+ { url = "https://files.pythonhosted.org/packages/3c/f0/57689aa4076e1b43b15fdfa646b04653969d50cf30c32a102762be2485da/markupsafe-3.0.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:1353ef0c1b138e1907ae78e2f6c63ff67501122006b0f9abad68fda5f4ffc6ab", size = 11661, upload-time = "2025-09-27T18:37:18.453Z" },
+ { url = "https://files.pythonhosted.org/packages/89/c3/2e67a7ca217c6912985ec766c6393b636fb0c2344443ff9d91404dc4c79f/markupsafe-3.0.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:1085e7fbddd3be5f89cc898938f42c0b3c711fdcb37d75221de2666af647c175", size = 12069, upload-time = "2025-09-27T18:37:19.332Z" },
+ { url = "https://files.pythonhosted.org/packages/f0/00/be561dce4e6ca66b15276e184ce4b8aec61fe83662cce2f7d72bd3249d28/markupsafe-3.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1b52b4fb9df4eb9ae465f8d0c228a00624de2334f216f178a995ccdcf82c4634", size = 25670, upload-time = "2025-09-27T18:37:20.245Z" },
+ { url = "https://files.pythonhosted.org/packages/50/09/c419f6f5a92e5fadde27efd190eca90f05e1261b10dbd8cbcb39cd8ea1dc/markupsafe-3.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fed51ac40f757d41b7c48425901843666a6677e3e8eb0abcff09e4ba6e664f50", size = 23598, upload-time = "2025-09-27T18:37:21.177Z" },
+ { url = "https://files.pythonhosted.org/packages/22/44/a0681611106e0b2921b3033fc19bc53323e0b50bc70cffdd19f7d679bb66/markupsafe-3.0.3-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f190daf01f13c72eac4efd5c430a8de82489d9cff23c364c3ea822545032993e", size = 23261, upload-time = "2025-09-27T18:37:22.167Z" },
+ { url = "https://files.pythonhosted.org/packages/5f/57/1b0b3f100259dc9fffe780cfb60d4be71375510e435efec3d116b6436d43/markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:e56b7d45a839a697b5eb268c82a71bd8c7f6c94d6fd50c3d577fa39a9f1409f5", size = 24835, upload-time = "2025-09-27T18:37:23.296Z" },
+ { url = "https://files.pythonhosted.org/packages/26/6a/4bf6d0c97c4920f1597cc14dd720705eca0bf7c787aebc6bb4d1bead5388/markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:f3e98bb3798ead92273dc0e5fd0f31ade220f59a266ffd8a4f6065e0a3ce0523", size = 22733, upload-time = "2025-09-27T18:37:24.237Z" },
+ { url = "https://files.pythonhosted.org/packages/14/c7/ca723101509b518797fedc2fdf79ba57f886b4aca8a7d31857ba3ee8281f/markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:5678211cb9333a6468fb8d8be0305520aa073f50d17f089b5b4b477ea6e67fdc", size = 23672, upload-time = "2025-09-27T18:37:25.271Z" },
+ { url = "https://files.pythonhosted.org/packages/fb/df/5bd7a48c256faecd1d36edc13133e51397e41b73bb77e1a69deab746ebac/markupsafe-3.0.3-cp314-cp314t-win32.whl", hash = "sha256:915c04ba3851909ce68ccc2b8e2cd691618c4dc4c4232fb7982bca3f41fd8c3d", size = 14819, upload-time = "2025-09-27T18:37:26.285Z" },
+ { url = "https://files.pythonhosted.org/packages/1a/8a/0402ba61a2f16038b48b39bccca271134be00c5c9f0f623208399333c448/markupsafe-3.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:4faffd047e07c38848ce017e8725090413cd80cbc23d86e55c587bf979e579c9", size = 15426, upload-time = "2025-09-27T18:37:27.316Z" },
+ { url = "https://files.pythonhosted.org/packages/70/bc/6f1c2f612465f5fa89b95bead1f44dcb607670fd42891d8fdcd5d039f4f4/markupsafe-3.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:32001d6a8fc98c8cb5c947787c5d08b0a50663d139f1305bac5885d98d9b40fa", size = 14146, upload-time = "2025-09-27T18:37:28.327Z" },
+]
+
+[[package]]
+name = "pluggy"
+version = "1.6.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz", hash = "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3", size = 69412, upload-time = "2025-05-15T12:30:07.975Z" }
+wheels = [
+ { url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538, upload-time = "2025-05-15T12:30:06.134Z" },
+]
+
+[[package]]
+name = "pygments"
+version = "2.20.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/c3/b2/bc9c9196916376152d655522fdcebac55e66de6603a76a02bca1b6414f6c/pygments-2.20.0.tar.gz", hash = "sha256:6757cd03768053ff99f3039c1a36d6c0aa0b263438fcab17520b30a303a82b5f", size = 4955991, upload-time = "2026-03-29T13:29:33.898Z" }
+wheels = [
+ { url = "https://files.pythonhosted.org/packages/f4/7e/a72dd26f3b0f4f2bf1dd8923c85f7ceb43172af56d63c7383eb62b332364/pygments-2.20.0-py3-none-any.whl", hash = "sha256:81a9e26dd42fd28a23a2d169d86d7ac03b46e2f8b59ed4698fb4785f946d0176", size = 1231151, upload-time = "2026-03-29T13:29:30.038Z" },
+]
diff --git a/.github/scripts/post-coverage-section.mjs b/.github/scripts/post-coverage-section.mjs
new file mode 100644
index 000000000000..da3b202f2ee8
--- /dev/null
+++ b/.github/scripts/post-coverage-section.mjs
@@ -0,0 +1,54 @@
+#!/usr/bin/env node
+// Posts the backend patch-coverage section to the shared CI report comment. Usage:
+// node post-coverage-section.mjs <coverage-comment.md path> <patch-coverage.json path>
+// The `backend-coverage` section id must be registered in SECTIONS in update-ci-report.mjs.
+//
+import fs from 'node:fs'
+
+import { clearSectionIfPresent, postSection } from '../../frontend/bin/ci-report/update-ci-report.mjs'
+
+const [bodyPath, patchJsonPath] = process.argv.slice(2)
+if (!bodyPath || !patchJsonPath) {
+ console.error('Usage: post-coverage-section.mjs <coverage-comment.md path> <patch-coverage.json path>')
+ process.exit(1)
+}
+
+// An undetermined patch (diff-cover unavailable, or no coverage ran) must not clear a
+// real warning from an earlier complete run — leave the section untouched.
+let patch
+try {
+ patch = JSON.parse(fs.readFileSync(patchJsonPath, 'utf8'))
+} catch {
+ console.info('Patch coverage undetermined — leaving any existing section untouched.')
+ process.exit(0)
+}
+
+const body = fs.readFileSync(bodyPath, 'utf8').trim()
+const totalLines = Number(patch.total_num_lines) || 0
+const violations = Number(patch.total_num_violations) || 0
+const pct = Number(patch.total_percent_covered) || 0
+
+if (totalLines === 0) {
+ await clearSectionIfPresent({
+ id: 'backend-coverage',
+ summary: 'no measured backend lines changed',
+ body,
+ })
+ process.exit(0)
+}
+
+if (violations > 0) {
+ await postSection({
+ id: 'backend-coverage',
+ status: 'warn',
+ summary: `${pct.toFixed(1)}% of changed backend lines covered — ${violations} uncovered`,
+ body,
+ })
+ process.exit(0)
+}
+
+await clearSectionIfPresent({
+ id: 'backend-coverage',
+ summary: 'all changed backend lines covered',
+ body,
+})
diff --git a/.github/scripts/test_coverage_report.py b/.github/scripts/test_coverage_report.py
new file mode 100644
index 000000000000..bb83fcdbaac5
--- /dev/null
+++ b/.github/scripts/test_coverage_report.py
@@ -0,0 +1,161 @@
+from __future__ import annotations
+
+import sys
+import importlib.util
+from pathlib import Path
+
+import pytest
+
+SCRIPT_PATH = Path(__file__).with_name("coverage_report.py")
+SPEC = importlib.util.spec_from_file_location("coverage_report", SCRIPT_PATH)
+assert SPEC is not None and SPEC.loader is not None
+coverage_report = importlib.util.module_from_spec(SPEC)
+sys.modules["coverage_report"] = coverage_report
+SPEC.loader.exec_module(coverage_report)
+
+
+# ---------- product_from_path ----------
+
+
+ "xml_path,expected",
+ [
+ (Path("cov-artifacts/product_analytics.xml"), "product_analytics"),
+ (Path("products/error_tracking/coverage.xml"), "error_tracking"),
+ (Path("coverage.xml"), None),
+ (Path("cov-artifacts/weird;name.xml"), "weird_name"),
+ (Path("products/weird;name/coverage.xml"), "weird_name"),
+ ],
+)
+def test_product_from_path(xml_path: Path, expected: str | None) -> None:
+ assert coverage_report.product_from_path(xml_path) == expected
+
+
+# ---------- repo_path_for ----------
+
+
+ "product,filename,expected",
+ [
+ ("error_tracking", "api.py", "products/error_tracking/backend/api.py"),
+ ("error_tracking", "migrations/0001.py", "products/error_tracking/backend/migrations/0001.py"),
+ ("error_tracking", "backend/api.py", "products/error_tracking/backend/api.py"),
+ ("error_tracking", "backend", "products/error_tracking/backend"),
+ ],
+)
+def test_repo_path_for(product: str, filename: str, expected: str) -> None:
+ assert coverage_report.repo_path_for(product, filename) == expected
+
+
+# ---------- resolve_core_path ----------
+
+
+def test_resolve_core_path_passes_through_already_rooted_filenames() -> None:
+ assert coverage_report.resolve_core_path("posthog/api/auth.py", ["posthog", "ee"], {}) == "posthog/api/auth.py"
+
+
+def test_resolve_core_path_resolves_against_the_owning_source(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None:
+ monkeypatch.chdir(tmp_path)
+ (tmp_path / "ee" / "api").mkdir(parents=True)
+ (tmp_path / "ee" / "api" / "only_in_ee.py").touch()
+
+ assert coverage_report.resolve_core_path("api/only_in_ee.py", ["posthog", "ee"], {}) == "ee/api/only_in_ee.py"
+
+
+def test_resolve_core_path_falls_back_to_first_source_when_no_candidate_exists(
+ tmp_path: Path, monkeypatch: pytest.MonkeyPatch
+) -> None:
+ monkeypatch.chdir(tmp_path)
+
+ assert coverage_report.resolve_core_path("nowhere.py", ["posthog", "ee"], {}) == "posthog/nowhere.py"
+
+
+def test_resolve_core_path_warns_and_prefers_posthog_when_a_path_collides(
+ tmp_path: Path, monkeypatch: pytest.MonkeyPatch, capsys: pytest.CaptureFixture[str]
+) -> None:
+ # A relative path that exists under both roots can't be disambiguated from the coverage
+ # XML alone — this is the silent-misattribution case the qa-swarm/codex reviews flagged.
+ monkeypatch.chdir(tmp_path)
+ (tmp_path / "posthog" / "api").mkdir(parents=True)
+ (tmp_path / "posthog" / "api" / "authentication.py").touch()
+ (tmp_path / "ee" / "api").mkdir(parents=True)
+ (tmp_path / "ee" / "api" / "authentication.py").touch()
+
+ resolved = coverage_report.resolve_core_path("api/authentication.py", ["ee", "posthog"], {})
+
+ assert resolved == "posthog/api/authentication.py"
+ assert "::warning::" in capsys.readouterr().err
+
+
+def test_resolve_core_path_caches_by_filename() -> None:
+ cache: dict[str, str] = {"api/auth.py": "ee/api/auth.py"}
+ assert coverage_report.resolve_core_path("api/auth.py", ["posthog"], cache) == "ee/api/auth.py"
+
+
+# ---------- compress_ranges / format_line_ranges ----------
+
+
+ "numbers,expected",
+ [
+ ([], []),
+ ([5], [(5, 5)]),
+ ([1, 2, 3], [(1, 3)]),
+ ([408, 409, 410, 412], [(408, 410), (412, 412)]),
+ ([3, 1, 2], [(1, 3)]), # unsorted input, duplicates collapse via set()
+ ],
+)
+def test_compress_ranges(numbers: list[int], expected: list[tuple[int, int]]) -> None:
+ assert coverage_report.compress_ranges(numbers) == expected
+
+
+ "numbers,expected",
+ [
+ ([], ""),
+ ([408, 409, 410, 412], "408–410, 412"),
+ ([5], "5"),
+ ],
+)
+def test_format_line_ranges(numbers: list[int], expected: str) -> None:
+ assert coverage_report.format_line_ranges(numbers) == expected
+
+
+# ---------- diff_touches_backend ----------
+
+
+ "changed_files,expected",
+ [
+ (["frontend/src/scene.tsx", "docs/readme.md"], False), # frontend-only PR → safe to clear stale section
+ (["posthog/api/auth.py"], True),
+ (["ee/api/auth.py"], True),
+ (["products/error_tracking/backend/api.py"], True),
+ (["products/error_tracking/frontend/scene.tsx"], False), # product frontend is not measured
+ (["posthog/README.md"], False), # non-.py under a backend root is not measured
+ ([], False),
+ ],
+)
+def test_diff_touches_backend(monkeypatch: pytest.MonkeyPatch, changed_files: list[str], expected: bool) -> None:
+ def fake_run(*args: object, **kwargs: object) -> object:
+ class Proc:
+ returncode = 0
+ stdout = "\n".join(changed_files)
+
+ return Proc()
+
+ monkeypatch.setattr(coverage_report.subprocess, "run", fake_run)
+ assert coverage_report.diff_touches_backend("origin/master") is expected
+
+
+def test_diff_touches_backend_is_undetermined_when_git_fails(monkeypatch: pytest.MonkeyPatch) -> None:
+ # Undetermined (not False) on git failure — False would clear a possibly-real warning.
+ def fake_run(*args: object, **kwargs: object) -> object:
+ class Proc:
+ returncode = 128
+ stdout = ""
+
+ return Proc()
+
+ monkeypatch.setattr(coverage_report.subprocess, "run", fake_run)
+ assert coverage_report.diff_touches_backend("origin/master") is None
diff --git a/.github/workflows/ci-backend.yml b/.github/workflows/ci-backend.yml
index e5f050efcd6f..46b17312088a 100644
--- a/.github/workflows/ci-backend.yml
+++ b/.github/workflows/ci-backend.yml
@@ -793,6 +793,12 @@ jobs:
--junitxml=junit-product.xml
${{ needs.detect-snapshot-mode.outputs.mode == 'update' && '--snapshot-update --snapshot-warn-unused' || '' }}
${{ github.ref == 'refs/heads/master' && '--store-durations' || '' }}
+ ${{ github.event_name == 'pull_request' && '--cov=backend --cov-report=xml:coverage.xml' || '' }}
+ # turbo runs each product's backend:test with the product dir as CWD, so --cov=backend
+ # scopes coverage to that product and writes products/<name>/coverage.xml — works for
+ # bin-packed buckets (each product writes its own file) and split products (unioned later).
+ # sysmon: Python 3.12+'s low-overhead coverage backend, ~a few % vs ~20% for the C tracer.
+ COVERAGE_CORE: sysmon
run: |
set +e
pnpm turbo run backend:test ${{ matrix.filters }} --concurrency=1 --output-logs=full --force --log-order=stream ${{ matrix.pytest_args }}
@@ -838,6 +844,30 @@ jobs:
include-hidden-files: true
retention-days: 2
+ - name: Stage product coverage
+ # Rename each products/<name>/coverage.xml to <name>.xml so the product name
+ # survives upload-artifact's least-common-ancestor path collapse.
+ if: ${{ always() && github.event_name == 'pull_request' }}
+ shell: bash
+ run: |
+ mkdir -p cov-staging
+ for f in products/*/coverage.xml; do
+ [ -f "$f" ] || continue
+ product=$(basename "$(dirname "$f")")
+ cp "$f" "cov-staging/${product}.xml"
+ done
+
+ - name: Upload product coverage
+ uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
+ # always(): a failing test shard still has partial coverage worth reporting.
+ if: ${{ always() && github.event_name == 'pull_request' }}
+ with:
+ name: coverage-xml-${{ strategy.job-index }}
+ path: cov-staging/*.xml
+ if-no-files-found: ignore
+ retention-days: 2
+ overwrite: true # artifacts are immutable per run; re-run shards would 409 otherwise
+
- name: Verify new snapshots for flakiness
if: ${{ always() && needs.detect-snapshot-mode.outputs.mode == 'update' && github.event.pull_request.head.repo.full_name == 'PostHog/posthog' }}
shell: bash
@@ -2446,6 +2476,9 @@ jobs:
MODE: ${{ needs.select-tests.outputs.mode }}
CORE_FILES: ${{ needs.select-tests.outputs.core_files }}
POE_FILES: ${{ needs.select-tests.outputs.poe_files }}
+ # devex: measure core (posthog/ee) coverage on PRs to size the gap vs products. sysmon = low overhead.
+ COVERAGE_CORE: sysmon
+ COV_ARGS: ${{ github.event_name == 'pull_request' && '--cov=posthog --cov=ee --cov-config=.github/coverage-core.cfg --cov-report=xml:coverage-core.xml' || '' }}
# Wrap bash with signal-fanout so the runner's cancel signal is
# propagated to the entire process tree (incl. pytest). Without
# this, GHA only signals the top-level bash and pytest survives
@@ -2454,6 +2487,11 @@ jobs:
shell: 'signal-fanout bash --noprofile --norc -eo pipefail {0}'
run: |
set +e
+ # Unrebased branches predate .github/coverage-core.cfg; an explicit --cov-config
+ # pointing at a missing file is a hard error, so drop coverage rather than fail.
+ if [[ -n "$COV_ARGS" && ! -f .github/coverage-core.cfg ]]; then
+ COV_ARGS=""
+ fi
# Pick the split algorithm and granularity at runtime: optimal_chunks +
# file granularity only when the installed pytest-split offers them, else
# duration_based_chunks / item. A workflow edit runs merged with master, so
@@ -2490,6 +2528,7 @@ jobs:
pytest -v --tb=short --reuse-db -o junit_duration_report=call $targets -m "not async_migrations" \
-r fEsxX \
--junitxml=junit-core.xml \
+ $COV_ARGS \
$PYTEST_ARGS
else
pytest -v --tb=short --reuse-db -o junit_duration_report=call ${{
@@ -2513,6 +2552,7 @@ jobs:
"${SPLIT_GRANULARITY[@]}" \
-r fEsxX \
--junitxml=junit-core.xml \
+ $COV_ARGS \
$PYTEST_ARGS
fi
exit_code=$?
@@ -2524,6 +2564,16 @@ jobs:
exit $exit_code
fi
+ - name: Upload core coverage
+ uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
+ if: ${{ always() && github.event_name == 'pull_request' && matrix.segment == 'Core' }}
+ with:
+ name: coverage-core-${{ strategy.job-index }}
+ path: coverage-core.xml
+ if-no-files-found: ignore
+ retention-days: 2
+ overwrite: true # artifacts are immutable per run; re-run shards would 409 otherwise
+
# Uncomment this code to create an ssh-able console so you can debug issues with github actions
# (Consider changing the timeout in ci-backend.yml to have more time)
# - name: Setup tmate session
@@ -3135,3 +3185,97 @@ jobs:
uv run --script .github/scripts/report_test_timings.py \
--min-duration-seconds=0.5 \
./junit-artifacts
+
+ backend-coverage-report:
+ name: Backend coverage report
+ needs: [turbo-tests, django_tests]
+ runs-on: ubuntu-latest
+ continue-on-error: true # report-only, never block a PR
+ timeout-minutes: 10
+ # Pinned job-level: this job runs PR-head-controlled scripts with github.token, so its
+ # grants must never silently widen if the workflow-level permissions block ever does.
+ permissions:
+ contents: read
+ pull-requests: write # sticky CI report comment
+ # In-repo PRs only — fork PRs get a read-only token that can't comment. Runs when either
+ # the product (turbo-tests) or core (django_tests) suite ran, so a core-only PR still
+ # gets a comment; both skip on drafts, leaving nothing to report.
+ # drafts run a partial test selection — patch coverage would report false gaps
+ # Security invariant: this job runs PR-head-controlled scripts (coverage_report.py,
+ # post-coverage-section.mjs) — never add secrets beyond github.token to this job
+ # (report-test-timings checks out the base ref for exactly this reason).
+ if: >-
+ always() &&
+ github.event_name == 'pull_request' &&
+ github.event.pull_request.draft == false &&
+ github.event.pull_request.head.repo.full_name == 'PostHog/posthog' &&
+ (needs.turbo-tests.result != 'skipped' || needs.django_tests.result != 'skipped')
+ steps:
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ with:
+ # Default pull_request checkout = the synthetic merge ref — the same tree the
+ # coverage runs measured, so diff line numbers match. Full history for diff-cover;
+ # blob:none keeps it light (commit graph only, blobs fetched on demand).
+ fetch-depth: 0
+ filter: blob:none
+ - name: Check for coverage reporter
+ id: reporter
+ shell: bash
+ run: |
+ if [[ -f .github/scripts/coverage_report.py ]]; then
+ echo "available=true" >> "$GITHUB_OUTPUT"
+ else
+ echo "available=false" >> "$GITHUB_OUTPUT"
+ echo "Coverage reporter not present on this ref; skipping (branch may predate the check)."
+ fi
+ - name: Download coverage artifacts
+ if: steps.reporter.outputs.available == 'true'
+ continue-on-error: true # a run where no shard emitted coverage.xml is not a failure
+ uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v6.0.0
+ with:
+ path: ./cov-artifacts
+ pattern: coverage-xml-*
+ - name: Download core coverage artifacts
+ if: steps.reporter.outputs.available == 'true'
+ continue-on-error: true # core coverage only present once the Core segment ran with --cov
+ uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v6.0.0
+ with:
+ path: ./core-artifacts
+ pattern: coverage-core-*
+ - uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
+ if: steps.reporter.outputs.available == 'true'
+ with:
+ version: '0.11.14' # pinned: unpinned setup-uv calls GH API on every job, exhausts rate limit
+ - name: Build coverage report
+ # diff-cover is declared inline (PEP 723) in coverage_report.py; uv provisions it.
+ if: steps.reporter.outputs.available == 'true'
+ run: |
+ mkdir -p cov-artifacts core-artifacts
+ git fetch --no-tags --filter=blob:none --quiet origin master
+ uv run --script .github/scripts/coverage_report.py \
+ --artifacts cov-artifacts \
+ --core-artifacts core-artifacts \
+ --combined-out combined-coverage.xml \
+ --compare-branch origin/master \
+ --patch-json-out patch-coverage.json \
+ --out coverage-comment.md
+ - name: Post to CI report comment
+ if: steps.reporter.outputs.available == 'true'
+ env:
+ GITHUB_TOKEN: ${{ github.token }}
+ run: |
+ if [ -f .github/scripts/post-coverage-section.mjs ]; then
+ node .github/scripts/post-coverage-section.mjs coverage-comment.md patch-coverage.json
+ fi
+ - name: Upload patch coverage payload
+ if: ${{ always() && steps.reporter.outputs.available == 'true' }}
+ uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
+ with:
+ name: patch-coverage
+ path: |
+ patch-coverage.json
+ combined-coverage.xml
+ coverage-comment.md
+ if-no-files-found: ignore
+ retention-days: 2
+ overwrite: true # artifacts are immutable per run; re-run shards would 409 otherwise
diff --git a/frontend/bin/ci-report/update-ci-report.mjs b/frontend/bin/ci-report/update-ci-report.mjs
index 3837644ce347..3e1fc2d31f69 100644
--- a/frontend/bin/ci-report/update-ci-report.mjs
+++ b/frontend/bin/ci-report/update-ci-report.mjs
@@ -22,6 +22,7 @@ export const SECTIONS = [
{ id: 'storybook-snapshots', title: 'Storybook snapshots' },
{ id: 'playwright-snapshots', title: 'Playwright snapshots' },
{ id: 'backend-snapshots', title: 'Backend snapshots' },
+ { id: 'backend-coverage', title: 'Backend coverage' },
{ id: 'mcp-snapshots', title: 'MCP snapshots' },
{ id: 'ai-evals', title: 'AI evals' },
{ id: 'ch-migration-sql', title: 'ClickHouse migration SQL' },