← Back to list
01Issue
FeatureOpenSwamp CLIPublic
AssigneesNone
Relationships
#4433 stagecraft tracker: tidy up external relations (duplicate entries, id case, second lookup)
Opened by skunk-ape · 11/5/2026
Problem
Small gaps in how the built-in tracker handles relations to another tracker's ticket (swamp-club #4376), found by review and left for later:
- Two entries for one ticket.
relate to=linear:ENG-12while the peer is unreachable stores the reference as written. A laterrelate to=linear:<uuid>once it is reachable adds a second entry for the same ticket, and repeating the original form returns before any read, so it is never moved to the stable id. A resolved read should also check the peer's display id against stored entries, and could upgrade the stored form. - Case-insensitive matching of opaque ids.
sameRefinbackends/builtin.tsfolds case so a display id and stable id match. With a peer whose ids are case-sensitive,relate to=jira:ABCbeside a recordedjira:abcrecords nothing, andunrelateremoves the wrong one. Compare exactly and accept the display form as the only alias, or document the assumption. - A missed lookup costs a second read.
lookupinbackends/builtin_peers.tsasks by name, then scans all of that tracker's tickets on a miss. Against a serve that is a second connection (50 a minute per address), and every ticket body crosses for a not-found reference, a display id or an uppercase stable id. A predicate on the record's own id and display would make it one query.
Why not in #4376
None of them gives a wrong status in normal use. Items 1 to 3 have a workaround (unrelate and relate again).
Also, from the last review round of #4376
- Token file can outlive a stuck read. In
swampPeerRun(backends/builtin_peers.ts) the file is removed only when the spawn settles, butremote()abandons a read still pending 2 seconds after its abort. If the child survives SIGTERM, or a descendant holds its pipes, swamp can exit with the private (mode 600) file still in the temp directory. DESIGN.md's "removed however the read ends" is too strong until this is fixed: remove it on abort or when the grace period ends. - A relation can become unremovable. Remove a peer named like this instance, or rename an instance to match a stored
name:x, andexternalOfreads the reference as local, sounrelatethrowsnot_foundor removes nothing. CheckexternalSide(source, type, given)before classifying the reference. unrelateby another name is silent. A relation stored asdev:ABC-1is not removed bydev:uuid-1, and reportschanged: falsewith the relation still there. Name the external relations of that type to that tracker when nothing matches.- The fallback scan has no limit (see 3). On a very large tracker a deleted ticket can report
timeoutrather thannot_foundon everyfetch_issue. Add--selectand--limit, and report truncation distinctly. - Typo.
REFERENCE.mdhas a stray.:before the peers example.
02Bog Flow
Open
No activity in this phase yet.
03Sludge Pulse
Sign in to post a ripple.