Commit ·
15ebeb5
1
Parent(s): bf3553f
Apply the user's pilot review list: ordering, headings, and partner totals
Browse filesDrops 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>
Files changed (4)
- PROJECT_LOG.md+52
- order_link.py+41
- questionnaires.py+42-11
- web_app.py+58-8
943 unmodified lines944945946947948949943 unmodified lines- **Verified**: `tripm_items(order_seed=X)` is stable for the same seed and differs acrossseeds (58 items both times); `web_app` imports cleanly; `test_payment.py`'s 21 tests pass.## 7. In progress / open items- **Is a pilot actually ready to go out? NOT YET — item 48 found a real handoff bug thefirst actual live two-task playthrough surfaced.** The SONA study listing exists (item 43)943 unmodified lines94494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001943 unmodified lines- **Verified**: `tripm_items(order_seed=X)` is stable for the same seed and differs acrossseeds (58 items both times); `web_app` imports cleanly; `test_payment.py`'s 21 tests pass.53. **A real review list from the user's own pilot playthrough, relayed by `task-pe-cu-nicewebrl-f9` (2026-10-14)** — items 1-4 were this task's alone; 5, 6, 8 were alreadydecided by the user and applied here to match; 7 needed a new signed cross-task field.1. **Removed the "A couple more things before you're done." interstitial** in`finish_experiment()` — straight into TriPM now, no click-through.2. **Demographics now runs AFTER TriPM**, not before — matches `task_pe-cu-nicewebrl`'sorder, reversing this task's own.3. **The "Questions about the future" scale is now shuffled per participant**, same`random.Random(zlib.crc32(...))` construction as item 52's TriPM fix, key travelingwith its item, recorded as `future_item_order` in the saved dict.4. **A handoff arrival under `?dev=1` now still runs the front matter** (title screen,explorer choice) instead of the dev shortcut's usual skip — `start_experiment()` gaineda `handoff_arrival` check (`task_order_source == "handoff" and task_position == 2`)mirroring `task_pe-cu-nicewebrl`'s identical fix; consent itself is still skipped, via`run_intro()`'s own `task_first` gate, not by this change.5. **The belief/suspicion check (`_belief_page`) is asked last, after TriPM anddemographics**, not mid-battery — revealing a manipulation check early colors everyself-report answer that follows it, the user's stated reason, matching`task_pe-cu-nicewebrl`'s identical move. Extracted into a standalone`questionnaires.belief_check_screen()`; `post_game_questionnaire_stage()` now defers it(`app.storage.user["_belief_check_deferred"]`) whenever `task_position == 2`, since forthat participant TriPM/demographics run later still, in `finish_experiment()` — askingit there, right after demographics, is what makes it actually last instead of justreordered within this task's own page list.6. **Post-task page headings replaced with TriPM-style instruction lines**: "Motivation","Effort", "About the task" no longer render as `## Title` headers — each now opens witha plain instruction sentence matched to its own response scale ("Please indicate howmotivated you were...", "...how much effort...", "...how each statement...applies"),dropping the heading entirely, same register TriPM already used. Hypothetical (dyad-only)pages were left as-is — unused in the current SONA pilot, out of scope for this pass.7. **New signed handoff field for partner totals, agreed with `task_pe-cu-nicewebrl`**: thefirst task's own partner is never shown to the participant (its final screen is skippedunder a verified handoff), so the task finished SECOND had no way to report it.`order_link.other_task_url()` gained `partner_bonus_usd=`/`partner_lost_usd=0.0` →`pbonus1=`/`plost1=`/`psig=` (signed over `"partners:<earned>:<lost>"`), verified onarrival by new `verify_signed_partners()`, stored as`other_task_partner_bonus_usd`/`_lost_usd`. `plost1` always sends `0.00` from this task— the chest mechanic has no one-sided loss the way their night harvest does; the sharedconstruction still carries both so one signature covers either direction.`finish_experiment()`'s final screen now reports this task's own partner (already knownlocally) AND the other task's partner(s) (shown only when the handoff actually carriedone — a missing figure is not shown as zero).8. **A "new adventurer and partner" note on `cover_part1`** when `task_position == 2`, so asecond-task participant doesn't carry an assumption from the task just finished — mirrors`task_pe-cu-nicewebrl`'s equivalent note on their own cover story.- **Verified**: `web_app`/`questionnaires`/`order_link` import cleanly; `test_payment.py`'s21 tests pass; a direct `other_task_url(..., partner_bonus_usd=4.5)` call round-tripsthrough `verify_signed_partners` correctly and a tampered amount is rejected.- **Not done**: the three items under `task-pe-cu-nicewebrl-f9`'s own "MINE" heading (nightslide wording, their day quiz, their final-screen auto-forward) are their own repo's work,not mirrored here — nothing on this list depended on them.## 7. In progress / open items- **Is a pilot actually ready to go out? NOT YET — item 48 found a real handoff bug thefirst actual live two-task playthrough surfaced.** The SONA study listing exists (item 43)
145 unmodified lines14614714814915015135 unmodified lines18718818919019119211 unmodified lines20420520620720820914 unmodified lines224225226227228229145 unmodified linesreturn bool(expected) and hmac.compare_digest(expected, sig)def signed_reference_code(pseudonym, amount_usd):"""A compact, copy-pasteable, tamper-evident code for the participant's final screen: theirresearch pseudonym plus the combined bonus total they were just shown, HMAC-signed together35 unmodified linesdef other_task_url(survey_code, sona_url, first_task_value, own_bonus_usd=None,dev=False, dev_trials=None):"""Where to send the participant next: the other task, carrying their SONA code, theeventual SONA return URL (if known), and the ALREADY-RESOLVED task order, signed so the11 unmodified linesfrom the URL. Only meaningful when this call is made by the task that ran FIRST; omit it(default None) when calling from the second task, which has nothing further to hand off.`dev` and `dev_trials` carry a debug run across the handoff. Without them a shortenedsession hands over to a full-length one, so walking the combined study end to end meantplaying the second task's whole block or opening it by hand and never testing the handoff14 unmodified linesbsig = _sign(survey_code, f"bonus:{own_bonus_usd:.2f}")if bsig:q += f"&bonus1={own_bonus_usd:.2f}&bsig={bsig}"if dev:q += "&dev=1"if dev_trials:145 unmodified lines14614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617735 unmodified lines21321421521621721821911 unmodified lines23123223323423523623723823924024124224324424514 unmodified lines260261262263264265266267268269270145 unmodified linesreturn bool(expected) and hmac.compare_digest(expected, sig)def verify_signed_partners(survey_code, pbonus_str, plost_str, sig):"""(earned, lost) in dollars for the FIRST task's partner(s), if `sig` is a genuinepbonus1=/plost1= handoff for this survey_code, else (None, None). Never raises.bonus1=/bsig= already carries the participant's OWN first-task bonus; this is the separatefigure for what their PARTNER(S) in that task received, which the participant never seesdirectly (their own final screen there is skipped entirely under a verified handoff) butthe task they finish on should still be able to report. One shared construction("partners:<earned>:<lost>") across both earned and lost, rather than two separate sigs,because a task whose mechanic has no distinct loss side (this one) always sends lost=0.00and a single signature is simpler to verify than two. Agreed with task_pe-cu-nicewebrl,whose own mechanic DOES have a one-sided loss (their night harvest only ever takes away),hence carrying both."""if not sig or pbonus_str is None or plost_str is None:return None, Nonetry:earned, lost = float(pbonus_str), float(plost_str)except (TypeError, ValueError):return None, Noneexpected = _sign(survey_code, f"partners:{earned:.2f}:{lost:.2f}")if not expected or not hmac.compare_digest(expected, sig):return None, Nonereturn earned, lostdef signed_reference_code(pseudonym, amount_usd):"""A compact, copy-pasteable, tamper-evident code for the participant's final screen: theirresearch pseudonym plus the combined bonus total they were just shown, HMAC-signed together35 unmodified linesdef other_task_url(survey_code, sona_url, first_task_value, own_bonus_usd=None,partner_bonus_usd=None, partner_lost_usd=0.0,dev=False, dev_trials=None):"""Where to send the participant next: the other task, carrying their SONA code, theeventual SONA return URL (if known), and the ALREADY-RESOLVED task order, signed so the11 unmodified linesfrom the URL. Only meaningful when this call is made by the task that ran FIRST; omit it(default None) when calling from the second task, which has nothing further to hand off.`partner_bonus_usd`, when given (only meaningful from the task that ran FIRST, same asown_bonus_usd), is the dollar total THIS task's own partner received -- never shown on thistask's own final screen, since a verified handoff skips straight past it, so the task theparticipant finishes on needs it to report what every partner across both tasks ended upwith. `partner_lost_usd` defaults to 0.00: this task's mechanic has no one-sided loss (achest can help or hurt the partner, there's no separate "partner lost" category the waytask_pe-cu-nicewebrl's night harvest has), so it always sends zero rather than omitting thefield -- the receiving side still verifies both together (see verify_signed_partners).`dev` and `dev_trials` carry a debug run across the handoff. Without them a shortenedsession hands over to a full-length one, so walking the combined study end to end meantplaying the second task's whole block or opening it by hand and never testing the handoff14 unmodified linesbsig = _sign(survey_code, f"bonus:{own_bonus_usd:.2f}")if bsig:q += f"&bonus1={own_bonus_usd:.2f}&bsig={bsig}"if partner_bonus_usd is not None:lost = partner_lost_usd or 0.0psig = _sign(survey_code, f"partners:{partner_bonus_usd:.2f}:{lost:.2f}")if psig:q += f"&pbonus1={partner_bonus_usd:.2f}&plost1={lost:.2f}&psig={psig}"if dev:q += "&dev=1"if dev_trials:
19 unmodified lines202122232425199 unmodified lines22522622722822923031 unmodified lines2622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993 unmodified lines30330430530630730830931031119 unmodified lines"""import asynciofrom nicegui import app, ui199 unmodified linesreturn renderdef post_game_questionnaire_stage():async def _display(stage, container):p = _partner_label(caps=True)31 unmodified lines"Very boring", "Very interesting")]),]pages = [_text_page(None, "What strategy (or strategies) did you use during ""the learning task?", "strategy_text"),_slider_page("Motivation", "Think back to the task you just completed.",[("motiv_win_self", "How motivated were you to win points for YOURSELF?"),("motiv_win_partner", f"How motivated were you to win points for {p}?"),("motiv_avoid_self", "How motivated were you to avoid losing points for YOURSELF?"),("motiv_avoid_partner", f"How motivated were you to avoid losing points for {p}?")],"Not at all motivated", "Extremely motivated"),_slider_page("Effort", "",[("effort_win_self", "How much effort did you exert to win points for YOURSELF?"),("effort_win_partner", f"How much effort did you exert to win points for {p}?"),("effort_avoid_self", "How much effort did you exert to avoid losing points for YOURSELF?"),("effort_avoid_partner", f"How much effort did you exert to avoid losing points for {p}?")],"Required no effort", "Required a lot of effort"),_slider_page("About the task", "",[("task_difficulty", "How easy or difficult was the task?","Very easy", "Very difficult"),("task_interest", "How boring or interesting was the task?","Very boring", "Very interesting")]),_belief_page(),*(hypothetical_pages if dyad_mode() else []),_likert_page("Questions about the future","Please indicate how much you agree with each statement below.",[("future_clear_goal", "When I think about my future, I can see clearly what ""I want to achieve."),("future_imagine", "I can imagine what my future will be like."),("future_unclear", "I can't get a clear picture of my future even when I try.")]),]answers = {}3 unmodified linesanswers.update(vals)idx = max(0, idx - 1) if action == "back" else idx + 1return dict(measure="post_game_questionnaire",dyad_mode=int(dyad_mode()),who=(who if dyad_mode() else ""), **answers)return _fb("PostTask_Questionnaire", _display)19 unmodified lines2021222324252627199 unmodified lines22722822923023123223323423523623723823924031 unmodified lines2722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183 unmodified lines32232332432532632732832933033133233333433533633733833934034134219 unmodified lines"""import asyncioimport randomimport zlibfrom nicegui import app, ui199 unmodified linesreturn renderasync def belief_check_screen(container):"""The partner-belief/suspicion check, asked on its own with no Back -- used whenpost_game_questionnaire_stage() defers it past TriPM/demographics for a participantfinishing second (see that function and web_app.finish_experiment)."""_, vals = await _belief_page()(container, {}, False)return valsdef post_game_questionnaire_stage():async def _display(stage, container):p = _partner_label(caps=True)31 unmodified lines"Very boring", "Very interesting")]),]# Shuffled per participant, same reason and construction as the TriPM fix: a fixed# order puts the same item last for everyone, and the key travels with its own item,# so the three future_* columns still score what they always did.future_items = [("future_clear_goal", "When I think about my future, I can see clearly what ""I want to achieve."),("future_imagine", "I can imagine what my future will be like."),("future_unclear", "I can't get a clear picture of my future even when I try."),]rng = random.Random(zlib.crc32(f"future|{app.storage.user.get('pid') or 'anon'}".encode()))rng.shuffle(future_items)pages = [_text_page(None, "What strategy (or strategies) did you use during ""the learning task?", "strategy_text"),_slider_page(None, "Think back to the task you just completed. Please indicate how ""motivated you were, for each statement below.",[("motiv_win_self", "How motivated were you to win points for YOURSELF?"),("motiv_win_partner", f"How motivated were you to win points for {p}?"),("motiv_avoid_self", "How motivated were you to avoid losing points for YOURSELF?"),("motiv_avoid_partner", f"How motivated were you to avoid losing points for {p}?")],"Not at all motivated", "Extremely motivated"),_slider_page(None, "Please indicate how much effort each statement below required.",[("effort_win_self", "How much effort did you exert to win points for YOURSELF?"),("effort_win_partner", f"How much effort did you exert to win points for {p}?"),("effort_avoid_self", "How much effort did you exert to avoid losing points for YOURSELF?"),("effort_avoid_partner", f"How much effort did you exert to avoid losing points for {p}?")],"Required no effort", "Required a lot of effort"),_slider_page(None, "Please indicate how each statement below applies to the task you just ""completed.",[("task_difficulty", "How easy or difficult was the task?","Very easy", "Very difficult"),("task_interest", "How boring or interesting was the task?","Very boring", "Very interesting")]),*(hypothetical_pages if dyad_mode() else []),_likert_page(None, "Please indicate how much you agree with each statement below.",future_items),]answers = {}3 unmodified linesanswers.update(vals)idx = max(0, idx - 1) if action == "back" else idx + 1# Belief/suspicion check: asked last, after everything else. On a participant finishing# SECOND, "everything else" includes the combined-study TriPM/demographics, which run# afterward in finish_experiment() -- deferred there instead of asked here, so answering# it doesn't tip the participant off before those self-report measures run. Revealing# that something is being checked, mid-battery, colors every answer that follows it.if app.storage.user.get("task_position") == 2:app.storage.user["_belief_check_deferred"] = Trueelse:_, belief_vals = await _belief_page()(container, {}, False)answers.update(belief_vals)return dict(measure="post_game_questionnaire",dyad_mode=int(dyad_mode()),who=(who if dyad_mode() else ""),future_item_order=[k for k, _ in future_items], **answers)return _fb("PostTask_Questionnaire", _display)
644 unmodified lines645646647648649650192 unmodified lines84384484584684784884985085185285366 unmodified lines92092192292392492592692792892993093193293354 unmodified lines98898999099199299399499599699714 unmodified lines101210131014101510161017482 unmodified lines150015011502150315041505644 unmodified linesui.image(_png_src(sprites.draw_chest_coins_icon())).style("width:220px; max-width:80vw; margin:4px 0;")ui.markdown(E.COVER_PART1)elif page == "cover_part3":ui.markdown("## Meet your partner")ui.markdown(E.cover_part3(app.storage.user.get("role", "c")))192 unmodified linesskip_stages = {"quiz": {"Practice"}, "main": {"Practice", "Quiz"},"questionnaire": {"Practice", "Quiz", "Explore"}}.get(start, set()) if dev else set()# ========================================# Intro (participant ID, welcome, instructions, choose explorer) -- mouse only# ========================================if not (app.storage.user.get("experiment_started", False)):if dev and start != "intro":app.storage.user.setdefault("pid", "9999") # dev fallbacksapp.storage.user.setdefault("avatar", 0)app.storage.user.setdefault("role", "c")66 unmodified lines# run_intro()). Collected BEFORE save_data() below so the results land in app.storage.user# in time to be captured by this session's saved metadata like everything else there.if treat_as_combined and not sona_first and not app.storage.user.get("general_measures_done"):with container.style("align-items:center;"):nicewebrl.clear_element(container)ui.markdown("### A couple more things before you're done.")ev = asyncio.Event()ui.button("Continue", on_click=ev.set).props("color=primary size=lg")await ev.wait()app.storage.user["demographics"] = await Q.demographics_screen(container)app.storage.user["tripm"] = await Q.tripm_screen(container)app.storage.user["general_measures_done"] = True# save quietly (no feedback prompt)54 unmodified linestotal_bonus_usd = min(12.0, own_bonus_this_task + other_bonus)pseudonym = app.storage.user.get("pid") or ""reference_code = order_link.signed_reference_code(pseudonym, total_bonus_usd) or pseudonymwith container.style("align-items:center;"):nicewebrl.clear_element(container)ui.markdown(f"### Your total bonus across both tasks is **${total_bonus_usd:.2f}**.\n\n"f"Your reference code is **`{reference_code}`**. The research team will contact you ""through SONA to arrange payment. **Please include this code in your reply** so we ""can confirm the amount."14 unmodified linesnext_url = order_link.other_task_url(survey_code, app.storage.user.get("sona_url") or "", first_value,own_bonus_usd=own_bonus_this_task,# A shortened run hands over as a shortened run -- see order_link.other_task_url.dev=bool(app.storage.user.get("dev_mode")),dev_trials=app.storage.user.get("dev_trials"))482 unmodified linesbsig_q = (request.query_params.get("bsig") or "").strip()if order_link.verify_signed_bonus(app.storage.user["survey_code"], bonus1_q, bsig_q):app.storage.user["other_task_bonus_usd"] = float(bonus1_q)elif "task_first" not in app.storage.user:# No verifiable handoff on THIS request, and nothing resolved yet -- resolve directly.# (If task_first IS already cached and this request carries no genuine handoff, there is644 unmodified lines645646647648649650651652653654655656657192 unmodified lines85085185285385485585685785885986086186286386486586686786866 unmodified lines93593693793893994094194294394494594694794894995054 unmodified lines100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102914 unmodified lines10441045104610471048104910501051105210531054482 unmodified lines1537153815391540154115421543154415451546154715481549155015511552155315541555644 unmodified linesui.image(_png_src(sprites.draw_chest_coins_icon())).style("width:220px; max-width:80vw; margin:4px 0;")ui.markdown(E.COVER_PART1)# Shown only to a participant arriving here as their SECOND task, so they don't carry an# assumption from the task they just finished into this one. Mirrors# task_pe-cu-nicewebrl's equivalent note on its own cover story.if app.storage.user.get("task_position") == 2:ui.markdown("_This is a new adventurer and a new partner — different from the ones in the ""task you just finished._")elif page == "cover_part3":ui.markdown("## Meet your partner")ui.markdown(E.cover_part3(app.storage.user.get("role", "c")))192 unmodified linesskip_stages = {"quiz": {"Practice"}, "main": {"Practice", "Quiz"},"questionnaire": {"Practice", "Quiz", "Explore"}}.get(start, set()) if dev else set()# A handed-over session is a participant arriving at their second task, so a shortened one# is a shortened real session and skips nothing a participant would otherwise see -- the# front matter (title screen, explorer choice) is exactly what no debug link could reach# otherwise. Consent is skipped either way via run_intro()'s own task_first gate, not an# accident of dev mode. Mirrors task_pe-cu-nicewebrl's equivalent fix.handoff_arrival = (app.storage.user.get("task_order_source") == "handoff"and app.storage.user.get("task_position") == 2)# ========================================# Intro (participant ID, welcome, instructions, choose explorer) -- mouse only# ========================================if not (app.storage.user.get("experiment_started", False)):if dev and start != "intro" and not handoff_arrival:app.storage.user.setdefault("pid", "9999") # dev fallbacksapp.storage.user.setdefault("avatar", 0)app.storage.user.setdefault("role", "c")66 unmodified lines# run_intro()). Collected BEFORE save_data() below so the results land in app.storage.user# in time to be captured by this session's saved metadata like everything else there.if treat_as_combined and not sona_first and not app.storage.user.get("general_measures_done"):# No interstitial "a couple more things" click-through -- straight into TriPM, then# demographics (TriPM first: matches task_pe-cu-nicewebrl's ordering).app.storage.user["tripm"] = await Q.tripm_screen(container)app.storage.user["demographics"] = await Q.demographics_screen(container)# The belief/suspicion check was deferred past here by post_game_questionnaire_stage (see# questionnaires.py) specifically so it would land after TriPM and demographics, not before# them -- asking it earlier tips off a participant that something is being checked, which# then colors every self-report answer that follows. Run it now, last.if app.storage.user.pop("_belief_check_deferred", False):app.storage.user["belief_check"] = await Q.belief_check_screen(container)app.storage.user["general_measures_done"] = True# save quietly (no feedback prompt)54 unmodified linestotal_bonus_usd = min(12.0, own_bonus_this_task + other_bonus)pseudonym = app.storage.user.get("pid") or ""reference_code = order_link.signed_reference_code(pseudonym, total_bonus_usd) or pseudonym# What every partner across both tasks ended up with -- this task's own partner is already# known locally; the other task's partner(s) only reach here if a verified handoff carried# them (see index()'s pbonus1=/plost1=/psig= verification). Omitted, not shown as $0, when# the other task didn't send one -- a missing figure is not the same as a confirmed zero.partner_bits = [f"your partner here (**#{partner}**) received **${to_money(partner_pts):.2f}**"]other_partner_earned = app.storage.user.get("other_task_partner_bonus_usd")if other_partner_earned is not None:bit = f"the partner(s) from your other task received **${other_partner_earned:.2f}**"other_partner_lost = app.storage.user.get("other_task_partner_lost_usd") or 0.0if other_partner_lost:bit += f" (and **${other_partner_lost:.2f}** was lost on your behalf there)"partner_bits.append(bit)with container.style("align-items:center;"):nicewebrl.clear_element(container)ui.markdown(f"### Your total bonus across both tasks is **${total_bonus_usd:.2f}**.\n\n"f"In total, {' and '.join(partner_bits)}.\n\n"f"Your reference code is **`{reference_code}`**. The research team will contact you ""through SONA to arrange payment. **Please include this code in your reply** so we ""can confirm the amount."14 unmodified linesnext_url = order_link.other_task_url(survey_code, app.storage.user.get("sona_url") or "", first_value,own_bonus_usd=own_bonus_this_task,# This task's own partner is never shown on this task's own final screen (a verified# handoff skips straight past it), so the task the participant finishes on needs this# to report what every partner across both tasks ended up with. lost defaults to 0.00# in other_task_url -- this mechanic has no one-sided loss.partner_bonus_usd=to_money(partner_pts),# A shortened run hands over as a shortened run -- see order_link.other_task_url.dev=bool(app.storage.user.get("dev_mode")),dev_trials=app.storage.user.get("dev_trials"))482 unmodified linesbsig_q = (request.query_params.get("bsig") or "").strip()if order_link.verify_signed_bonus(app.storage.user["survey_code"], bonus1_q, bsig_q):app.storage.user["other_task_bonus_usd"] = float(bonus1_q)# The first task's own PARTNER'S total, separate from bonus1= above (the participant's# own money). That partner is never shown to the participant directly -- the first task's# own final screen is skipped entirely under a verified handoff -- so whichever task the# participant finishes on needs this to report what every partner across both tasks ended# up with. Agreed naming with task_pe-cu-nicewebrl (see order_link.verify_signed_partners).pbonus1_q = (request.query_params.get("pbonus1") or "").strip()plost1_q = (request.query_params.get("plost1") or "").strip()psig_q = (request.query_params.get("psig") or "").strip()p_earned, p_lost = order_link.verify_signed_partners(app.storage.user["survey_code"], pbonus1_q or None, plost1_q or None, psig_q)if p_earned is not None:app.storage.user["other_task_partner_bonus_usd"] = p_earnedapp.storage.user["other_task_partner_lost_usd"] = p_lostelif "task_first" not in app.storage.user:# No verifiable handoff on THIS request, and nothing resolved yet -- resolve directly.# (If task_first IS already cached and this request carries no genuine handoff, there is
PROJECT_LOG.md+52
order_link.py+41
questionnaires.py+42-11
web_app.py+58-8