Skip to content

tech-debt(unic-pr-review): regression fixture for dedupe-ordering catch (PR #5612) #218

@orioltf

Description

@orioltf

What to build

Capture the adjudicated dedupe-ordering catch from PR #5612 as a regression / eval fixture, so unic-pr-review's quality on it does not regress as the plugin changes.

Background (adjudicated against the real source): unic correctly flagged (Minor) that an unconditional dedupe-ref reset before an early-return guard can re-fire a duplicate page_view. In AnalyticsTracker.tsx, lastFiredPathRef.current = null runs before the cancelled guard; on an SSP-redirect-back-to-same-page (logo click while already on the landing page) the dedupe key is wiped and the destination's routeChangeComplete re-fires a duplicate page_view. pr-review v1.4.0 missed this entirely (false negative). This is a quality win worth locking in.

Acceptance criteria

  • A fixture encodes the pattern: an unconditional ref/state reset placed before an early-return guard, where a later same-key event re-fires.
  • An eval/test asserts the review surfaces the duplicate-emission ordering finding at roughly Minor severity.
  • The fixture is documented as a parity / quality-regression guard, referencing the PR #5612 comparison.

Blocked by

None - can start immediately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    app:unic-pr-reviewArea: apps/claude-code/unic-pr-reviewready-for-agentFully specified, ready for an AFK agenttech-debtInternal restructuring; no behaviour change

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions