Skip to content
pi-c Artifact [0ce9a1077c]
Login

Artifact [0ce9a1077c]

Artifact 0ce9a1077cfa4c20fa77295cf7d93136cbe2a205adb1eaf8d6551585e8bc6fb0:

Ticket change [0ce9a1077c] - New ticket [bf37ba145c] Remote: a forked conversation syncs empty on the phone: the follow reads only the fork's own submissions. by dmestas on 2026-11-28 15:43:44.
D 2026-11-28T15:43:44.055
J comment A\sconversation\smade\sby\s`fork_session`\s(or\s`/fork`,\s`pic\sfork\s--at`)\sshows\snothing\son\sthe\sphone.\sFollowing\sit,\spic\sanswers\s`sync`\swith\sa\smark\sat\s0\sand\sno\sevents,\sand\searlier\sis\sabsent,\sso\sthe\spage\sdraws\san\sempty\sconversation\stitled\s"Untitled".\sYet\sits\s`sessions`\srow\ssays\s`seq`\s12,\s`pic\slog`\sshows\sits\sentries,\sand\sthe\sconversation\sit\swas\sforked\sfrom\ssyncs\snormally.\n\nReproduction\s(pi-c\strunk\sa163283659ba,\srelease\sbuild,\san\sisolated\sHOME\spaired\sto\sa\slocal\srelay):\n1.\sFrom\sthe\sphone,\sstart\sa\sconversation\sin\sa\sfolder\sand\ssend\stwo\smessages\s("Plan\sthe\srelease",\s"And\sthe\sdate?").\spic\slog\sshows\sentries\s9\sto\s12.\n2.\sSend\s`fork_session`\swith\sno\s`at`\sto\sit.\sThe\sanswer\sis\ssuccess,\swith\sdata.session\s`W/3455f930`.\n3.\s`sync`\sto\s`W/3455f930`.\spic\ssends\sonly\s`sync`\s(mark)\sat\sseq\s0,\swith\sno\s`event`s\sand\sno\s`earlier`.\sThe\ssame\ssync\sto\sthe\soriginal\ssends\sevents\s11\sand\s12,\sthen\sthe\smark\sat\s12\swith\searlier\s8.\n4.\s`pic\slog\s3455f930`\sprints\sentries\s9\sto\s12.\n\nCode\spath:\s`rmt_syncjob_run`\s(src/remote.c:6743)\scalls\s`pic_follow_new`.\sThe\sfollow's\spass\sreads\s`pic_entry\se\sJOIN\spic_submission\su\s...\sWHERE\su.session_id\s=\s?1`\s(src/attach.c:489-491),\sand\sthe\sstart\smark\scomes\sfrom\s`max(id)\sFROM\spic_submission\sWHERE\ssession_id\s=\s?1`\s(src/attach.c:1142).\sBoth\ssee\sonly\sthe\sconversation's\sown\ssubmissions.\sA\sfork\shas\snone\suntil\sits\sfirst\srequest,\sbecause\sits\sentries\sare\son\sits\s`forked_from`\spath\s(the\srecursive\swalk\sat\ssrc/loop.c:4928\sthat\s`pic\slog`\suses).\s`rmt_earlier`\sand\s`pic_follow_page`\s(earlier\spages)\shave\sthe\ssame\slimit.\n\nExpected:\sa\sfork's\sfollow,\searlier\spages\sand\smark\scover\sits\swhole\spath,\sas\s`pic\slog`\sdoes:\sthe\sinherited\sentries\sup\sto\sthe\sfork\spoint,\sthen\sits\sown.\sThe\spage\sfollows\sa\sfork\sfrom\s`data.session`\sas\ssoon\sas\sthe\sfork\sis\sanswered,\sso\stoday\severy\sfork\sopens\sempty.\n\nFix\sshape:\shave\sthe\sfollow,\spage\sand\smark\squeries\sselect\sentries\son\sthe\ssession's\spath\s(the\s`forked_from`\schain,\seach\sancestor\sup\sto\sits\sfork\spoint),\snot\s`u.session_id\s=\s?1`.\sAdd\sa\sremote\stest\sthat\ssyncs\sa\sfork\sand\spages\searlier\sin\sit.
J severity Important
J status Open
J title Remote:\sa\sforked\sconversation\ssyncs\sempty\son\sthe\sphone:\sthe\sfollow\sreads\sonly\sthe\sfork's\sown\ssubmissions
J type Code_Defect
K bf37ba145c447591a3be941703ea4eac64f09fb2
U dmestas
Z 40b0dc40eb5ed77580cbdca315ad0925