You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
An anchor printed before a part split later resolves to another part and reports exact #2710
core/src/host/chat-index.js:225 (anchorOf) prints an anchor as #<seq> while the chat has one part and as part N #<seq> only afterwards; :305 (aroundOwnChat) resolves a bare #<seq> to parts[parts.length - 1] — the part that is current now, not the part the anchor was printed from. Once parts.js:973 ends a segment and a fresh part becomes current, every bare anchor a Bot saved and quoted back resolves into the wrong part, and the lookup reports success.
/data/dsh/bot/workspace/audit47/repro/chat-index-truth.test.mjs, test divergence: an anchor printed without a part number resolves to another part (real chat-index.js, temp home, real chat-index.sqlite, fake Session log):
part 1 holds seq 2 = "the url is https://example.test/xyz keep it"; the anchor printed at that moment is #2;
a segment ends and part 2 becomes current;
read_own_chat around "#2" returns part 2'sseq 2 and says exact: true.
Control in the same file: the same lookup written as "part 1 #2" reaches the real source. That is also the one-line fix — always print the part number.
Why it matters
The anchor is the tool's own citation: a Bot quotes [#2 · 10-08 14:22] in its answer and later looks it up to check what it said. With the bare form it silently gets a different message from a different part and cannot tell — exact: true is the worst possible answer here. A conversation that grew past its first part is the normal case, not an edge.
Expected
anchorOf always prints part N #<seq> (the form aroundOwnChat already resolves exactly), so an anchor names the part it came from from the first message onward. A bare #<seq> in an older anchor keeps resolving as it does today for compatibility, and the reader says so when it had to guess rather than claiming exact.
Change scope
core/src/host/chat-index.js (anchorOf, and aroundOwnChat's fallback so a guessed part is not reported as exact), the tests in core/test/ that assert the current anchor text, and any doc line that shows the anchor format.
Activity
Name the part in every chat anchor so a saved anchor keeps its message (
Release v0.2.28 (ThinkFlowLab#2777)
test(client): pin the read-only overview's model value in all three c…