Skip to content

fix: preserve build, browser capture, and reporter coverage provenance - #1748

Merged
mrbobbytables merged 5 commits into
mainfrom
quality/e2e-coverage-report-runtime-stamp
Oct 21, 2026
Merged

mrbobbytables merged 5 commits into
mainfrom
quality/e2e-coverage-report-runtime-stamp

Conversation

@hivecommons-hive

@hivecommons-hive hivecommons-hive Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Correct the runtime-provenance proposal so later report rendering cannot
misidentify the toolchain that produced browser coverage.

  • Coverage-only builds write their build-process Node/V8 identity.
  • Browser capture artifacts record capture-process Node/V8, Playwright version,
    and Chromium product/V8 versions obtained through Browser.getVersion.
  • Sealing preserves capture and main/fixture-build identities in the run
    manifest. Re-rendering reuses those identities, even if the current build
    metadata has changed.
  • Success and failure reports distinguish buildRuntimes, captureRuntimes
    and the live reporterRuntime. Text output labels all three separately.
  • Legacy producer metadata remains explicitly unknown. Capture-version failures
    produce error artifacts, malformed capture JSON retains explicit provenance
    warnings, and malformed build metadata fails sealing visibly.
  • Contributor guidance distinguishes Chromium's raw ranges from the reporting
    process's V8; no single runtime stamp is presented as proof of what caused
    region-count drift.
  • ADR 0007 adds a dated clarification on calibrating mutation attribution and
    preserving producer identities separately from reporter identity. It selects
    no new mutation architecture and changes no scopes, thresholds or existing
    test-policy restrictions; pilot measurements remain on [quality] Pilot: callable-core mutation attribution for CLI validators #1752.

This replaces the original reporter-only runtime proposal, not an existing
merged public contract. Normal noncoverage production builds, coverage
thresholds, mutation scope, workflows and conservative cross-chunk attribution
are unchanged. This does not resolve #1736.

Verification

  • Full required unit coverage gate: 3,017 tests passed; source 100% lines/regions,
    harness 100% lines / 99.77% regions, with every per-file floor preserved.
  • Formatting, spelling, Markdown, duplication, ESLint, unused-file/export checks
    and dependency audit passed.
  • Actual coverage-site build generated the expected Node/V8 marker.
  • Real headless Chromium capture/seal recorded Playwright 1.64.1,
    HeadlessChrome/156.0.8078.4 and browser V8 15.6.75, separately from local Node
    v26.11.1 / V8 14.6.202.34-node.37.
  • Standard Chromium suite: 328 passed, 34 coverage-only tests skipped. This is
    not a claim that the full variant-build browser-coverage lane ran locally.
  • Focused regressions cover successful and failed rendering, legacy metadata,
    changed-marker re-rendering, main/variant builds and capture failures.

Maintainer disposition

The maintainer approved these bounded repairs and the subsequent ADR
clarification. The hold label is restored and remains in place. Leave this PR
unmerged for review.
Current main, including #1753, is merged into this existing branch;
no competing provenance PR was created.

Closes #1747.

The e2e coverage report's region percentages are a V8 artifact: the same
commit, suite and fixture builds split into a different number of ranges
on a different runtime, so the denominator moves while the code does not.
CONTRIBUTING.md measures that drift and tests/e2e-coverage-gate.test.mjs
pins the Node major its floors were measured on, but both guard the job
rather than the artifact. The report stamped revision -- which code -- and
nothing about which runtime chose the denominator, so a report read out of
the 90-day upload, or pasted into a pull request from a local render, was
indistinguishable from a CI one measured on the pinned major.

Record node and v8 on the success envelope and on the failure envelope,
and render a Runtime: line beneath Revision: so the step summary and the
.txt artifact carry it too. v8 and not just node because V8 is what splits
the ranges, and it moves between patch releases of one Node major -- the
difference CONTRIBUTING.md warns is runtime drift, not a code change.

Additive: no existing key changes meaning, no threshold moves, and the
e2e-coverage job already tees the rendered text into its summary.

Closes #1747

Signed-off-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Important

Held for human review by the hive's ACMM level gate.

This PR was opened by the "quality" agent while Hive policy required a human checkpoint for that agent. Agent PRs are held at ACMM L3–L5; an outreach PR that targets a repository this hive does not manage is held at every level because it publishes project-facing communication into someone else's project.

Hive will keep the hold label until a human removes it. Operators can make a deliberate one-off release during an ACMM level change with release_level_holds=true, but level changes never release this hold automatically.

@netlify

netlify Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for endusers ready!

Name Link
🔨 Latest commit 17dc073
🔍 Latest deploy log https://app.netlify.com/projects/endusers/deploys/6ad8f3a7706812307d22c4f8
😎 Deploy Preview https://deploy-preview-1748--endusers.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Read the tree at c3420ae, not just the diff. This looks correct to me.

Verified:

  • The runtime stamp reaches every envelope: the full build path starts from emptyReport(run) (tests/tools/e2e-coverage-report.mjs:813), which now carries runtime: reportRuntime() (line 770), and the failure envelope in main's catch stamps it independently (line 1114). So the normal non-empty success report gets the key too, not just the trivially-empty one.
  • Render falls back per-field (report.runtime?.node ?? 'unknown', lines 1034-1035), so old schema-v2 JSON without the key still renders a line instead of throwing — matching the Revision: unknown pattern directly above it.
  • Ran node --test tests/e2e-coverage-runtime.test.mjs at this head after npm ci: 3/3 pass, including the failure-envelope case which asserts against the live process.version/process.versions.v8 rather than literals.
  • Overlap claim checked against the queue: no other open PR touches tests/tools/e2e-coverage-report.mjs.

Additive, no workflow edit needed, body matches the diff. No findings.

— hive: agent=reviewer backend=copilot model=claude-fable-5 copilot=1.0.88

@mrbobbytables

Copy link
Copy Markdown
Member

The maintainer has explicitly authorized a temporary hold release for the agreed P2 provenance repairs: distinguish build/capture producer metadata from reporter runtime, preserve capture identity across re-rendering, and validate success/failure behavior. I will restore the hold after updating this PR. No merge is authorized.

mrbobbytables and others added 3 commits October 21, 2026 11:43
Signed-off-by: mrbobbytables <mrbobbytables@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: mrbobbytables <mrbobbytables@users.noreply.github.com>
Record browser and build identity at production time, seal it with the run and distinguish the current reporter runtime in success and error output. Preserve unknown legacy provenance and explicit capture/sealing diagnostics.

Signed-off-by: mrbobbytables <mrbobbytables@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mrbobbytables mrbobbytables changed the title test: stamp the runtime on the e2e coverage report fix: preserve build, browser capture, and reporter coverage provenance Oct 21, 2026
@mrbobbytables

Copy link
Copy Markdown
Member

Published the maintainer-approved provenance repairs at 9841db1. Build and capture producer identities are now sealed separately from the current reporter runtime, including Chromium/V8 and Playwright identity, legacy unknowns and failure diagnostics. Updated the PR description with precise scope and local evidence. The temporary release is finished: the hold label is restored, and this PR remains unmerged for human review. No coverage thresholds, workflow scope or cross-chunk attribution policy changed.

Distinguish NoCoverage accounting from assertion gaps and preserve build/capture producer identity independently of the reporter. Keep runner architecture, mutation scope, thresholds and test-policy restrictions unchanged.

Signed-off-by: mrbobbytables <mrbobbytables@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mrbobbytables

Copy link
Copy Markdown
Member

Added the requested dated clarification to ADR 0007: calibrate mutation attribution before interpreting NoCoverage as assertion gaps, and preserve build/capture identities independently of the current reporter across re-renders and failures. Legacy producer metadata remains explicitly unknown. No new runner architecture, scope expansion, threshold change or relaxation of existing test-policy restrictions is approved by this clarification. Updated the PR description; hold remains in place and the PR is unmerged.

@mrbobbytables

Copy link
Copy Markdown
Member

The maintainer has now explicitly authorized adding this PR and #1754 to the normal merge queue. Releasing hold for that authorized submission. Required repository-validation and lint checks are green; remaining checks and merge-group validation continue through the normal workflows. No protections or checks are bypassed.

@mrbobbytables
mrbobbytables added this pull request to the merge queue Oct 21, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

🔒 Hold-gate integrity: branch changed while hold-gated — fresh review required

This PR's branch moved while it sat hold-gated: the head recorded when the hold was applied was 9841db11c6cb, but the branch now sits at 17dc073852e9. The diff a reviewer saw under the hold is no longer the diff that would merge, so auto-merge is blocked and the hold label has been re-applied.

Commits not present in the hold-time snapshot (1):

  • 17dc073852e9 by mrbobbytables — docs: clarify coverage attribution and provenance in ADR 0007

A human should review the FULL diff at the current head — a rebase or force-push renames every commit, so everything above needs eyes even if it looks familiar. Removing the hold label after that review is the fresh approval: the guard has re-pinned its snapshot to the current head, so a clean lift re-opens the merge lanes.

Merged via the queue into main with commit 9c580db Oct 21, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant