Skip to content

try? on the delivery path — five defects, one symptom, complete silence #110

Description

@liversedge

From PinPointStudio's preview handover, 28 August 2026, §4.2.

Why this is a defect class and not a style note

Five separate defects sat on the preview delivery path — an unreachable .present, an unchunked payload, a redundant openChannel, a duplicate stream_open, a shed reaching back before opened_at. Every one produced the identical symptom: a black tile on the host, and complete silence at both ends. Each only became visible once the one in front of it was cleared, which is what turned a delivery bug into two days.

⛔ They were silent because each error was swallowed by try?. Their conclusion, and ours: try? on anything that puts bytes on a link is a defect, not a style choice.

What is actually there, surveyed at 2f604b1

File try?
Sources/App/HostLinkSession.swift 18
Sources/App/AppModel.swift 10
Sources/Platform/Capture/LivePreview.swift 2
Packages/Core/Sources/CaptureCore/Live/PreviewProducer.swift 1 (in a comment)
Packages/Core/Sources/CaptureCore/Ppcp/DevicePeer.swift 1 (hasStream, deliberate)

The ones that write to the link are the ones that matter — HostLinkSession.swift:280, :412, :429, :465 all try? await pump.perform { … } around a peer call.

Not all of them are wrong. try? await Task.sleep, a resourceValues read for a file size, and DevicePeer.hasStream's deliberate guard let handle = try? handle() are fine. This is an audit, not a sweep: the question for each is "if this throws, does anything anywhere ever find out?"

LivePreview.swift:63 now carries the corrected record at the site — "delivery used to be try? from end to end … that cost two evenings on 27-28 Aug 2026" — and the three counters that replaced it. That treatment has been applied to one file. This issue is the rest of the path.

Exit criterion

Every try? on a path that puts bytes on a link either propagates, or records a named reason where §2.8's per-stage counters can show it. A line-by-line pass with a note at each site saying which it is — including the ones deliberately left alone.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglayer: uiSources/UI, Sources/Apprelease: v1PRD §10.1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions