The ONE place a pw-link subprocess's stderr text is parsed into a code — never re-matched
at each call site. pw-link carries no structured errno (unlike the native addon's
completion object, whose .code is the real negative errno — see
audio-engine/src/graph.ts's isDuplicateLinkError): its exit status is not specific enough
to tell "already linked" from "not linked yet" apart (both are a generic non-zero exit), and
its strerror suffix is translated into whatever locale the console boots under (the live
rig's own message was Catalan, El fitxer ja existeix). This function is the sole reader of
that text; everything downstream reads the CODE it returns, not the string again.
Control-flow correctness never depends on this classification succeeding: a pw-link
CONNECT/DISCONNECT always verify-after-fail against the live graph afterwards
(PipeWireBackend.connect/disconnect in audio-engine/src/graph.ts) — an UNKNOWN here
just means the exec-level retry (below) is not short-circuited, not that the outcome is
misjudged.
The ONE place a
pw-linksubprocess's stderr text is parsed into a code — never re-matched at each call site.pw-linkcarries no structured errno (unlike the native addon's completion object, whose.codeis the real negative errno — seeaudio-engine/src/graph.ts'sisDuplicateLinkError): its exit status is not specific enough to tell "already linked" from "not linked yet" apart (both are a generic non-zero exit), and its strerror suffix is translated into whatever locale the console boots under (the live rig's own message was Catalan,El fitxer ja existeix). This function is the sole reader of that text; everything downstream reads the CODE it returns, not the string again.Control-flow correctness never depends on this classification succeeding: a
pw-linkCONNECT/DISCONNECT always verify-after-fail against the live graph afterwards (PipeWireBackend.connect/disconnectinaudio-engine/src/graph.ts) — anUNKNOWNhere just means the exec-level retry (below) is not short-circuited, not that the outcome is misjudged.