Repository navigation
Remove per-visit token machinery - #15
Merged
Merged
Conversation
Owner decision 2026-10-08: no session token and no dormant code. The token was config-gated off for Kingston (the v3 collector contract forbids session identifiers and drops unknown keys); it is now unimplemented rather than disabled. Within-visit follow-through will be measured by browser-composed fixed funnel events under a future governed contract expansion instead. Removes the visitId environment hook, in-memory token generation and rotation, the visit_linkage schema flag, the static-visit validation guard, the Per-visit linkage docs section, and token expectations in unit and e2e tests. The e2e spec now asserts no visit field is ever emitted.
Completes the token excision: the schema flag and the Per-visit linkage documentation section go with the code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Removes all per-visit token (
visitId/newVisit/visit_linkage) machinery from the Kingston Food Help site, per owner decision (Jay, 2026-10-08): no dormant/dead code in the codebase; visit linkage will not be used. Measurement instead relies on the agreed signal ladder — QR scan ≈ person-from-poster (single shared QR), with page actions in ascending weight: more-info < directions < install.Changes (7 files)
src/analytics.ts— token generation, storage, and emission removedsrc/validation.ts— token-related validation removedschemas/site.schema.json—visit_linkageflag removed from schemadocs/analytics.md— token references removed; docs match the no-token designtests/unit/analytics.test.ts,tests/unit/kingston-analytics.test.ts,tests/e2e/analytics.spec.ts— token assertions removed/updatedVerification
tests/unit/analytics.test.ts,tests/unit/kingston-analytics.test.ts)npm run contracts— passnpx tsc --noEmit— cleanvisit_linkage,visitId,newVisitFull suite not run (scoped change per project test policy: small tweaks get targeted tests).
Notes