Skip to content

ci: show why the refresh-cost step failed - #224

Merged
arzafran merged 1 commit into
mainfrom
ci/183-refresh-cost-diagnostics
Jul 31, 2026
Merged

ci: show why the refresh-cost step failed#224
arzafran merged 1 commit into
mainfrom
ci/183-refresh-cost-diagnostics

Conversation

@arzafran

Copy link
Copy Markdown
Member

Refs #183.

What happened

#223 added a dispatch-only step to measure the text-input refresh cost in-process. I dispatched four runs (two on main, two on the fix branch) and all four failed with a single line:

FAIL: Socket closed while waiting for response

That tells you the app died or refused the connection. It does not tell you why. The app's own log is written to /tmp/programa-ci-refresh-cost.log on the runner and never surfaced, so four runs produced no diagnosis.

I guessed twice at the cause — a DispatchQueue.main.sync deadlock, then an assert(Thread.isMainThread) trip from an off-main sendEvent — and both were wrong on inspection (main.sync is the established pattern at eight other sites in that file, and simulateShortcut does hop to main). Rather than guess a third time, this makes the next run answer the question.

What this adds

On failure the step now reports, before exiting non-zero:

  • whether a Programa DEV process is still alive
  • whether the socket exists at the expected path
  • the last 80 lines of the app log

Test plan

  • YAML parses; step body passes bash -n
  • CI green (the step is dispatch-only, so it does not run on this PR)
  • After merge: re-dispatch and read the actual cause

All four dispatched measurement runs failed with a single line:

  FAIL: Socket closed while waiting for response

That says the app died or refused the connection. It does not say why, and the
app's own log sits at /tmp/programa-ci-refresh-cost.log on the runner where
nobody can read it -- so a four-run cycle produced no diagnosis at all.

On failure the step now reports whether the app is still running, whether the
socket exists, and the tail of the app log, before exiting non-zero.

Refs #183
@arzafran
arzafran merged commit de55b85 into main Jul 31, 2026
7 checks passed
@arzafran
arzafran deleted the ci/183-refresh-cost-diagnostics branch July 31, 2026 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant