Removes all 353 em dashes across the task, the quiz prefixes becoming
"Correct:" and "Not quite:". Also untracks the study documents a git add -A
swept into main, and adds the script that built this commit.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Deploy: counterbalance the side within a block, fix the feedback capital
Each block now puts the pair's first letter on the left for exactly half its
trials and its second for the other half, shuffled, matching the 20-trial
PsychoPy scheme. Applies to the dyad arm and the SONA arm. The quiz feedback
sentence is recapitalised after its prefix is stripped.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Deploy: record the trial landmarks, the quiz feedback and the clicks
stim_onset/outcome_onset plus the two interval columns, from stamps nicewebrl
was already writing; the quiz feedback text; partner_relation; and the screen
recorder fix that was losing every click count and the timing file's rt.
Also deals the partner code and avatar from the pool instead of per session.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Deploy: stop a parent and child meeting the same stranger
partner_id_for and partner_avatar_for now seed off rando, so a parent playing
under their first child's pid no longer gets that child's partner. The match
reveal records the partner it showed and export_csv prefers it, keeping the
three sessions already collected readable. Also carries the per-child bearid
fix to the BEAR sheet tooling.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Deploy: BEAR dyad mode, the design pool, screen timing, and the ID-code removal
Brings the Space up to main. What changes for a running session:
- ?rando=<n> picks the design from the predetermined pool (randos.py), so a
dyad can share one pid and still get two different tasks.
- dyad_mode sessions write to bear/<pid>/ and bear_randomization_log.csv,
leaving data/ and randomization_log.csv to the SONA sample.
- every screen is timed into a per-participant CSV with PsychoPy's column
names, including the quiz answer and whether it was right.
- savequeue_fix.py no longer carries two real participant ID codes, which
this repository has been serving publicly.
The two .docx files on main are left out; HF rejects loose binaries.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The session working in this repository ended before any of it landed, so the
record goes here: what was committed off the working tree, the push fix that
was losing every session's final write, the wording and framing fixes, and
the two facts about this checkout and its Space remote that are not obvious
from looking at either.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Request fullscreen on the first real click, not silently on load
A requestFullscreen() call made on page load has no user gesture behind
it (the click that navigated here happened on a different document),
so it was a rejected promise every time, silently swallowed by the
except clause. Queues the request instead and fires it from the
welcome page's Next button handler -- a real gesture, which browsers
honor. Mirrors task_pe-cu-nicewebrl's identical fix, found after they
asked their user whether the second leg was actually windowed.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Skip the fullscreen/device-check screen on a genuine handoff arrival
desktop_gate() ran unconditionally at the top of run_intro(), so even
after fixing the pid-screen gate, a second-task participant still hit
a click-through "make sure you're on a computer" screen before the
title screen. Skipped entirely on a verified handoff, attempting
fullscreen silently instead. Also checked three other defect shapes
task_pe-cu-nicewebrl found on their own side (canvas-drawn-late, id
capitalization, markdown-in-flex-row, nested bold) -- none exist here.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Restructure belief/liking into one per-partner check, plus 3 smaller fixes
Belief and liking now run once, covering every partner across both
tasks (not just this task's own), before TriPM/demographics, on
whichever task finishes second. Adds a kind field to the handoff's
partner-row format so the belief question's wording (receive vs. lose)
matches each partner's actual mechanic; backward compatible with the
3-field format.
Also: fixed a real bug where the experimenter ID-entry screen was
showing on every non-dyad session (role was never set outside dyad
mode, but was required to skip it); added partner numbering to the
match-reveal screen; quiz feedback now states the correct answer
outright instead of only explaining it.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Send a bare partner id instead of a sentence in the handoff row
task_pe-cu-nicewebrl caught this: "your partner (#12345)" survives
_ROW_ID_OK's filtering as "your partner 12345", then their screen wraps
its own label around that, doubling up. Send str(partner) bare instead,
matching their own id format, and add the wording on the receiving side
for either direction's bare id.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Name each partner on the final screen instead of a combined total
A total can't say what any one partner walked away with, which is what
the participant actually decided. Ports task_pe-cu-nicewebrl's
encode_partner_rows/partner_list_signature/verify_partner_rows into
order_link.py (verified byte-identical against their actual file) and
carries them as pparts1=/ppsig= alongside the existing pbonus1=/plost1=
total, not instead of it. The final screen now lists one line per
partner, in the order met, falling back to the combined-total sentence
if no itemised list arrives.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The retry loop had no exit besides answering correctly, and its attempt
counter was global across every wrong item rather than per item. A
participant who could not pass a given item for any reason had no way
through it. Matches task_pe-cu-nicewebrl's day-quiz cap; a still-wrong
item at the cap is let through flagged forced=True.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Apply the user's pilot review list: ordering, headings, and partner totals
Drops the "a couple more things" interstitial, swaps TriPM/demographics
order, shuffles the future-outlook items, moves the belief/suspicion
check to the very end (after TriPM/demographics, not before), reworks
post-task page headings into TriPM's instruction-line register, carries
a signed partner-bonus total across the handoff so whichever task runs
second can report every partner across both tasks, runs the front matter
on a genuine handoff even under ?dev=1, and discloses a new character/
partner when this task runs second. Mirrors several equivalent fixes
already made and shared by task_pe-cu-nicewebrl.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Shuffle the TriPM per participant and stop forcing all 58 answers
Mirrors two fixes already made on task_pe-cu-nicewebrl: the TriPM was
shown in fixed file order, unevenly weighting attention cost across its
three scales, and the submit handler blocked Continue entirely while any
item was blank, contradicting consent's "you can skip any question" line.
Also ports back a dialog-persistence fix to _confirm_skip, which their
side found in their copy of a helper that originated here.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Fix three consent-text errors found on task_pe-cu-nicewebrl's served form
Venmo was never set up but the form offered it as a payment option; the
task-order sentence was hardcoded and wrong for half the sample depending
on which task resolves first; the payment-ask wording omitted the
reference code that actually identifies which session to pay. Mirrors the
same three fixes already made and approved on the sibling task.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Add a dev one-house override and carry dev/trials across the handoff
?houses=N shortens a dev run to the first N houses, matching the existing
?trials=N (per-house). The cross-task handoff was also missing the
dev=/trials= passthrough task_pe-cu-nicewebrl already had, so a shortened
session here handed over to a full-length one there; mirrored their fix.
The entry-order redirect now skips itself under ?dev=1 for the same reason
their equivalent redirect does.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Trust a verified handoff for general-measures deferral too, not just sona_url
task_pe-cu-nicewebrl found and fixed a gap in their own consent-skip logic:
it depended on sona_url reaching the second task's session, which does not
happen when the first task supplies its own sona_url from a Space secret
and does not carry it into the handoff. Checked whether this task's handoff
has the same gap: it does not. other_task_url() carries sona= whenever
app.storage.user["sona_url"] is already resolved, and that resolution
(including the SONA_RETURN_URL fallback) runs before finish_experiment()
can build the handoff, confirmed by reading the code and by calling
other_task_url() directly.
This task's consent gate also does not share their failure shape (it
defaults to not showing consent unless the combined study is confirmed
active, the opposite default from theirs).
The general-measures (demographics/TriPM) deferral does share the same
dependency on _in_combined_study(), so it's hardened the same way: trusts
a directly verified handoff (task_order_source == "handoff" a…
Fix: trust a verified cross-task handoff even when task_first was cached
Real bug, found via an actual live two-task playthrough (the first one run
since the reference-code redesign): a participant whose first task is "pe"
touches THIS task's session twice -- once on arrival (resolves and caches
task_first="pe", redirects away before experiment_started) and once on
return, via the OTHER task's genuine signed handoff, in the same browser
session. The old "resolve once" guard ("task_first" not in app.storage.user)
saw it already cached from the first visit and skipped verifying the
handoff entirely on the second, leaving task_order_source stuck at its
stale pre-redirect value -- which then re-triggered the entry-redirect
check, bouncing the participant straight back to the other task instead of
ever letting them play this one.
Fix: a genuinely verified handoff is now checked and trusted on every
request that carries one, not gated behind "nothing cached yet" -- a
cryptographically verified handoff is always more authoritative than an
earlier self-resolved gu…
order_link.signed_reference_code()/verify_reference_code(): the participant's
final-screen code is now "<pseudonym>-<cents>-<sig>", HMAC-signing the
pseudonym and the combined bonus total together (SONA_PID_HASH_KEY). An RA
reads the dollar amount straight off a reported code with no lookup, and a
participant editing the digits before reporting it back breaks the
signature. Falls back to the bare pseudonym if the key is unset. 6 new
tests (21 total).
Also fixes a wrong assumption surfaced while building this: the combined
screen does NOT always land on this task -- the entry-redirect logic means
whichever task finishes second shows it, which alternates with task_first.
That only held for the old write-based design (item 44, withdrawn), where
only this task had GitLab write credentials. task_pe-cu-nicewebrl needs the
matching screen for when they end up second.
content/consent.md: "we will ask for your name and an email address at the
end of the study" -> "the research team will conta…
Show reference code on final screen for the SONA bulk-email payment workflow
Resolves item 45's two open payment-design questions, after the user
confirmed directly in SONA admin that Contact Participants is bulk/templated
(not 1:1), settling on: an RA periodically emails everyone granted credit
asking them to reply with name + payment method, matched back to their saved
bonus data via a reference code shown on this final screen.
The code is the participant's existing research pseudonym (app.storage.user
["pid"]) -- already the literal GitLab data-folder name, so no new scheme,
secret, or stored mapping is needed for an RA to look up the real amount
(money_self/money_partner, already saved, never taken on the participant's
word). gitlab_save.submit_payment()/questionnaires.payment_screen() remain
unused -- this design doesn't need them.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Update consent to match approved protocol; withdraw non-compliant payment store
Consent (content/consent.md, applied by task_pe-cu-nicewebrl at the user's
instruction, byte-identical to their copy): now says name + email are
collected for payment, stored in a password-protected payment spreadsheet
kept separate from study data -- matching the BEAR protocol's 09-22 revision,
which added exactly this and removed the prior "no identifiable information
will be collected" promise.
Withdraw item 44's payment store: task_pe-cu-nicewebrl found the approved
protocol commits to a password-protected spreadsheet separate from study
data (the lab's existing Box-based arrangement), not a GitLab-hosted CSV
written via a Space API token, and not email alone without a name.
payment_log.csv/payment_screen()/submit_payment()/SONA_PAYMENT_HASH_KEY are
pulled from finish_experiment() -- confirmed via /health this was live and
would have actually written to the non-compliant store, though no real
participant had reached it. Replaced with a display-only bonus total; no
collection, noth…
Add SONA payment-collection screen + store, fix raw-code leak in task-order log
Payment: whichever task a participant finishes second now sums both tasks'
self bonus and collects email + Venmo/Amazon Gift Card/PayPal choice, saved
to a separate payment store keyed by its own pseudonym (SONA_PAYMENT_HASH_KEY,
distinct from the research pid's key) so email can never be joined to research
data with only one secret. Nothing here executes a real payment -- disbursement
stays a human-worked queue by design.
Privacy fix: the shared task-order log was keyed on the raw SONA code, which
(combined with SONA_PID_HASH_KEY) could re-identify participants -- found by
task_pe-cu-nicewebrl while checking what the new payment log would sit next to.
first_task() now takes the raw code and the research pseudonym separately: the
raw code still feeds only the (unpersisted) local hash fallback, while the
pseudonym is what actually gets written as the log's row key.
15 new tests in test_payment.py; one new test_health.py test.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Add SONA_RETURN_URL fallback so the credit-granting URL never has to fit in SONA's Study URL
Squashed deploy snapshot of main (item 32 in PROJECT_LOG.md), same
docx-free pattern as the previous deploy commits.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Squashed deploy snapshot of main (item 31 in PROJECT_LOG.md), same
docx-free pattern as the previous deploy commit -- see that commit's
message for why the doc is excluded.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Deploy: 16-trial redesign, chest/counterbalancing fixes, pilot bug fixes
Squashed deploy snapshot of main (items 23-30 in PROJECT_LOG.md), built
without the tracked reviewer-instructions .docx: Hugging Face's git
endpoint rejects pushes containing binary files (Git LFS/Xet only), and
this history carried two .docx blobs. The doc isn't needed by the running
app -- it stays tracked on `main` and backed up via `origin`, just left
out of what's pushed here. See PROJECT_LOG.md on `main` for the full,
unsquashed commit history and rationale.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Log recent work in PROJECT_LOG (swap anim, PIL feedback, practice->quiz, coin trial, text pass)
- when the chests swap sides, a quick perspective turntable 'shuffle' plays on the scene
+ a synthesised swoosh, selling the magic-cups framing
- triggered from the env when side_schedule flips between consecutive trials
- PROJECT_LOG: within-house redesign (Splits A-C) marked complete
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>