-
Notifications
You must be signed in to change notification settings - Fork 20
Leader rejection #876
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
clebouleau
wants to merge
35
commits into
PAIR-code:main
Choose a base branch
from
clebouleau:leader-rejection
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Leader rejection #876
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
This PR introduces a new experimental template designed for a Leadership Rejection experiment. The goal of the experiment is to investigate how repeated experiences of rejection from leadership roles affect future leadership ambitions, and whether these dynamics differ by gender.
To implement this, I created a fully new template inspired by the existing Lost-at-Sea template: frontend/src/shared/templates/leader_rejection_template.ts
Key Features Added:
A new selection system to get leaders (compared to Condorcet elections):
To avoid rewriting the entire reveal/payout logic, I reused ranking stages but introduced a new ranking type that:
Custom reveal page for leadership status
A new reveal component shows each participant: their status (accepted, rejected, hypothetical).
New frontend file: frontend/src/components/stages/leader_status_reveal_view.ts
New survival task (Desert Scenario)
Added a new set of items, images, and expert solutions for a desert-survival task. Assets added under:
frontend/assets/survival_desert/
Main Files Added / Modified
Backend
functions/src/stages/leadership_rejection.utils.ts — full leader-selection logic & utilities.
utils/src/stages/ranking_stage.ts — new RankingType.LR
utils/src/stages/ranking_stage.validation.ts — validation schema for LR ranking.
utils/src/stages/reveal_stage.ts — support for LR reveal items.
utils/src/stages/reveal_stage.validation.ts — validation schema updates.
utils/src/utils/algebraic.utils.ts — extended helpers for leader-selection logic.
Frontend
frontend/src/shared/templates/leader_rejection_template.ts — new experiment template.
frontend/src/components/experiment_builder/stage_builder_dialog.ts — import LR metadata + card rendering.
frontend/src/components/stages/ranking_editor.ts — new ranking type added to editor UI.
frontend/src/components/stages/ranking_participant_view.ts — new info-only LR ranking view.
frontend/src/components/stages/reveal_summary_view.ts — LR reveal routing.
frontend/src/components/stages/leader_status_reveal_view.ts — new reveal page.
frontend/src/shared/file.utils.ts — export of leader selection outcome + status.
frontend/src/components/stages/payout_summary_view.ts temporarily replaced “Election winner’s answer” with “Leader’s answer” to avoid confusion.
Assets
frontend/assets/survival_desert/ — images + expert solution PDF.
Verifications:
Verified locally in emulator
All stages progress correctly