Commit ·
cabb4a3
1
Parent(s): d25974f
Send a bare partner id instead of a sentence in the handoff row
Browse filestask_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>
Files changed (2)
- PROJECT_LOG.md+13
- web_app.py+12-5
1043 unmodified lines1044104510461047104810491043 unmodified linessame input — not merely "looks the same," actually checked. Also: `web_app`/`order_link`import cleanly; `test_payment.py`'s 21 tests pass; a tampered row amount is rejected.## 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)1043 unmodified lines10441045104610471048104910501051105210531054105510561057105810591060106110621043 unmodified linessame input — not merely "looks the same," actually checked. Also: `web_app`/`order_link`import cleanly; `test_payment.py`'s 21 tests pass; a tampered row amount is rejected.56. **Item 55's `id` field carried a baked-in label, which doubled up once the receivingscreen added its own wording (2026-10-14)** — `task-pe-cu-nicewebrl-f9` caught this: thistask sent `id="your partner (#12345)"`, which `_ROW_ID_OK` reduces to `"your partner12345"` (parens and `#` aren't in the allowed set), and their screen then wrapped ITS OWNlabel around that, reading "YOUR PARTNER 1 (your partner 12345) earned...".- **Fix, both directions**: this task's `partner_rows` now sends the bare identifier(`str(partner)`, just the partner number) instead of a sentence — matches their own idformat (`"P2-63540"`, also bare). `_row_line()` on the receiving side now adds "yourpartner **{id}**" wording around EITHER side's bare id — this task's own row (alreadybare now) and theirs — so a bare id renders correctly from either direction regardlessof which side sent it.- **Verified**: `web_app` imports cleanly; `test_payment.py`'s 21 tests still 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)
1011 unmodified lines1012101310141015101610171018101910201021102246 unmodified lines1069107010711072107310741075107610771011 unmodified lines# other task's partner(s) only reach here if a verified handoff carried the itemised list# (index()'s pparts1=/ppsig= verification). The other task ran first here (sona_first is# False in this branch), so its rows come first -- the order the participant met them.own_row = {"id": f"your partner (#{partner})", "earned": to_money(partner_pts), "lost": 0.0}other_rows = app.storage.user.get("other_task_partner_rows") or []def _row_line(r):bit = f"**{r['id']}** received **${r['earned']:.2f}**"if r.get("lost"):bit += f" (and lost **${r['lost']:.2f}**)"return bit46 unmodified linespartner_bonus_usd=to_money(partner_pts),# The same thing person by person: one entry, since this task has exactly one# partner. Carried alongside partner_bonus_usd above, not instead of it, so the# other task's final screen still has a total even on a version that only reads that.partner_rows=[{"id": f"your partner (#{partner})","earned": to_money(partner_pts), "lost": 0.0}],# 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"))1011 unmodified lines101210131014101510161017101810191020102110221023102410251026102746 unmodified lines107410751076107710781079108010811082108310841011 unmodified lines# other task's partner(s) only reach here if a verified handoff carried the itemised list# (index()'s pparts1=/ppsig= verification). The other task ran first here (sona_first is# False in this branch), so its rows come first -- the order the participant met them.# `id` is the bare identifier only, never a sentence -- task_pe-cu-nicewebrl's screen# found this the hard way: a label baked in here reads fine alone but doubles up once# their own wording wraps around it too ("YOUR PARTNER 1 (your partner 12345) earned...").# Each screen adds its own wording around the bare id, which is the point of carrying the# id rather than a sentence.own_row = {"id": str(partner), "earned": to_money(partner_pts), "lost": 0.0}other_rows = app.storage.user.get("other_task_partner_rows") or []def _row_line(r):bit = f"your partner **{r['id']}** received **${r['earned']:.2f}**"if r.get("lost"):bit += f" (and lost **${r['lost']:.2f}**)"return bit46 unmodified linespartner_bonus_usd=to_money(partner_pts),# The same thing person by person: one entry, since this task has exactly one# partner. Carried alongside partner_bonus_usd above, not instead of it, so the# other task's final screen still has a total even on a version that only reads# that. `id` is bare -- task_pe-cu-nicewebrl's own id ("P2-63540") is bare too,# and each screen adds its own wording around it; a label baked in here would# double up once their wording wraps around it too.partner_rows=[{"id": str(partner), "earned": to_money(partner_pts), "lost": 0.0}],# 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"))
PROJECT_LOG.md+13
web_app.py+12-5