Skip to content

feat(publishing): change one location scheme parameter value - #5372

Merged
natechadwick-intsof merged 5 commits into
mainfrom
fix/issue-5360-scheme-parameter-value
Oct 8, 2026
Merged

natechadwick-intsof merged 5 commits into
mainfrom
fix/issue-5360-scheme-parameter-value

Conversation

@natechadwick-intsof

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

Copy link
Copy Markdown
Collaborator

Summary

Publishing Design can change one stored location scheme parameter value on the existing scheme PUT (updateParameterValue), the same one-parameter shape as add and remove. The stored name, type, and sequence stay. Other parameters stay. Scheme identity fields stay unless those fields are present. A blank value does not clear the stored value. Cancel does not write. HTTP 400, 403, and 409 leave the previous value in place. A name that is not on the scheme is HTTP 409.

This is slice 94 of parent #4531. Type (#5361) and sequence (#5362) stay out of scope.

Fixes #5360

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

Test plan

  1. Publish, Design, Contexts. Open a location scheme that has at least two parameters. Choose Value on one parameter.
  2. Save a new non-blank value. The list shows that value only after the save succeeds. The parameter name, type, and sequence stay. The other parameter stays. The scheme name, generator, description, content type, and template stay.
  3. Enter only spaces and save. The form reports that a value is required and the stored value stays.
  4. Cancel after an edit and decline the confirm, or cancel before editing. The stored value stays.
  5. A name that is not on the scheme, or HTTP 400, 403, or 409 from the save, leaves the previous value in place.

H2 proof: TEST_CMS_URL=http://127.0.0.1:9993, npm run test:surface -- --path tests/publishing/designLocationSchemeParameterValue.spec.js — 2 passed. console-clean=yes. server.log-clean=yes.

Checklist

  • Product documentation — updated product-docs/8.2/admin/publishing.md (Change one location scheme parameter value)
  • Unit / module tests — sitemanage PSPublishingDesignRestServiceTest value cases, Jackson flag bind, Vitest locationSchemeParameterValue.test.ts and ContextsPanel.schemeParameterValue.test.tsx
  • WebUI + Playwright — modules/perc-qa-automation/frontend/tests/publishing/designLocationSchemeParameterValue.spec.js (2 passed on H2)
  • Build gates — standalone clean install for projects/sitemanage, WebUI, and modules/perc-qa-automation (no skipTests). No final / signature change, so no reverse-dep install.
  • Cross-platform — no new filesystem path construction

Build evidence

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

downstream_checked: none (no final, sealed, or public signature change; grep found no extends PSLocationSchemeSummary)

  • cd projects/sitemanage && JAVA_HOME=/usr/lib/jvm/java-21-openjdk rtk mvn clean install — Tests run: 3761, Failures: 0, Errors: 0, Skipped: 125, BUILD SUCCESS, Total time 36.613 s, Finished 2026-10-07T21:08:15-04:00
  • cd WebUI && JAVA_HOME=/usr/lib/jvm/java-21-openjdk rtk mvn clean install — Java Tests run: 69, Failures: 0, Errors: 0, Skipped: 0; Vitest Test Files 727 passed (727), Tests 6868 passed (6868); BUILD SUCCESS, Total time 01:47 min, Finished 2026-10-07T21:10:33-04:00
  • cd modules/perc-qa-automation && JAVA_HOME=/usr/lib/jvm/java-21-openjdk rtk mvn clean install — No tests to run (Playwright is the C5 surface, not the default Maven profile); BUILD SUCCESS, Total time 1.634 s, Finished 2026-10-07T21:15:36-04:00

UI proof (C5)

  • python3 docker/scripts/perc-devctl.py qa-up --skip-image-build — RESULT:OK, TEST_CMS_URL=http://127.0.0.1:9993, QA_CMS_HOST_PORT=9993
  • python3 docker/scripts/perc-devctl.py qa-health — RESULT:OK HTTP:200 HEALTH:healthy
  • python3 docker/scripts/perc-devctl.py qa-deploy-war-jars --restart-jetty — copied perc-system, sitemanage, rest, extensions-workflow, and utils SNAPSHOT jars into /opt/Percussion/jetty/base/webapps/Rhythmyx/WEB-INF/lib and ran in-cell StopJetty/StartJetty. RESULT:OK
  • python3 docker/scripts/perc-devctl.py qa-health — RESULT:OK HTTP:200 HEALTH:healthy
  • python3 docker/scripts/perc-devctl.py qa-deploy-webui — copied WebUI/target/generated-webui/cm/modern (publishing bundle contains location-scheme-parameter-value). RESULT:OK
  • python3 docker/scripts/perc-devctl.py qa-health — RESULT:OK HTTP:200 HEALTH:healthy
  • cd modules/perc-qa-automation/frontend && 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/designLocationSchemeParameterValue.spec.js — 2 passed (3.8s)
  • console-clean=yes (spec asserts no pageerror or unexpected console error)
  • server.log-clean=yes (new lines were two Admin login SUCCESS audit records only)

Pre-push local code review

Erlang review — PR #5372

Scope

Verdict

Recommendation: approve. Blocking bugs: 0. May merge: yes.

Re-review after 8142d5f027 extracted scheme-parameter mode checks and apply out of updateScheme. That was the only in-diff bug on the previous head (updateScheme cognitive=36, over the pack 2× line of 30). It is gone.

Independent read: the extraction preserves the value-one contract. Exactly one stored parameter is updated. A blank or null value is HTTP 400 and does not clear the stored value. A name that is not stored is HTTP 409. Request type and sequence are ignored, so the stored type, sequence, and parameter id stay, and the other parameter stays. Add or remove combined with a value change is HTTP 400 before load. Identity fields change only when present. Sitemanage tests, Jackson binding, Vitest, product docs, and the H2 Playwright spec still match that contract. No filesystem path joins. No agent rule files.

Suggestions, not blockers: prepareSchemeParameterValueChange cognitive=19 and applySchemeParameters cognitive=16, both under the bug line. llm.error is Ollama CUDA out of memory, not a product defect.

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

Summary

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

Scope

  • Base: origin/main
  • Head: HEAD
  • Files: 13 analyzed
  • In-diff: 2 finding(s); preexisting: 0
  • 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: projects/sitemanage/src/main/java/com/percussion/publishingdesign/impl/PSPublishingDesignRestService.java:2041 (in-diff)
  • Rule: complexity.cognitive
  • Tool: arborist-metrics
  • Description: Function prepareSchemeParameterValueChange cognitive=19 (max 15), cyclomatic=15 (max 15)
  • Suggestion: Extract helpers, reduce nesting, use guard clauses (see CODE_STANDARDS).
  • Status: open

Issue 2 -- Severity: suggestion

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

Issue 3 -- 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

PUT updateParameterValue updates exactly one stored parameter value on an
existing location scheme. Name, type, sequence, other parameters, and scheme
identity stay. A blank value does not clear the stored value.

Fixes #5360

> Co-Authored by Grok Build 1.0.46 using grok-4.7 with agent night-issue-prs.
Machine review of the issue 5360 branch diff. Complexity on updateScheme is
advisory. The LLM stage ran out of CUDA memory.

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

Copy link
Copy Markdown
Collaborator Author

Request changes. Do not merge.

In-diff machine bug (mkd-code-review 0.1.18, pack percussion, gate advisory, base origin/main):

  • File: projects/sitemanage/src/main/java/com/percussion/publishingdesign/impl/PSPublishingDesignRestService.java:1404
  • Rule: complexity.cognitive (severity bug; cognitive above 2× the pack threshold of 15)
  • updateScheme cognitive=36 (max 15), cyclomatic=26 (max 15)
  • On origin/main the same method is cognitive=25, cyclomatic=21 (suggestion, under the bug line of 30). This slice crosses that line.

The value-update behavior itself is correct: one stored parameter, blank value does not clear, unknown name is HTTP 409, stored type/sequence/id and the other parameter stay, and add/remove cannot be combined. Tests cover that. Extract the new value-change path (or the surrounding field updates) so updateScheme is back at or under the bug line without changing that behavior.

Suggestions, not blockers: prepareSchemeParameterValueChange cognitive=19 at line 1982; applySchemeParameters cognitive=16 at line 2041. llm.error is Ollama CUDA out of memory, not a product defect.

Full report: docs/ai-generated/code-reviews/pr-5372-erlang.md.

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

Move location-scheme parameter mode checks and apply out of updateScheme
so the method stays within the percussion complexity gate. Add, remove,
value change, and full replace behave as before.

> Co-Authored by Grok Build 1.0.46 using grok-4.7 with agent night-issue-prs-erlang-fix.
The complexity bug on updateScheme is gone. Suggestions stay under the bug line.

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

Copy link
Copy Markdown
Collaborator Author

LGTM. Re-review after 8142d5f027 (split updateScheme parameter mutation).

Independent Erlang review found no in-diff behavioral bug, missing behavioral test, non-portable path, or change-class gap. The previous blocking complexity.cognitive bug on updateScheme (cognitive=36) is gone. Machine gate: 0 blocking bugs. Suggestions only: prepareSchemeParameterValueChange cognitive=19 and applySchemeParameters cognitive=16, both under the 2× bug line. llm.error is Ollama CUDA out of memory, not a product defect. Report: docs/ai-generated/code-reviews/pr-5372-erlang.md (commit 2f455b96f0).

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

@natechadwick-intsof
natechadwick-intsof merged commit 26082e3 into main Oct 8, 2026
8 checks passed
@natechadwick-intsof
natechadwick-intsof deleted the fix/issue-5360-scheme-parameter-value branch October 8, 2026 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

model:grok-4.7 Session model grok-4.7 operator:grok Operator Grok operator:night-issue-prs Overnight issue-to-PR worker

Projects

None yet

Development

Successfully merging this pull request may close these issues.

issue 4531 slice 94: PublishingShell change one location scheme parameter value

1 participant