Check this receipt without trusting this site

gh attestation verify run-record-M-014.tar.gz --repo northset-oss/verification-pilot --signer-workflow northset-oss/verification-pilot/.github/workflows/attest-bundle.yml

Expected output includes Verification succeeded!

NORTHSET

Proof-of-Pass Receipt

Receipt ID M-014

ISSUE / WORKIssue #621 · PR #773

CONTRIBUTOR SELF-RUN — NOT MAINTAINER VERIFICATION

RUN1m 12s

01 / TECHNICAL RESULT

Technical result

1/1

declared command passed

1/1 declared command returned exit 0 in the recorded environment

Upstream
CLOSED UNMERGEDCHANGES REQUESTED GitHub review decision
Environment
node:22-bookwormnetwork phaseA:bridge,phaseB:none
Signature
verified Northset signing workflow provenance

02 / DECLARED CHECKS

Command evidence

Execution summary
1/1 declared command returned exit 0 in the recorded environment

  1. npm run test-unit

    exit 0 · 5.6s

unclassified executor time (derived residual) 1m07s

run wall (derived from recorded timestamps) 1m12s

Every command listed returned exit 0 in the declared environment. Only the listed commands are in scope. Unlisted test, lint, typecheck, build, coverage, compiler, full-suite, and CI gates are not implied or recorded.

03 / RECORDED IDENTITIES

Compact hashes

Patch diff SHA-256
sha256:48a2c9…803b666
Container image digest
node@sha256:a25c99…127c365
Bundle contents digest
sha256:8d24ba…174209f
Signed asset SHA-256
sha256:1121a9…48f2cfe

04 / PUBLIC SCOPE INTERPRETATION

Public scope interpretation

Contributor self-run record of Northset’s own contribution; not the maintainer’s verification. The declared network-off check runs `npm run test-unit` on node:22-bookworm after a disclosed online install. It does not run lint, type-check, or the full upstream CI gates.

05 / CLAIMS BOUNDARY

NOT INCLUDED

  • Does not prove code quality
  • Does not prove security
  • Contributor self-run record of Northset’s own contribution; not the maintainer’s verification.
  • The declared network-off check runs `npm run test-unit` on node:22-bookworm after a disclosed online install. It does not run lint, type-check, or the full upstream CI gates.
06 / Evidence annexTechnical · provenance · full recorded values
01

Technical evidence

Code, full environment, patch, and redacted outputs

Project

prometheus/client_js

Work

Issue #621 · PR #773

Verification execution

runtime: northset-oss executor v0
human operator: aeziz

Code

base
7c54cc43cc5443e79d92ff4b9b732c2b091b6517
recorded patch commit
6e2083494d2cb088ee5bb9fb82bc05deb16a684e
declared metadata; not execution-bound
patch diff SHA-256
sha256:48a2c9…803b666
bound to executed patch bytes

Environment

image reference
node:22-bookworm
repository digest
node@sha256:a25c99…127c365
network
phaseA:bridge,phaseB:none
Committed patch.diff
diff --git a/index.d.ts b/index.d.ts
index 8c0ebb2..fe41cc4 100644
--- a/index.d.ts
+++ b/index.d.ts
@@ -323,6 +323,7 @@ export interface CounterConfiguration<
 	T extends string,
 > extends MetricConfiguration<T> {
 	collect?: CollectFunction<Counter<T>>;
+	useCounterValueAsExemplar?: boolean;
 }
 
 export interface IncreaseDataWithExemplar<T extends string> {
diff --git a/lib/counter.js b/lib/counter.js
index 7835c8d..b6ce480 100644
--- a/lib/counter.js
+++ b/lib/counter.js
@@ -24,7 +24,7 @@ const Exemplar = require('./exemplar');
 
 class Counter extends Metric {
 	constructor(config) {
-		super(config);
+		super(config, { useCounterValueAsExemplar: false });
 		this.type = 'counter';
 		this.defaultLabels = {};
 		this.defaultValue = 1;
@@ -93,7 +93,11 @@ class Counter extends Metric {
 		entry.exemplar ??= new Exemplar();
 		entry.exemplar.validateExemplarLabelSet(exemplarLabels);
 		entry.exemplar.labelSet = exemplarLabels;
-		entry.exemplar.value = value ? value : 1;
+		entry.exemplar.value = this.useCounterValueAsExemplar
+			? entry.value
+			: value
+				? value
+				: 1;
 		entry.exemplar.timestamp = nowTimestamp();
 	}
 
diff --git a/test/exemplarsTest.js b/test/exemplarsTest.js
index 0ad6588..344d523 100644
--- a/test/exemplarsTest.js
+++ b/test/exemplarsTest.js
@@ -60,6 +60,34 @@ describe('Exemplars', () => {
 				);
 			});
 
+			it('should optionally use the counter value for exemplars', async () => {
+				const counterWithTotal = new Counter({
+					name: 'counter_total_exemplar_test',
+					help: 'help',
+					enableExemplars: true,
+					useCounterValueAsExemplar: true,
+					registers: [],
+				});
+				const counterWithIncrement = new Counter({
+					name: 'counter_increment_exemplar_test',
+					help: 'help',
+					enableExemplars: true,
+					registers: [],
+				});
+
+				counterWithTotal.inc({ exemplarLabels: { traceId: 'x' } });
+				counterWithTotal.inc({ exemplarLabels: { traceId: 'x' } });
+				counterWithIncrement.inc({ exemplarLabels: { traceId: 'x' } });
+				counterWithIncrement.inc({ exemplarLabels: { traceId: 'x' } });
+
+				const totalValues = await counterWithTotal.get();
+				const incrementValues = await counterWithIncrement.get();
+				expect(totalValues.values[0].value).toEqual(2);
+				expect(totalValues.values[0].exemplar.value).toEqual(2);
+				expect(incrementValues.values[0].value).toEqual(2);
+				expect(incrementValues.values[0].exemplar.value).toEqual(1);
+			});
+
 			it('should make histogram with exemplars on multiple buckets', async () => {
 				const histogramInstance = new Histogram({
 					name: 'histogram_exemplar_test',
Redacted stdout
=== cmd 1: npm run test-unit ===

> @[REDACTED:email] test-unit
> jest

Redacted stderr
=== cmd 1: npm run test-unit ===
PASS test/histogramTest.js
PASS test/summaryTest.js
PASS test/registerTest.js
PASS test/utilTest.js
PASS test/gaugeTest.js
PASS test/exemplarsTest.js
PASS test/counterTest.js
PASS test/defaultMetricsTest.js
PASS test/pushgatewayWithPathTest.js
PASS test/pushgatewayTest.js
PASS test/aggregatorsTest.js
PASS test/metrics/heapSpacesSizeAndUsedTest.js
PASS test/metrics/eventLoopLagTest.js
PASS test/timeWindowQuantilesTest.js
PASS test/metrics/maxFileDescriptorsTest.js
PASS test/clusterTest.js
PASS test/bucketGeneratorsTest.js
PASS test/metrics/versionTest.js
PASS test/metrics/heapSizeAndUsedTest.js
PASS test/workerTest.js
PASS test/metrics/gcTest.js
PASS test/metrics/processRequestsTest.js
PASS test/metrics/processHandlesTest.js
PASS test/browserCompatibilityTest.js
PASS test/metrics/processStartTimeTest.js
PASS test/metrics/processOpenFileDescriptorsTest.js
PASS test/metrics/processResourcesTest.js
PASS test/validationTest.js
A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper teardown. Try running with --detectOpenHandles to find leaks. Active timers can also cause this, ensure that .unref() was called on them.

Test Suites: 28 passed, 28 total
Tests:       543 passed, 543 total
Snapshots:   34 passed, 34 total
Time:        3.724 s
Ran all test suites.
02

Provenance & record

Full hashes, bundle identity, attestation, and record details

Record details

payment
none · not merge-contingent
redactions
1 email
Bundle contents digest
sha256:8d24ba…174209f
Signed asset SHA-256
sha256:1121a9…48f2cfe
Signed provenance recorded
verified

Full cryptographic values

Full recorded values. The compact receipt above shortens these for legibility only.

Patch diff SHA-256
sha256:48a2c9ae72581cf4767ec4bc01ed2b1468ebf12aef9973f6e4ecf49c4803b666
Container image digest
node@sha256:a25c9934ff6382cd4f08b6bc26c82bf4ea69b1e6f8dabfb2ead457374127c365
Bundle contents digest
sha256:8d24baf5c1f7ed157ee0f9b4d268e7f55afead025ca21e85095a986ef174209f
Signed asset SHA-256
sha256:1121a9aa74a20a29854bd9130157cc6dd628d5ebfe27ff55c53e0e99348f2cfe

Signed bundle

Download signed bundle

Verify this receipt

gh attestation verify run-record-M-014.tar.gz --repo northset-oss/verification-pilot --signer-workflow northset-oss/verification-pilot/.github/workflows/attest-bundle.yml

Attestation confirms that Northset's signing workflow produced this exact bundle. The signer does not witness the recorded run, and verification does not turn it into maintainer verification.

QR → receipt page
Northset contributed this fix and ran its declared checks. Contributor self-run. Not maintainer verification.

Evidence of what ran — not a verdict that the code is good.

SELF-FUNDED FIELD-TESTING.

- - - detach here - - -

External status

Mutable upstream observation; unattested and separate from the signed run record.

PR state
CLOSED UNMERGED
GitHub review decision
CHANGES REQUESTED
Upstream updated
Observed
CLOSED UNMERGED

Linked upstream record · open linked record

All Northset work in prometheus/client_js →

FOR MAINTAINERS

Maintain prometheus/client_js?

Get this same run for any PR in your queue — private, free during the pilot, nothing published without your approval.

The issue form is public. Do not include secrets or private repository details there; use email instead.

Already onboarded? Add northset-verify to a PR to request a run on that PR.

Claims boundary

This page reports scoped proof-of-pass receipt evidence. It does not prove code quality, security, full CI coverage, production readiness, or maintainer approval. An attestation confirms bundle provenance; it does not broaden the receipt's claim.

Read the full Claims Boundary policy.