Skip to content

Prevent replay from overwriting participant metadata - #1474

Open
JackWilb wants to merge 1 commit into
devfrom
codex/1473-replay-metadata
Open

JackWilb wants to merge 1 commit into
devfrom
codex/1473-replay-metadata

Conversation

@JackWilb

@JackWilb JackWilb commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Why

Opening a participant replay currently runs the normal IP-enrichment path. When the viewer's IP differs from the participant's, that path replaces the participant's browser, screen, language, and IP metadata with the viewer's values.

Fixes #1473.

Architecture

This is a narrow startup guard rather than a storage redesign. Shell already identifies replay and analysis by the presence of the standard participantId query parameter. The metadata-enrichment block now skips IP collection and persistence in that mode while preserving the existing path for normal participant sessions.

The regression test exercises both sides of that boundary: normal startup still requests the IP, while replay reaches the subsequent completion-status check without requesting the viewer's IP or calling updateParticipantMetadata.

User-facing impact

Viewing or replaying a participant session no longer replaces that participant's metadata with the viewer's environment. Normal study participation is unchanged.

Validation

  • corepack yarn unittest src/components/tests/Shell.spec.tsx --run — 17 tests passed
  • corepack yarn unittest --run — 164 files passed; 2,577 tests passed and 1 skipped
  • corepack yarn typecheck — passed
  • corepack yarn lint — passed with 2 pre-existing warnings outside this diff
  • corepack yarn build — passed with existing non-blocking bundle warnings
  • Exact-head adversarial review — no code findings
  • GitHub checks for cc1096c2 — running at the time of this update

Risk and rollout

No migration or configuration change is required. The main risk is accidentally suppressing metadata enrichment for normal participants; the existing-path assertion covers that boundary. Previously overwritten metadata is not restored by this change.

@github-actions

github-actions Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

A preview of cc1096c is uploaded and can be seen here:

https://revisit.dev/study/PR1474

Changes may take a few minutes to propagate.

@JackWilb
JackWilb changed the base branch from main to dev September 17, 2026 15:03
@JackWilb
JackWilb force-pushed the codex/1473-replay-metadata branch from 7acbfa8 to e16fee9 Compare September 17, 2026 15:07
@JackWilb
JackWilb force-pushed the codex/1473-replay-metadata branch from e16fee9 to cc1096c Compare September 17, 2026 15:09
@JackWilb
JackWilb marked this pull request as ready for review September 17, 2026 18:23
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 17, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-17T18:27:31.685286Z cc1096c Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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.

Study meta data gets overwritten

1 participant