Skip to content

fix: align safe-plugin-update Step 6 poll with project-scoped endpoint (#6) - #9

Merged
Gmulti merged 1 commit into
developfrom
fix/issue-6-endpoint-mismatch
Apr 30, 2026
Merged

fix: align safe-plugin-update Step 6 poll with project-scoped endpoint (#6)#9
Gmulti merged 1 commit into
developfrom
fix/issue-6-endpoint-mismatch

Conversation

@Gmulti

@Gmulti Gmulti commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Step 6 of the safe-plugin-update workflow polled the global /processes?per_page=20 while Step 7 read from /projects/<ID>/processes?per_page=20. Two problems:

  1. Internal inconsistency — same workflow, same processId, two different endpoints.
  2. Reliability gap — for accounts with many concurrent processes (agencies managing 50+ sites), the freshly-created processId can drop off page 1 of the global feed within seconds. The select(.id==$PROCESS_ID) then matches nothing, .code // empty returns empty, the poll never sees a terminal state, and the 2-minute loop times out reporting "still queued" even when the update finished in 10 seconds.
-  "https://public-api.wp-umbrella.com/processes?per_page=20" \
+  "https://public-api.wp-umbrella.com/projects/<ID>/processes?per_page=20" \

The project-scoped endpoint avoids the page-1 race because per-project process volume is naturally much smaller, and it now matches Step 7.

Scope

Minimal — only the endpoint URL in Step 6. Two intentional non-changes:

Build verification

  • UMBRELLA_SKIP_COMPRESS=1 bash scripts/build.sh✓ Build complete — 8 markdown file(s) copied
  • diff -r src/skills skills → empty
  • Diff: 2 files (src/ + mirrored skills/), 4 lines total

Test plan

  • Trigger a real plugin update via the workflow on a project with several concurrent processes; confirm the poll matches and exits within the 2-minute window
  • Verify the timeout message still makes sense (now references the same endpoint as the poll)

Closes #6.

Closes #6.

Step 6 polled the global `/processes?per_page=20` while Step 7 read from
`/projects/<ID>/processes?per_page=20`. The mismatch was internally
inconsistent and, more importantly, unreliable for users with many
concurrent processes: the freshly-created processId could drop off page 1
of the global feed within seconds, causing the poll to never find a match
and the loop to silently time out as "still queued" even when the update
had finished.

Switch Step 6 to the same project-scoped endpoint as Step 7. The polling
logic itself (truthy `[ -n "$STATUS" ]` exit) is left as-is — that's
issue #4 and is intentionally out of scope here.

`SKILL.md` section 6 still uses the global form as the canonical
"track any process" example; left untouched on purpose so the generic
guidance stays generic.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Gmulti
Gmulti merged commit d47f5f8 into develop Apr 30, 2026
1 check passed
@Gmulti
Gmulti deleted the fix/issue-6-endpoint-mismatch branch April 30, 2026 04:33
Gmulti added a commit that referenced this pull request Apr 30, 2026
fix: align safe-plugin-update Step 6 poll with project-scoped endpoint (#6)
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 Step 6 polls global /processes, Step 7 uses project-scoped (mismatch)

1 participant