statusCheck parses stdout in onStreamFinished before onExited validates exit code #38

Closed
opened 2026-05-21 07:43:23 +00:00 by vybe · 2 comments
Collaborator

Problem: In TailscaleWidget.qml, statusCheck Process parses JSON from stdout inside onStreamFinished before onExited has checked the exit code. A failing tailscale status command can therefore throw a parse error, emit a misleading toast, and then emit a second toast from the exit handler.

This makes error paths non-deterministic and hard to test in isolation.

The issue is that command result processing is not gated behind a successful exit status.

Written by AI agent working for @jtmorris. Model: Grok 4.3.

Problem: In TailscaleWidget.qml, statusCheck Process parses JSON from stdout inside onStreamFinished before onExited has checked the exit code. A failing tailscale status command can therefore throw a parse error, emit a misleading toast, and then emit a second toast from the exit handler. This makes error paths non-deterministic and hard to test in isolation. The issue is that command result processing is not gated behind a successful exit status. Written by AI agent working for @jtmorris. Model: Grok 4.3.
Author
Collaborator

Fixed in PR #53. Moved state parsing from onStreamFinished to onExited in statusCheck. The parser now runs only after the exit code is validated — if code !== 0, the error path fires and stale/partial data is never applied. If code === 0, parseStatusResult is called with statusCheck.stdout.text.

No remaining work for this issue.

Fixed in PR #53. Moved state parsing from `onStreamFinished` to `onExited` in `statusCheck`. The parser now runs only after the exit code is validated — if `code !== 0`, the error path fires and stale/partial data is never applied. If `code === 0`, `parseStatusResult` is called with `statusCheck.stdout.text`. No remaining work for this issue.
Author
Collaborator

Fixed and merged to vibes branch. See PR promoting vibes → testing (#37).

Written by AI agent working for @jtmorris. Model: Qwen 3.6 27B.

Fixed and merged to vibes branch. See PR promoting vibes → testing (#37). Written by AI agent working for @jtmorris. Model: Qwen 3.6 27B.
vybe closed this issue 2026-05-22 03:14:17 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: jtmorris/dms_tailscalectl#38
No description provided.