Skip to content

fix(ci): pass the changed-line gate when no changed line is executable - #63

Merged
M3gA-Mind merged 2 commits into
tinyhumansai:mainfrom
M3gA-Mind:fix/coverage-gate-no-executable-change
Nov 11, 2026
Merged

M3gA-Mind merged 2 commits into
tinyhumansai:mainfrom
M3gA-Mind:fix/coverage-gate-no-executable-change

Conversation

@M3gA-Mind

Copy link
Copy Markdown
Contributor

Summary

The native changed-line coverage gate fails any pull request whose production change has no executable line. A new entry in a constant table, a plain // comment or an attribute counts as a changed line, but it has no LCOV line. So the gate measured 0 changed executable lines and failed with "no measured changed executable lines in workspace". All tests and every per-file threshold had passed. #60 hits this on macOS and Windows: its only production change is one entry in the credential-floor table.

Such a change now gets the same outcome as a change with no production lines: the changed-line measurement is skipped and the per-file gate still applies. This follows 435a6d0, which made rustdoc-only changes pass the same gate.

What still raises

Nothing else is loosened. check_changed runs these checks before the line that changed, and each still raises exactly as before:

  • Required platform sources: every source in required_sources(platform) (the Windows audit sources on Windows, the Unix set elsewhere) must have LCOV lines. Otherwise: "no measured changed or executable LCOV lines: ".
  • LCOV inventory, missing instrumentation: every production source with executable lines in the JSON inventory must appear in LCOV. Otherwise: "missing executable LCOV source: ".
  • LCOV inventory, unknown sources: every LCOV production source with lines must be an executable source in the JSON inventory. Otherwise: "LCOV source absent from executable JSON inventory: ".
  • Changed required sources: a changed required platform source must have at least one measured changed line. Otherwise: "no measured changed executable lines: ".
  • Coverage threshold: when any changed line is executable, at least 80% of them must be covered. Otherwise: "changed lines: N/M below 80%".

The per-file 90% gate (check_files) is unchanged.

Related issue

None. It unblocks #60.

API or behavior changes

CI only. The changed-line gate no longer fails a change that has no executable changed line.

Validation

Commands actually run, on our Linux CI runner at 420c93a (Python 3.12):

  • python .github/scripts/check-native-coverage_tests.py -v: 35 run, OK (main runs 34; the difference is the new test)
  • Red control, with main's check-native-coverage.py: only the new test fails, with "no measured changed executable lines in workspace"
  • The cargo commands don't apply; no Rust source changed.

Tests

test_changes_with_no_executable_line_skip_only_changed_line_gate has two cases:

  • a change to a non-required source whose only changed line has no LCOV entry now skips the changed-line gate;
  • the same change with that source missing from LCOV still fails with "missing executable LCOV source".

Documentation

Not needed. The comment at the change explains why the case is safe.

Checklist

  • The change is focused on one logical change
  • No new #[allow(...)], #[ignore], or relaxed lints
  • No secrets, tokens, or .env contents in the diff or the description

A change whose production lines are all non-executable, such as a new
entry in a constant table, has nothing for the changed-line gate to
measure, but the gate failed it with "no measured changed executable
lines in workspace". Treat it like a documentation-only change: skip
the changed-line measurement and keep the file gate.

The required platform sources and the LCOV inventory are still checked
first, so missing instrumentation is still rejected.
@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1c3407ca-8024-42d7-96c6-7292d221983e
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@tinysweeper

tinysweeper Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Tiny Sweeper review

Reviewed head: b27d18787f8909ddb45c46c6df2e41eabd25f708

Verdict: Ready for maintainer review · Priority: none
Coverage: Reviewed 2 of 2 files.
Pull request purpose (title): fix(ci): pass the ch…

Diagnostics and supporting details

Full summary

Pull request purpose (title): fix(ci): pass the changed-line gate when no changed line is executable. Tiny Sweeper completed its review; deterministic results follow.

Review snapshot

Change surface Files Review signal Count
Production 0 Active findings 0
Tests 1 Noted findings 0
Documentation 0 Resolved findings 0
Configuration 1 Pending checks/questions 0

Completeness: Complete
Test assessment: No supported feature-to-test mapping was available; this does not mean tests are absent or passed.

Features

None identified with supported citations.

Tests

No supported feature-to-test mapping was produced. Test execution is not inferred.

Findings

No active actionable findings.

Before merge

None.

Agent review details

critique

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Positive: Answered with no findings: the branch is reachable only after required-platform sources and the compiled-executable inventory are validated, and the inputs reaching it are genuinely uninstrumented changed lines, so the relaxation does not open a new blind spot.
  • Lane summary: The change replaces the workspace-level 'no measured changed executable lines' error in check_changed with a `return None`, matching the existing skip path for empty `changed`, and adds a test covering both the skip and the fact that the LCOV inventory checks still run first. Reading the surrounding code, that branch is only reachable after required-platform sources and the compiled-executable inventory are validated, and the inputs that reach it are genuinely uninstrumented changed lines (imports, const/static initializers, attributes, cfg-disabled code), so the relaxation does not open a new blind spot for the changed-line gate. No defects found. _The code index is behind this pull request (indexed at `3e158e31d722`), so retrieved context may be out of date._

security

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Lane summary: The change relaxes one branch of the changed-line coverage gate: when every changed line falls outside LCOV's executable line map, `check_changed` now returns `None` (pass) instead of raising. The preceding inventory checks still run unconditionally — required platform sources must have measured changed lines, every compiled executable production source must appear in LCOV, and every LCOV source must be in the executable JSON inventory — so the relaxed branch cannot be reached by a source with missing instrumentation, only by a change made entirely of comments, attributes or other non-executable lines. The new regression test covers both the pass case and the still-failing missing-inventory case. No defect found. _The code index is behind this pull request (indexed at `3e158e31d722`), so retrieved context may be out of date._

tests

  • Conclusion: Neutral
  • Scope reviewed: all assigned evidence
  • Lane summary: No behavioural change: nothing outside documentation, configuration and tests.

commits

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Positive: Answered: no sensitive content in committed files.
  • Lane summary: No sensitive content in committed files. _The code index is behind this pull request (indexed at `3e158e31d722`), so retrieved context may be out of date._

description

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Lane summary: The description matches the diff: it replaces the `raise ValueError('no measured changed executable lines in workspace')` in `check_changed` with `return None`, and every check the body says still raises (required platform sources, both LCOV/JSON inventory checks, changed required sources, the 80% threshold) is indeed still present and ordered before the changed line. The new test covers both the relaxed path and the inventory failure the body cites, and no significant behaviour is introduced that the body leaves unmentioned. _The code index is behind this pull request (indexed at `3e158e31d722`), so retrieved context may be out of date._
Evidence and run details
  • Models: ladder/vectors-oai3, deepseek-v4.1-flash
  • Spend: $0.006134
  • Tokens: 126865 input · 23565 output · 39680 cached · 128 embedding
  • Updated: 2026-11-11T13:15:10Z
Head State Pass summary
420c93a24508 ready for maintainer review 0 active finding(s), 0 resolved finding(s) (at 2026-11-11T11:19:14Z)
b27d18787f89 ready for maintainer review 0 active finding(s), 0 resolved finding(s) (at 2026-11-11T13:15:10Z)

tinysweeper 0.1.2

@tinysweeper tinysweeper 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.

tinysweeper found nothing blocking. Approving.

Diagnostics

Total spend: $0.0017

@M3gA-Mind
M3gA-Mind merged commit b8fc360 into tinyhumansai:main Nov 11, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant