Skip to content

feat(publish): delete a Design publishing context (#5136) - #5150

Merged
natechadwick-intsof merged 5 commits into
mainfrom
fix/issue-5136-delete-publishing-context
Oct 4, 2026
Merged

natechadwick-intsof merged 5 commits into
mainfrom
fix/issue-5136-delete-publishing-context

Conversation

@natechadwick-intsof

@natechadwick-intsof natechadwick-intsof commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Parent: #4531 (slice 69). Design can delete one publishing context. Confirm sends DELETE /services/sitemanage/publishingdesign/contexts/{contextId}. The context leaves the list only after that delete succeeds. Cancel does not call the server. A context that still has location schemes returns HTTP 409 and stays. HTTP 400 and 403 stay in the error region and do not claim success.

CXF was selecting PSRuntimeExceptionMapper ahead of the JAX-RS WebApplicationException mapper, so those design 4xx responses were rewritten to HTTP 500 and logged at error. Explicit client statuses (400–499) are preserved. Wrapped server failures, including HTML preview, stay HTTP 500.

Context save stays #4703. The Design create form still posts a flat body; JAXB requires a context root. The surface spec seeds the disposable context with that root, then drives delete in the PublishingShell.

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

Fixes #5136

Test plan

  1. QA H2: python docker/scripts/perc-devctl.py qa-up then qa-health. TEST_CMS_URL from that run (this session: http://127.0.0.1:9993).
  2. Publish → Design → Contexts. Select a context with no location schemes. Delete context, confirm. The context is gone only after DELETE returns 200/204.
  3. Repeat and dismiss the confirm. No DELETE is sent. The context stays.
  4. Add a location scheme to a disposable context, then delete the context. HTTP 409, alert contains “location schemes”, and the context stays. Schemes are not deleted.
  5. Stub or provoke HTTP 400 and 403. The context stays and the error region shows the failure.

Checklist

  • Product documentation — updated product-docs/8.2/admin/publishing.md (“Delete a publishing context (Design)”)
  • Unit / module tests — PSPublishingDesignRestServiceTest delete cases; PSRuntimeExceptionMapperJacksonNullTest keeps 409 and still maps a wrapped server failure to 500; Vitest contextDelete.test.ts and ContextsPanel.contextDelete.test.tsx
  • WebUI + Playwright — modules/perc-qa-automation/frontend/tests/publishing/designContextDelete.spec.js (4 passed on H2)
  • Build gates — standalone rtk mvn clean install (JDK 21) for each changed module; no skipTests
  • Cross-platform — no new filesystem path construction

Build evidence

modules_built: projects/sitemanage, WebUI, modules/perc-qa-automation

downstream_checked: none (no final/sealed type and no public or protected signature change)

  • cd projects/sitemanage && rtk mvn clean install — Tests run: 3412, Failures: 0, Errors: 0, Skipped: 125, BUILD SUCCESS (2026-10-04T05:59:36-04:00). Focused mapper + design tests before that: Tests run: 71, Failures: 0, BUILD SUCCESS.
  • cd WebUI && rtk mvn clean install — Tests run: 69, Failures: 0; Vitest 642 files / 5854 tests passed; BUILD SUCCESS (2026-10-04T05:45:59-04:00).
  • cd modules/perc-qa-automation && rtk mvn clean install — No tests to run, BUILD SUCCESS (2026-10-04T05:59:47-04:00).
  • Pre-existing javadoc, raw-type, and dependency-plugin warnings on sitemanage/WebUI are baseline. No new warning from this change.

UI proof (C5)

  • python docker/scripts/perc-devctl.py qa-up (skip image rebuild). Container perc-matrix-cms-h2. TEST_CMS_URL=http://127.0.0.1:9993, TEST_DB_TYPE=h2, TEST_PRODUCT=cms, ADMIN_USERNAME=Admin.
  • Hot-deploy into /opt/Percussion/jetty/base/webapps/Rhythmyx/WEB-INF/lib/: worktree sitemanage-8.2.0-SNAPSHOT.jar, plus the installed rest and perc-system jars so the cell can start. In-cell StopJetty.sh, truncate server.log, detached StartJetty.sh. No docker restart of the cell.
  • python docker/scripts/perc-devctl.py qa-health after that restart: RESULT:OK HTTP:200 HEALTH:healthy (docker/logs/qa-health-20261004-100007.log).
  • cd modules/perc-qa-automation/frontend && rtk npm run test:surface -- --path tests/publishing/designContextDelete.spec.js — 4 passed.
  • console-clean=yes (spec fails on pageerror / console error).
  • server.log-clean=yes (no ERROR or FATAL lines in the test window; log grew 760→764).

Pre-push local code review

Erlang review — PR #5150

Scope

CLI stdout (mkd-code-review analyze --format markdown)

Summary

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

Scope

  • Base: origin/main
  • Head: HEAD
  • Files: 10 analyzed
  • 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: suggestion

  • File: review

  • Rule: llm.error

  • Tool: llm

  • Description: model ollama-dev-coder failed: http: status 500 Internal Server Error body {"error":{"message":"llama-server process has terminated: exit status 1: cudaMalloc failed: out of memory\nalloc_tensor_range: failed to allocate CUDA0 buffer of size 5064192000\nerror loading model: unable to allocate CUDA0 buffer","type":"api_error","param":null,"code":null}}

  • Status: open

Interpreter

Independent read of the diff (not the author). Confirm is required. The context leaves the list only after DELETE succeeds; a refresh failure still drops that id and does not pretend the delete failed. Dismissing confirm returns before any request. A context with location schemes is HTTP 409 and deleteContext is not called. PSRuntimeExceptionMapper keeps an explicit 4xx WebApplicationException status (409 stays 409). A wrapped server failure stays 500. requireDesignWrite runs in addition to the site-manager availability check. Companions are present: publishing-design tests, mapper status test, Vitest, surface Playwright, product-docs publishing. No new filesystem path joins. No agent rule files. The local coder model ran out of CUDA memory; that warning is not an in-diff bug. Machine findings kept. Recommendation: approve. May commit/push: yes.

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

Confirm deletes one context with no location schemes only after DELETE
succeeds. A context that still has schemes returns HTTP 409 and stays.
Cancel and HTTP 400/403/409 do not claim success.

Fixes #5136

> Co-Authored by Grok Build 1.0.46 using grok-4.6 with agent night-issue-prs.
> Co-Authored by Grok Build 1.0.46 using grok-4.6 with agent night-issue-prs.
CXF was mapping publishing-design WebApplicationException 409/403/400
responses to HTTP 500. Preserve explicit client statuses and seed the
delete Playwright fixture with the JAXB context root.

Fixes #5136

> Co-Authored by Grok Build 1.0.46 using grok-4.6 with agent night-issue-prs.
> Co-Authored by Grok Build 1.0.46 using grok-4.6 with agent night-issue-prs.
@natechadwick-intsof natechadwick-intsof added operator:grok Changes authored by Grok operator:night-issue-prs night-issue-prs workflow model:grok-4.6 Session model grok-4.6 labels Oct 4, 2026
Independent mkd-code-review 0.1.18 advisory pass on publishing-context delete. In-diff bugs: 0.

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

Copy link
Copy Markdown
Collaborator Author

LGTM. Independent Erlang pass (not the author). mkd-code-review 0.1.18, pack percussion, advisory, --git-base origin/main. Persona erlang 0.1.1.

In-diff bugs: 0. May commit/push: yes. Same-login cannot APPROVE; this comment is the review.

No in-diff machine findings. Ollama dev-coder did not load (CUDA out of memory); machine findings kept. Confirm deletes only after DELETE succeeds; cancel does not call the server; a context with location schemes stays at HTTP 409. The runtime mapper keeps explicit 4xx statuses.

Report commit f5fa7055e8. Full CLI markdown is in the PR body under ## Pre-push local code review and in docs/ai-generated/code-reviews/pr-5150-erlang.md.

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

@natechadwick-intsof
natechadwick-intsof merged commit e7188ac into main Oct 4, 2026
8 checks passed
@natechadwick-intsof
natechadwick-intsof deleted the fix/issue-5136-delete-publishing-context branch October 4, 2026 10:46
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 69: PublishingShell delete a publishing context

1 participant