fix: match terminal codes explicitly in safe-plugin-update poll - #13
Merged
Gmulti merged 1 commit intoMay 15, 2026
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
safe-plugin-update.mdexited the poll loop as soon as.codewas any non-empty value. The/processesstatusenum inopenapi-public.jsonincludespending, so a queued process surfaces a non-empty but non-terminalcode— the loop could declare success while the update was still running.casematch against the three terminal codes (success,failed,finished) and default missing.codetopendingso the still-running signal is unambiguous.SKILL.mdsection 6 so future workflow authors do not re-introduce the bug.skills/regenerated viaUMBRELLA_SKIP_COMPRESS=1 bash scripts/build.sh(mirrors what CI does —claudeCLI is not on the runner so caveman is auto-skipped) sosrc/andskills/stay byte-identical.Closes #4
Test plan
verify-buildCI passes (skills/ matches src/).codeispending/missing and only exits on a terminal code.