Skip to content

Add post-reveal explanation framing condition#20

Open
Spbd1 wants to merge 1 commit into
codex/add-memory-of-initial-judgment-measurefrom
codex/add-randomized-explanation-framing-condition
Open

Add post-reveal explanation framing condition#20
Spbd1 wants to merge 1 commit into
codex/add-memory-of-initial-judgment-measurefrom
codex/add-randomized-explanation-framing-condition

Conversation

@Spbd1

@Spbd1 Spbd1 commented May 11, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Introduce a randomized framing manipulation for the post-reveal open-text explanation so participants are assigned to either explain-to-self or explain-to-other and wording can be adjusted without changing the study’s neutrality.

Description

  • Add explanationFrameCondition?: { condition: "explain-to-self" | "explain-to-other"; assignedAt: string } to the ResearchSession model and an ExplanationFrameConditionName type in types/research.ts and include it in exports.
  • Persist and normalize the field via utils/session.ts and expose assignExplanationFrameCondition(session) which assigns the condition once (no re-randomization) when the post-reveal survey starts.
  • Update PostRevealSurveyForm to call assignExplanationFrameCondition at survey start and to show condition-specific, neutral wording for the open-text question while preserving the existing 10–500 character validation.
  • Include the frame in computed outputs and exports by adding explanationFrame to computed metrics, adding explanationFrameCondition to the Zod researchExportSchema and CSV flattening (explanation_frame_condition), bumping the research schema version to hidden-cost-game-research-schema-4, and updating the sample export.

Testing

  • Ran npm run typecheck and it completed successfully.
  • Ran npm run lint; linting passed but reports an existing react-hooks/exhaustive-deps warning in ParticipantBackgroundForm.tsx (unchanged by this PR).
  • Ran npm run build and the production build completed successfully.
  • Ran npm run validate:sample to validate the sample export against the updated schema and it succeeded.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant