[E17-S01-T01] Created lazily only when preference is set #318

Open
opened 2026-08-27 08:05:45 +00:00 by kpcto · 0 comments
Owner

Parent story: [E17-S01] Anonymous preference identity (#123)

Intent

Create the anonymous preference identity lazily, only when a visitor actually sets a preference, so ordinary page views create no tracking record.

Acceptance criteria

  • No identity is created for a page view with no preference write.
  • The identity is created on the first preference write.
  • Subsequent writes reuse the existing identity.

Explicitly out of scope

  • Token generation, hashing, expiration, cookie contents and corrupt-token handling (sibling tasks T02-T06).

Test plan

  • Assert a read-only visit creates no identity row.
  • Assert the first set() creates exactly one identity row.

Rollback note

  • Additive lazy-creation path; revert the commit. No migration.

Owning stream

platform

Risk quadrant

agent-full

> Parent story: [E17-S01] Anonymous preference identity (#123) ## Intent Create the anonymous preference identity lazily, only when a visitor actually sets a preference, so ordinary page views create no tracking record. ## Acceptance criteria - No identity is created for a page view with no preference write. - The identity is created on the first preference write. - Subsequent writes reuse the existing identity. ## Explicitly out of scope - Token generation, hashing, expiration, cookie contents and corrupt-token handling (sibling tasks T02-T06). ## Test plan - Assert a read-only visit creates no identity row. - Assert the first set() creates exactly one identity row. ## Rollback note - Additive lazy-creation path; revert the commit. No migration. ### Owning stream platform ### Risk quadrant agent-full
kpcto added this to the Sprint 5 milestone 2026-08-27 08:05:46 +00:00
kpcto added the
kind
task
status
proposed
labels 2026-08-27 08:05:46 +00:00
Sign in to join this conversation.