Skip to content

Remove per-visit token machinery - #15

Merged
truegoodcraft merged 2 commits into
mainfrom
kimi/remove-visit-token
Oct 8, 2026
Merged

truegoodcraft merged 2 commits into
mainfrom
kimi/remove-visit-token

Conversation

@truegoodcraft

Copy link
Copy Markdown
Member

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 removed
  • src/validation.ts — token-related validation removed
  • schemas/site.schema.json — visit_linkage flag removed from schema
  • docs/analytics.md — token references removed; docs match the no-token design
  • tests/unit/analytics.test.ts, tests/unit/kingston-analytics.test.ts, tests/e2e/analytics.spec.ts — token assertions removed/updated

Verification

  • Targeted unit tests: 15/15 pass (tests/unit/analytics.test.ts, tests/unit/kingston-analytics.test.ts)
  • npm run contracts — pass
  • npx tsc --noEmit — clean
  • Repo-wide sweep: zero remaining references to visit_linkage, visitId, newVisit
  • Remote branch schema re-fetched from GitHub and confirmed clean

Full suite not run (scoped change per project test policy: small tweaks get targeted tests).

Notes

  • Branch only — merging is a production decision for Jay.
  • Companion work: Agent_Smith PR "Humanize /kfh report presentation (0.32.0)".

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.
@truegoodcraft
truegoodcraft merged commit 01f1adf into main Oct 8, 2026
4 checks passed
@truegoodcraft
truegoodcraft deleted the kimi/remove-visit-token branch October 8, 2026 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant