Skip to content

fix(publish): unapprove one incremental queue item (#4913) - #4931

Merged
natechadwick-intsof merged 3 commits into
mainfrom
fix/issue-4913-unapprove-queue-item
Sep 26, 2026
Merged

natechadwick-intsof merged 3 commits into
mainfrom
fix/issue-4913-unapprove-queue-item

Conversation

@natechadwick-intsof

@natechadwick-intsof natechadwick-intsof commented Sep 26, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

PublishingShell can remove approval from one incremental-queue item that is already approved. Confirm calls POST …/incremental/content/{site}/{server}/{contentId}/unapprove, which runs the Reject workflow transition for that content id only and leaves the row queued. The list reloads and that row drops the Approved mark; other approved rows stay approved. Cancel does not call the server. HTTP 400, 403, and 404 stay on the panel and do not clear the badge.

Parent: #4531. Fixes #4913.

Operator: Grok: night-issue-prs (model grok-4.6)

Test plan

  • PSSitePublishServiceUnapproveQueueItemTest — one id Rejects, sibling is not deleted from the queue, 400/403/404
  • Vitest queue mapping and SiteWorkspace confirm/cancel/error
  • Playwright surface tests/publishing-incremental-queue-unapprove.spec.js (5 passed) on H2 QA
  • Human: open Publish, incremental preview, Unapprove one approved row, confirm the other row stays approved

Product documentation

  • Updated product-docs/8.2/admin/publishing.md (Unapprove on an approved incremental queue row)

Maven / C3

  • modules_built: projects/sitemanage, WebUI
  • downstream_checked: none (new method on IPSSitePublishService; only PSSitePublishService implements it; no existing signature changed)
  • cd projects/sitemanage && rtk mvn clean install -DskipITs — BUILD SUCCESS. Surefire aggregate Tests run: 3069, Failures: 0, Errors: 0, Skipped: 125. PSSitePublishServiceUnapproveQueueItemTest Tests run: 6, Failures: 0.
  • cd WebUI && rtk mvn clean install -DskipITs — BUILD SUCCESS. Surefire Tests run: 69, Failures: 0, Errors: 0, Skipped: 0.
  • cd WebUI && rtk npm test -- src/test/ts/publishing/siteWorkspaceQueueList.test.tsx src/test/ts/publishing/incrementalQueue.test.ts — 25 passed (vitest is not bound to the WebUI Maven lifecycle).

C5 UI proof

  • python3 docker/scripts/perc-devctl.py qa-up — TEST_CMS_URL=http://127.0.0.1:9993, container perc-matrix-cms-h2
  • qa-health RESULT:OK HEALTH:healthy
  • qa-deploy-war-jars --restart-jetty (sitemanage + perc-system into Rhythmyx WEB-INF/lib) then qa-health healthy
  • qa-deploy-webui then qa-health healthy
  • TEST_CMS_URL=http://127.0.0.1:9993 ADMIN_USERNAME=Admin TEST_DB_TYPE=h2 TEST_PRODUCT=cms rtk npm run test:surface -- --path tests/publishing-incremental-queue-unapprove.spec.js — 5 passed
  • console-clean=yes (spec pageerror/console error listeners empty on confirm and cancel)
  • server.log-clean=yes for the Playwright window (install-time H2 view errors were before the test run; no feature ERROR during the surface run)

Pre-push local code review

Summary

Machine analysis found 9 finding(s), 0 bug(s).

Scope

  • Base: origin/main
  • Head: HEAD
  • Files: 13 analyzed
  • In-diff: 2 finding(s); preexisting: 7
  • Persona: erlang 0.1.1
  • Persona source: /home/nate/.local/share/mkd/agents/erlang

Recommendation

approve

Gate

  • Blocking bugs: 0
  • May commit/push: yes

Issues

Issue 1 -- Severity: bug

  • File: projects/sitemanage/src/main/java/com/percussion/sitemanage/service/impl/PSSitePublishService.java:551 (preexisting)
  • Rule: paths.hardcoded_sep
  • Tool: paths.hardcoded_sep
  • Pattern-id: paths.hardcoded-sep
  • Description: Possible non-portable path construction (line 551)
  • Suggestion: Use Path/PathBuf, path.join, File.separator, or pathSeparator — not literal / or \ joins.
  • Status: open

Issue 2 -- Severity: bug

  • File: projects/sitemanage/src/main/java/com/percussion/sitemanage/service/impl/PSSitePublishService.java:758 (preexisting)
  • Rule: paths.hardcoded_sep
  • Tool: paths.hardcoded_sep
  • Pattern-id: paths.hardcoded-sep
  • Description: Possible non-portable path construction (line 758)
  • Suggestion: Use Path/PathBuf, path.join, File.separator, or pathSeparator — not literal / or \ joins.
  • Status: open

Issue 3 -- Severity: bug

  • File: projects/sitemanage/src/main/java/com/percussion/sitemanage/service/impl/PSSitePublishService.java:779 (preexisting)
  • Rule: paths.hardcoded_sep
  • Tool: paths.hardcoded_sep
  • Pattern-id: paths.hardcoded-sep
  • Description: Possible non-portable path construction (line 779)
  • Suggestion: Use Path/PathBuf, path.join, File.separator, or pathSeparator — not literal / or \ joins.
  • Status: open

Issue 4 -- Severity: bug

  • File: projects/sitemanage/src/main/java/com/percussion/sitemanage/service/impl/PSSitePublishService.java:806 (preexisting)
  • Rule: paths.hardcoded_sep
  • Tool: paths.hardcoded_sep
  • Pattern-id: paths.hardcoded-sep
  • Description: Possible non-portable path construction (line 806)
  • Suggestion: Use Path/PathBuf, path.join, File.separator, or pathSeparator — not literal / or \ joins.
  • Status: open

Issue 5 -- Severity: bug

  • File: projects/sitemanage/src/main/java/com/percussion/sitemanage/service/impl/PSSitePublishService.java:808 (preexisting)
  • Rule: paths.hardcoded_sep
  • Tool: paths.hardcoded_sep
  • Pattern-id: paths.hardcoded-sep
  • Description: Possible non-portable path construction (line 808)
  • Suggestion: Use Path/PathBuf, path.join, File.separator, or pathSeparator — not literal / or \ joins.
  • Status: open

Issue 6 -- Severity: bug

  • File: projects/sitemanage/src/main/java/com/percussion/sitemanage/service/impl/PSSitePublishService.java:1139 (preexisting)
  • Rule: paths.hardcoded_sep
  • Tool: paths.hardcoded_sep
  • Pattern-id: paths.hardcoded-sep
  • Description: Possible non-portable path construction (line 1139)
  • Suggestion: Use Path/PathBuf, path.join, File.separator, or pathSeparator — not literal / or \ joins.
  • Status: open

Issue 7 -- Severity: suggestion

  • File: modules/perc-qa-automation/frontend/tests/publishing-incremental-queue-unapprove.spec.js:75 (in-diff)
  • Rule: complexity.cognitive
  • Tool: arborist-metrics
  • Description: Function stubQueueApis cognitive=20 (max 15), cyclomatic=13 (max 15)
  • Suggestion: Extract helpers, reduce nesting, use guard clauses (see CODE_STANDARDS).
  • Status: open

Issue 8 -- Severity: suggestion

  • File: projects/sitemanage/src/main/java/com/percussion/sitemanage/service/impl/PSSitePublishService.java:954 (preexisting)
  • Rule: complexity.cognitive
  • Tool: arborist-metrics
  • Description: Function approveQueuedIncrementalContent cognitive=15 (max 15), cyclomatic=16 (max 15)
  • Suggestion: Extract helpers, reduce nesting, use guard clauses (see CODE_STANDARDS).
  • Status: open

Issue 9 -- Severity: suggestion

  • File: projects/sitemanage/src/main/java/com/percussion/sitemanage/service/impl/PSSitePublishService.java:1009 (in-diff)
  • Rule: complexity.cognitive
  • Tool: arborist-metrics
  • Description: Function unapproveQueuedIncrementalContent cognitive=16 (max 15), cyclomatic=17 (max 15)
  • Suggestion: Extract helpers, reduce nesting, use guard clauses (see CODE_STANDARDS).
  • Status: open

Co-Authored by Grok Build 1.0.41 using grok-4.6 with agent night-issue-prs.

Confirm runs the Reject transition for that queued content id only and reloads the list. Cancel writes nothing. HTTP 400, 403, and 404 stay on the Publishing shell.

> Co-Authored by Grok Build 1.0.41 using grok-4.6 with agent night-issue-prs.
> Co-Authored by Grok Build 1.0.41 using grok-4.6 with agent night-issue-prs.
sitePublishService.unapproveQueuedIncrementalContent(siteName, serverName, contentId);
return Response.noContent().build();
} catch (PSIncrementalQueueStatusException e) {
return Response.status(e.status()).entity(e.getMessage()).type(MediaType.TEXT_PLAIN).build();

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mitigation (commit 489915f53c0ddaa4c105b53d8dbd6b402c42e99c): unapproveQueuedIncrementalContent no longer puts e.getMessage() on the HTTP entity. Status 400/403/404 return a fixed phrase (unapproveClientMessage); the real failure is logged server-side. A PSSitePublishException on this method becomes HTTP 500 without the exception text. Covered by PSSitePublishServiceWebAdapterUnapproveQueueItemTest (sitemanage clean install -DskipITs: Tests run: 3143, Failures: 0).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correction: PR #4931 was already merged at 8da61d5aff7a29f08538a72619eafee66d4a9271 (2026-09-26T11:33:19Z) and the head ref was deleted before 489915f53c was pushed. That commit is not in the merge and not on main. The unapprove handler on main still returns e.getMessage(). This thread is left open because the mitigation did not ship. No follow-up PR was opened in this pass.

Record the mkd-code-review advisory pass (0 in-diff bugs) before merge.

> Co-Authored by Grok Build 1.0.41 using grok-4.6 with agent night-issue-prs-erlang.
@natechadwick-intsof

Copy link
Copy Markdown
Collaborator Author

LGTM. Same-login APPROVE is rejected, so this is the review record. Independent Erlang pass on 78ef69b: mkd-code-review advisory, 0 in-diff bugs. Preexisting paths.hardcoded_sep rows and cognitive suggestions (Playwright stub and unapproveQueuedIncrementalContent) do not block. Behavioral tests, product-docs, and the Playwright surface are present. Report: docs/ai-generated/code-reviews/pr-4931-erlang.md.

Co-Authored by Grok Build 1.0.41 using grok-4.6 with agent night-issue-prs-erlang.

@natechadwick-intsof
natechadwick-intsof merged commit 8da61d5 into main Sep 26, 2026
6 checks passed
@natechadwick-intsof
natechadwick-intsof deleted the fix/issue-4913-unapprove-queue-item branch September 26, 2026 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

model:grok-4.6 Session model grok-4.6 operator:grok Changes authored by Grok operator:night-issue-prs night-issue-prs workflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

issue 4531 slice 41: PublishingShell unapprove one incremental queue item

2 participants