Commit ·
aeb71e5
1
Parent(s): d2f0ef7
Deploy: fix entry-redirect gap + sync consent text (Method_and_Decisions doc dropped, binary rejected by HF)
Browse filesFiles changed (3)
- PROJECT_LOG.md+53-14
- content/consent.md+6-4
- web_app.py+21
338 unmodified lines339340341342343344345346347348349350351352353354355356357358359360338 unmodified linessaved data showing `task_order_source: shared_log` (not the hash fallback) for the firsttime. Lesson: a mock that encodes the same assumption the code under test makes will passeven when that assumption is wrong — this one needed a real API round-trip to surface.## 7. In progress / open items- **Deploy status (2026-09-26): items 1-35 pushed to `origin`/`hf`; items 36-37 (SONA infra)not yet pushed** — see the commit history for exactly what's landed by the time you read this.`SONA_GITLAB_PROJECT`/`SONA_GITLAB_TOKEN`/`OTHER_TASK_BASE_URL`/`SONA_PID_HASH_KEY` are allset in this machine's local `.env` (and the matching values in `task_pe-cu-nicewebrl`'s), but**still need to be added as HF Space secrets on both live Spaces** before the combined flowworks in production — a local `.env` is not read by the deployed Space. Every piece degradesindependently rather than breaking if a secret is missing there too: `OTHER_TASK_BASE_URL`unset -> no next-task link shown (this task behaves exactly as it did before this featureexisted); `SONA_PID_HASH_KEY` unset -> pid falls back to the raw code with a loud warning (NOTsafe for real data collection); `SONA_GITLAB_PROJECT` unset -> task order falls back to thelocal hash (works, just only approximately balanced) — recorded as such via `task_order_source`.- **`princessamygdala/bear-sona` (item 37) exists now** — private, on `gitlab.com`, holding thetask-order allocation log; will also hold the payment store once that's designed. Both tasks'local `.env` point at it already.- **Input-drop limitation (item 33) is unresolved and out of this repo's control** — flaggingfor awareness, not a to-do: if it becomes a real problem in the lab, the options are asking kidsto pace their presses, or forking/patching the vendored `nicewebrl` package (bigger undertaking,338 unmodified lines339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399338 unmodified linessaved data showing `task_order_source: shared_log` (not the hash fallback) for the firsttime. Lesson: a mock that encodes the same assumption the code under test makes will passeven when that assumption is wrong — this one needed a real API round-trip to surface.38. **Fixed a real "wrong entry" gap, and synced consent.md to the actual current approvedtext** (2026-09-26, same day, prompted by the user asking whether a pilot could actually goout). Two separate, real findings, not decisions:- **The redirect gap**: item 36/37's design gates CONSENT and the general measures on`task_first`, but nothing stopped this task's own MAIN GAME from running when aparticipant lands here directly and isn't assigned to see it first — i.e. every design sofar assumed some other mechanism (two separate SONA links?) would route people to theircorrect first task, and neither app actually built that mechanism. With one shared SONAentry link (the realistic setup), roughly half of participants would have hit whichevertask's link exists, and that task would have just run its own consent + game anyway,never routing them to the other task at all. Fixed: right after `task_first` resolves in`index()` (from the shared log/hash, not a trusted handoff) and this task isn't theassigned first task, redirect immediately to `order_link.other_task_url(...)` beforerendering anything, guarded on `not experiment_started` so an in-progress session cannever be stranded by this check. Verified against the REAL, now-live HarvestForTwo Space(secrets from item 37 made this possible for the first time): a "pe-first" test codehitting sl-cu directly correctly redirected, carrying a valid signed handoff, to the realpe-cu Space, which correctly showed consent as the genuine first task. Also checked themirror case directly against pe-cu's live Space with a "sl-first" test code and confirmed**`task_pe-cu-nicewebrl` has the identical gap, still open as of this writing** — flaggedto that session with the exact fix; not yet resolved on their side.- **Stale consent text**: `content/consent.md` (ported into this task from `pe-cu` underitem 36, before the 09-19-2026 consent form was even found) was missing the currentrisk-disclosure paragraph — both apps still said "there are no risks to participating,"when the actual approved text discloses that some questions may be upsetting/sensitiveand that data, while stored on secure servers, cannot be guaranteed safe from a breach.`pe-cu`'s copy additionally had the payment-mechanism sentence this task's copy lacked.Checked programmatically against every substantial paragraph of the actual `.docx`, notjust spot-checked; fixed both files identically (verified byte-for-byte identical after).- Test data (`PILOTTEST0001`/`0002`) cleared from the shared allocation log afterward so itdoesn't skew real counterbalancing once recruitment starts.## 7. In progress / open items- **Is a pilot actually ready to go out? Not yet — one known blocker, plus manual setup steps.**As of item 38: this task's own entry-redirect gap is fixed and deployed; **`task_pe-cu-nicewebrl` has the identical gap and it is NOT yet fixed on their side** (flagged, exact fixgiven). Sending a real participant through a single SONA link right now would work correctlyfor whichever ~half land on sl-cu first, and incorrectly (never reaches sl-cu, or reaches ithaving skipped consent) for the other half, until pe-cu ships the matching fix. Separately,nobody has actually created the SONA-side study listing yet (the external-study URL,`%SURVEY_CODE%` placeholder wiring, credit amount) — that's a manual step on the SONA adminsite, not something either app's code does. And payment collection (below) is still fullyunbuilt. All three should be resolved before real participants are recruited.- **Deploy status (2026-09-26): items 1-35, 37 pushed to `origin`/`hf`; item 38 (this) and item36 not yet pushed** — see the commit history for exactly what's landed by the time you readthis. `SONA_GITLAB_PROJECT`/`SONA_GITLAB_TOKEN`/`OTHER_TASK_BASE_URL`/`SONA_PID_HASH_KEY` arenow set as HF Space secrets on BOTH live Spaces (not just local `.env`), so the combined flowis live in production on this task's side. Every piece still degrades independently ratherthan breaking if a secret were ever removed: `OTHER_TASK_BASE_URL` unset -> no next-task linkshown (this task behaves exactly as it did before this feature existed); `SONA_PID_HASH_KEY`unset -> pid falls back to the raw code with a loud warning (NOT safe for real datacollection); `SONA_GITLAB_PROJECT` unset -> task order falls back to the local hash (works,just only approximately balanced) — recorded as such via `task_order_source`.- **`princessamygdala/bear-sona` (item 37) exists** — private, on `gitlab.com`, holding thetask-order allocation log; will also hold the payment store once that's designed.- **Input-drop limitation (item 33) is unresolved and out of this repo's control** — flaggingfor awareness, not a to-do: if it becomes a real problem in the lab, the options are asking kidsto pace their presses, or forking/patching the vendored `nicewebrl` package (bigger undertaking,
44 unmodified lines454647484950515253545556575833 unmodified lines929394959697987 unmodified lines10610710810911011111244 unmodified lines***Is there any way being in this study could be bad for me?***There are no risks to participating in this study.More detailed information about the risks of this study can be found under “Is there any way being in this study could be bad for me? (Detailed Risks)”***Will being in this study help me in any way?***There are no benefits to you from taking part in this research. We cannot promise any benefits to others from your taking part in this research. However, possible benefits to others include gaining knowledge about social perceptions and decisions.***What happens if I do not want to be in this research?***33 unmodified linesAfter the tasks, we ask you to answer questionnaires that will take approximately 10 minutes combined.When you have completed the tasks, you will receive <span style="color:#c0392b"><strong>2 SONA Credits</strong></span>. You can earn a potential <span style="color:#c0392b"><strong>monetary bonus of up to $6</strong></span> each for yourself and a stranger for each task (<span style="color:#c0392b"><strong>up to $12 total for each</strong></span> yourself and the stranger).Please read through the task instructions carefully and answer questions thoughtfully. Everything should be straightforward and clear, but if you are unsure of what is being asked, make your best guess, and please let us know at the end of your participation. You can choose not to answer any question you do not wish to answer. You can also choose to stop taking the survey at any time.7 unmodified lines***Is there any way being in this study could be bad for me? (Detailed Risks).***There are no risks to participating in this study.***What happens to the information collected for the research?***44 unmodified lines454647484950515253545556575833 unmodified lines929394959697987 unmodified lines10610710810911011111211311444 unmodified lines***Is there any way being in this study could be bad for me?***Some of the questions asked may be upsetting, or you may feel uncomfortable answering them. If you do not wish to answer a question, you may skip it and go to the next question.More detailed information about the risks of this study can be found under “Is there any way being in this study could be bad for me? (Detailed Risks)”***Will being in this study help me in any way?***There are no benefits to you from your taking part in this research. We cannot promise any benefits to others from your taking part in this research. However, possible benefits to others include gaining knowledge about social perceptions and decisions.***What happens if I do not want to be in this research?***33 unmodified linesAfter the tasks, we ask you to answer questionnaires that will take approximately 10 minutes combined.When you have completed the tasks, you will receive <span style="color:#c0392b"><strong>2 SONA Credits</strong></span>. You can earn a potential <span style="color:#c0392b"><strong>monetary bonus of up to $6</strong></span> each for yourself and a stranger for each task (<span style="color:#c0392b"><strong>up to $12 total for each</strong></span> yourself and the stranger). This bonus money will be paid out to participants via <span style="color:#c0392b"><strong>Venmo Gift card, Amazon Gift card, or PayPal</strong></span>.Please read through the task instructions carefully and answer questions thoughtfully. Everything should be straightforward and clear, but if you are unsure of what is being asked, make your best guess, and please let us know at the end of your participation. You can choose not to answer any question you do not wish to answer. You can also choose to stop taking the survey at any time.7 unmodified lines***Is there any way being in this study could be bad for me? (Detailed Risks).***During this research, you may be asked questions of a personal or sensitive nature. You are free to refrain from answering any questions you do not wish to answer.All research data will be stored on secure password-protected servers to which only researchers approved on this protocol have access. However, we cannot guarantee that our servers could never be breached, so it is possible that the data we collect could be obtained or misused by third parties.***What happens to the information collected for the research?***
1345 unmodified lines1346134713481349135013511345 unmodified lineslogger.warning(f"ignoring ?sona={sona_q!r}: must be an https:// URL")app.storage.user.setdefault("sona_url", "")# dev/pilot shortcuts, e.g. ?dev=1&start=main&trials=3 (skip front matter; flagged in data)if request.query_params.get("dev") in ("1", "true", "yes"):app.storage.user["dev_mode"] = True1345 unmodified lines1346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721345 unmodified lineslogger.warning(f"ignoring ?sona={sona_q!r}: must be an https:// URL")app.storage.user.setdefault("sona_url", "")# Combined-SONA-study only: if this participant is supposed to see the OTHER task first, and# didn't arrive via a genuine handoff FROM it (task_order_source == "handoff"), they landed on# the wrong task -- e.g. a single SONA entry link always points here, but the shared# allocation assigned them "pe first". Redirect immediately, before showing anything# (including consent), so a single entry link still sends every participant to their correct# first task. Guarded on "not experiment_started" so this can never strand someone already# partway through THIS task's intro/game (e.g. a reload after this check was added).if (combined_study_active and app.storage.user.get("task_first")and app.storage.user.get("task_first") != order_link.THIS_TASKand app.storage.user.get("task_order_source") != "handoff"and not app.storage.user.get("experiment_started")):redirect_url = order_link.other_task_url(app.storage.user["survey_code"], app.storage.user.get("sona_url") or "",app.storage.user["task_first"])if redirect_url:ui.navigate.to(redirect_url)returnlogger.warning("task_first says this participant should see the other task first, but ""OTHER_TASK_BASE_URL isn't configured -- cannot redirect, continuing here instead.")# dev/pilot shortcuts, e.g. ?dev=1&start=main&trials=3 (skip front matter; flagged in data)if request.query_params.get("dev") in ("1", "true", "yes"):app.storage.user["dev_mode"] = True
PROJECT_LOG.md+53-14
content/consent.md+6-4
web_app.py+21