Skip to content

ci: pilot informational Python line and branch coverage (#651) - #662

Merged
Fooftilly merged 2 commits into
masterfrom
ci/651-python-branch-coverage-pilot
Oct 14, 2026
Merged

Fooftilly merged 2 commits into
masterfrom
ci/651-python-branch-coverage-pilot

Conversation

@Fooftilly

@Fooftilly Fooftilly commented Oct 14, 2026 •

Copy link
Copy Markdown
Owner

Scope

First B1 informational coverage slice of #651. This adds a bounded Python line + branch coverage pilot without touching PRKS runtime, the PostgreSQL migration, or required Test Gate behavior.

  • Add one workflow: .github/workflows/python-coverage-pilot.yml.
  • Run Coverage.py 7.16.2 (exact wheel-only CI pin) against the existing tests/test_text_identity.py vector suite; measure only backend/domain/text_identity.py.
  • Compute separate executed/total line and branch percentages from Coverage.py JSON totals, and emit an easily readable GitHub Actions job summary and console report.
  • Explicitly no --fail-under threshold. The targeted tests still need to pass, but low coverage does not fail CI.
  • No uploaded files/artifacts: .coverage is already gitignored; detailed JSON stays in RUNNER_TEMP and only aggregate counts appear in the job summary.
  • Trigger only for the new workflow, the two related production files, the test and its fixtures, or manual workflow_dispatch. Stable existing checks remain unchanged; it does not run the full PRKS test suite a second time.
  • Minimal read-only permissions, SHA-pinned checkout/setup-python, GitHub-hosted Python 3.12.

Why separate instead of instrumenting the existing test gate?

The repository's test-gate invariants in tests/test_dependency_gate.py require exactly python run_tests.py and an allowlisted pinned install command. Rewriting it or adding extra execution steps for coverage would weaken well-established guards and add risk to ongoing PostgreSQL work. This isolated pilot collects actionable initial data cheaply. It does not purport to measure all Python modules, subprocess coverage, or changed-line coverage.

Validation / acceptance

  • Base: master@8d9e74fe25647fdf6560a3634935e27e43fafaa1.
  • Verified on updated head c197cf3: Python coverage pilot run 38550523559 passed, running all seven text-identity tests in 0.173 s. The job summary reports 16/16 executable lines (100.0%) and 6/6 branches (100.0%) for the one targeted module only. These figures are not repository-wide coverage.
  • Initial run exposed an unsupported coverage json --output option; fixed in c197cf3 by using documented coverage json -o. Rerun completed successfully.
  • Ensure the existing PRKS Test Gate, actionlint and zizmor checks remain green; do not change required check names.
  • CI cost: collect actual first-run duration from GitHub Actions, then decide whether to expand to more modules or run less often.
  • Follow-up B1: test a bounded Vitest TypeScript coverage slice separately; then consider more Python modules, meaningful changed-line coverage and trend tracking only once a stable baseline exists.

Related: #651, #69, #624. No change to PostgreSQL runtime or parity-harness work.

Do not merge automatically. Leave open for maintainer review and approval.

@sourcery-ai

This comment has been minimized.

@Fooftilly
Fooftilly temporarily deployed to project-automation October 14, 2026 10:33 — with GitHub Actions Inactive
@coderabbitai

This comment has been minimized.

@chatgpt-codex-connector

This comment has been minimized.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 545ec6afd2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/python-coverage-pilot.yml Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant