Skip to content

fix: match terminal codes explicitly in safe-plugin-update poll - #13

Merged
Gmulti merged 1 commit into
developfrom
fix/issue-4-safe-plugin-update-poll-terminal-codes
May 15, 2026
Merged

fix: match terminal codes explicitly in safe-plugin-update poll#13
Gmulti merged 1 commit into
developfrom
fix/issue-4-safe-plugin-update-poll-terminal-codes

Conversation

@Gmulti

@Gmulti Gmulti commented May 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Step 6 of safe-plugin-update.md exited the poll loop as soon as .code was any non-empty value. The /processes status enum in openapi-public.json includes pending, so a queued process surfaces a non-empty but non-terminal code — the loop could declare success while the update was still running.
  • Replace the truthy check with a case match against the three terminal codes (success, failed, finished) and default missing .code to pending so the still-running signal is unambiguous.
  • Document the canonical terminal codes in SKILL.md section 6 so future workflow authors do not re-introduce the bug.

skills/ regenerated via UMBRELLA_SKIP_COMPRESS=1 bash scripts/build.sh (mirrors what CI does — claude CLI is not on the runner so caveman is auto-skipped) so src/ and skills/ stay byte-identical.

Closes #4

Test plan

  • verify-build CI passes (skills/ matches src/).
  • Manually trigger a safe plugin update against a real project: confirm the loop sleeps while code is pending/missing and only exits on a terminal code.
  • Loop timeout path (no terminal code within 2 min) still falls through to the "still queued" message.

Step 6 treated any non-empty .code as terminal and broke out of the
poll, but the /processes status enum includes "pending" — a queued
process surfaces a non-empty but non-terminal code, so the loop would
declare success while the update was still running.

Replace the truthy check with an explicit case match against the three
terminal codes (success, failed, finished) and default missing .code to
"pending" so the still-running signal is unambiguous.

Also document the canonical terminal codes in SKILL.md section 6 so
future workflow authors do not re-introduce the same bug.

Closes #4
@Gmulti
Gmulti merged commit ba9b42f into develop May 15, 2026
1 check passed
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.

safe-plugin-update polling exits early on any non-empty process code

1 participant