princessamygdala Claude Sonnet 5 commited on
Commit
4546034
·
1 Parent(s): 1b202fd

Trust a verified handoff for general-measures deferral too, not just sona_url

Browse files

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" and
task_position == 2) alongside _in_combined_study(), rather than depending
solely on sona_url. Not currently exposed given SONA_RETURN_URL is
configured, but the failure direction would have been the measures never
running, not running twice.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

2 files changed +55 -2
Files changed (2)
PROJECT_LOG.md+35
web_app.py+20-2