@kya-os/checkpoint-shared 1.4.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -0
- package/dist/beacon-types/index.d.mts +441 -432
- package/dist/beacon-types/index.d.mts.map +1 -0
- package/dist/beacon-types/index.d.ts +441 -432
- package/dist/beacon-types/index.d.ts.map +1 -0
- package/dist/beacon-types/index.js +198 -182
- package/dist/beacon-types/index.mjs +197 -179
- package/dist/beacon-types/index.mjs.map +1 -0
- package/dist/browser-posture-cookie-Dmq9Brf_.d.mts +5 -0
- package/dist/browser-posture-cookie-Dmq9Brf_.d.mts.map +1 -0
- package/dist/browser-posture-cookie-Dmq9Brf_.d.ts +5 -0
- package/dist/browser-posture-cookie-Dmq9Brf_.d.ts.map +1 -0
- package/dist/browser-posture-cookie.d.mts +2 -0
- package/dist/browser-posture-cookie.d.ts +2 -0
- package/dist/browser-posture-cookie.js +1 -0
- package/dist/browser-posture-cookie.mjs +2 -0
- package/dist/browser-posture-cookie.mjs.map +1 -0
- package/dist/browser-posture-report.d.mts +48 -44
- package/dist/browser-posture-report.d.mts.map +1 -0
- package/dist/browser-posture-report.d.ts +48 -44
- package/dist/browser-posture-report.d.ts.map +1 -0
- package/dist/browser-posture-report.js +1 -1
- package/dist/browser-posture-report.mjs +2 -1
- package/dist/browser-posture-report.mjs.map +1 -0
- package/dist/browser-posture.d.mts +80 -75
- package/dist/browser-posture.d.mts.map +1 -0
- package/dist/browser-posture.d.ts +80 -75
- package/dist/browser-posture.d.ts.map +1 -0
- package/dist/browser-posture.js +159 -18993
- package/dist/browser-posture.mjs +158 -18990
- package/dist/browser-posture.mjs.map +1 -0
- package/dist/browser.d.mts +323 -316
- package/dist/browser.d.mts.map +1 -0
- package/dist/browser.d.ts +323 -316
- package/dist/browser.d.ts.map +1 -0
- package/dist/browser.js +1 -1
- package/dist/browser.mjs +2 -1
- package/dist/browser.mjs.map +1 -0
- package/dist/canonical-signer/index.d.mts +38 -33
- package/dist/canonical-signer/index.d.mts.map +1 -0
- package/dist/canonical-signer/index.d.ts +38 -33
- package/dist/canonical-signer/index.d.ts.map +1 -0
- package/dist/canonical-signer/index.js +411 -181
- package/dist/canonical-signer/index.mjs +383 -175
- package/dist/canonical-signer/index.mjs.map +1 -0
- package/dist/clearance.d.mts +30 -0
- package/dist/clearance.d.mts.map +1 -0
- package/dist/clearance.d.ts +30 -0
- package/dist/clearance.d.ts.map +1 -0
- package/dist/clearance.js +120 -0
- package/dist/clearance.mjs +112 -0
- package/dist/clearance.mjs.map +1 -0
- package/dist/client-ip-1y2iXAYW.js +237 -0
- package/dist/client-ip-HOfe6ucV.mjs +215 -0
- package/dist/client-ip-HOfe6ucV.mjs.map +1 -0
- package/dist/deploy/index.d.mts +339 -339
- package/dist/deploy/index.d.mts.map +1 -0
- package/dist/deploy/index.d.ts +339 -339
- package/dist/deploy/index.d.ts.map +1 -0
- package/dist/deploy/index.js +505 -413
- package/dist/deploy/index.mjs +504 -410
- package/dist/deploy/index.mjs.map +1 -0
- package/dist/errors/index.d.mts +101 -101
- package/dist/errors/index.d.mts.map +1 -0
- package/dist/errors/index.d.ts +101 -101
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +341 -314
- package/dist/errors/index.mjs +340 -311
- package/dist/errors/index.mjs.map +1 -0
- package/dist/external-jr_S4iSS.d.mts +4187 -0
- package/dist/external-jr_S4iSS.d.mts.map +1 -0
- package/dist/external-jr_S4iSS.d.ts +4187 -0
- package/dist/external-jr_S4iSS.d.ts.map +1 -0
- package/dist/gateway/index.d.mts +138 -132
- package/dist/gateway/index.d.mts.map +1 -0
- package/dist/gateway/index.d.ts +138 -132
- package/dist/gateway/index.d.ts.map +1 -0
- package/dist/gateway/index.js +117 -81
- package/dist/gateway/index.mjs +116 -78
- package/dist/gateway/index.mjs.map +1 -0
- package/dist/gateway-client-ip.d.mts +59 -0
- package/dist/gateway-client-ip.d.mts.map +1 -0
- package/dist/gateway-client-ip.d.ts +59 -0
- package/dist/gateway-client-ip.d.ts.map +1 -0
- package/dist/gateway-client-ip.js +149 -0
- package/dist/gateway-client-ip.mjs +139 -0
- package/dist/gateway-client-ip.mjs.map +1 -0
- package/dist/index.d.mts +14895 -14240
- package/dist/index.d.mts.map +1 -0
- package/dist/index.d.ts +14895 -14240
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +15180 -31025
- package/dist/index.mjs +15065 -30942
- package/dist/index.mjs.map +1 -0
- package/dist/mcpi/agentshield-api/index.d.mts +45 -44
- package/dist/mcpi/agentshield-api/index.d.mts.map +1 -0
- package/dist/mcpi/agentshield-api/index.d.ts +45 -44
- package/dist/mcpi/agentshield-api/index.d.ts.map +1 -0
- package/dist/mcpi/agentshield-api/index.js +0 -2
- package/dist/mcpi/agentshield-api/index.mjs +1 -1
- package/dist/mcpi/approval-grant/index.d.mts +63 -61
- package/dist/mcpi/approval-grant/index.d.mts.map +1 -0
- package/dist/mcpi/approval-grant/index.d.ts +63 -61
- package/dist/mcpi/approval-grant/index.d.ts.map +1 -0
- package/dist/mcpi/approval-grant/index.js +220 -140
- package/dist/mcpi/approval-grant/index.mjs +219 -137
- package/dist/mcpi/approval-grant/index.mjs.map +1 -0
- package/dist/mcpi/dashboard-config/index.d.mts +2323 -2318
- package/dist/mcpi/dashboard-config/index.d.mts.map +1 -0
- package/dist/mcpi/dashboard-config/index.d.ts +2323 -2318
- package/dist/mcpi/dashboard-config/index.d.ts.map +1 -0
- package/dist/mcpi/dashboard-config/index.js +605 -458
- package/dist/mcpi/dashboard-config/index.mjs +604 -455
- package/dist/mcpi/dashboard-config/index.mjs.map +1 -0
- package/dist/mcpi/multibase-ed25519.d.mts +10 -8
- package/dist/mcpi/multibase-ed25519.d.mts.map +1 -0
- package/dist/mcpi/multibase-ed25519.d.ts +10 -8
- package/dist/mcpi/multibase-ed25519.d.ts.map +1 -0
- package/dist/mcpi/multibase-ed25519.js +182 -106
- package/dist/mcpi/multibase-ed25519.mjs +181 -103
- package/dist/mcpi/multibase-ed25519.mjs.map +1 -0
- package/dist/patterns-CkRVOdtV.js +243 -0
- package/dist/patterns-DzkGy_qk.mjs +173 -0
- package/dist/patterns-DzkGy_qk.mjs.map +1 -0
- package/dist/project-verification-key-C3L5rd8a.js +41 -0
- package/dist/project-verification-key-CgSVX9_m.mjs +37 -0
- package/dist/project-verification-key-CgSVX9_m.mjs.map +1 -0
- package/dist/rolldown-runtime-iY2fYEqi.mjs +19 -0
- package/dist/schemas-BmjNLAE7.js +5677 -0
- package/dist/schemas-DxY-dk9y.mjs +5511 -0
- package/dist/schemas-DxY-dk9y.mjs.map +1 -0
- package/dist/signals/index.d.mts +125 -115
- package/dist/signals/index.d.mts.map +1 -0
- package/dist/signals/index.d.ts +125 -115
- package/dist/signals/index.d.ts.map +1 -0
- package/dist/signals/index.js +1693 -1536
- package/dist/signals/index.mjs +1692 -1533
- package/dist/signals/index.mjs.map +1 -0
- package/dist/test-fixtures/index.d.mts +124 -119
- package/dist/test-fixtures/index.d.mts.map +1 -0
- package/dist/test-fixtures/index.d.ts +124 -119
- package/dist/test-fixtures/index.d.ts.map +1 -0
- package/dist/test-fixtures/index.js +460 -228
- package/dist/test-fixtures/index.mjs +459 -225
- package/dist/test-fixtures/index.mjs.map +1 -0
- package/dist/tool-protection/index.d.mts +343 -343
- package/dist/tool-protection/index.d.mts.map +1 -0
- package/dist/tool-protection/index.d.ts +343 -343
- package/dist/tool-protection/index.d.ts.map +1 -0
- package/dist/tool-protection/index.js +366 -285
- package/dist/tool-protection/index.mjs +365 -282
- package/dist/tool-protection/index.mjs.map +1 -0
- package/fixtures/bot-signal-resolution.json +142 -0
- package/fixtures/browser-posture-claims.json +421 -0
- package/fixtures/browser-posture-headers.json +46 -0
- package/fixtures/detection/reason-codes.json +10 -1
- package/fixtures/kya-http/challenge.delegation.fetcher-200.json +9 -3
- package/fixtures/kya-http/challenge.delegation.full.json +9 -3
- package/fixtures/kya-http/challenge.delegation.minimal.json +9 -3
- package/fixtures/kya-http/error-codes.json +7 -2
- package/package.json +20 -6
package/dist/signals/index.js
CHANGED
|
@@ -1,1596 +1,1745 @@
|
|
|
1
|
-
'
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
let _noble_hashes_sha2_js = require("@noble/hashes/sha2.js");
|
|
3
|
+
let _noble_hashes_utils_js = require("@noble/hashes/utils.js");
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"philosophical belief",
|
|
31
|
-
"faith affiliation"
|
|
32
|
-
]
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
category: "mental-or-physical-health-condition-or-diagnosis",
|
|
36
|
-
description: "Inference indicating a mental or physical health condition or diagnosis.",
|
|
37
|
-
regimes: [
|
|
38
|
-
"CO Privacy Act Rules, 4 CCR 904-3 \xA72.02 (Sensitive Data Inferences)",
|
|
39
|
-
"WA My Health My Data Act (RCW 19.373)",
|
|
40
|
-
"NV SB 370 (consumer health data)"
|
|
41
|
-
],
|
|
42
|
-
keywords: [
|
|
43
|
-
"health condition",
|
|
44
|
-
"medical condition",
|
|
45
|
-
"health diagnosis",
|
|
46
|
-
"mental health condition",
|
|
47
|
-
"mental health diagnosis",
|
|
48
|
-
"physical health condition",
|
|
49
|
-
"disability status",
|
|
50
|
-
"disease indicator",
|
|
51
|
-
"illness indicator"
|
|
52
|
-
]
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
category: "sex-life-or-sexual-orientation",
|
|
56
|
-
description: "Inference indicating sex life or sexual orientation.",
|
|
57
|
-
regimes: ["CO Privacy Act Rules, 4 CCR 904-3 \xA72.02 (Sensitive Data Inferences)"],
|
|
58
|
-
keywords: ["sexual orientation", "sex life", "gender identity inferred"]
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
category: "citizenship-or-immigration-status",
|
|
62
|
-
description: "Inference indicating citizenship or citizenship status.",
|
|
63
|
-
regimes: ["CO Privacy Act Rules, 4 CCR 904-3 \xA72.02 (Sensitive Data Inferences)"],
|
|
64
|
-
keywords: [
|
|
65
|
-
"citizenship status",
|
|
66
|
-
"immigration status",
|
|
67
|
-
"visa status",
|
|
68
|
-
"national origin status",
|
|
69
|
-
"resident alien status"
|
|
70
|
-
]
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
category: "biometric-identifier-or-derivative",
|
|
74
|
-
description: "A biometric identifier, or a derivative of one, used to identify an individual.",
|
|
75
|
-
regimes: ["CT Data Privacy Act (Public Act 22-15)"],
|
|
76
|
-
keywords: [
|
|
77
|
-
"voiceprint",
|
|
78
|
-
"faceprint",
|
|
79
|
-
"iris scan",
|
|
80
|
-
"retina scan",
|
|
81
|
-
"facial geometry",
|
|
82
|
-
"gait analysis",
|
|
83
|
-
"palm print",
|
|
84
|
-
"dna profile",
|
|
85
|
-
"genetic marker"
|
|
86
|
-
]
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
category: "government-identification-number",
|
|
90
|
-
description: "A government-issued identification number.",
|
|
91
|
-
regimes: ["CT Data Privacy Act (Public Act 22-15)"],
|
|
92
|
-
keywords: [
|
|
93
|
-
"social security number",
|
|
94
|
-
"ssn",
|
|
95
|
-
"passport number",
|
|
96
|
-
"driver's license number",
|
|
97
|
-
"driver license number",
|
|
98
|
-
"national id number",
|
|
99
|
-
"government id number",
|
|
100
|
-
"tax id number"
|
|
101
|
-
]
|
|
102
|
-
}
|
|
103
|
-
]
|
|
104
|
-
};
|
|
105
|
-
var COMPOSITION_RISK_RULES = [
|
|
106
|
-
{
|
|
107
|
-
id: "accessibility-preference-composite",
|
|
108
|
-
category: "mental-or-physical-health-condition-or-diagnosis",
|
|
109
|
-
signalIds: [
|
|
110
|
-
"platform.reducedMotion",
|
|
111
|
-
"platform.invertedColors",
|
|
112
|
-
"platform.contrast",
|
|
113
|
-
"platform.forcedColors",
|
|
114
|
-
"platform.reducedTransparency"
|
|
115
|
-
],
|
|
116
|
-
minMatches: 2,
|
|
117
|
-
regimes: [
|
|
118
|
-
"CO Privacy Act Rules, 4 CCR 904-3 \xA72.02 (Sensitive Data Inferences)",
|
|
119
|
-
"WA My Health My Data Act (RCW 19.373)",
|
|
120
|
-
"NV SB 370 (consumer health data)"
|
|
121
|
-
],
|
|
122
|
-
rationale: "Two or more OS-level accessibility-preference reads (reduced motion, inverted colors, forced colors, reduced contrast, reduced transparency), combined into one derived feature, reliably identify a disability/health accommodation (e.g. vestibular disorder, low vision, photosensitivity), even though each individual CSS media-feature probe is, alone, a consent-gated, near-zero-weight contradiction signal."
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
id: "locale-cluster-national-origin-composite",
|
|
126
|
-
category: "citizenship-or-immigration-status",
|
|
127
|
-
signalIds: ["platform.languages", "platform.timezone", "platform.dateTimeLocale"],
|
|
128
|
-
minMatches: 3,
|
|
129
|
-
regimes: [
|
|
130
|
-
"CO Privacy Act Rules, 4 CCR 904-3 \xA72.02 (Sensitive Data Inferences)",
|
|
131
|
-
"CT Data Privacy Act (Public Act 22-15)"
|
|
132
|
-
],
|
|
133
|
-
rationale: `Combining accepted-languages, IANA timezone, and resolved locale into one derived "origin" feature moves from three individually benign, user-configurable locale reads into a feature whose purpose is inferring likely national origin/immigration status: the "alone or combined" inference Colorado's rule targets.`
|
|
134
|
-
}
|
|
5
|
+
//#region src/signals/types.ts
|
|
6
|
+
/**
|
|
7
|
+
* Signal registry types.
|
|
8
|
+
*
|
|
9
|
+
* A "signal" is one named, independently-collected piece of device/browser
|
|
10
|
+
* entropy (e.g. `canvas.geometry`, `platform.timezone`). The registry is the
|
|
11
|
+
* single declarative source of truth for every signal's version range,
|
|
12
|
+
* stability tier, de-noising policy, consent mode, and linkage weight.
|
|
13
|
+
*
|
|
14
|
+
* Core rule: a shipped signal is never edited, only forked. See
|
|
15
|
+
* `immutability.ts` for the mechanism that enforces this.
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* Ordered registry versions. Order matters — it defines "added"/"removed"
|
|
19
|
+
* comparisons.
|
|
20
|
+
*
|
|
21
|
+
* A new signal is added at a NEW version once fingerprint trees are being
|
|
22
|
+
* stored (P55 pins `registry_version` on every row): `buildFingerprintTree`
|
|
23
|
+
* digests every signal resolved at a version, absent leaves included, so an
|
|
24
|
+
* addition at an existing version would silently change what every tree
|
|
25
|
+
* pinned to that version recomputes to. v3 = the behavioural plane's first
|
|
26
|
+
* entries (interaction physics).
|
|
27
|
+
*/
|
|
28
|
+
const REGISTRY_VERSIONS = [
|
|
29
|
+
"v1",
|
|
30
|
+
"v2",
|
|
31
|
+
"v3"
|
|
135
32
|
];
|
|
33
|
+
const CURRENT_REGISTRY_VERSION = REGISTRY_VERSIONS[REGISTRY_VERSIONS.length - 1];
|
|
34
|
+
/** Fields frozen once a signal has shipped (see immutability.ts). */
|
|
35
|
+
const FROZEN_FIELDS = [
|
|
36
|
+
"id",
|
|
37
|
+
"addedVersion",
|
|
38
|
+
"denoise",
|
|
39
|
+
"mode",
|
|
40
|
+
"plane",
|
|
41
|
+
"group"
|
|
42
|
+
];
|
|
43
|
+
/**
|
|
44
|
+
* Fields frozen only once the tier has been finalized (`measurement.provisional`
|
|
45
|
+
* flips to `false`). While provisional, tier/measurement may be updated in
|
|
46
|
+
* place as real data comes in; once finalized, any further change requires
|
|
47
|
+
* a fork — mirroring the `BatteryFullCapacity` -> `BatteryFullCapacityV2`
|
|
48
|
+
* precedent, where the read didn't change, only its classification did.
|
|
49
|
+
*/
|
|
50
|
+
const TIER_LOCKED_FIELDS = ["tier"];
|
|
51
|
+
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region src/signals/sensitive-attributes.ts
|
|
54
|
+
/**
|
|
55
|
+
* Feature-registration guard: rejects any signal (feature) that derives a
|
|
56
|
+
* Sensitive Data Inference, at registration time.
|
|
57
|
+
*
|
|
58
|
+
* WHY THIS EXISTS (P44)
|
|
59
|
+
* ----------------------
|
|
60
|
+
* Liability under CO/WA/NV/CT attaches at the INFERENCE step, not the
|
|
61
|
+
* collection step. Colorado's rule says this most plainly: raw browsing data
|
|
62
|
+
* may be benign, but browsing data which, alone or combined with other
|
|
63
|
+
* personal data, infers sexual orientation IS sensitive, and sensitive data
|
|
64
|
+
* requires opt-in consent. The same raw signal is therefore benign or
|
|
65
|
+
* regulated depending only on what gets computed from it, so the one place
|
|
66
|
+
* that can actually hold this line is the point where a *derived feature*
|
|
67
|
+
* gets named and shipped, not a data-collection policy doc. Enforcing it
|
|
68
|
+
* here, in the code that builds the live signal registry, means the four
|
|
69
|
+
* regimes below are satisfied by one control instead of four separate ones.
|
|
70
|
+
*
|
|
71
|
+
* DECISION LOG: v1 list contents (needs legal/product sign-off)
|
|
72
|
+
* ----------------------------------------------------------------
|
|
73
|
+
* The category list below seeds from the ticket's own citations: Colorado's
|
|
74
|
+
* Sensitive Data Inference categories (race/ethnicity, religion, mental or
|
|
75
|
+
* physical health, sex life/orientation, citizenship status), plus
|
|
76
|
+
* Washington's My Health My Data Act and Nevada SB 370 (health specifically),
|
|
77
|
+
* plus Connecticut's Data Privacy Act (biometric derivatives and government
|
|
78
|
+
* ID numbers). This is an engineering starting point, not a finished legal
|
|
79
|
+
* determination. The mechanism (versioned list plus forced re-evaluation on
|
|
80
|
+
* version bump, see `findSignalsNeedingReevaluation`) exists precisely so
|
|
81
|
+
* Legal/Product can revise the list in place and have every existing
|
|
82
|
+
* registered feature re-reviewed against the new version before it's
|
|
83
|
+
* considered compliant again. Do not treat v1 as final without that sign-off.
|
|
84
|
+
*
|
|
85
|
+
* ON "BIOMETRIC" KEYWORDS: a deliberate omission
|
|
86
|
+
* -------------------------------------------------
|
|
87
|
+
* This module and its neighbors use "fingerprint" pervasively to mean
|
|
88
|
+
* *device/browser* fingerprinting (canvas hash, audio hash, WebGL hash), not
|
|
89
|
+
* a human biometric identifier. Connecticut's biometric-data category means
|
|
90
|
+
* data generated from measurements of an individual's *body* (voiceprint,
|
|
91
|
+
* faceprint, iris/retina scan, gait). The keyword list below intentionally
|
|
92
|
+
* avoids the bare words "fingerprint"/"biometric" for that reason: using
|
|
93
|
+
* them would false-positive on this entire module.
|
|
94
|
+
*/
|
|
95
|
+
/** Ordered rejection-list versions. Order matters: CURRENT is always the last entry. */
|
|
96
|
+
const SENSITIVE_REJECTION_LIST_VERSIONS = ["v1"];
|
|
97
|
+
const CURRENT_SENSITIVE_REJECTION_LIST_VERSION = SENSITIVE_REJECTION_LIST_VERSIONS[SENSITIVE_REJECTION_LIST_VERSIONS.length - 1];
|
|
98
|
+
const SENSITIVE_ATTRIBUTE_REJECTION_LIST = { v1: [
|
|
99
|
+
{
|
|
100
|
+
category: "racial-or-ethnic-origin",
|
|
101
|
+
description: "Inference indicating racial or ethnic origin.",
|
|
102
|
+
regimes: ["CO Privacy Act Rules, 4 CCR 904-3 §2.02 (Sensitive Data Inferences)"],
|
|
103
|
+
keywords: [
|
|
104
|
+
"racial origin",
|
|
105
|
+
"ethnic origin",
|
|
106
|
+
"race indicator",
|
|
107
|
+
"ethnicity indicator"
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
category: "religious-or-philosophical-beliefs",
|
|
112
|
+
description: "Inference indicating religious or philosophical beliefs.",
|
|
113
|
+
regimes: ["CO Privacy Act Rules, 4 CCR 904-3 §2.02 (Sensitive Data Inferences)"],
|
|
114
|
+
keywords: [
|
|
115
|
+
"religious belief",
|
|
116
|
+
"religious observance",
|
|
117
|
+
"philosophical belief",
|
|
118
|
+
"faith affiliation"
|
|
119
|
+
]
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
category: "mental-or-physical-health-condition-or-diagnosis",
|
|
123
|
+
description: "Inference indicating a mental or physical health condition or diagnosis.",
|
|
124
|
+
regimes: [
|
|
125
|
+
"CO Privacy Act Rules, 4 CCR 904-3 §2.02 (Sensitive Data Inferences)",
|
|
126
|
+
"WA My Health My Data Act (RCW 19.373)",
|
|
127
|
+
"NV SB 370 (consumer health data)"
|
|
128
|
+
],
|
|
129
|
+
keywords: [
|
|
130
|
+
"health condition",
|
|
131
|
+
"medical condition",
|
|
132
|
+
"health diagnosis",
|
|
133
|
+
"mental health condition",
|
|
134
|
+
"mental health diagnosis",
|
|
135
|
+
"physical health condition",
|
|
136
|
+
"disability status",
|
|
137
|
+
"disease indicator",
|
|
138
|
+
"illness indicator"
|
|
139
|
+
]
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
category: "sex-life-or-sexual-orientation",
|
|
143
|
+
description: "Inference indicating sex life or sexual orientation.",
|
|
144
|
+
regimes: ["CO Privacy Act Rules, 4 CCR 904-3 §2.02 (Sensitive Data Inferences)"],
|
|
145
|
+
keywords: [
|
|
146
|
+
"sexual orientation",
|
|
147
|
+
"sex life",
|
|
148
|
+
"gender identity inferred"
|
|
149
|
+
]
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
category: "citizenship-or-immigration-status",
|
|
153
|
+
description: "Inference indicating citizenship or citizenship status.",
|
|
154
|
+
regimes: ["CO Privacy Act Rules, 4 CCR 904-3 §2.02 (Sensitive Data Inferences)"],
|
|
155
|
+
keywords: [
|
|
156
|
+
"citizenship status",
|
|
157
|
+
"immigration status",
|
|
158
|
+
"visa status",
|
|
159
|
+
"national origin status",
|
|
160
|
+
"resident alien status"
|
|
161
|
+
]
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
category: "biometric-identifier-or-derivative",
|
|
165
|
+
description: "A biometric identifier, or a derivative of one, used to identify an individual.",
|
|
166
|
+
regimes: ["CT Data Privacy Act (Public Act 22-15)"],
|
|
167
|
+
keywords: [
|
|
168
|
+
"voiceprint",
|
|
169
|
+
"faceprint",
|
|
170
|
+
"iris scan",
|
|
171
|
+
"retina scan",
|
|
172
|
+
"facial geometry",
|
|
173
|
+
"gait analysis",
|
|
174
|
+
"palm print",
|
|
175
|
+
"dna profile",
|
|
176
|
+
"genetic marker"
|
|
177
|
+
]
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
category: "government-identification-number",
|
|
181
|
+
description: "A government-issued identification number.",
|
|
182
|
+
regimes: ["CT Data Privacy Act (Public Act 22-15)"],
|
|
183
|
+
keywords: [
|
|
184
|
+
"social security number",
|
|
185
|
+
"ssn",
|
|
186
|
+
"passport number",
|
|
187
|
+
"driver's license number",
|
|
188
|
+
"driver license number",
|
|
189
|
+
"national id number",
|
|
190
|
+
"government id number",
|
|
191
|
+
"tax id number"
|
|
192
|
+
]
|
|
193
|
+
}
|
|
194
|
+
] };
|
|
195
|
+
const COMPOSITION_RISK_RULES = [{
|
|
196
|
+
id: "accessibility-preference-composite",
|
|
197
|
+
category: "mental-or-physical-health-condition-or-diagnosis",
|
|
198
|
+
signalIds: [
|
|
199
|
+
"platform.reducedMotion",
|
|
200
|
+
"platform.invertedColors",
|
|
201
|
+
"platform.contrast",
|
|
202
|
+
"platform.forcedColors",
|
|
203
|
+
"platform.reducedTransparency"
|
|
204
|
+
],
|
|
205
|
+
minMatches: 2,
|
|
206
|
+
regimes: [
|
|
207
|
+
"CO Privacy Act Rules, 4 CCR 904-3 §2.02 (Sensitive Data Inferences)",
|
|
208
|
+
"WA My Health My Data Act (RCW 19.373)",
|
|
209
|
+
"NV SB 370 (consumer health data)"
|
|
210
|
+
],
|
|
211
|
+
rationale: "Two or more OS-level accessibility-preference reads (reduced motion, inverted colors, forced colors, reduced contrast, reduced transparency), combined into one derived feature, reliably identify a disability/health accommodation (e.g. vestibular disorder, low vision, photosensitivity), even though each individual CSS media-feature probe is, alone, a consent-gated, near-zero-weight contradiction signal."
|
|
212
|
+
}, {
|
|
213
|
+
id: "locale-cluster-national-origin-composite",
|
|
214
|
+
category: "citizenship-or-immigration-status",
|
|
215
|
+
signalIds: [
|
|
216
|
+
"platform.languages",
|
|
217
|
+
"platform.timezone",
|
|
218
|
+
"platform.dateTimeLocale"
|
|
219
|
+
],
|
|
220
|
+
minMatches: 3,
|
|
221
|
+
regimes: ["CO Privacy Act Rules, 4 CCR 904-3 §2.02 (Sensitive Data Inferences)", "CT Data Privacy Act (Public Act 22-15)"],
|
|
222
|
+
rationale: "Combining accepted-languages, IANA timezone, and resolved locale into one derived \"origin\" feature moves from three individually benign, user-configurable locale reads into a feature whose purpose is inferring likely national origin/immigration status: the \"alone or combined\" inference Colorado's rule targets."
|
|
223
|
+
}];
|
|
224
|
+
/**
|
|
225
|
+
* Splits a dotted/camelCase/snake_case/kebab-case identifier into
|
|
226
|
+
* space-separated words, so a keyword PHRASE like "mental health condition"
|
|
227
|
+
* can match an id like `health.mentalHealthConditionIndicator`, which has
|
|
228
|
+
* no natural word separators at all.
|
|
229
|
+
*/
|
|
136
230
|
function tokenizeIdentifier(text) {
|
|
137
|
-
|
|
231
|
+
return text.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[._-]+/g, " ");
|
|
138
232
|
}
|
|
233
|
+
/**
|
|
234
|
+
* Two scan surfaces, checked together, not one replacing the other
|
|
235
|
+
* (Cursor Bugbot, PR #4645, two rounds): the RAW lowercased text, where a
|
|
236
|
+
* single fused-case compound like `voicePrint` already contains the
|
|
237
|
+
* single-word keyword "voiceprint" via ordinary substring matching with no
|
|
238
|
+
* tokenization needed; and the TOKENIZED text, where a multi-word phrase
|
|
239
|
+
* keyword like "mental health condition" can match a camelCase id that
|
|
240
|
+
* spells it with no spaces at all. Tokenizing and discarding the raw form
|
|
241
|
+
* fixed the phrase case while silently breaking the fused-word case: a
|
|
242
|
+
* space inserted between "voice" and "Print" stops "voiceprint" from
|
|
243
|
+
* matching. Neither surface alone is sufficient, so both are scanned.
|
|
244
|
+
*/
|
|
139
245
|
function scanTexts(signal) {
|
|
140
|
-
|
|
141
|
-
const tokenized = `${tokenizeIdentifier(signal.id)} ${tokenizeIdentifier(signal.description)} ${tokenizeIdentifier(signal.group)}`.toLowerCase();
|
|
142
|
-
return [raw, tokenized];
|
|
246
|
+
return [`${signal.id} ${signal.description} ${signal.group}`.toLowerCase(), `${tokenizeIdentifier(signal.id)} ${tokenizeIdentifier(signal.description)} ${tokenizeIdentifier(signal.group)}`.toLowerCase()];
|
|
143
247
|
}
|
|
248
|
+
/** Mechanical keyword scan of a signal's own id/description/group against the rejection list. Test 1. */
|
|
144
249
|
function checkDirectMatch(signal, version = CURRENT_SENSITIVE_REJECTION_LIST_VERSION) {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
}
|
|
160
|
-
return violations;
|
|
250
|
+
const texts = scanTexts(signal);
|
|
251
|
+
const rules = SENSITIVE_ATTRIBUTE_REJECTION_LIST[version];
|
|
252
|
+
const violations = [];
|
|
253
|
+
for (const rule of rules) {
|
|
254
|
+
const hit = rule.keywords.find((keyword) => texts.some((text) => text.includes(keyword)));
|
|
255
|
+
if (hit) violations.push({
|
|
256
|
+
kind: "direct",
|
|
257
|
+
category: rule.category,
|
|
258
|
+
ruleId: rule.category,
|
|
259
|
+
regimes: rule.regimes,
|
|
260
|
+
message: `derives "${rule.category}" (matched "${hit}"): a direct Sensitive Data Inference per ${rule.regimes.join("; ")}.`
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
return violations;
|
|
161
264
|
}
|
|
265
|
+
/**
|
|
266
|
+
* The combination test: does this signal's declared `combinesWith` set,
|
|
267
|
+
* together with its own id, cross a known composition-risk rule's
|
|
268
|
+
* minimum-match threshold? Test 4.
|
|
269
|
+
*/
|
|
162
270
|
function checkCompositionRisk(signalId, combinesWith) {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
}
|
|
178
|
-
return violations;
|
|
271
|
+
if (combinesWith.length === 0) return [];
|
|
272
|
+
const combinationSet = /* @__PURE__ */ new Set([signalId, ...combinesWith]);
|
|
273
|
+
const violations = [];
|
|
274
|
+
for (const rule of COMPOSITION_RISK_RULES) {
|
|
275
|
+
const matches = rule.signalIds.filter((id) => combinationSet.has(id));
|
|
276
|
+
if (matches.length >= rule.minMatches) violations.push({
|
|
277
|
+
kind: "composition",
|
|
278
|
+
category: rule.category,
|
|
279
|
+
ruleId: rule.id,
|
|
280
|
+
regimes: rule.regimes,
|
|
281
|
+
message: `combination rule "${rule.id}" fired: [${matches.join(", ")}] combine into "${rule.category}" per ${rule.regimes.join("; ")}. ${rule.rationale}`
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
return violations;
|
|
179
285
|
}
|
|
286
|
+
/** A reviewer who declared this feature DOES derive a sensitive category: the honest-disclosure path. */
|
|
180
287
|
function checkDeclaredCategory(review, version = CURRENT_SENSITIVE_REJECTION_LIST_VERSION) {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
ruleId: review.derivesCategory,
|
|
191
|
-
regimes,
|
|
192
|
-
message: `reviewer declared this feature derives "${review.derivesCategory}"${regimes.length ? ` (${regimes.join("; ")})` : ""}.`
|
|
193
|
-
}
|
|
194
|
-
];
|
|
288
|
+
if (review.derivesCategory === null) return [];
|
|
289
|
+
const regimes = SENSITIVE_ATTRIBUTE_REJECTION_LIST[version].find((r) => r.category === review.derivesCategory)?.regimes ?? [];
|
|
290
|
+
return [{
|
|
291
|
+
kind: "declared",
|
|
292
|
+
category: review.derivesCategory,
|
|
293
|
+
ruleId: review.derivesCategory,
|
|
294
|
+
regimes,
|
|
295
|
+
message: `reviewer declared this feature derives "${review.derivesCategory}"${regimes.length ? ` (${regimes.join("; ")})` : ""}.`
|
|
296
|
+
}];
|
|
195
297
|
}
|
|
298
|
+
/**
|
|
299
|
+
* Structural integrity of the review record itself: a missing or stale
|
|
300
|
+
* review is treated as non-compliant, not as "no violations found". This is
|
|
301
|
+
* the enforcement half of "the code needs to enforce that the [human] step
|
|
302
|
+
* happened": an absent or out-of-date review can't silently read as clear.
|
|
303
|
+
*/
|
|
196
304
|
function checkReviewRecordIntegrity(review, currentVersion = CURRENT_SENSITIVE_REJECTION_LIST_VERSION) {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
if (review.listVersion !== currentVersion) {
|
|
220
|
-
return [
|
|
221
|
-
{
|
|
222
|
-
kind: "stale-review",
|
|
223
|
-
category: null,
|
|
224
|
-
ruleId: "stale-list-version",
|
|
225
|
-
regimes: [],
|
|
226
|
-
message: `was reviewed against rejection-list version "${review.listVersion}", but the current version is "${currentVersion}": re-evaluation required. See findSignalsNeedingReevaluation().`
|
|
227
|
-
}
|
|
228
|
-
];
|
|
229
|
-
}
|
|
230
|
-
return [];
|
|
305
|
+
if (!review) return [{
|
|
306
|
+
kind: "stale-review",
|
|
307
|
+
category: null,
|
|
308
|
+
ruleId: "missing-review",
|
|
309
|
+
regimes: [],
|
|
310
|
+
message: "has no sensitiveAttributeReview record: every registered signal requires one."
|
|
311
|
+
}];
|
|
312
|
+
if (!review.reviewedBy || !review.reviewedAt || !review.rationale) return [{
|
|
313
|
+
kind: "stale-review",
|
|
314
|
+
category: null,
|
|
315
|
+
ruleId: "incomplete-review",
|
|
316
|
+
regimes: [],
|
|
317
|
+
message: "has an incomplete review record (reviewedBy/reviewedAt/rationale required)."
|
|
318
|
+
}];
|
|
319
|
+
if (review.listVersion !== currentVersion) return [{
|
|
320
|
+
kind: "stale-review",
|
|
321
|
+
category: null,
|
|
322
|
+
ruleId: "stale-list-version",
|
|
323
|
+
regimes: [],
|
|
324
|
+
message: `was reviewed against rejection-list version "${review.listVersion}", but the current version is "${currentVersion}": re-evaluation required. See findSignalsNeedingReevaluation().`
|
|
325
|
+
}];
|
|
326
|
+
return [];
|
|
231
327
|
}
|
|
328
|
+
/** The single shared check both `registerSignal` and `validateRegistry` call, so there is no logic drift between entry points. */
|
|
232
329
|
function evaluateSensitiveAttributeCompliance(signal) {
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
330
|
+
return [
|
|
331
|
+
...checkDirectMatch(signal),
|
|
332
|
+
...checkCompositionRisk(signal.id, signal.review?.combinesWith ?? []),
|
|
333
|
+
...signal.review ? checkDeclaredCategory(signal.review) : [],
|
|
334
|
+
...checkReviewRecordIntegrity(signal.review)
|
|
335
|
+
];
|
|
239
336
|
}
|
|
240
337
|
function formatViolation(v) {
|
|
241
|
-
|
|
338
|
+
return ` - [${v.kind}] ${v.message}`;
|
|
242
339
|
}
|
|
243
340
|
var SensitiveAttributeRejectionError = class extends Error {
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
341
|
+
signalId;
|
|
342
|
+
violations;
|
|
343
|
+
constructor(signalId, violations) {
|
|
344
|
+
const lines = [
|
|
345
|
+
`Feature registration rejected for "${signalId}": Sensitive Data Inference constraint(s) fired.`,
|
|
346
|
+
...violations.map(formatViolation),
|
|
347
|
+
"This is a legal boundary (see CO Privacy Act Rules Sensitive Data Inferences; WA My Health My Data Act; NV SB 370; CT Data Privacy Act) enforced in code, not documentation.",
|
|
348
|
+
"To register this feature: resolve the conflict (drop the derivation, or narrow combinesWith) and route the change through the sensitive-attribute review process (see docs/governance/sensitive-attribute-rejection-list.md) before re-registering. Do not bypass by editing SIGNAL_REGISTRY directly: validateRegistry() enforces the same check."
|
|
349
|
+
];
|
|
350
|
+
super(lines.join("\n"));
|
|
351
|
+
this.name = "SensitiveAttributeRejectionError";
|
|
352
|
+
this.signalId = signalId;
|
|
353
|
+
this.violations = violations;
|
|
354
|
+
}
|
|
258
355
|
};
|
|
356
|
+
/**
|
|
357
|
+
* The single approved way to add a signal to the live registry. Throws with
|
|
358
|
+
* an actionable message (naming the exact category/rule and pointing at the
|
|
359
|
+
* review process) rather than a bare "feature rejected". Returns the
|
|
360
|
+
* definition unchanged on success so callers can do
|
|
361
|
+
* `RAW.map(registerSignal)`.
|
|
362
|
+
*/
|
|
259
363
|
function registerSignal(definition) {
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
}
|
|
264
|
-
return definition;
|
|
364
|
+
const violations = evaluateSensitiveAttributeCompliance(definition);
|
|
365
|
+
if (violations.length > 0) throw new SensitiveAttributeRejectionError(definition.id, violations);
|
|
366
|
+
return definition;
|
|
265
367
|
}
|
|
368
|
+
/**
|
|
369
|
+
* Non-throwing variant used by `validateRegistry` (and directly by anyone
|
|
370
|
+
* validating a whole array) so a bypass of `registerSignal`, such as a
|
|
371
|
+
* hand-edited registry array, is still caught by the same shared logic.
|
|
372
|
+
*/
|
|
266
373
|
function checkSensitiveAttributeCompliance(signal) {
|
|
267
|
-
|
|
268
|
-
|
|
374
|
+
const violations = evaluateSensitiveAttributeCompliance(signal);
|
|
375
|
+
return {
|
|
376
|
+
ok: violations.length === 0,
|
|
377
|
+
violations
|
|
378
|
+
};
|
|
269
379
|
}
|
|
380
|
+
/**
|
|
381
|
+
* Signals whose review is pinned to a rejection-list version older than
|
|
382
|
+
* current: the concrete "changes trigger re-evaluation" mechanism. Also
|
|
383
|
+
* doubles as the "which version was a given model trained under" answer:
|
|
384
|
+
* once this returns empty for a registry snapshot, every feature in it was
|
|
385
|
+
* reviewed against `CURRENT_SENSITIVE_REJECTION_LIST_VERSION`.
|
|
386
|
+
*/
|
|
270
387
|
function findSignalsNeedingReevaluation(signals, currentVersion = CURRENT_SENSITIVE_REJECTION_LIST_VERSION) {
|
|
271
|
-
|
|
388
|
+
return signals.filter((s) => !s.review || s.review.listVersion !== currentVersion);
|
|
272
389
|
}
|
|
273
390
|
|
|
274
|
-
|
|
391
|
+
//#endregion
|
|
392
|
+
//#region src/signals/registry.ts
|
|
393
|
+
/**
|
|
394
|
+
* The signal registry: single declarative source of truth for every
|
|
395
|
+
* signal's version range, stability tier, de-noise policy, consent mode,
|
|
396
|
+
* and Merkle-tree grouping. Collectors and recomputation reference this —
|
|
397
|
+
* nothing hardcodes a signal name or a denoise run count at a call site.
|
|
398
|
+
*
|
|
399
|
+
* A shipped signal is never edited, only forked (see immutability.ts and
|
|
400
|
+
* `.github/workflows/signal-registry-check.yml`). Adding a new signal or
|
|
401
|
+
* finalizing a still-provisional tier does not need a fork; changing
|
|
402
|
+
* addedVersion/denoise/mode/plane/group, or a tier once finalized, does.
|
|
403
|
+
*
|
|
404
|
+
* Provisional tiers: the stability harness that measures real per-browser
|
|
405
|
+
* agreement rates does not exist yet in this repo (tracked as a follow-on).
|
|
406
|
+
* Every tier below is seeded from documented reasoning about each read's
|
|
407
|
+
* known volatility (farbling, driver/OS dependence, etc.), not from
|
|
408
|
+
* measurement, and is marked `measurement.provisional: true` accordingly.
|
|
409
|
+
* A tier with no measurement behind it is a guess wearing a label — so
|
|
410
|
+
* these are explicitly labelled provisional rather than presented as final.
|
|
411
|
+
* Once the harness lands, finalize these in place (see TIER_LOCKED_FIELDS);
|
|
412
|
+
* finalizing is a one-way door — after that, a re-tiering must fork.
|
|
413
|
+
*/
|
|
275
414
|
function provisional(notes) {
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
415
|
+
return {
|
|
416
|
+
agreementRate: null,
|
|
417
|
+
sampleSize: 0,
|
|
418
|
+
browsers: [],
|
|
419
|
+
measuredAt: null,
|
|
420
|
+
provisional: true,
|
|
421
|
+
notes
|
|
422
|
+
};
|
|
284
423
|
}
|
|
424
|
+
/**
|
|
425
|
+
* P44 sensitive-attribute review record shared by every signal below that
|
|
426
|
+
* does not derive a Sensitive Data Inference on its own or in combination
|
|
427
|
+
* (see sensitive-attributes.ts for the versioned rejection list and
|
|
428
|
+
* composition-risk table this is checked against at registration). Every
|
|
429
|
+
* signal here evaluates to `derivesCategory: null` with no known composition
|
|
430
|
+
* risk, so one shared record covers them all instead of 38 near-identical
|
|
431
|
+
* inline literals going stale independently.
|
|
432
|
+
*/
|
|
285
433
|
function compliantReview() {
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
434
|
+
return {
|
|
435
|
+
listVersion: CURRENT_SENSITIVE_REJECTION_LIST_VERSION,
|
|
436
|
+
reviewedBy: "privacy-review@kya-os.example",
|
|
437
|
+
reviewedAt: "2026-08-19",
|
|
438
|
+
combinesWith: [],
|
|
439
|
+
derivesCategory: null,
|
|
440
|
+
rationale: "Raw device/browser entropy read; no plausible link to a Sensitive Data Inference category, individually or via a known composition-risk rule."
|
|
441
|
+
};
|
|
294
442
|
}
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
443
|
+
/** Every interaction-plane id, for each entry's `combinesWith` (the composite reads them all). */
|
|
444
|
+
const INTERACTION_SIGNAL_IDS = [
|
|
445
|
+
"interaction.keyDwellUnder5Share",
|
|
446
|
+
"interaction.keyGapUnder5Share",
|
|
447
|
+
"interaction.pressUnder10Share",
|
|
448
|
+
"interaction.zeroTrailClickShare",
|
|
449
|
+
"interaction.untrustedInputShare",
|
|
450
|
+
"interaction.mousePerClick"
|
|
302
451
|
];
|
|
303
452
|
function interactionReview(id) {
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
453
|
+
return {
|
|
454
|
+
listVersion: CURRENT_SENSITIVE_REJECTION_LIST_VERSION,
|
|
455
|
+
reviewedBy: "privacy-review@kya-os.example",
|
|
456
|
+
reviewedAt: "2026-09-03",
|
|
457
|
+
combinesWith: INTERACTION_SIGNAL_IDS.filter((other) => other !== id),
|
|
458
|
+
derivesCategory: null,
|
|
459
|
+
rationale: "A per-visit share of input events below a physical floor (or a per-visit ratio of two event counts), derived from integer counters; no per-event timing, coordinate, or key identity is collected, so the read cannot reconstruct a typing or pointer rhythm and is not a biometric identifier or a derivative of one (mode: never, so it is excluded from identity linkage regardless). It reads 0 for a person at any speed, ability, or input method, since the floors sit below any hand; it therefore carries no information about a health condition or accommodation. Its only composition is interaction_integrity, a Noisy-OR over the other interaction shares, which derives \"driven by software\" and nothing about the person."
|
|
460
|
+
};
|
|
312
461
|
}
|
|
313
462
|
function interactionSignals() {
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
"Share of timed keydown-to-next-keydown gaps within 2s that were under 5ms: a whole string arriving in one tick.",
|
|
338
|
-
"Same corpus: hand minimum gap 26ms, share 0; CDP drivers 0ms, share 0.97 to 1. AltGr (Control then Alt back to back) is excluded by the modifier guard; a held key auto-repeats without entering the gap count. Provisional pending the trap populations."
|
|
339
|
-
),
|
|
340
|
-
entry(
|
|
341
|
-
"interaction.pressUnder10Share",
|
|
342
|
-
"Share of primary-pointer presses (pointerdown to pointerup) under 10ms; a second finger is not a press and a cancelled press does not pair with the next release.",
|
|
343
|
-
"Same corpus: hand minimum press 38ms, share 0; CDP drivers 2-7ms, share 0.8 to 1. Playwright click({ delay }) holds the press and reads 0. Provisional pending the touch and switch-access populations."
|
|
344
|
-
),
|
|
345
|
-
entry(
|
|
346
|
-
"interaction.zeroTrailClickShare",
|
|
347
|
-
"Of clicks whose own pointerType is mouse and that follow at least one observed pointer move, the share with no mousemove or wheel in the preceding 300ms: a pointer that appeared on its target.",
|
|
348
|
-
"Same corpus: every hand click approached, share 0; Claude-in-Chrome 8 of 12 unapproached, the cdp rig 0.7. Taps, keyboard-activated buttons, and a click before any move has been seen are outside the denominator, so a cursor already resting on a button is unknown rather than a teleport. Weaker than the timing rungs (the plan weights it 0.4) because a scroll-then-click is an ordinary thing for a hand; provisional."
|
|
349
|
-
),
|
|
350
|
-
entry(
|
|
351
|
-
"interaction.untrustedInputShare",
|
|
352
|
-
"Share of counted input events (throttled mousemove, keydown, scroll, click, touchstart) dispatched with isTrusted false: input from a script or extension rather than the browser reacting to hardware.",
|
|
353
|
-
"The content-script rung (#4842). A person's input is always trusted and the flag is browser-set and read-only, so it cannot be forged upward; the content-script rig reads 0.96 with human-shaped timing, and a CDP-driven browser reads 0 because its synthetic input arrives trusted, which is what the timing rungs above are for. Human baseline 0 of 15 windows. Provisional pending the autofill and accessibility-tool populations, whose events are trusted and should read 0."
|
|
354
|
-
),
|
|
355
|
-
entry(
|
|
356
|
-
"interaction.mousePerClick",
|
|
357
|
-
"Throttled (50ms) mouse moves per mouse click over the visit; undefined on touch traffic, which fires no mousemove.",
|
|
358
|
-
"The backstop (#4806): a hand cannot reach a button without dragging the pointer across the screen (measured 33 moves per click) while a driver teleports (measured 2). Noisy on short windows (human 1 to 15 on 4s windows) and undefined for touch, so it is weighted 0.2 in the composite and read only as the mouse-only kinematics reading. Provisional."
|
|
359
|
-
)
|
|
360
|
-
];
|
|
463
|
+
const entry = (id, description, notes) => ({
|
|
464
|
+
id,
|
|
465
|
+
addedVersion: "v3",
|
|
466
|
+
removedVersion: null,
|
|
467
|
+
tier: "low",
|
|
468
|
+
measurement: provisional(notes),
|
|
469
|
+
denoise: { kind: "none" },
|
|
470
|
+
mode: "never",
|
|
471
|
+
plane: "behavioural",
|
|
472
|
+
group: "interaction",
|
|
473
|
+
u: null,
|
|
474
|
+
supersedes: null,
|
|
475
|
+
description,
|
|
476
|
+
review: interactionReview(id)
|
|
477
|
+
});
|
|
478
|
+
return [
|
|
479
|
+
entry("interaction.keyDwellUnder5Share", "Share of paired keystrokes (keydown to keyup) held under 5ms; IME composition, left/right modifiers, and auto-repeat are not timed, and key timing stops once a finger has touched the page.", "Lab gauntlet, two recordings and three driver rigs against production (plan P0.5): hand minimum dwell 39ms, share 0; CDP drivers 0-1ms on every key, share 1. Playwright type({ delay }) manufactures a hand dwell and reads 0: the timing rungs raise the bar and prove nothing, which is why the ladder ends in a challenge. Seeded from that corpus, not a stability harness; finalize once P3 calibration has the trap populations (IME, dictation, on-screen keyboard, switch access)."),
|
|
480
|
+
entry("interaction.keyGapUnder5Share", "Share of timed keydown-to-next-keydown gaps within 2s that were under 5ms: a whole string arriving in one tick.", "Same corpus: hand minimum gap 26ms, share 0; CDP drivers 0ms, share 0.97 to 1. AltGr (Control then Alt back to back) is excluded by the modifier guard; a held key auto-repeats without entering the gap count. Provisional pending the trap populations."),
|
|
481
|
+
entry("interaction.pressUnder10Share", "Share of primary-pointer presses (pointerdown to pointerup) under 10ms; a second finger is not a press and a cancelled press does not pair with the next release.", "Same corpus: hand minimum press 38ms, share 0; CDP drivers 2-7ms, share 0.8 to 1. Playwright click({ delay }) holds the press and reads 0. Provisional pending the touch and switch-access populations."),
|
|
482
|
+
entry("interaction.zeroTrailClickShare", "Of clicks whose own pointerType is mouse and that follow at least one observed pointer move, the share with no mousemove or wheel in the preceding 300ms: a pointer that appeared on its target.", "Same corpus: every hand click approached, share 0; Claude-in-Chrome 8 of 12 unapproached, the cdp rig 0.7. Taps, keyboard-activated buttons, and a click before any move has been seen are outside the denominator, so a cursor already resting on a button is unknown rather than a teleport. Weaker than the timing rungs (the plan weights it 0.4) because a scroll-then-click is an ordinary thing for a hand; provisional."),
|
|
483
|
+
entry("interaction.untrustedInputShare", "Share of counted input events (throttled mousemove, keydown, scroll, click, touchstart) dispatched with isTrusted false: input from a script or extension rather than the browser reacting to hardware.", "The content-script rung (#4842). A person's input is always trusted and the flag is browser-set and read-only, so it cannot be forged upward; the content-script rig reads 0.96 with human-shaped timing, and a CDP-driven browser reads 0 because its synthetic input arrives trusted, which is what the timing rungs above are for. Human baseline 0 of 15 windows. Provisional pending the autofill and accessibility-tool populations, whose events are trusted and should read 0."),
|
|
484
|
+
entry("interaction.mousePerClick", "Throttled (50ms) mouse moves per mouse click over the visit; undefined on touch traffic, which fires no mousemove.", "The backstop (#4806): a hand cannot reach a button without dragging the pointer across the screen (measured 33 moves per click) while a driver teleports (measured 2). Noisy on short windows (human 1 to 15 on 4s windows) and undefined for touch, so it is weighted 0.2 in the composite and read only as the mouse-only kinematics reading. Provisional.")
|
|
485
|
+
];
|
|
361
486
|
}
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
denoise: { kind: "none" },
|
|
1154
|
-
mode: "never",
|
|
1155
|
-
plane: "platform",
|
|
1156
|
-
group: "clientHints",
|
|
1157
|
-
u: null,
|
|
1158
|
-
supersedes: null,
|
|
1159
|
-
description: "UA-CH high-entropy device model hint.",
|
|
1160
|
-
review: compliantReview()
|
|
1161
|
-
},
|
|
1162
|
-
{
|
|
1163
|
-
id: "platform.clientHints.platform",
|
|
1164
|
-
addedVersion: "v1",
|
|
1165
|
-
removedVersion: null,
|
|
1166
|
-
tier: "low",
|
|
1167
|
-
measurement: provisional(
|
|
1168
|
-
"UA-CH low-entropy `platform` (e.g. 'Windows', 'macOS', 'Linux', 'Android', 'Chrome OS'), read synchronously off navigator.userAgentData rather than requested through getHighEntropyValues(). The half of this collector's output the platform contradiction check actually compares against the User-Agent string's platform."
|
|
1169
|
-
),
|
|
1170
|
-
denoise: { kind: "none" },
|
|
1171
|
-
mode: "never",
|
|
1172
|
-
plane: "platform",
|
|
1173
|
-
group: "clientHints",
|
|
1174
|
-
u: null,
|
|
1175
|
-
supersedes: null,
|
|
1176
|
-
description: "UA-CH low-entropy platform family string.",
|
|
1177
|
-
review: compliantReview()
|
|
1178
|
-
},
|
|
1179
|
-
{
|
|
1180
|
-
id: "platform.clientHints.platformVersion",
|
|
1181
|
-
addedVersion: "v1",
|
|
1182
|
-
removedVersion: null,
|
|
1183
|
-
tier: "low",
|
|
1184
|
-
measurement: provisional(
|
|
1185
|
-
"UA-CH high-entropy `platformVersion` hint (OS version string). Collected for contradiction detection only; see platform.clientHints.architecture."
|
|
1186
|
-
),
|
|
1187
|
-
denoise: { kind: "none" },
|
|
1188
|
-
mode: "never",
|
|
1189
|
-
plane: "platform",
|
|
1190
|
-
group: "clientHints",
|
|
1191
|
-
u: null,
|
|
1192
|
-
supersedes: null,
|
|
1193
|
-
description: "UA-CH high-entropy OS version hint.",
|
|
1194
|
-
review: compliantReview()
|
|
1195
|
-
},
|
|
1196
|
-
{
|
|
1197
|
-
id: "platform.clientHints.uaFullVersion",
|
|
1198
|
-
addedVersion: "v1",
|
|
1199
|
-
removedVersion: null,
|
|
1200
|
-
tier: "low",
|
|
1201
|
-
measurement: provisional(
|
|
1202
|
-
"UA-CH high-entropy `uaFullVersion` hint \u2014 deprecated upstream in favour of `fullVersionList`, but still requested here because a spoofing tool that patches the User-Agent string is more likely to miss this legacy field than the one it actually knows to fake."
|
|
1203
|
-
),
|
|
1204
|
-
denoise: { kind: "none" },
|
|
1205
|
-
mode: "never",
|
|
1206
|
-
plane: "platform",
|
|
1207
|
-
group: "clientHints",
|
|
1208
|
-
u: null,
|
|
1209
|
-
supersedes: null,
|
|
1210
|
-
description: "UA-CH high-entropy (deprecated) full browser version hint.",
|
|
1211
|
-
review: compliantReview()
|
|
1212
|
-
},
|
|
1213
|
-
{
|
|
1214
|
-
id: "platform.clientHints.fullVersionList",
|
|
1215
|
-
addedVersion: "v1",
|
|
1216
|
-
removedVersion: null,
|
|
1217
|
-
tier: "low",
|
|
1218
|
-
measurement: provisional(
|
|
1219
|
-
"UA-CH high-entropy `fullVersionList` hint: brand/full-version pairs, GREASE entries filtered before this signal is ever populated (see the collector for the filter and why an unfiltered read would self-split on every request)."
|
|
1220
|
-
),
|
|
1221
|
-
denoise: { kind: "none" },
|
|
1222
|
-
mode: "never",
|
|
1223
|
-
plane: "platform",
|
|
1224
|
-
group: "clientHints",
|
|
1225
|
-
u: null,
|
|
1226
|
-
supersedes: null,
|
|
1227
|
-
description: "UA-CH high-entropy brand/full-version list, GREASE-filtered.",
|
|
1228
|
-
review: compliantReview()
|
|
1229
|
-
},
|
|
1230
|
-
{
|
|
1231
|
-
id: "platform.clientHints.wow64",
|
|
1232
|
-
addedVersion: "v1",
|
|
1233
|
-
removedVersion: null,
|
|
1234
|
-
tier: "low",
|
|
1235
|
-
measurement: provisional(
|
|
1236
|
-
"UA-CH high-entropy `wow64` hint: whether a 32-bit browser is running under WOW64 on 64-bit Windows. Collected for contradiction detection only; see platform.clientHints.architecture."
|
|
1237
|
-
),
|
|
1238
|
-
denoise: { kind: "none" },
|
|
1239
|
-
mode: "never",
|
|
1240
|
-
plane: "platform",
|
|
1241
|
-
group: "clientHints",
|
|
1242
|
-
u: null,
|
|
1243
|
-
supersedes: null,
|
|
1244
|
-
description: "UA-CH high-entropy Windows WOW64 hint.",
|
|
1245
|
-
review: compliantReview()
|
|
1246
|
-
},
|
|
1247
|
-
{
|
|
1248
|
-
id: "platform.clientHints.mobile",
|
|
1249
|
-
addedVersion: "v1",
|
|
1250
|
-
removedVersion: null,
|
|
1251
|
-
tier: "low",
|
|
1252
|
-
measurement: provisional(
|
|
1253
|
-
"UA-CH low-entropy `mobile` flag, read synchronously off navigator.userAgentData rather than requested through getHighEntropyValues(). Collected for contradiction detection only (e.g. against a desktop User-Agent string), not identity linkage."
|
|
1254
|
-
),
|
|
1255
|
-
denoise: { kind: "none" },
|
|
1256
|
-
mode: "never",
|
|
1257
|
-
plane: "platform",
|
|
1258
|
-
group: "clientHints",
|
|
1259
|
-
u: null,
|
|
1260
|
-
supersedes: null,
|
|
1261
|
-
description: "UA-CH low-entropy mobile-device flag.",
|
|
1262
|
-
review: compliantReview()
|
|
1263
|
-
},
|
|
1264
|
-
// --- Interaction physics, contradiction-only (agentic-session plan P1.1) --
|
|
1265
|
-
// The behavioural plane's first entries. Each is a per-visit SHARE derived
|
|
1266
|
-
// server-side from integer counters the pixel's detector and the beacon's
|
|
1267
|
-
// InteractionCollector accumulate (apps/web/lib/detection/timing-physics.ts
|
|
1268
|
-
// reads both lanes through one function). They exist to tell a driven
|
|
1269
|
-
// browser from a person, never to say WHICH person: mode 'never', so none
|
|
1270
|
-
// enters identity linkage or the Merkle tree; tier 'low', because a share
|
|
1271
|
-
// of a visit's events is by definition a within-session quantity.
|
|
1272
|
-
//
|
|
1273
|
-
// The reads are floor-crossings. A hand's shortest measured key dwell on the
|
|
1274
|
-
// lab gauntlet was 39ms, its shortest click press 38ms, its shortest
|
|
1275
|
-
// inter-key gap 26ms, and every one of its clicks was approached by the
|
|
1276
|
-
// pointer; a browser driven over CDP produced 0-1ms dwells, 2-7ms presses,
|
|
1277
|
-
// 0ms gaps, and clicks with no approach. The counters bucket at 5ms and 10ms,
|
|
1278
|
-
// below any hand, so each share reads 0 for a person whatever their speed
|
|
1279
|
-
// and near 1 for a driver. No timestamp, coordinate, or key identity leaves
|
|
1280
|
-
// the page; a counter cannot be replayed into a rhythm. The mean dwell and
|
|
1281
|
-
// mean press that the same counters also yield are lab-calibration display
|
|
1282
|
-
// only and are NOT registered here; promoting either would need its own
|
|
1283
|
-
// review, because "how long a hand holds a key" is a property of the hand.
|
|
1284
|
-
//
|
|
1285
|
-
// Combined downstream by `interaction_integrity` (apps/web/lib/detection/
|
|
1286
|
-
// interaction-integrity.ts, scorer v1, shadow-only): a Noisy-OR over the
|
|
1287
|
-
// keyboard, press, approach, and provenance readings. That composition is
|
|
1288
|
-
// declared on every entry below so the P44 combination test evaluates it.
|
|
1289
|
-
...interactionSignals()
|
|
487
|
+
const SIGNAL_REGISTRY = [
|
|
488
|
+
{
|
|
489
|
+
id: "canvas.geometry",
|
|
490
|
+
addedVersion: "v1",
|
|
491
|
+
removedVersion: "v2",
|
|
492
|
+
tier: "medium",
|
|
493
|
+
measurement: provisional("Canvas 2D geometry rasterisation is GPU/driver dependent; expected to move on driver updates, stable otherwise. No modal() de-noising applied yet, so privacy-browser farbling is expected to reduce agreement — this is exactly what the v2 fork below addresses."),
|
|
494
|
+
denoise: { kind: "none" },
|
|
495
|
+
mode: "consent",
|
|
496
|
+
plane: "rendering",
|
|
497
|
+
group: "canvas",
|
|
498
|
+
u: null,
|
|
499
|
+
supersedes: null,
|
|
500
|
+
description: "Hash of a rendered 2D canvas shape/text scene. Single-read today; superseded by canvas.geometry.v2 once modal(3) de-noising lands (prompt 2).",
|
|
501
|
+
review: compliantReview()
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
id: "canvas.geometry.v2",
|
|
505
|
+
addedVersion: "v2",
|
|
506
|
+
removedVersion: null,
|
|
507
|
+
tier: "medium",
|
|
508
|
+
measurement: provisional("Same read as canvas.geometry, sampled 3x and reduced by mode to recover the deterministic render under per-session farbling noise (Brave/Firefox/Safari). Originally a worked fork example proving the versioning mechanism ahead of the real collector; #4256 has since landed the real geometry-only collector (packages/checkpoint-beacon/.../entropy/canvas.ts) with these exact frozen fields (modal(3), consent, rendering/canvas), so this entry is now that signal for real, not just the demo."),
|
|
509
|
+
denoise: {
|
|
510
|
+
kind: "modal",
|
|
511
|
+
runs: 3
|
|
512
|
+
},
|
|
513
|
+
mode: "consent",
|
|
514
|
+
plane: "rendering",
|
|
515
|
+
group: "canvas",
|
|
516
|
+
u: null,
|
|
517
|
+
supersedes: "canvas.geometry",
|
|
518
|
+
description: "Hash of a rendered 2D canvas GEOMETRY-ONLY scene (overlapping shapes, a bezier stroke); no text is drawn into this read. Forked from canvas.geometry (which conflated shape and text in one read) to apply modal(3) de-noising instead of editing the shipped v1 definition in place. As of #4256/P10, geometry and text are collected and hashed as two fully independent signals (see canvas.text): a font-stack change moves canvas.text and leaves this one untouched, and vice versa for a GPU/driver change.",
|
|
519
|
+
review: compliantReview()
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
id: "canvas.text",
|
|
523
|
+
addedVersion: "v2",
|
|
524
|
+
removedVersion: null,
|
|
525
|
+
tier: "low",
|
|
526
|
+
measurement: provisional("Canvas 2D text rasterisation (mixed fonts, emoji) is materially less stable than canvas geometry: it moves on font-stack changes, emoji font updates, and subpixel antialiasing changes, none of which touch canvas.geometry.v2's arcs/bezier stroke. Hashing geometry and text together (as the pre-#4256 client-side detector did, with a 32-bit DJB2 digest with nowhere near enough entropy to separate devices in the first place) meant any text drift destroyed the geometry evidence too; kept as an independent signal with its own, lower tier instead."),
|
|
527
|
+
denoise: {
|
|
528
|
+
kind: "modal",
|
|
529
|
+
runs: 3
|
|
530
|
+
},
|
|
531
|
+
mode: "consent",
|
|
532
|
+
plane: "rendering",
|
|
533
|
+
group: "canvas",
|
|
534
|
+
u: null,
|
|
535
|
+
supersedes: null,
|
|
536
|
+
description: "Hash of a rendered 2D canvas TEXT-ONLY scene (mixed fonts, emoji); no geometry primitives are drawn into this read. Collected and hashed independently of canvas.geometry.v2 by the same collector module (packages/checkpoint-beacon/.../entropy/canvas.ts), so a font-stack or emoji-font change moves this signal without disturbing the geometry one.",
|
|
537
|
+
review: compliantReview()
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
id: "webgl.render",
|
|
541
|
+
addedVersion: "v1",
|
|
542
|
+
removedVersion: null,
|
|
543
|
+
tier: "medium",
|
|
544
|
+
measurement: provisional("WebGL renderer/parameter fingerprint. Moves on GPU driver updates; stable within a driver version. Farbling affects some browsers (notably Samsung Internet)."),
|
|
545
|
+
denoise: { kind: "none" },
|
|
546
|
+
mode: "consent",
|
|
547
|
+
plane: "rendering",
|
|
548
|
+
group: "webgl",
|
|
549
|
+
u: null,
|
|
550
|
+
supersedes: null,
|
|
551
|
+
description: "Hash of WebGL renderer info and a rendered scene.",
|
|
552
|
+
review: compliantReview()
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
id: "audio.digest",
|
|
556
|
+
addedVersion: "v1",
|
|
557
|
+
removedVersion: null,
|
|
558
|
+
tier: "medium",
|
|
559
|
+
measurement: provisional("AudioContext oscillator/compressor output digest. Deterministic per audio stack; moves on driver/OS audio-subsystem updates."),
|
|
560
|
+
denoise: { kind: "none" },
|
|
561
|
+
mode: "consent",
|
|
562
|
+
plane: "rendering",
|
|
563
|
+
group: "audio",
|
|
564
|
+
u: null,
|
|
565
|
+
supersedes: null,
|
|
566
|
+
description: "Digest of a rendered AudioContext sample buffer.",
|
|
567
|
+
review: compliantReview()
|
|
568
|
+
},
|
|
569
|
+
{
|
|
570
|
+
id: "rendering.fonts",
|
|
571
|
+
addedVersion: "v1",
|
|
572
|
+
removedVersion: null,
|
|
573
|
+
tier: "medium",
|
|
574
|
+
measurement: provisional("Enumerated available font list. High entropy but moves whenever the OS font stack changes (OS updates, new app installs)."),
|
|
575
|
+
denoise: { kind: "none" },
|
|
576
|
+
mode: "consent",
|
|
577
|
+
plane: "rendering",
|
|
578
|
+
group: "fonts",
|
|
579
|
+
u: null,
|
|
580
|
+
supersedes: null,
|
|
581
|
+
description: "Set of locally-available fonts detected via width-probing.",
|
|
582
|
+
review: compliantReview()
|
|
583
|
+
},
|
|
584
|
+
{
|
|
585
|
+
id: "rendering.mathFingerprint",
|
|
586
|
+
addedVersion: "v1",
|
|
587
|
+
removedVersion: null,
|
|
588
|
+
tier: "high",
|
|
589
|
+
measurement: provisional("Floating-point transcendental function results depend on the JS engine and CPU FPU implementation, not on user state or GPU driver — expected to be stable across sessions and survive most updates, per FingerprintJS/ThumbmarkJS prior art."),
|
|
590
|
+
denoise: { kind: "none" },
|
|
591
|
+
mode: "open",
|
|
592
|
+
plane: "rendering",
|
|
593
|
+
group: "math",
|
|
594
|
+
u: null,
|
|
595
|
+
supersedes: null,
|
|
596
|
+
description: "Hash of a battery of Math.* transcendental function results.",
|
|
597
|
+
review: compliantReview()
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
id: "platform.hardwareConcurrency",
|
|
601
|
+
addedVersion: "v1",
|
|
602
|
+
removedVersion: null,
|
|
603
|
+
tier: "high",
|
|
604
|
+
measurement: provisional("navigator.hardwareConcurrency reflects physical core count, effectively constant for a given device."),
|
|
605
|
+
denoise: { kind: "none" },
|
|
606
|
+
mode: "open",
|
|
607
|
+
plane: "platform",
|
|
608
|
+
group: "hardware",
|
|
609
|
+
u: null,
|
|
610
|
+
supersedes: null,
|
|
611
|
+
description: "Reported logical CPU core count.",
|
|
612
|
+
review: compliantReview()
|
|
613
|
+
},
|
|
614
|
+
{
|
|
615
|
+
id: "platform.deviceMemory",
|
|
616
|
+
addedVersion: "v1",
|
|
617
|
+
removedVersion: null,
|
|
618
|
+
tier: "high",
|
|
619
|
+
measurement: provisional("navigator.deviceMemory is a coarse, bucketed value tied to physical RAM; effectively constant for a given device."),
|
|
620
|
+
denoise: { kind: "none" },
|
|
621
|
+
mode: "open",
|
|
622
|
+
plane: "platform",
|
|
623
|
+
group: "hardware",
|
|
624
|
+
u: null,
|
|
625
|
+
supersedes: null,
|
|
626
|
+
description: "Reported device memory in GB, bucketed by the browser.",
|
|
627
|
+
review: compliantReview()
|
|
628
|
+
},
|
|
629
|
+
{
|
|
630
|
+
id: "platform.screenResolution",
|
|
631
|
+
addedVersion: "v1",
|
|
632
|
+
removedVersion: null,
|
|
633
|
+
tier: "medium",
|
|
634
|
+
measurement: provisional("Screen resolution is stable per device but changes on external-monitor connect/disconnect or OS display scaling changes."),
|
|
635
|
+
denoise: { kind: "none" },
|
|
636
|
+
mode: "open",
|
|
637
|
+
plane: "platform",
|
|
638
|
+
group: "display",
|
|
639
|
+
u: null,
|
|
640
|
+
supersedes: null,
|
|
641
|
+
description: "screen.width/height and color depth.",
|
|
642
|
+
review: compliantReview()
|
|
643
|
+
},
|
|
644
|
+
{
|
|
645
|
+
id: "platform.timezone",
|
|
646
|
+
addedVersion: "v1",
|
|
647
|
+
removedVersion: null,
|
|
648
|
+
tier: "medium",
|
|
649
|
+
measurement: provisional("IANA timezone name. Stable per device/user but changes on travel or explicit user change — a trivial, legitimate user action, so capped at medium rather than high."),
|
|
650
|
+
denoise: { kind: "none" },
|
|
651
|
+
mode: "open",
|
|
652
|
+
plane: "platform",
|
|
653
|
+
group: "locale",
|
|
654
|
+
u: null,
|
|
655
|
+
supersedes: null,
|
|
656
|
+
description: "Intl-resolved IANA timezone.",
|
|
657
|
+
review: compliantReview()
|
|
658
|
+
},
|
|
659
|
+
{
|
|
660
|
+
id: "platform.languages",
|
|
661
|
+
addedVersion: "v1",
|
|
662
|
+
removedVersion: null,
|
|
663
|
+
tier: "medium",
|
|
664
|
+
measurement: provisional("navigator.languages ordering/content is stable per device but is user-configurable, a trivial action."),
|
|
665
|
+
denoise: { kind: "none" },
|
|
666
|
+
mode: "open",
|
|
667
|
+
plane: "platform",
|
|
668
|
+
group: "locale",
|
|
669
|
+
u: null,
|
|
670
|
+
supersedes: null,
|
|
671
|
+
description: "Ordered list of accepted languages.",
|
|
672
|
+
review: compliantReview()
|
|
673
|
+
},
|
|
674
|
+
{
|
|
675
|
+
id: "platform.permissions",
|
|
676
|
+
addedVersion: "v1",
|
|
677
|
+
removedVersion: null,
|
|
678
|
+
tier: "low",
|
|
679
|
+
measurement: provisional("Permission grant states (geolocation, notifications, camera, microphone) change whenever the user grants/revokes a permission — moves within a session on a trivial user action. Collected for contradiction detection, weighted near zero for identity."),
|
|
680
|
+
denoise: {
|
|
681
|
+
kind: "modal",
|
|
682
|
+
runs: 3
|
|
683
|
+
},
|
|
684
|
+
mode: "consent",
|
|
685
|
+
plane: "platform",
|
|
686
|
+
group: "permissions",
|
|
687
|
+
u: null,
|
|
688
|
+
supersedes: null,
|
|
689
|
+
description: "Modal permission state per permission name (Permissions API).",
|
|
690
|
+
review: compliantReview()
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
id: "platform.userAgentData",
|
|
694
|
+
addedVersion: "v1",
|
|
695
|
+
removedVersion: null,
|
|
696
|
+
tier: "high",
|
|
697
|
+
measurement: provisional("User-Agent Client Hints high-entropy values (architecture, bitness, model, platformVersion), Chromium-only. Device model in particular is highly identifying: the same sensitivity Chromium itself recognises by gating getHighEntropyValues() behind a Permissions-Policy check. Effectively device-constant when available."),
|
|
698
|
+
denoise: { kind: "none" },
|
|
699
|
+
mode: "consent",
|
|
700
|
+
plane: "platform",
|
|
701
|
+
group: "identity",
|
|
702
|
+
u: null,
|
|
703
|
+
supersedes: null,
|
|
704
|
+
description: "UA-CH brands/mobile/platform plus high-entropy architecture/bitness/model/platformVersion.",
|
|
705
|
+
review: compliantReview()
|
|
706
|
+
},
|
|
707
|
+
{
|
|
708
|
+
id: "rendering.fontPreferences",
|
|
709
|
+
addedVersion: "v1",
|
|
710
|
+
removedVersion: null,
|
|
711
|
+
tier: "medium",
|
|
712
|
+
measurement: provisional("Measured widths of a fixed set of font-preset text samples inside an iframe. Stable per OS/browser install; the upstream source itself documents floating-point measurement noise across zoom levels on some browsers, hence medium rather than high pending real measurement."),
|
|
713
|
+
denoise: { kind: "none" },
|
|
714
|
+
mode: "consent",
|
|
715
|
+
plane: "rendering",
|
|
716
|
+
group: "fonts",
|
|
717
|
+
u: null,
|
|
718
|
+
supersedes: null,
|
|
719
|
+
description: "Dictionary of measured text-sample widths under a fixed set of font/style presets.",
|
|
720
|
+
review: compliantReview()
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
id: "platform.osCpu",
|
|
724
|
+
addedVersion: "v1",
|
|
725
|
+
removedVersion: null,
|
|
726
|
+
tier: "low",
|
|
727
|
+
measurement: provisional("navigator.oscpu, Firefox-only and largely redundant with the platform/UA family. Shared by every user of a given Firefox+OS combination, so low uniqueness on its own: contradiction-detection value only."),
|
|
728
|
+
denoise: { kind: "none" },
|
|
729
|
+
mode: "open",
|
|
730
|
+
plane: "platform",
|
|
731
|
+
group: "identity",
|
|
732
|
+
u: null,
|
|
733
|
+
supersedes: null,
|
|
734
|
+
description: "navigator.oscpu, when present.",
|
|
735
|
+
review: compliantReview()
|
|
736
|
+
},
|
|
737
|
+
{
|
|
738
|
+
id: "platform.colorDepth",
|
|
739
|
+
addedVersion: "v1",
|
|
740
|
+
removedVersion: null,
|
|
741
|
+
tier: "low",
|
|
742
|
+
measurement: provisional("window.screen.colorDepth is effectively constant (24, occasionally 30) across nearly all modern displays. Very low entropy by itself."),
|
|
743
|
+
denoise: { kind: "none" },
|
|
744
|
+
mode: "open",
|
|
745
|
+
plane: "platform",
|
|
746
|
+
group: "display",
|
|
747
|
+
u: null,
|
|
748
|
+
supersedes: null,
|
|
749
|
+
description: "Reported screen color depth in bits.",
|
|
750
|
+
review: compliantReview()
|
|
751
|
+
},
|
|
752
|
+
{
|
|
753
|
+
id: "platform.sessionStorage",
|
|
754
|
+
addedVersion: "v1",
|
|
755
|
+
removedVersion: null,
|
|
756
|
+
tier: "low",
|
|
757
|
+
measurement: provisional("Boolean availability of window.sessionStorage. Near-universally true; moves only under specific privacy configurations. Contradiction-detection value only."),
|
|
758
|
+
denoise: { kind: "none" },
|
|
759
|
+
mode: "open",
|
|
760
|
+
plane: "platform",
|
|
761
|
+
group: "storage",
|
|
762
|
+
u: null,
|
|
763
|
+
supersedes: null,
|
|
764
|
+
description: "Whether window.sessionStorage is available.",
|
|
765
|
+
review: compliantReview()
|
|
766
|
+
},
|
|
767
|
+
{
|
|
768
|
+
id: "platform.localStorage",
|
|
769
|
+
addedVersion: "v1",
|
|
770
|
+
removedVersion: null,
|
|
771
|
+
tier: "low",
|
|
772
|
+
measurement: provisional("Boolean availability of window.localStorage. Near-universally true; moves only under specific privacy configurations. Contradiction-detection value only."),
|
|
773
|
+
denoise: { kind: "none" },
|
|
774
|
+
mode: "open",
|
|
775
|
+
plane: "platform",
|
|
776
|
+
group: "storage",
|
|
777
|
+
u: null,
|
|
778
|
+
supersedes: null,
|
|
779
|
+
description: "Whether window.localStorage is available.",
|
|
780
|
+
review: compliantReview()
|
|
781
|
+
},
|
|
782
|
+
{
|
|
783
|
+
id: "platform.indexedDB",
|
|
784
|
+
addedVersion: "v1",
|
|
785
|
+
removedVersion: null,
|
|
786
|
+
tier: "low",
|
|
787
|
+
measurement: provisional("Boolean availability of window.indexedDB (undefined on IE/Edge in private mode by design, per upstream source comment). Near-universally true elsewhere. Contradiction-detection value only."),
|
|
788
|
+
denoise: { kind: "none" },
|
|
789
|
+
mode: "open",
|
|
790
|
+
plane: "platform",
|
|
791
|
+
group: "storage",
|
|
792
|
+
u: null,
|
|
793
|
+
supersedes: null,
|
|
794
|
+
description: "Whether window.indexedDB is available.",
|
|
795
|
+
review: compliantReview()
|
|
796
|
+
},
|
|
797
|
+
{
|
|
798
|
+
id: "platform.navigatorPlatform",
|
|
799
|
+
addedVersion: "v1",
|
|
800
|
+
removedVersion: null,
|
|
801
|
+
tier: "low",
|
|
802
|
+
measurement: provisional("navigator.platform (with the iPad/iPhone WebKit correction upstream applies). Shared by every user of a given OS+browser-mode combination, so low uniqueness alone."),
|
|
803
|
+
denoise: { kind: "none" },
|
|
804
|
+
mode: "open",
|
|
805
|
+
plane: "platform",
|
|
806
|
+
group: "identity",
|
|
807
|
+
u: null,
|
|
808
|
+
supersedes: null,
|
|
809
|
+
description: "Reported navigator.platform, WebKit iPad/iPhone-corrected.",
|
|
810
|
+
review: compliantReview()
|
|
811
|
+
},
|
|
812
|
+
{
|
|
813
|
+
id: "platform.touchSupport",
|
|
814
|
+
addedVersion: "v1",
|
|
815
|
+
removedVersion: null,
|
|
816
|
+
tier: "medium",
|
|
817
|
+
measurement: provisional("maxTouchPoints + TouchEvent/ontouchstart feature detection. Stable per device and useful for separating phone/tablet from desktop form factors, but shared by every device of the same model."),
|
|
818
|
+
denoise: { kind: "none" },
|
|
819
|
+
mode: "open",
|
|
820
|
+
plane: "platform",
|
|
821
|
+
group: "hardware",
|
|
822
|
+
u: null,
|
|
823
|
+
supersedes: null,
|
|
824
|
+
description: "maxTouchPoints plus TouchEvent/ontouchstart availability.",
|
|
825
|
+
review: compliantReview()
|
|
826
|
+
},
|
|
827
|
+
{
|
|
828
|
+
id: "platform.vendor",
|
|
829
|
+
addedVersion: "v1",
|
|
830
|
+
removedVersion: null,
|
|
831
|
+
tier: "low",
|
|
832
|
+
measurement: provisional("navigator.vendor. A handful of possible values shared by huge populations (e.g. every Chromium user reads \"Google Inc.\"). Contradiction-detection value only."),
|
|
833
|
+
denoise: { kind: "none" },
|
|
834
|
+
mode: "open",
|
|
835
|
+
plane: "platform",
|
|
836
|
+
group: "identity",
|
|
837
|
+
u: null,
|
|
838
|
+
supersedes: null,
|
|
839
|
+
description: "Reported navigator.vendor.",
|
|
840
|
+
review: compliantReview()
|
|
841
|
+
},
|
|
842
|
+
{
|
|
843
|
+
id: "platform.vendorFlavors",
|
|
844
|
+
addedVersion: "v1",
|
|
845
|
+
removedVersion: null,
|
|
846
|
+
tier: "low",
|
|
847
|
+
measurement: provisional("Presence of browser-specific (not engine-specific) global variables (e.g. window.chrome, window.__firefox__). Distinguishes browser flavor within an engine family; still shared by every install of that browser."),
|
|
848
|
+
denoise: { kind: "none" },
|
|
849
|
+
mode: "open",
|
|
850
|
+
plane: "platform",
|
|
851
|
+
group: "identity",
|
|
852
|
+
u: null,
|
|
853
|
+
supersedes: null,
|
|
854
|
+
description: "Sorted list of detected browser-specific global variable names.",
|
|
855
|
+
review: compliantReview()
|
|
856
|
+
},
|
|
857
|
+
{
|
|
858
|
+
id: "platform.cookiesEnabled",
|
|
859
|
+
addedVersion: "v1",
|
|
860
|
+
removedVersion: null,
|
|
861
|
+
tier: "low",
|
|
862
|
+
measurement: provisional("Live cookie-write/read probe. Near-universally true; moves whenever the user or a privacy extension blocks cookies, a trivial, legitimate action. Contradiction-detection value only."),
|
|
863
|
+
denoise: { kind: "none" },
|
|
864
|
+
mode: "open",
|
|
865
|
+
plane: "platform",
|
|
866
|
+
group: "storage",
|
|
867
|
+
u: null,
|
|
868
|
+
supersedes: null,
|
|
869
|
+
description: "Whether a test cookie can be written and read back.",
|
|
870
|
+
review: compliantReview()
|
|
871
|
+
},
|
|
872
|
+
{
|
|
873
|
+
id: "platform.colorGamut",
|
|
874
|
+
addedVersion: "v1",
|
|
875
|
+
removedVersion: null,
|
|
876
|
+
tier: "medium",
|
|
877
|
+
measurement: provisional("CSS color-gamut media-feature probe (srgb/p3/rec2020). Reflects the physical display panel, stable until an external-monitor change."),
|
|
878
|
+
denoise: { kind: "none" },
|
|
879
|
+
mode: "open",
|
|
880
|
+
plane: "platform",
|
|
881
|
+
group: "display",
|
|
882
|
+
u: null,
|
|
883
|
+
supersedes: null,
|
|
884
|
+
description: "Widest supported color gamut per the CSS color-gamut media feature.",
|
|
885
|
+
review: compliantReview()
|
|
886
|
+
},
|
|
887
|
+
{
|
|
888
|
+
id: "platform.invertedColors",
|
|
889
|
+
addedVersion: "v1",
|
|
890
|
+
removedVersion: null,
|
|
891
|
+
tier: "low",
|
|
892
|
+
measurement: provisional("CSS inverted-colors media-feature probe: an OS-level accessibility preference, not a display capability. Consent-gated like platform.permissions, since it can correlate with a vision-related accessibility need, so it is collected for contradiction detection only and weighted near zero for identity."),
|
|
893
|
+
denoise: { kind: "none" },
|
|
894
|
+
mode: "consent",
|
|
895
|
+
plane: "platform",
|
|
896
|
+
group: "display",
|
|
897
|
+
u: null,
|
|
898
|
+
supersedes: null,
|
|
899
|
+
description: "Whether the OS-level \"invert colors\" accessibility preference is active.",
|
|
900
|
+
review: compliantReview()
|
|
901
|
+
},
|
|
902
|
+
{
|
|
903
|
+
id: "platform.forcedColors",
|
|
904
|
+
addedVersion: "v1",
|
|
905
|
+
removedVersion: null,
|
|
906
|
+
tier: "low",
|
|
907
|
+
measurement: provisional("CSS forced-colors media-feature probe: an OS-level accessibility preference (Windows High Contrast and similar). Consent-gated for the same reason as platform.invertedColors."),
|
|
908
|
+
denoise: { kind: "none" },
|
|
909
|
+
mode: "consent",
|
|
910
|
+
plane: "platform",
|
|
911
|
+
group: "display",
|
|
912
|
+
u: null,
|
|
913
|
+
supersedes: null,
|
|
914
|
+
description: "Whether an OS-level forced-colors accessibility mode is active.",
|
|
915
|
+
review: compliantReview()
|
|
916
|
+
},
|
|
917
|
+
{
|
|
918
|
+
id: "platform.monochrome",
|
|
919
|
+
addedVersion: "v1",
|
|
920
|
+
removedVersion: null,
|
|
921
|
+
tier: "low",
|
|
922
|
+
measurement: provisional("CSS monochrome media-feature probe (bits per pixel on a non-color/e-ink-style display, or 0). Reflects display hardware, not a user preference, unlike the accessibility-preference probes above."),
|
|
923
|
+
denoise: { kind: "none" },
|
|
924
|
+
mode: "open",
|
|
925
|
+
plane: "platform",
|
|
926
|
+
group: "display",
|
|
927
|
+
u: null,
|
|
928
|
+
supersedes: null,
|
|
929
|
+
description: "Monochrome display bit depth per the CSS monochrome media feature, or undefined if unsupported.",
|
|
930
|
+
review: compliantReview()
|
|
931
|
+
},
|
|
932
|
+
{
|
|
933
|
+
id: "platform.contrast",
|
|
934
|
+
addedVersion: "v1",
|
|
935
|
+
removedVersion: null,
|
|
936
|
+
tier: "low",
|
|
937
|
+
measurement: provisional("CSS prefers-contrast media-feature probe: an OS-level accessibility preference. Consent-gated for the same reason as platform.invertedColors/platform.forcedColors."),
|
|
938
|
+
denoise: { kind: "none" },
|
|
939
|
+
mode: "consent",
|
|
940
|
+
plane: "platform",
|
|
941
|
+
group: "display",
|
|
942
|
+
u: null,
|
|
943
|
+
supersedes: null,
|
|
944
|
+
description: "OS-level contrast preference per the CSS prefers-contrast media feature.",
|
|
945
|
+
review: compliantReview()
|
|
946
|
+
},
|
|
947
|
+
{
|
|
948
|
+
id: "platform.reducedMotion",
|
|
949
|
+
addedVersion: "v1",
|
|
950
|
+
removedVersion: null,
|
|
951
|
+
tier: "low",
|
|
952
|
+
measurement: provisional("CSS prefers-reduced-motion media-feature probe: an OS-level accessibility preference that can correlate with a vestibular-disorder accommodation. Consent-gated, contradiction-detection only."),
|
|
953
|
+
denoise: { kind: "none" },
|
|
954
|
+
mode: "consent",
|
|
955
|
+
plane: "platform",
|
|
956
|
+
group: "display",
|
|
957
|
+
u: null,
|
|
958
|
+
supersedes: null,
|
|
959
|
+
description: "Whether the OS-level \"reduce motion\" accessibility preference is active.",
|
|
960
|
+
review: compliantReview()
|
|
961
|
+
},
|
|
962
|
+
{
|
|
963
|
+
id: "platform.reducedTransparency",
|
|
964
|
+
addedVersion: "v1",
|
|
965
|
+
removedVersion: null,
|
|
966
|
+
tier: "low",
|
|
967
|
+
measurement: provisional("CSS prefers-reduced-transparency media-feature probe: an OS-level accessibility preference. Consent-gated for the same reason as platform.reducedMotion."),
|
|
968
|
+
denoise: { kind: "none" },
|
|
969
|
+
mode: "consent",
|
|
970
|
+
plane: "platform",
|
|
971
|
+
group: "display",
|
|
972
|
+
u: null,
|
|
973
|
+
supersedes: null,
|
|
974
|
+
description: "Whether the OS-level \"reduce transparency\" accessibility preference is active.",
|
|
975
|
+
review: compliantReview()
|
|
976
|
+
},
|
|
977
|
+
{
|
|
978
|
+
id: "platform.hdr",
|
|
979
|
+
addedVersion: "v1",
|
|
980
|
+
removedVersion: null,
|
|
981
|
+
tier: "medium",
|
|
982
|
+
measurement: provisional("CSS dynamic-range media-feature probe (high vs standard). Reflects display hardware capability, stable until an external-monitor change."),
|
|
983
|
+
denoise: { kind: "none" },
|
|
984
|
+
mode: "open",
|
|
985
|
+
plane: "platform",
|
|
986
|
+
group: "display",
|
|
987
|
+
u: null,
|
|
988
|
+
supersedes: null,
|
|
989
|
+
description: "Whether the display supports high dynamic range per the CSS dynamic-range media feature.",
|
|
990
|
+
review: compliantReview()
|
|
991
|
+
},
|
|
992
|
+
{
|
|
993
|
+
id: "platform.pdfViewerEnabled",
|
|
994
|
+
addedVersion: "v1",
|
|
995
|
+
removedVersion: null,
|
|
996
|
+
tier: "low",
|
|
997
|
+
measurement: provisional("navigator.pdfViewerEnabled, Chromium-only. Near-constant true across recent Chromium installs. Contradiction-detection value only."),
|
|
998
|
+
denoise: { kind: "none" },
|
|
999
|
+
mode: "open",
|
|
1000
|
+
plane: "platform",
|
|
1001
|
+
group: "capabilities",
|
|
1002
|
+
u: null,
|
|
1003
|
+
supersedes: null,
|
|
1004
|
+
description: "Reported navigator.pdfViewerEnabled.",
|
|
1005
|
+
review: compliantReview()
|
|
1006
|
+
},
|
|
1007
|
+
{
|
|
1008
|
+
id: "platform.architecture",
|
|
1009
|
+
addedVersion: "v1",
|
|
1010
|
+
removedVersion: null,
|
|
1011
|
+
tier: "high",
|
|
1012
|
+
measurement: provisional("Distinguishes x86/x86-64 from other CPU architectures via IEEE 754 NaN sign-bit behaviour on infinity subtraction. Depends on CPU architecture only, effectively device-constant like hardwareConcurrency/deviceMemory."),
|
|
1013
|
+
denoise: { kind: "none" },
|
|
1014
|
+
mode: "open",
|
|
1015
|
+
plane: "platform",
|
|
1016
|
+
group: "hardware",
|
|
1017
|
+
u: null,
|
|
1018
|
+
supersedes: null,
|
|
1019
|
+
description: "Single byte distinguishing CPU architecture via a floating-point NaN sign-bit probe.",
|
|
1020
|
+
review: compliantReview()
|
|
1021
|
+
},
|
|
1022
|
+
{
|
|
1023
|
+
id: "platform.applePay",
|
|
1024
|
+
addedVersion: "v1",
|
|
1025
|
+
removedVersion: null,
|
|
1026
|
+
tier: "low",
|
|
1027
|
+
measurement: provisional("ApplePaySession.canMakePayments() state, Safari-only. Depends on device wallet configuration, which can change independently of the fingerprint; mostly useful for Safari-family detection."),
|
|
1028
|
+
denoise: { kind: "none" },
|
|
1029
|
+
mode: "open",
|
|
1030
|
+
plane: "platform",
|
|
1031
|
+
group: "capabilities",
|
|
1032
|
+
u: null,
|
|
1033
|
+
supersedes: null,
|
|
1034
|
+
description: "Apple Pay availability/enabled state (Safari only).",
|
|
1035
|
+
review: compliantReview()
|
|
1036
|
+
},
|
|
1037
|
+
{
|
|
1038
|
+
id: "platform.privateClickMeasurement",
|
|
1039
|
+
addedVersion: "v1",
|
|
1040
|
+
removedVersion: null,
|
|
1041
|
+
tier: "low",
|
|
1042
|
+
measurement: provisional("Presence of Safari's Privacy-Preserving Ad Measurement attribution-source attribute. Safari-only, mostly stable across recent versions."),
|
|
1043
|
+
denoise: { kind: "none" },
|
|
1044
|
+
mode: "open",
|
|
1045
|
+
plane: "platform",
|
|
1046
|
+
group: "capabilities",
|
|
1047
|
+
u: null,
|
|
1048
|
+
supersedes: null,
|
|
1049
|
+
description: "Whether Safari's private click measurement attribution attribute is present.",
|
|
1050
|
+
review: compliantReview()
|
|
1051
|
+
},
|
|
1052
|
+
{
|
|
1053
|
+
id: "rendering.audioBaseLatency",
|
|
1054
|
+
addedVersion: "v1",
|
|
1055
|
+
removedVersion: null,
|
|
1056
|
+
tier: "medium",
|
|
1057
|
+
measurement: provisional("AudioContext.baseLatency, a scalar tied to the audio hardware/OS audio stack. Distinct collection mechanism from audio.digest (no oscillator rendering, no shared context), so this does not duplicate that signal."),
|
|
1058
|
+
denoise: { kind: "none" },
|
|
1059
|
+
mode: "open",
|
|
1060
|
+
plane: "rendering",
|
|
1061
|
+
group: "audio",
|
|
1062
|
+
u: null,
|
|
1063
|
+
supersedes: null,
|
|
1064
|
+
description: "Reported AudioContext.baseLatency, or a negative status code when unsupported/disabled.",
|
|
1065
|
+
review: compliantReview()
|
|
1066
|
+
},
|
|
1067
|
+
{
|
|
1068
|
+
id: "platform.dateTimeLocale",
|
|
1069
|
+
addedVersion: "v1",
|
|
1070
|
+
removedVersion: null,
|
|
1071
|
+
tier: "medium",
|
|
1072
|
+
measurement: provisional("Intl.DateTimeFormat().resolvedOptions().locale. Stable per device/user but trivially user-configurable, same rationale as platform.timezone/platform.languages."),
|
|
1073
|
+
denoise: { kind: "none" },
|
|
1074
|
+
mode: "open",
|
|
1075
|
+
plane: "platform",
|
|
1076
|
+
group: "locale",
|
|
1077
|
+
u: null,
|
|
1078
|
+
supersedes: null,
|
|
1079
|
+
description: "Intl-resolved locale string, or a negative status code when unsupported.",
|
|
1080
|
+
review: compliantReview()
|
|
1081
|
+
},
|
|
1082
|
+
{
|
|
1083
|
+
id: "transport.webrtcCodecs",
|
|
1084
|
+
addedVersion: "v1",
|
|
1085
|
+
removedVersion: null,
|
|
1086
|
+
tier: "medium",
|
|
1087
|
+
measurement: provisional("RTP header extensions and per-codec (rtpmap/fmtp/rtcp-fb) descriptors parsed from a locally-generated SDP offer. Determined by the WebRTC engine build and codec licensing bundled with a given browser version; stable within a browser version, moves on browser updates that add/remove codec or extension support (e.g. AV1/VP9 profile rollout). Collection never gathers a real ICE candidate: setLocalDescription is never called AND iceCandidatePoolSize is 0, so neither of the two ways gathering can start ever fires (see webrtc.ts)."),
|
|
1088
|
+
denoise: { kind: "none" },
|
|
1089
|
+
mode: "consent",
|
|
1090
|
+
plane: "transport",
|
|
1091
|
+
group: "webrtc",
|
|
1092
|
+
u: null,
|
|
1093
|
+
supersedes: null,
|
|
1094
|
+
description: "Counts and digests of RTP extensions (extmap) and per-codec descriptors (rtpmap/fmtp/rtcp-fb) for audio and video, parsed from a locally-generated SDP offer.",
|
|
1095
|
+
review: compliantReview()
|
|
1096
|
+
},
|
|
1097
|
+
{
|
|
1098
|
+
id: "platform.speechVoices",
|
|
1099
|
+
addedVersion: "v1",
|
|
1100
|
+
removedVersion: null,
|
|
1101
|
+
tier: "medium",
|
|
1102
|
+
measurement: provisional("speechSynthesis.getVoices() reduced to voiceURI/name/lang/localService/default per voice, sorted, then hashed. Tied to the OS/browser installed voice set: stable per device, moves when the OS installs a language pack or a browser update changes its bundled voice list. No modal() de-noising applies (voice enumeration is not farbled/randomized per call the way canvas/WebGL/audio reads are) — the observed timing nondeterminism is handled by the collector's voiceschanged/timeout race, not by resampling."),
|
|
1103
|
+
denoise: { kind: "none" },
|
|
1104
|
+
mode: "consent",
|
|
1105
|
+
plane: "platform",
|
|
1106
|
+
group: "capabilities",
|
|
1107
|
+
u: null,
|
|
1108
|
+
supersedes: null,
|
|
1109
|
+
description: "Voice count and a digest of the sorted, normalized speechSynthesis voice list.",
|
|
1110
|
+
review: compliantReview()
|
|
1111
|
+
},
|
|
1112
|
+
{
|
|
1113
|
+
id: "platform.mediaQuerySweep",
|
|
1114
|
+
addedVersion: "v1",
|
|
1115
|
+
removedVersion: "v2",
|
|
1116
|
+
tier: "medium",
|
|
1117
|
+
measurement: provisional("Systematic sweep of every legal value across 11 CSS media-query families (prefers-contrast, any-hover, any-pointer, pointer, hover, update, inverted-colors, prefers-reduced-motion, prefers-reduced-transparency, scripting, forced-colors). Mostly OS/input-hardware driven and stable per device, but a few families (hover/pointer/any-hover/any-pointer) can move on a trivial user action such as docking a touch device to a mouse, capping this at medium rather than high pending real measurement. Deliberately overlaps 5 already-registered vendored-FingerprintJS signals (platform.contrast, platform.invertedColors, platform.reducedMotion, platform.reducedTransparency, platform.forcedColors) as a cross-validation check, not a duplication bug — see media-queries.ts."),
|
|
1118
|
+
denoise: { kind: "none" },
|
|
1119
|
+
mode: "consent",
|
|
1120
|
+
plane: "platform",
|
|
1121
|
+
group: "display",
|
|
1122
|
+
u: null,
|
|
1123
|
+
supersedes: null,
|
|
1124
|
+
description: "Per-family matched value across 11 media-query families (family absent from the result when unsupported, never a false/placeholder value), plus a family count and a digest. Forked to platform.mediaQuerySweep.v2, which narrows this to 6 families: combining the 5 accessibility-preference families into this one derived feature trips the accessibility-preference-composite Sensitive Data Inference composition rule (see sensitive-attributes.ts) — a disability/health-accommodation inference risk, per P44. Collector-only; never wired into scoring, transport, or the identity graph at any point in this signal's v1 lifetime, so no stored device data exists to preserve compatibility with (Cursor Bugbot, PR #4639) — forked anyway, per this file's \"never edited, only forked\" discipline.",
|
|
1125
|
+
review: compliantReview()
|
|
1126
|
+
},
|
|
1127
|
+
{
|
|
1128
|
+
id: "platform.mediaQuerySweep.v2",
|
|
1129
|
+
addedVersion: "v2",
|
|
1130
|
+
removedVersion: null,
|
|
1131
|
+
tier: "medium",
|
|
1132
|
+
measurement: provisional("Systematic sweep of every legal value across 6 CSS media-query families (any-hover, any-pointer, pointer, hover, update, scripting) — none of which any existing collector reads. Mostly OS/input-hardware driven and stable per device, but a few families (hover/pointer/any-hover/any-pointer) can move on a trivial user action such as docking a touch device to a mouse, capping this at medium rather than high pending real measurement. Forked from platform.mediaQuerySweep (v1) to EXCLUDE the 5 media-query families already registered as their own accessibility-preference signals (platform.contrast, platform.invertedColors, platform.reducedMotion, platform.reducedTransparency, platform.forcedColors): combining 2+ of those into one derived feature trips the accessibility-preference-composite Sensitive Data Inference composition rule (see sensitive-attributes.ts) — a disability/health-accommodation inference risk, per P44. See media-queries.ts's module doc."),
|
|
1133
|
+
denoise: { kind: "none" },
|
|
1134
|
+
mode: "consent",
|
|
1135
|
+
plane: "platform",
|
|
1136
|
+
group: "display",
|
|
1137
|
+
u: null,
|
|
1138
|
+
supersedes: "platform.mediaQuerySweep",
|
|
1139
|
+
description: "Per-family matched value across 6 media-query families with no existing collector (family absent from the result when unsupported, never a false/placeholder value), plus a family count and a digest. Excludes the 5 families already covered by their own registered accessibility-preference signals — see measurement notes.",
|
|
1140
|
+
review: compliantReview()
|
|
1141
|
+
},
|
|
1142
|
+
{
|
|
1143
|
+
id: "platform.clientHints.architecture",
|
|
1144
|
+
addedVersion: "v1",
|
|
1145
|
+
removedVersion: null,
|
|
1146
|
+
tier: "low",
|
|
1147
|
+
measurement: provisional("UA-CH high-entropy `architecture` hint (e.g. 'arm', 'x86'). Requested independently of platform.userAgentData's copy of the same hint, specifically so it can feed User-Agent/Client-Hints contradiction detection rather than identity linkage."),
|
|
1148
|
+
denoise: { kind: "none" },
|
|
1149
|
+
mode: "never",
|
|
1150
|
+
plane: "platform",
|
|
1151
|
+
group: "clientHints",
|
|
1152
|
+
u: null,
|
|
1153
|
+
supersedes: null,
|
|
1154
|
+
description: "UA-CH high-entropy CPU architecture hint.",
|
|
1155
|
+
review: compliantReview()
|
|
1156
|
+
},
|
|
1157
|
+
{
|
|
1158
|
+
id: "platform.clientHints.bitness",
|
|
1159
|
+
addedVersion: "v1",
|
|
1160
|
+
removedVersion: null,
|
|
1161
|
+
tier: "low",
|
|
1162
|
+
measurement: provisional("UA-CH high-entropy `bitness` hint (e.g. '64'). Collected for contradiction detection only; see platform.clientHints.architecture."),
|
|
1163
|
+
denoise: { kind: "none" },
|
|
1164
|
+
mode: "never",
|
|
1165
|
+
plane: "platform",
|
|
1166
|
+
group: "clientHints",
|
|
1167
|
+
u: null,
|
|
1168
|
+
supersedes: null,
|
|
1169
|
+
description: "UA-CH high-entropy CPU bitness hint.",
|
|
1170
|
+
review: compliantReview()
|
|
1171
|
+
},
|
|
1172
|
+
{
|
|
1173
|
+
id: "platform.clientHints.model",
|
|
1174
|
+
addedVersion: "v1",
|
|
1175
|
+
removedVersion: null,
|
|
1176
|
+
tier: "low",
|
|
1177
|
+
measurement: provisional("UA-CH high-entropy `model` hint. Empty string on desktop; device model on mobile. Collected for contradiction detection only; see platform.clientHints.architecture."),
|
|
1178
|
+
denoise: { kind: "none" },
|
|
1179
|
+
mode: "never",
|
|
1180
|
+
plane: "platform",
|
|
1181
|
+
group: "clientHints",
|
|
1182
|
+
u: null,
|
|
1183
|
+
supersedes: null,
|
|
1184
|
+
description: "UA-CH high-entropy device model hint.",
|
|
1185
|
+
review: compliantReview()
|
|
1186
|
+
},
|
|
1187
|
+
{
|
|
1188
|
+
id: "platform.clientHints.platform",
|
|
1189
|
+
addedVersion: "v1",
|
|
1190
|
+
removedVersion: null,
|
|
1191
|
+
tier: "low",
|
|
1192
|
+
measurement: provisional("UA-CH low-entropy `platform` (e.g. 'Windows', 'macOS', 'Linux', 'Android', 'Chrome OS'), read synchronously off navigator.userAgentData rather than requested through getHighEntropyValues(). The half of this collector's output the platform contradiction check actually compares against the User-Agent string's platform."),
|
|
1193
|
+
denoise: { kind: "none" },
|
|
1194
|
+
mode: "never",
|
|
1195
|
+
plane: "platform",
|
|
1196
|
+
group: "clientHints",
|
|
1197
|
+
u: null,
|
|
1198
|
+
supersedes: null,
|
|
1199
|
+
description: "UA-CH low-entropy platform family string.",
|
|
1200
|
+
review: compliantReview()
|
|
1201
|
+
},
|
|
1202
|
+
{
|
|
1203
|
+
id: "platform.clientHints.platformVersion",
|
|
1204
|
+
addedVersion: "v1",
|
|
1205
|
+
removedVersion: null,
|
|
1206
|
+
tier: "low",
|
|
1207
|
+
measurement: provisional("UA-CH high-entropy `platformVersion` hint (OS version string). Collected for contradiction detection only; see platform.clientHints.architecture."),
|
|
1208
|
+
denoise: { kind: "none" },
|
|
1209
|
+
mode: "never",
|
|
1210
|
+
plane: "platform",
|
|
1211
|
+
group: "clientHints",
|
|
1212
|
+
u: null,
|
|
1213
|
+
supersedes: null,
|
|
1214
|
+
description: "UA-CH high-entropy OS version hint.",
|
|
1215
|
+
review: compliantReview()
|
|
1216
|
+
},
|
|
1217
|
+
{
|
|
1218
|
+
id: "platform.clientHints.uaFullVersion",
|
|
1219
|
+
addedVersion: "v1",
|
|
1220
|
+
removedVersion: null,
|
|
1221
|
+
tier: "low",
|
|
1222
|
+
measurement: provisional("UA-CH high-entropy `uaFullVersion` hint — deprecated upstream in favour of `fullVersionList`, but still requested here because a spoofing tool that patches the User-Agent string is more likely to miss this legacy field than the one it actually knows to fake."),
|
|
1223
|
+
denoise: { kind: "none" },
|
|
1224
|
+
mode: "never",
|
|
1225
|
+
plane: "platform",
|
|
1226
|
+
group: "clientHints",
|
|
1227
|
+
u: null,
|
|
1228
|
+
supersedes: null,
|
|
1229
|
+
description: "UA-CH high-entropy (deprecated) full browser version hint.",
|
|
1230
|
+
review: compliantReview()
|
|
1231
|
+
},
|
|
1232
|
+
{
|
|
1233
|
+
id: "platform.clientHints.fullVersionList",
|
|
1234
|
+
addedVersion: "v1",
|
|
1235
|
+
removedVersion: null,
|
|
1236
|
+
tier: "low",
|
|
1237
|
+
measurement: provisional("UA-CH high-entropy `fullVersionList` hint: brand/full-version pairs, GREASE entries filtered before this signal is ever populated (see the collector for the filter and why an unfiltered read would self-split on every request)."),
|
|
1238
|
+
denoise: { kind: "none" },
|
|
1239
|
+
mode: "never",
|
|
1240
|
+
plane: "platform",
|
|
1241
|
+
group: "clientHints",
|
|
1242
|
+
u: null,
|
|
1243
|
+
supersedes: null,
|
|
1244
|
+
description: "UA-CH high-entropy brand/full-version list, GREASE-filtered.",
|
|
1245
|
+
review: compliantReview()
|
|
1246
|
+
},
|
|
1247
|
+
{
|
|
1248
|
+
id: "platform.clientHints.wow64",
|
|
1249
|
+
addedVersion: "v1",
|
|
1250
|
+
removedVersion: null,
|
|
1251
|
+
tier: "low",
|
|
1252
|
+
measurement: provisional("UA-CH high-entropy `wow64` hint: whether a 32-bit browser is running under WOW64 on 64-bit Windows. Collected for contradiction detection only; see platform.clientHints.architecture."),
|
|
1253
|
+
denoise: { kind: "none" },
|
|
1254
|
+
mode: "never",
|
|
1255
|
+
plane: "platform",
|
|
1256
|
+
group: "clientHints",
|
|
1257
|
+
u: null,
|
|
1258
|
+
supersedes: null,
|
|
1259
|
+
description: "UA-CH high-entropy Windows WOW64 hint.",
|
|
1260
|
+
review: compliantReview()
|
|
1261
|
+
},
|
|
1262
|
+
{
|
|
1263
|
+
id: "platform.clientHints.mobile",
|
|
1264
|
+
addedVersion: "v1",
|
|
1265
|
+
removedVersion: null,
|
|
1266
|
+
tier: "low",
|
|
1267
|
+
measurement: provisional("UA-CH low-entropy `mobile` flag, read synchronously off navigator.userAgentData rather than requested through getHighEntropyValues(). Collected for contradiction detection only (e.g. against a desktop User-Agent string), not identity linkage."),
|
|
1268
|
+
denoise: { kind: "none" },
|
|
1269
|
+
mode: "never",
|
|
1270
|
+
plane: "platform",
|
|
1271
|
+
group: "clientHints",
|
|
1272
|
+
u: null,
|
|
1273
|
+
supersedes: null,
|
|
1274
|
+
description: "UA-CH low-entropy mobile-device flag.",
|
|
1275
|
+
review: compliantReview()
|
|
1276
|
+
},
|
|
1277
|
+
...interactionSignals()
|
|
1290
1278
|
];
|
|
1291
1279
|
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1280
|
+
//#endregion
|
|
1281
|
+
//#region src/signals/resolve.ts
|
|
1282
|
+
function versionIndex$1(version) {
|
|
1283
|
+
return REGISTRY_VERSIONS.indexOf(version);
|
|
1295
1284
|
}
|
|
1296
1285
|
function isActiveAt(signal, version) {
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1286
|
+
const at = versionIndex$1(version);
|
|
1287
|
+
const added = versionIndex$1(signal.addedVersion);
|
|
1288
|
+
const removed = signal.removedVersion === null ? Infinity : versionIndex$1(signal.removedVersion);
|
|
1289
|
+
return added <= at && at < removed;
|
|
1301
1290
|
}
|
|
1291
|
+
/**
|
|
1292
|
+
* The signal set active at a given registry version. This is what
|
|
1293
|
+
* recomputation of a stored fingerprint MUST call, keyed off the
|
|
1294
|
+
* `registryVersion` pinned on that fingerprint — never the live
|
|
1295
|
+
* `SIGNAL_REGISTRY` — or historical records silently stop matching once the
|
|
1296
|
+
* registry moves on.
|
|
1297
|
+
*
|
|
1298
|
+
* Throws on a version outside `REGISTRY_VERSIONS` rather than silently
|
|
1299
|
+
* resolving to an empty signal set. A stored `registry_version` reaching
|
|
1300
|
+
* here unrecognized (corrupted, truncated, never valid) is exactly the
|
|
1301
|
+
* "historical records silently stop matching" failure this module exists
|
|
1302
|
+
* to prevent — better to fail loud than to hand recomputation zero signals.
|
|
1303
|
+
*/
|
|
1302
1304
|
function resolveSignalsAt(registry, version = CURRENT_REGISTRY_VERSION) {
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
`Unrecognized registry version "${version}". Known versions: ${REGISTRY_VERSIONS.join(", ")}.`
|
|
1306
|
-
);
|
|
1307
|
-
}
|
|
1308
|
-
return registry.filter((signal) => isActiveAt(signal, version));
|
|
1305
|
+
if (!REGISTRY_VERSIONS.includes(version)) throw new Error(`Unrecognized registry version "${version}". Known versions: ${REGISTRY_VERSIONS.join(", ")}.`);
|
|
1306
|
+
return registry.filter((signal) => isActiveAt(signal, version));
|
|
1309
1307
|
}
|
|
1310
1308
|
function getSignal(registry, id, version = CURRENT_REGISTRY_VERSION) {
|
|
1311
|
-
|
|
1309
|
+
return resolveSignalsAt(registry, version).find((signal) => signal.id === id);
|
|
1312
1310
|
}
|
|
1311
|
+
/** Every signal that has ever shipped, live or removed — for docs and audits, not for resolving a fingerprint. */
|
|
1313
1312
|
function listShippedSignals(registry) {
|
|
1314
|
-
|
|
1313
|
+
return [...registry].sort((a, b) => a.id.localeCompare(b.id));
|
|
1315
1314
|
}
|
|
1315
|
+
/**
|
|
1316
|
+
* Buckets signals by plane then group, matching the shape a Merkle tree's
|
|
1317
|
+
* leaf grouping should mirror. This module doesn't build a tree — it just
|
|
1318
|
+
* makes the grouping a lookup rather than something re-derived by hand.
|
|
1319
|
+
*/
|
|
1316
1320
|
function groupSignals(signals) {
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1321
|
+
const grouped = {};
|
|
1322
|
+
for (const signal of signals) {
|
|
1323
|
+
const plane = grouped[signal.plane] ??= {};
|
|
1324
|
+
(plane[signal.group] ??= []).push(signal);
|
|
1325
|
+
}
|
|
1326
|
+
return grouped;
|
|
1323
1327
|
}
|
|
1324
1328
|
|
|
1325
|
-
|
|
1329
|
+
//#endregion
|
|
1330
|
+
//#region ../../node_modules/.pnpm/canonicalize@3.0.0/node_modules/canonicalize/lib/canonicalize.js
|
|
1326
1331
|
function canonicalize(object, seen = /* @__PURE__ */ new Set()) {
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
return canonicalize(value, seen);
|
|
1354
|
-
});
|
|
1355
|
-
result = `[${values.join(",")}]`;
|
|
1356
|
-
} else {
|
|
1357
|
-
const parts = [];
|
|
1358
|
-
for (const key of Object.keys(object).sort()) {
|
|
1359
|
-
if (object[key] === void 0 || typeof object[key] === "symbol") {
|
|
1360
|
-
continue;
|
|
1361
|
-
}
|
|
1362
|
-
parts.push(`${canonicalize(key)}:${canonicalize(object[key], seen)}`);
|
|
1363
|
-
}
|
|
1364
|
-
result = `{${parts.join(",")}}`;
|
|
1365
|
-
}
|
|
1366
|
-
seen.delete(object);
|
|
1367
|
-
return result;
|
|
1332
|
+
if (typeof object === "number" && isNaN(object)) throw new Error("NaN is not allowed");
|
|
1333
|
+
if (typeof object === "number" && !isFinite(object)) throw new Error("Infinity is not allowed");
|
|
1334
|
+
if (object === null || typeof object !== "object") return JSON.stringify(object);
|
|
1335
|
+
if (typeof object.toJSON === "function") {
|
|
1336
|
+
if (seen.has(object)) throw new Error("Circular reference detected");
|
|
1337
|
+
seen.add(object);
|
|
1338
|
+
const result = canonicalize(object.toJSON(), seen);
|
|
1339
|
+
seen.delete(object);
|
|
1340
|
+
return result;
|
|
1341
|
+
}
|
|
1342
|
+
if (seen.has(object)) throw new Error("Circular reference detected");
|
|
1343
|
+
seen.add(object);
|
|
1344
|
+
let result;
|
|
1345
|
+
if (Array.isArray(object)) result = `[${object.map((cv) => {
|
|
1346
|
+
return canonicalize(cv === void 0 || typeof cv === "symbol" ? null : cv, seen);
|
|
1347
|
+
}).join(",")}]`;
|
|
1348
|
+
else {
|
|
1349
|
+
const parts = [];
|
|
1350
|
+
for (const key of Object.keys(object).sort()) {
|
|
1351
|
+
if (object[key] === void 0 || typeof object[key] === "symbol") continue;
|
|
1352
|
+
parts.push(`${canonicalize(key)}:${canonicalize(object[key], seen)}`);
|
|
1353
|
+
}
|
|
1354
|
+
result = `{${parts.join(",")}}`;
|
|
1355
|
+
}
|
|
1356
|
+
seen.delete(object);
|
|
1357
|
+
return result;
|
|
1368
1358
|
}
|
|
1369
1359
|
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1360
|
+
//#endregion
|
|
1361
|
+
//#region src/signals/merkle.ts
|
|
1362
|
+
/**
|
|
1363
|
+
* Merkle-tree fingerprint calculator (P8).
|
|
1364
|
+
*
|
|
1365
|
+
* Replaces a flat, single-digest fingerprint with a tree: one leaf digest
|
|
1366
|
+
* per signal, rolled up into a digest per group, rolled up into a digest
|
|
1367
|
+
* per plane, rolled up into a root. Every level is independently exposed
|
|
1368
|
+
* on the returned `FingerprintTree`, so "what changed" is answerable by
|
|
1369
|
+
* diffing sub-digests instead of staring at two unrelated flat hashes — a
|
|
1370
|
+
* GPU driver update shifts `planes.rendering` and leaves `planes.platform`
|
|
1371
|
+
* untouched; a different physical machine shifts nearly everything.
|
|
1372
|
+
*
|
|
1373
|
+
* Ported from fingerprintjs-ios's `FingerprintTreeCalculator` (MIT):
|
|
1374
|
+
* leaf = SHA256(value), node = SHA256(concat of children's hex digests).
|
|
1375
|
+
* This module adds the present/absent/error leaf-encoding contract that
|
|
1376
|
+
* upstream doesn't need — a native iOS read doesn't get silently blocked
|
|
1377
|
+
* the way a privacy browser blocks a web API.
|
|
1378
|
+
*
|
|
1379
|
+
* Grouping: this module does NOT invent a new taxonomy. `plane`/`group`
|
|
1380
|
+
* come straight from the signal registry (#4257) — `FROZEN_FIELDS` in
|
|
1381
|
+
* `./types.ts` already locks them once a signal ships, so the grouping
|
|
1382
|
+
* used here IS the registry's grouping, not a parallel one re-derived by
|
|
1383
|
+
* hand. See the P8 PR description for the plane/group semantics ratified
|
|
1384
|
+
* in review.
|
|
1385
|
+
*
|
|
1386
|
+
* Scope: hashing and storage only (P8). Nothing here consumes a
|
|
1387
|
+
* sub-fingerprint for scoring or linkage — that's P21/P31.
|
|
1388
|
+
*/
|
|
1389
|
+
/**
|
|
1390
|
+
* Planes excluded from the identity root.
|
|
1391
|
+
*
|
|
1392
|
+
* Behavioural signals (interaction dynamics) change by design on every
|
|
1393
|
+
* session — folding them into the root would make the identity root drift
|
|
1394
|
+
* constantly rather than only on a genuine device change, defeating the
|
|
1395
|
+
* entire point of a stable device identifier. The behavioural subtree is
|
|
1396
|
+
* still computed and exposed on `planes.behavioural` for classification
|
|
1397
|
+
* use downstream; it just never feeds `root`.
|
|
1398
|
+
*/
|
|
1399
|
+
const EXCLUDED_FROM_ROOT = /* @__PURE__ */ new Set(["behavioural"]);
|
|
1400
|
+
const TAG_PRESENT = "v:";
|
|
1401
|
+
const TAG_ABSENT = "a:";
|
|
1402
|
+
const TAG_ERROR = "e:";
|
|
1375
1403
|
function digestHex(bytes) {
|
|
1376
|
-
|
|
1404
|
+
return (0, _noble_hashes_utils_js.bytesToHex)((0, _noble_hashes_sha2_js.sha256)(bytes));
|
|
1377
1405
|
}
|
|
1406
|
+
/**
|
|
1407
|
+
* Encodes one reading into the bytes that get hashed for its leaf. Every
|
|
1408
|
+
* branch is tag-prefixed with a byte sequence no other branch can ever
|
|
1409
|
+
* produce, so absent/error/present-with-any-value never collide.
|
|
1410
|
+
*/
|
|
1378
1411
|
function leafBytes(reading) {
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
if (reading.value === void 0) {
|
|
1386
|
-
throw new Error(
|
|
1387
|
-
'buildFingerprintTree: a "present" reading with value `undefined` is not a valid leaf \u2014 use { kind: "absent" } instead.'
|
|
1388
|
-
);
|
|
1389
|
-
}
|
|
1390
|
-
const json = canonicalize(reading.value);
|
|
1391
|
-
if (json === void 0) {
|
|
1392
|
-
throw new Error(
|
|
1393
|
-
"buildFingerprintTree: reading value is not JSON-serializable (function, symbol, etc)."
|
|
1394
|
-
);
|
|
1395
|
-
}
|
|
1396
|
-
return new TextEncoder().encode(`${TAG_PRESENT}${json}`);
|
|
1412
|
+
if (reading === void 0 || reading.kind === "absent") return new TextEncoder().encode(TAG_ABSENT);
|
|
1413
|
+
if (reading.kind === "error") return new TextEncoder().encode(`${TAG_ERROR}error`);
|
|
1414
|
+
if (reading.value === void 0) throw new Error("buildFingerprintTree: a \"present\" reading with value `undefined` is not a valid leaf — use { kind: \"absent\" } instead.");
|
|
1415
|
+
const json = canonicalize(reading.value);
|
|
1416
|
+
if (json === void 0) throw new Error("buildFingerprintTree: reading value is not JSON-serializable (function, symbol, etc).");
|
|
1417
|
+
return new TextEncoder().encode(`${TAG_PRESENT}${json}`);
|
|
1397
1418
|
}
|
|
1419
|
+
/**
|
|
1420
|
+
* Node digest = SHA256(concat of children's hex digests). Children MUST
|
|
1421
|
+
* already be in a caller-determined, key-sorted order — this function
|
|
1422
|
+
* does not re-sort, so ordering invariance is guaranteed by always
|
|
1423
|
+
* deriving the child list from the registry's sorted keys rather than
|
|
1424
|
+
* from a caller-supplied map's iteration order.
|
|
1425
|
+
*/
|
|
1398
1426
|
function nodeDigest(orderedChildDigests) {
|
|
1399
|
-
|
|
1427
|
+
return digestHex(new TextEncoder().encode(orderedChildDigests.join("")));
|
|
1400
1428
|
}
|
|
1429
|
+
/**
|
|
1430
|
+
* Builds the Merkle fingerprint tree for one collection: a leaf per live
|
|
1431
|
+
* signal (present/absent/error), rolled up by group, rolled up by plane,
|
|
1432
|
+
* rolled up into a root that excludes `behavioural`.
|
|
1433
|
+
*
|
|
1434
|
+
* `readings` is keyed by signal id (`SignalDefinition.id`). A signal id
|
|
1435
|
+
* with no key at all is treated identically to an explicit
|
|
1436
|
+
* `{ kind: 'absent' }` reading.
|
|
1437
|
+
*
|
|
1438
|
+
* Pure and deterministic: the same `(registry, readings, registryVersion)`
|
|
1439
|
+
* always produces the same tree, regardless of `readings`' key order or
|
|
1440
|
+
* `registry`'s element order — every level is rebuilt from the registry's
|
|
1441
|
+
* own sorted `id`/`group`/`plane` keys, never from a caller's map
|
|
1442
|
+
* iteration order. `registryVersion` MUST be the version pinned on the
|
|
1443
|
+
* stored fingerprint when recomputing a historical tree; resolving
|
|
1444
|
+
* against "current" would silently produce a different tree once the
|
|
1445
|
+
* registry moves on (see `resolveSignalsAt`).
|
|
1446
|
+
*/
|
|
1401
1447
|
function buildFingerprintTree(registry, readings, registryVersion = CURRENT_REGISTRY_VERSION) {
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1448
|
+
const grouped = groupSignals(resolveSignalsAt(registry, registryVersion));
|
|
1449
|
+
const planes = {};
|
|
1450
|
+
const rootInputs = [];
|
|
1451
|
+
for (const plane of Object.keys(grouped).sort()) {
|
|
1452
|
+
const groupsForPlane = grouped[plane];
|
|
1453
|
+
const groups = {};
|
|
1454
|
+
const groupDigests = [];
|
|
1455
|
+
for (const groupName of Object.keys(groupsForPlane).sort()) {
|
|
1456
|
+
const signalsInGroup = [...groupsForPlane[groupName]].sort((a, b) => a.id.localeCompare(b.id));
|
|
1457
|
+
const leaves = {};
|
|
1458
|
+
const leafDigests = [];
|
|
1459
|
+
for (const signal of signalsInGroup) {
|
|
1460
|
+
const digest = digestHex(leafBytes(readings[signal.id]));
|
|
1461
|
+
leaves[signal.id] = digest;
|
|
1462
|
+
leafDigests.push(digest);
|
|
1463
|
+
}
|
|
1464
|
+
const groupDigest = nodeDigest(leafDigests);
|
|
1465
|
+
groups[groupName] = {
|
|
1466
|
+
digest: groupDigest,
|
|
1467
|
+
leaves
|
|
1468
|
+
};
|
|
1469
|
+
groupDigests.push(groupDigest);
|
|
1470
|
+
}
|
|
1471
|
+
const planeDigest = nodeDigest(groupDigests);
|
|
1472
|
+
const includedInRoot = !EXCLUDED_FROM_ROOT.has(plane);
|
|
1473
|
+
planes[plane] = {
|
|
1474
|
+
digest: planeDigest,
|
|
1475
|
+
includedInRoot,
|
|
1476
|
+
groups
|
|
1477
|
+
};
|
|
1478
|
+
if (includedInRoot) rootInputs.push(planeDigest);
|
|
1479
|
+
}
|
|
1480
|
+
return {
|
|
1481
|
+
registryVersion,
|
|
1482
|
+
root: nodeDigest(rootInputs),
|
|
1483
|
+
planes
|
|
1484
|
+
};
|
|
1434
1485
|
}
|
|
1486
|
+
|
|
1487
|
+
//#endregion
|
|
1488
|
+
//#region src/signals/session-fingerprint-hash.ts
|
|
1489
|
+
/**
|
|
1490
|
+
* Session-level fingerprint hash (P33).
|
|
1491
|
+
*
|
|
1492
|
+
* `unified_agent_sessions.fingerprint_hash` has been declared since F-19
|
|
1493
|
+
* (migration 0124) — `visitor_id` is a STORED GENERATED column defined as
|
|
1494
|
+
* `COALESCE(user_account_id::text, 'unattributed:' || fingerprint_hash)` —
|
|
1495
|
+
* but nothing ever wrote it. Every anonymous visitor's `visitor_id`
|
|
1496
|
+
* therefore collapsed to the literal constant `'unattributed:'`, so a
|
|
1497
|
+
* COUNT(DISTINCT visitor_id) counted every anonymous visitor across an
|
|
1498
|
+
* entire org as ONE person. See
|
|
1499
|
+
* `docs/architecture/canonical-identity-model.md` (the `visitor_id`
|
|
1500
|
+
* correctness trap) for the full write-up.
|
|
1501
|
+
*
|
|
1502
|
+
* LIMITS (bestbrian, PR #4660): every input to this digest is
|
|
1503
|
+
* client-supplied via the pixel, so a hostile client can inflate or
|
|
1504
|
+
* collide anonymous visitor counts by varying or replaying its reported
|
|
1505
|
+
* attributes — this is inherent to any device-fingerprinting signal, not
|
|
1506
|
+
* specific to this implementation. It only affects the anonymous,
|
|
1507
|
+
* `'unattributed:'`-prefixed bucket: an authenticated `visitor_id` uses
|
|
1508
|
+
* `user_account_id` and never reaches this function, and the
|
|
1509
|
+
* `'unattributed:'` prefix keeps every fingerprinted visitor out of the
|
|
1510
|
+
* identity-merge graph. Treat anonymous visitor counts as estimate-grade
|
|
1511
|
+
* — strictly better than the prior all-collapse-to-one defect, not a
|
|
1512
|
+
* precise headcount.
|
|
1513
|
+
*
|
|
1514
|
+
* WHAT THIS COLUMN HOLDS (read this before changing the algorithm):
|
|
1515
|
+
*
|
|
1516
|
+
* This is a SHA-256 hex digest over the canonicalized (sorted-key, stable
|
|
1517
|
+
* JSON) map of `SignalsEnvelope.client.attributes` — the pixel-collected,
|
|
1518
|
+
* per-attribute entropy (device.platform, browser.language, screen
|
|
1519
|
+
* resolution, …) persisted verbatim on `detections.signals` by P6. It is
|
|
1520
|
+
* NOT the P8 Merkle-tree root (`buildFingerprintTree` in
|
|
1521
|
+
* `./merkle.ts`, `fingerprints.root`), even though P8 has landed: that
|
|
1522
|
+
* root is built from the formal signal REGISTRY (`./registry.ts`),
|
|
1523
|
+
* keyed by registered signal ids
|
|
1524
|
+
* (`canvas.geometry`, `platform.hardwareConcurrency`, …), and P8 itself
|
|
1525
|
+
* ships with zero callers that map a live collection onto those ids — that
|
|
1526
|
+
* mapping is explicitly out of scope for P8 (see its module doc: "nothing
|
|
1527
|
+
* here consumes a sub-fingerprint for scoring or linkage yet — P21/P31").
|
|
1528
|
+
* Inventing that mapping here, unreviewed, to force-fit `buildFingerprintTree`
|
|
1529
|
+
* would be worse than not using it: a registry-shaped root computed from a
|
|
1530
|
+
* fabricated id mapping is not actually comparable to a future REAL
|
|
1531
|
+
* registry-driven root, and callers would have no way to tell the
|
|
1532
|
+
* difference by looking at the column.
|
|
1533
|
+
*
|
|
1534
|
+
* What IS kept forward-compatible with P8, deliberately:
|
|
1535
|
+
* - Same primitive: SHA-256 hex, matching `merkle.ts`'s `digestHex`.
|
|
1536
|
+
* - Same exclusion principle: only IDENTITY-STABLE signals are hashed.
|
|
1537
|
+
* `SignalsEnvelope.behavioural` (mouse movements, scroll depth, time on
|
|
1538
|
+
* page) is a different axis from `client` and is never passed in here —
|
|
1539
|
+
* mirroring P8's own `EXCLUDED_FROM_ROOT` (`behavioural` is hashed for
|
|
1540
|
+
* classification but never rolled into the identity root), for the
|
|
1541
|
+
* same reason: behavioural signals churn every session by design, and
|
|
1542
|
+
* folding them in would make the "same device" hash drift on every
|
|
1543
|
+
* visit instead of only on a genuine device change.
|
|
1544
|
+
* - Same "no entropy → no hash" contract: `null` in, `null` out — this
|
|
1545
|
+
* function must NEVER fabricate a value for a session that carried no
|
|
1546
|
+
* signals. Downstream, `visitor_id` for such a session correctly stays
|
|
1547
|
+
* `'unattributed:'` (an honest bucket for genuinely-unknown visitors,
|
|
1548
|
+
* not a bug to paper over).
|
|
1549
|
+
*
|
|
1550
|
+
* When a real registry-attribute adapter exists (P21/P31), THIS function
|
|
1551
|
+
* should be retired in favor of `buildFingerprintTree(...).root`, and
|
|
1552
|
+
* `fingerprint_hash` should be repointed at it in one migration-free
|
|
1553
|
+
* application change (the column is `text`, so either shape fits) — do not
|
|
1554
|
+
* let the two representations coexist silently in the same column.
|
|
1555
|
+
*/
|
|
1556
|
+
/**
|
|
1557
|
+
* @param clientAttributes Signal-attribute-name -> collected string value —
|
|
1558
|
+
* e.g. `SignalsEnvelope.client.attributes` with each `ClientSignalAttribute`
|
|
1559
|
+
* unwrapped to its `.value` by the caller (kept decoupled from
|
|
1560
|
+
* `@kya-os/checkpoint-wasm-runtime`'s engine types on purpose: that
|
|
1561
|
+
* package depends on checkpoint-shared, not the other way around).
|
|
1562
|
+
* `null`/`undefined`/`{}` all mean "no client entropy collected."
|
|
1563
|
+
* @returns A 64-char lowercase hex SHA-256 digest, or `null` when there is
|
|
1564
|
+
* nothing to hash. Never throws — a session with no entropy is a normal,
|
|
1565
|
+
* expected input, not an error.
|
|
1566
|
+
*/
|
|
1435
1567
|
function computeSessionFingerprintHash(clientAttributes) {
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1568
|
+
const names = Object.keys(clientAttributes ?? {});
|
|
1569
|
+
if (names.length === 0) return null;
|
|
1570
|
+
const sorted = {};
|
|
1571
|
+
for (const name of names.sort()) sorted[name] = clientAttributes[name];
|
|
1572
|
+
const json = canonicalize(sorted);
|
|
1573
|
+
if (json === void 0) return null;
|
|
1574
|
+
return (0, _noble_hashes_utils_js.bytesToHex)((0, _noble_hashes_sha2_js.sha256)(new TextEncoder().encode(json)));
|
|
1443
1575
|
}
|
|
1444
1576
|
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1577
|
+
//#endregion
|
|
1578
|
+
//#region src/signals/validate.ts
|
|
1579
|
+
const VALID_TIERS = [
|
|
1580
|
+
"high",
|
|
1581
|
+
"medium",
|
|
1582
|
+
"low"
|
|
1583
|
+
];
|
|
1584
|
+
const VALID_MODES = [
|
|
1585
|
+
"open",
|
|
1586
|
+
"consent",
|
|
1587
|
+
"never"
|
|
1588
|
+
];
|
|
1589
|
+
function versionIndex(version) {
|
|
1590
|
+
return REGISTRY_VERSIONS.indexOf(version);
|
|
1450
1591
|
}
|
|
1592
|
+
/**
|
|
1593
|
+
* Runtime validation of the registry's invariants. This exists alongside
|
|
1594
|
+
* the TypeScript types (not instead of them) because the enforcement this
|
|
1595
|
+
* feature needs — "CI fails on an untiered signal" — has to hold even if a
|
|
1596
|
+
* signal is constructed dynamically or a type is bypassed with `as any`.
|
|
1597
|
+
*/
|
|
1451
1598
|
function validateRegistry(signals) {
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
}
|
|
1491
|
-
}
|
|
1492
|
-
const sensitiveCheck = checkSensitiveAttributeCompliance(signal);
|
|
1493
|
-
if (!sensitiveCheck.ok) {
|
|
1494
|
-
for (const violation of sensitiveCheck.violations) {
|
|
1495
|
-
errors.push(`Signal "${label}" ${violation.message}`);
|
|
1496
|
-
}
|
|
1497
|
-
}
|
|
1498
|
-
}
|
|
1499
|
-
for (const signal of signals) {
|
|
1500
|
-
if (signal.supersedes === null) continue;
|
|
1501
|
-
const target = byId.get(signal.supersedes);
|
|
1502
|
-
if (!target) {
|
|
1503
|
-
errors.push(
|
|
1504
|
-
`Signal "${signal.id}" supersedes "${signal.supersedes}", which does not exist in the registry.`
|
|
1505
|
-
);
|
|
1506
|
-
continue;
|
|
1507
|
-
}
|
|
1508
|
-
if (target.removedVersion === null || versionIndex2(target.removedVersion) > versionIndex2(signal.addedVersion)) {
|
|
1509
|
-
errors.push(
|
|
1510
|
-
`Signal "${signal.id}" forks "${signal.supersedes}" at "${signal.addedVersion}", but "${signal.supersedes}" has no matching removedVersion. Set removedVersion="${signal.addedVersion}" on "${signal.supersedes}" when forking.`
|
|
1511
|
-
);
|
|
1512
|
-
}
|
|
1513
|
-
}
|
|
1514
|
-
return { valid: errors.length === 0, errors };
|
|
1599
|
+
const errors = [];
|
|
1600
|
+
const byId = /* @__PURE__ */ new Map();
|
|
1601
|
+
const seenIds = /* @__PURE__ */ new Set();
|
|
1602
|
+
for (const signal of signals) {
|
|
1603
|
+
const label = signal?.id ?? "<unknown id>";
|
|
1604
|
+
if (seenIds.has(signal?.id)) errors.push(`Duplicate signal id "${signal.id}".`);
|
|
1605
|
+
else if (signal?.id) {
|
|
1606
|
+
seenIds.add(signal.id);
|
|
1607
|
+
byId.set(signal.id, signal);
|
|
1608
|
+
}
|
|
1609
|
+
if (!signal.tier) errors.push(`Signal "${label}" has no tier. Every signal must carry a stability tier.`);
|
|
1610
|
+
else if (!VALID_TIERS.includes(signal.tier)) errors.push(`Signal "${label}" has invalid tier "${signal.tier}".`);
|
|
1611
|
+
if (!signal.mode || !VALID_MODES.includes(signal.mode)) errors.push(`Signal "${label}" has invalid mode "${signal.mode}".`);
|
|
1612
|
+
if (!REGISTRY_VERSIONS.includes(signal.addedVersion)) errors.push(`Signal "${label}" has invalid addedVersion "${signal.addedVersion}".`);
|
|
1613
|
+
if (signal.removedVersion !== null) {
|
|
1614
|
+
if (!REGISTRY_VERSIONS.includes(signal.removedVersion)) errors.push(`Signal "${label}" has invalid removedVersion "${signal.removedVersion}".`);
|
|
1615
|
+
else if (versionIndex(signal.removedVersion) <= versionIndex(signal.addedVersion)) errors.push(`Signal "${label}" has removedVersion "${signal.removedVersion}" at or before its addedVersion "${signal.addedVersion}".`);
|
|
1616
|
+
}
|
|
1617
|
+
if (!signal.measurement) errors.push(`Signal "${label}" has no measurement record for its tier assignment.`);
|
|
1618
|
+
else if (!signal.measurement.provisional) {
|
|
1619
|
+
if (signal.measurement.agreementRate === null || signal.measurement.measuredAt === null) errors.push(`Signal "${label}" has a finalized (non-provisional) tier but no recorded measurement (agreementRate/measuredAt). A tier with no measurement behind it is a guess wearing a label.`);
|
|
1620
|
+
}
|
|
1621
|
+
const sensitiveCheck = checkSensitiveAttributeCompliance(signal);
|
|
1622
|
+
if (!sensitiveCheck.ok) for (const violation of sensitiveCheck.violations) errors.push(`Signal "${label}" ${violation.message}`);
|
|
1623
|
+
}
|
|
1624
|
+
for (const signal of signals) {
|
|
1625
|
+
if (signal.supersedes === null) continue;
|
|
1626
|
+
const target = byId.get(signal.supersedes);
|
|
1627
|
+
if (!target) {
|
|
1628
|
+
errors.push(`Signal "${signal.id}" supersedes "${signal.supersedes}", which does not exist in the registry.`);
|
|
1629
|
+
continue;
|
|
1630
|
+
}
|
|
1631
|
+
if (target.removedVersion === null || versionIndex(target.removedVersion) > versionIndex(signal.addedVersion)) errors.push(`Signal "${signal.id}" forks "${signal.supersedes}" at "${signal.addedVersion}", but "${signal.supersedes}" has no matching removedVersion. Set removedVersion="${signal.addedVersion}" on "${signal.supersedes}" when forking.`);
|
|
1632
|
+
}
|
|
1633
|
+
return {
|
|
1634
|
+
valid: errors.length === 0,
|
|
1635
|
+
errors
|
|
1636
|
+
};
|
|
1515
1637
|
}
|
|
1516
1638
|
|
|
1517
|
-
|
|
1639
|
+
//#endregion
|
|
1640
|
+
//#region src/signals/immutability.ts
|
|
1518
1641
|
function denoiseEqual(a, b) {
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1642
|
+
if (a.kind !== b.kind) return false;
|
|
1643
|
+
if (a.kind === "modal" && b.kind === "modal") return a.runs === b.runs;
|
|
1644
|
+
return true;
|
|
1522
1645
|
}
|
|
1646
|
+
/**
|
|
1647
|
+
* The frozen snapshot of a signal, as it should be recorded in the
|
|
1648
|
+
* committed snapshot file. `finalizedTier` stays null until the signal's
|
|
1649
|
+
* measurement is no longer provisional (see `TierMeasurement.provisional`),
|
|
1650
|
+
* and `removedVersion` stays null until the signal is forked. Each locks in
|
|
1651
|
+
* exactly once — see `checkSnapshotConsistency`.
|
|
1652
|
+
*/
|
|
1523
1653
|
function computeImmutableSnapshot(signal) {
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1654
|
+
return {
|
|
1655
|
+
id: signal.id,
|
|
1656
|
+
addedVersion: signal.addedVersion,
|
|
1657
|
+
removedVersion: signal.removedVersion,
|
|
1658
|
+
denoise: signal.denoise,
|
|
1659
|
+
mode: signal.mode,
|
|
1660
|
+
plane: signal.plane,
|
|
1661
|
+
group: signal.group,
|
|
1662
|
+
finalizedTier: signal.measurement.provisional ? null : signal.tier
|
|
1663
|
+
};
|
|
1534
1664
|
}
|
|
1535
|
-
|
|
1665
|
+
const FORK_INSTRUCTION = "Shipped signals are immutable — a signal is never edited, only forked. Create a new signal (e.g. \"<id>.v2\") with supersedes set to this id and removedVersion set on this entry, instead of editing it in place.";
|
|
1666
|
+
/**
|
|
1667
|
+
* Compares the committed snapshot (what has already shipped) against the
|
|
1668
|
+
* live registry. This is deliberately NOT "regenerate the snapshot from the
|
|
1669
|
+
* live registry and diff" — that self-referential check would pass even
|
|
1670
|
+
* when an existing entry was edited, because the regenerated file would
|
|
1671
|
+
* just agree with the edit. Instead every id already in `committed` is
|
|
1672
|
+
* pinned, and the live registry is checked against that pin.
|
|
1673
|
+
*/
|
|
1536
1674
|
function checkSnapshotConsistency(committed, live) {
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
}
|
|
1570
|
-
}
|
|
1571
|
-
return { ok: violations.length === 0, violations };
|
|
1675
|
+
const violations = [];
|
|
1676
|
+
const liveById = new Map(live.map((s) => [s.id, s]));
|
|
1677
|
+
const committedIds = new Set(committed.map((r) => r.id));
|
|
1678
|
+
for (const record of committed) {
|
|
1679
|
+
const current = liveById.get(record.id);
|
|
1680
|
+
if (!current) {
|
|
1681
|
+
violations.push({
|
|
1682
|
+
id: record.id,
|
|
1683
|
+
kind: "deleted",
|
|
1684
|
+
message: `Signal "${record.id}" was removed from the registry entirely. Mark it removed with removedVersion instead of deleting it — historical fingerprints still reference it.`
|
|
1685
|
+
});
|
|
1686
|
+
continue;
|
|
1687
|
+
}
|
|
1688
|
+
const currentSnapshot = computeImmutableSnapshot(current);
|
|
1689
|
+
const frozenMismatch = currentSnapshot.addedVersion !== record.addedVersion || !denoiseEqual(currentSnapshot.denoise, record.denoise) || currentSnapshot.mode !== record.mode || currentSnapshot.plane !== record.plane || currentSnapshot.group !== record.group;
|
|
1690
|
+
const tierMismatch = record.finalizedTier !== null && currentSnapshot.finalizedTier !== record.finalizedTier;
|
|
1691
|
+
const removedVersionMismatch = record.removedVersion !== null && currentSnapshot.removedVersion !== record.removedVersion;
|
|
1692
|
+
if (frozenMismatch || tierMismatch || removedVersionMismatch) violations.push({
|
|
1693
|
+
id: record.id,
|
|
1694
|
+
kind: "edited",
|
|
1695
|
+
message: `Signal "${record.id}" was edited in place. ${FORK_INSTRUCTION} Re-running the snapshot recorder will not fix this — it refuses to overwrite a divergent entry.`
|
|
1696
|
+
});
|
|
1697
|
+
}
|
|
1698
|
+
for (const current of live) if (!committedIds.has(current.id)) violations.push({
|
|
1699
|
+
id: current.id,
|
|
1700
|
+
kind: "unrecorded",
|
|
1701
|
+
message: `Signal "${current.id}" is new and not yet recorded. Run \`pnpm --filter @kya-os/checkpoint-shared run signals:snapshot -- --write\` and commit the result.`
|
|
1702
|
+
});
|
|
1703
|
+
return {
|
|
1704
|
+
ok: violations.length === 0,
|
|
1705
|
+
violations
|
|
1706
|
+
};
|
|
1572
1707
|
}
|
|
1708
|
+
/**
|
|
1709
|
+
* Snapshot writer: append-only for new signal ids, and refuses (throws)
|
|
1710
|
+
* rather than overwrite any existing record that disagrees with the live
|
|
1711
|
+
* registry — so running this locally after an in-place edit fails loudly
|
|
1712
|
+
* instead of quietly re-recording the edit as the new baseline.
|
|
1713
|
+
*
|
|
1714
|
+
* Existing records DO get rewritten, deliberately: `checkSnapshotConsistency`
|
|
1715
|
+
* having already passed (no violations) means the only way an existing
|
|
1716
|
+
* record can still differ from `computeImmutableSnapshot(current)` is one of
|
|
1717
|
+
* the two allowed one-way transitions (finalizing a provisional tier,
|
|
1718
|
+
* marking a signal removed) — so it's safe to persist the live value.
|
|
1719
|
+
* Recording only the truly-new ids and never updating existing ones was the
|
|
1720
|
+
* bug: a transition that `checkSnapshotConsistency` correctly allowed was
|
|
1721
|
+
* never actually written back, so the committed snapshot stayed at its
|
|
1722
|
+
* pre-transition value forever and the lock never engaged (Bugbot, PR #4257).
|
|
1723
|
+
*/
|
|
1573
1724
|
function recordSnapshot(committed, live) {
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
});
|
|
1585
|
-
const additions = live.filter((s) => !committedIds.has(s.id)).map((s) => computeImmutableSnapshot(s));
|
|
1586
|
-
return [...updated, ...additions];
|
|
1725
|
+
const editedOrDeleted = checkSnapshotConsistency(committed, live).violations.filter((v) => v.kind !== "unrecorded");
|
|
1726
|
+
if (editedOrDeleted.length > 0) throw new Error(editedOrDeleted.map((v) => v.message).join("\n"));
|
|
1727
|
+
const liveById = new Map(live.map((s) => [s.id, s]));
|
|
1728
|
+
const committedIds = new Set(committed.map((r) => r.id));
|
|
1729
|
+
const updated = committed.map((record) => {
|
|
1730
|
+
const current = liveById.get(record.id);
|
|
1731
|
+
return current ? computeImmutableSnapshot(current) : record;
|
|
1732
|
+
});
|
|
1733
|
+
const additions = live.filter((s) => !committedIds.has(s.id)).map((s) => computeImmutableSnapshot(s));
|
|
1734
|
+
return [...updated, ...additions];
|
|
1587
1735
|
}
|
|
1588
1736
|
|
|
1589
|
-
|
|
1590
|
-
|
|
1737
|
+
//#endregion
|
|
1738
|
+
//#region src/signals/docs.ts
|
|
1739
|
+
const GENERATED_HEADER = `<!-- GENERATED FILE — do not hand-edit. -->
|
|
1591
1740
|
<!-- Generated from \`packages/checkpoint-shared/src/signals/registry.ts\` by -->
|
|
1592
1741
|
<!-- \`pnpm --filter @kya-os/checkpoint-shared run signals:docs\`. -->
|
|
1593
|
-
<!-- CI rejects a stale copy of this file
|
|
1742
|
+
<!-- CI rejects a stale copy of this file — see .github/workflows/signal-registry-check.yml. -->
|
|
1594
1743
|
|
|
1595
1744
|
# Signal registry
|
|
1596
1745
|
|
|
@@ -1605,37 +1754,45 @@ historical fingerprints stay reproducible against the version they were
|
|
|
1605
1754
|
computed under.
|
|
1606
1755
|
`;
|
|
1607
1756
|
function formatDenoise(denoise) {
|
|
1608
|
-
|
|
1757
|
+
return denoise.kind === "modal" ? `modal(${denoise.runs})` : "none";
|
|
1609
1758
|
}
|
|
1610
1759
|
function formatVersion(version) {
|
|
1611
|
-
|
|
1760
|
+
return version ?? "—";
|
|
1612
1761
|
}
|
|
1613
1762
|
function formatTier(signal) {
|
|
1614
|
-
|
|
1763
|
+
return signal.measurement.provisional ? `${signal.tier} (provisional)` : signal.tier;
|
|
1615
1764
|
}
|
|
1616
1765
|
function formatRow(signal) {
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
return `| ${cells.join(" | ")} |`;
|
|
1766
|
+
return `| ${[
|
|
1767
|
+
`\`${signal.id}\``,
|
|
1768
|
+
`${signal.plane}/${signal.group}`,
|
|
1769
|
+
formatVersion(signal.addedVersion),
|
|
1770
|
+
formatVersion(signal.removedVersion),
|
|
1771
|
+
formatTier(signal),
|
|
1772
|
+
signal.mode,
|
|
1773
|
+
formatDenoise(signal.denoise),
|
|
1774
|
+
signal.supersedes ? `\`${signal.supersedes}\`` : "—",
|
|
1775
|
+
signal.u === null ? "—" : String(signal.u)
|
|
1776
|
+
].join(" | ")} |`;
|
|
1629
1777
|
}
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1778
|
+
const TABLE_HEADER = ["| id | plane/group | added | removed | tier | mode | denoise | supersedes | u |", "| --- | --- | --- | --- | --- | --- | --- | --- | --- |"].join("\n");
|
|
1779
|
+
/**
|
|
1780
|
+
* Pure markdown generator over the registry — the doc-generation half of
|
|
1781
|
+
* "generate the docs from the registry rather than maintaining them by
|
|
1782
|
+
* hand." Deterministic (stable sort, no timestamps) so regeneration
|
|
1783
|
+
* produces a clean diff only when the registry actually changed.
|
|
1784
|
+
*/
|
|
1634
1785
|
function generateRegistryMarkdown(registry) {
|
|
1635
|
-
|
|
1636
|
-
|
|
1786
|
+
const rows = listShippedSignals(registry).map(formatRow);
|
|
1787
|
+
return [
|
|
1788
|
+
GENERATED_HEADER,
|
|
1789
|
+
TABLE_HEADER,
|
|
1790
|
+
...rows,
|
|
1791
|
+
""
|
|
1792
|
+
].join("\n");
|
|
1637
1793
|
}
|
|
1638
1794
|
|
|
1795
|
+
//#endregion
|
|
1639
1796
|
exports.COMPOSITION_RISK_RULES = COMPOSITION_RISK_RULES;
|
|
1640
1797
|
exports.CURRENT_REGISTRY_VERSION = CURRENT_REGISTRY_VERSION;
|
|
1641
1798
|
exports.CURRENT_SENSITIVE_REJECTION_LIST_VERSION = CURRENT_SENSITIVE_REJECTION_LIST_VERSION;
|
|
@@ -1664,4 +1821,4 @@ exports.listShippedSignals = listShippedSignals;
|
|
|
1664
1821
|
exports.recordSnapshot = recordSnapshot;
|
|
1665
1822
|
exports.registerSignal = registerSignal;
|
|
1666
1823
|
exports.resolveSignalsAt = resolveSignalsAt;
|
|
1667
|
-
exports.validateRegistry = validateRegistry;
|
|
1824
|
+
exports.validateRegistry = validateRegistry;
|