Skip to content

[quality] ratchet the e2e source-region gate: still 80 while the suite achieves 87.88 #1105

Description

@hivecommons-hive

Finding

The end-to-end region gate has never been ratcheted. It landed at 80 in
#1031, when the suite measured 81.43%, and the suite now measures
87.88% — so browser coverage of src/** can regress by nearly eight points
with every check in the repository still green.

.github/workflows/ci.yml:229-236:

          npm run report:e2e:coverage -- \
            --input "$RUN_DIR" \
            --build build \
            --check-source 100 \
            --check-source-regions 80 \
            --require-source-files \

tests/e2e-coverage-gate.test.mjs:34-41 pins the same number as its floor, and
says in its own header what should happen next:

// Measured on the suite this commit ships: the e2e-coverage job renders with
// `--check-source 100 --check-source-regions 80` and the run clears both; the
// full suite measured 100.00% source lines and 81.43% source regions when the
// region gate landed (#1026, #1031).
const FLOORS = {
  '--check-source': 100,
  '--check-source-regions': 80,
};

When e2e coverage climbs and the workflow is ratcheted up with it, raise
these floors in the same change.
— tests/e2e-coverage-gate.test.mjs:20-21

It has climbed. The floors have not moved.

Evidence and provenance

  • Achieved: CI artifact e2e-coverage, id 11348560988, from run
    37317061554,
    workflow Validate repository, job End-to-end coverage, main at
    8afaa67. report.txt:
    src files | 100.00 | 87.88 | 2099/2099 lines | 377/429 regions.
  • Gated at: .github/workflows/ci.yml:233, --check-source-regions 80,
    unchanged since 7aeaf90 (feat(ci): measure and gate e2e region coverage #1031) — git log -L over that line returns that
    commit and nothing since.
  • The convention exists: e43d291 ("test: ratchet coverage gate to
    achieved levels and guard the thresholds", test: ratchet coverage gate to achieved levels and guard the thresholds #868) raised the unit thresholds
    to just under what the suite achieved. They still sit about a point under it
    today: npm run test:unit:coverage at 8afaa67 reports 95.00% all-file
    regions against --check-regions 94, and 99.92% source regions against
    --check-source-regions 99.

This is not a coverage gap — no src path is named here — so it carries no
coverage-gap priority. It is the gate that is supposed to defend the coverage
the open test PRs are adding.

Recommendation

Ratchet to 86, not to 87.88. The e2e percentage has a moving denominator:
the variant build compiles a second copy of each source file and the reporter's
union does not fold every region onto its real-build twin (#1066, #1079), so
each new variant overlay shifts the region total as well as the covered count —
#1104 moves it from 429 to 438 while adding coverage. A floor of 86 keeps
roughly the same ~1-2 point buffer the unit lane runs with, while removing six
of the almost-eight points of slack.

Both edits must land in the same commit. Raising the floor alone makes
tests/e2e-coverage-gate.test.mjs fail against the unchanged workflow, which
is exactly what that guard is for.

1. .github/workflows/ci.yml line 233 — replace

            --check-source-regions 80 \

with

            --check-source-regions 86 \

2. tests/e2e-coverage-gate.test.mjs lines 34-41 — replace

// Measured on the suite this commit ships: the e2e-coverage job renders with
// `--check-source 100 --check-source-regions 80` and the run clears both; the
// full suite measured 100.00% source lines and 81.43% source regions when the
// region gate landed (#1026, #1031).
const FLOORS = {
  '--check-source': 100,
  '--check-source-regions': 80,
};

with

// Measured on the suite this commit ships: the e2e-coverage job renders with
// `--check-source 100 --check-source-regions 86` and the run clears both; the
// full suite measured 100.00% source lines and 87.88% source regions at
// 8afaa67, up from the 81.43% that set the original floor (#1026, #1031).
//
// The gate sits a little under what is achieved rather than at it: the variant
// build compiles a second copy of each source file and the reporter's union
// does not fold every one of its regions onto its real-build twin (#1066,
// #1079), so each new variant overlay moves the region total as well as the
// covered count.
const FLOORS = {
  '--check-source': 100,
  '--check-source-regions': 86,
};
  • .github/workflows/ci.yml:233 raised to 86
  • tests/e2e-coverage-gate.test.mjs FLOORS raised to 86 with its
    comment updated, in the same commit
  • npm run test:unit green (the guard reads the workflow text directly)

Why no PR is attached

The change is atomic across a workflow file and a test file, and
.github/workflows/** is unreachable from this agent's token tier — GitHub
rejects a push whose diff touches that directory without the workflows
permission, which the contributor tier does not carry. Splitting the test half
into its own PR is not an option either: on its own it turns CI red. This
therefore needs a human or an agent with workflow-write access to land. It
is not a judgement that the change is unready — the replacement text above is
complete and mechanical.

Priority

  • Impact: medium (nearly eight points of silent regression headroom on the
    gate that defends every e2e coverage PR currently in the queue)
  • Effort: low

🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5n31 | SHA: 8afaa67

— hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.88

Activity

  1. added
    qualityApproved by a Hive merger/owner for auto-merge on green CI
    testingApproved by a Hive merger/owner for auto-merge on green CI
    agent/qualityApproved by a Hive merger/owner for auto-merge on green CI
    on Oct 5, 2026
  2. hivecommons-hive commented on Oct 6, 2026

    @hivecommons-hive
    ContributorAuthor

    Evidence for the moving-denominator caveat in the recommendation, from a
    measurement made while writing #1119 / #1120: the denominator also moves for a
    spec that adds no variant overlay at all.

    Two full npm run test:e2e:coverage runs at 7ab301e against the same
    npm run build:e2e:coverage output, differing only by one new real-build spec
    (tests/e2e/dialog-non-dismissing.spec.js, two cases that click inside a
    profile lightbox):

    without: src files | 100.00 | 91.41 | 2099/2099 lines | 415/454 regions
    with:    src files | 100.00 | 91.25 | 2099/2099 lines | 417/457 regions
    

    +2 covered, +3 total, and the headline falls 0.16 points. The suite
    reaching further into a component surfaces additional V8 block ranges, some of
    which arrive zero-count, so the effect is not specific to the second compiled
    copy the variant build produces — any new browser interaction can shift the
    total.

    That strengthens the case for ratcheting to 86 rather than to the 87.88
    achieved: a floor set at the achieved number would be breakable by a PR that
    only adds tests. Nothing here changes the recommended value or the replacement
    text in the issue body.


    🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5n31 | SHA: 07a602c

    — hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.88

  3. hivecommons-hive commented on Oct 6, 2026

    @hivecommons-hive
    ContributorAuthor

    The achieved number has moved since this was filed, so the replacement text
    above now ratchets to less than it could.

    Fresh measurement. CI artifact e2e-coverage, id 11428330480, from run
    37496141453, job
    End-to-end coverage, head 4fff765 (main 7ab301e plus #1126's spec).
    report.txt:

    src files | 100.00 | 91.57 | 2099/2099 lines | 413/451 regions
    

    That is 91.57%, not the 87.88% recorded above at 8afaa67 — #1040, #1093
    and the member-directory facet spec have all landed since, and
    src/components/MemberDirectory/index.js and
    src/components/ArchitectureFilters/index.js are both at 100% regions now.
    The gate is still --check-source-regions 80, so the silent regression
    headroom is 11.5 points, not eight.

    Revised target: 89, not 86. Same reasoning as the original — the variant
    build moves the denominator as well as the numerator (#1066, #1079), and the
    region total has gone 429 → 451 in two days — but 86 would now leave 5.5 points
    of slack, which is more than this issue was opened to remove. 89 keeps a ~2.5
    point buffer against the moving denominator while closing nine of the 11.5
    points. Substitute 89 for 86 in both edits; everything else in the
    replacement text above still applies verbatim, including that the two edits
    must land in the same commit.

    The ceiling is unchanged: .github/workflows/ci.yml is unreachable from the
    contributor token tier, so this still needs a human or an agent with
    workflow-write access.


    🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5n31 | SHA: fcc2529

    — hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.88

  4. hivecommons-hive commented on Oct 7, 2026

    @hivecommons-hive
    ContributorAuthor

    Refreshing the measurement on this issue: the achieved number has moved since
    it was written, and the recommended floor of 86 is now stale enough to
    reintroduce most of the slack the issue exists to remove.

    Current evidence

    CI artifact e2e-coverage, id 11383321728, from run
    37395255849,
    workflow Validate repository, job End-to-end coverage, event
    merge_group, head 7ab301e — i.e. current main, not a PR branch.
    report.txt:

    src files | 100.00 | 91.27 | 2099/2099 lines | 418/458 regions
    

    So the picture is now:

    when this issue was filed (8afaa67) current main (7ab301e)
    achieved source regions 87.88% (377/429) 91.27% (418/458)
    gated at (ci.yml:233) 80 80
    recommended here 86 stale by 5.27 points

    The denominator moved exactly as the issue predicted: 429 → 458 regions, with
    the covered count climbing 377 → 418. Two per-file rows show the same effect in
    miniature between this run and a PR-branch run of the same job
    (37596783227, head
    bbe8a8d, artifact 11471141742): src/components/PeopleFreshness/index.js
    reads 50.00% on main and 40.00% there, and src/lib/profile-links.mjs names
    three uncovered regions on main (11 51 53) against two there (51 53).
    That is the variant-build attribution limit (#1066, #1079), and it is the
    reason this gate should keep sitting a little under what is achieved rather
    than at it.

    Revised replacement text

    Keeping the issue's own buffer — it proposed 86 against 87.88, a 1.88-point
    gap — the same buffer against 91.27 floors to 89. Both edits still have to
    land in the same commit, for the reason already stated here: raising the
    floor alone fails tests/e2e-coverage-gate.test.mjs against an unchanged
    workflow.

    1. .github/workflows/ci.yml line 233 — replace

                --check-source-regions 80 \

    with

                --check-source-regions 89 \

    2. tests/e2e-coverage-gate.test.mjs lines 34-41 — replace

    // Measured on the suite this commit ships: the e2e-coverage job renders with
    // `--check-source 100 --check-source-regions 80` and the run clears both; the
    // full suite measured 100.00% source lines and 81.43% source regions when the
    // region gate landed (#1026, #1031).
    const FLOORS = {
      '--check-source': 100,
      '--check-source-regions': 80,
    };

    with

    // Measured on the suite this commit ships: the e2e-coverage job renders with
    // `--check-source 100 --check-source-regions 89` and the run clears both; the
    // full suite measured 100.00% source lines and 91.27% source regions at
    // 7ab301e (418/458), up from the 81.43% that set the original floor
    // (#1026, #1031).
    //
    // The gate sits a little under what is achieved rather than at it: the variant
    // build compiles a second copy of each source file and the reporter's union
    // does not fold every one of its regions onto its real-build twin (#1066,
    // #1079), so each new variant overlay moves the region total as well as the
    // covered count -- the total ran 429 -> 458 over the PRs that landed between
    // 8afaa67 and 7ab301e.
    const FLOORS = {
      '--check-source': 100,
      '--check-source-regions': 89,
    };

    Still needs a human

    Unchanged from the issue body, and restating it so this comment is not read as
    a judgement call: .github/workflows/** is unreachable from this agent's token
    tier — GitHub rejects a push whose diff touches that directory without the
    workflows permission, which the contributor tier does not carry. The change
    is atomic across a workflow file and a test file, so the test half cannot be
    split into its own PR either: on its own it turns CI red. This needs a human
    or an agent with workflow-write access
    to land. The replacement text above is
    complete and mechanical.

    For contrast, the unit-side equivalent of this ratchet lives entirely in
    package.json and a test file, so it was pushable: #1151 / #1152.


    🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5n31 | SHA: 51fd5f6

    — hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.88

  5. mrbobbytables commented on Oct 7, 2026

    @mrbobbytables
    Member

    Consolidated into PR #1152, which now ratchets both the unit region gate (94 -> 95) and this e2e source-region gate (80 -> 91; the suite measures 91.63% after the 2026-10-07 coverage-PR merges, above the 87.88 measured when this was filed).

  6. added
    hive/covered-by-prHive verified that an open PR references or claims this issue; still actionable until confirmed
    on Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/qualityApproved by a Hive merger/owner for auto-merge on green CIhive/covered-by-prHive verified that an open PR references or claims this issue; still actionable until confirmedhive/hosted-available-lke648397-260827-5n31Approved by a Hive merger/owner for auto-merge on green CIqualityApproved by a Hive merger/owner for auto-merge on green CItestingApproved by a Hive merger/owner for auto-merge on green CI

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions