Skip to content

feat(publishing): change one location scheme parameter type - #5374

Merged
natechadwick-intsof merged 3 commits into
mainfrom
fix/issue-5361-location-scheme-parameter-type
Oct 8, 2026
Merged

natechadwick-intsof merged 3 commits into
mainfrom
fix/issue-5361-location-scheme-parameter-type

Conversation

@natechadwick-intsof

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

Copy link
Copy Markdown
Collaborator

Summary

Publishing Design changes the type of one stored location-scheme parameter on the existing scheme PUT. updateParameterType keeps the stored name, value, and sequence, and leaves every other parameter and the scheme name, generator, description, content type, and template alone. A blank type does not write. Cancel does not write. A name that is not on the scheme is HTTP 409. HTTP 400, 403, and 409 leave the previous type in place.

Parent tracker: #4531. This is slice 95. Parameter value (#5360) and sequence (#5362) stay out of this PR.

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

Fixes #5361

Test plan

  1. Open Publishing → Design → Contexts, add a location scheme with a path parameter, then add a second parameter (suffix, type BackendColumn, value article).
  2. Choose Type on suffix. Confirm the form shows scheme name, generator, description, content type, template, current type BackendColumn, sequence 1, value article, and the other parameter.
  3. Select String and Cancel. The list still shows BackendColumn and article. No PUT.
  4. Open Type again, leave the type blank, and Save. The alert says the type is required. The current type stays BackendColumn. No PUT.
  5. Select String and Save. The list shows suffix (String) and article only after the save succeeds. Path stays. Scheme identity fields stay. Reopen Type: current type String, sequence 1, value article.
  6. Repeat a save with the PUT forced to HTTP 400, 403, and 409. The form stays open and the list still shows the previous type.

Checklist

  • Product documentation — updated product-docs/8.2/admin/publishing.md (section "Change one location scheme parameter type (Design)"). Frontmatter id unchanged.
  • Unit / module tests — sitemanage behavioral tests for the type-one flag; WebUI Vitest for the body builder and Contexts panel; Playwright surface spec.
  • WebUI + Playwright — modules/perc-qa-automation/frontend/tests/publishing/designLocationSchemeParameterType.spec.js (2 passed on H2).
  • Build gates — standalone rtk mvn clean install for sitemanage, WebUI, and perc-qa-automation. 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. C2 did not apply. PSLocationSchemeSummary gained a Boolean getter/setter only. Grep found no extends PSLocationSchemeSummary and no new PSLocationSchemeSummary() {.

  • cd projects/sitemanage && JAVA_HOME=/usr/lib/jvm/java-21-openjdk rtk mvn clean install — BUILD SUCCESS. Tests run: 3777, Failures: 0, Errors: 0, Skipped: 125.
  • cd WebUI && JAVA_HOME=/usr/lib/jvm/java-21-openjdk rtk mvn clean install — BUILD SUCCESS. Java Tests run: 69, Failures: 0. Vitest Test Files 729 passed, Tests 6915 passed.
  • cd modules/perc-qa-automation && rtk mvn clean install — BUILD SUCCESS (Playwright is not part of the default Maven test run).

UI proof (H2 QA)

  • python docker/scripts/perc-devctl.py qa-up — TEST_CMS_URL=http://127.0.0.1:9993, TEST_DB_TYPE=h2, TEST_PRODUCT=cms, ADMIN_USERNAME=Admin. Password taken from qa-up stdout (not recorded here).
  • Hot deploy into perc-matrix-cms-h2 /opt/Percussion/jetty/base/webapps/Rhythmyx/WEB-INF/lib/: matching sitemanage, rest, and perc-system SNAPSHOT jars, then python docker/scripts/perc-devctl.py qa-deploy-webui. Jetty restarted inside the cell (not docker restart).
  • python docker/scripts/perc-devctl.py qa-health after the matching jars — RESULT:OK HTTP:200 HEALTH:healthy (docker/logs/qa-health-20261008-024520.log).
  • From modules/perc-qa-automation/frontend: rtk npm run test:surface -- --path tests/publishing/designLocationSchemeParameterType.spec.js with TEST_CMS_URL, ADMIN_USERNAME, ADMIN_PASSWORD, TEST_DB_TYPE=h2, TEST_PRODUCT=cms.
  • Result: 2 passed (3.8s). console-clean=yes. server.log-clean=yes (no ERROR/FATAL after the test-window mark).

Pre-push local code review

Independent Erlang review (not the author). Full report:

<!--
Copyright (c) 2026 Intersoft Data Labs, Inc.
Licensed under the Apache License, Version 2.0.
-->

# Erlang review — PR #5374

## Scope

- Persona: erlang 0.1.1
- Persona source: /home/nate/.local/share/mkd/agents/erlang
- Status: mkd-code-review 0.1.18, pack percussion, --gate advisory, --git-base origin/main
- PR: https://github.com/intersoftdatalabs-in/percussioncms/pull/5374
- Base: origin/main (26082e3cf9b54fc1966b90a3c16e9c32fc0f71df)
- Head: e157f09838261a953ab8c4c8145fe31f058f982b
- Files analyzed: 12

## Verdict

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

Independent read of `e157f09838`: `updateParameterType` on the existing scheme PUT replaces one stored parameter type. The server keeps that parameter's stored name, value, and sequence, ignores a value or sequence on the request, and does not replace the other parameters. A blank type is HTTP 400 and writes nothing. A name that is not stored is HTTP 409. Add, remove, or a value change combined with a type change is HTTP 400 before any field is written. A blank stored value is HTTP 400 so the update does not invent a value (`addParameter` requires a non-null value); nothing is written. The Design form omits scheme identity fields, updates the list only after success, and Cancel does not call the update. Sitemanage tests, Jackson binding, Vitest, product docs, and the H2 Playwright spec match that contract. No filesystem path joins. No agent rule files.

Suggestions, not blockers: `prepareSchemeParameterTypeChange` cognitive=20 and `applySchemeParameters` cognitive=16, both under the bug line (2× the pack max of 15). `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: 12 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:2120 (in-diff)
- Rule: `complexity.cognitive`
- Tool: `arborist-metrics`
- Description: Function `prepareSchemeParameterTypeChange` cognitive=20 (max 15), cyclomatic=16 (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:2182 (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

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

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

Fixes #5361

> Co-Authored by Grok Build 1.0.46 using grok-4.7 with agent night-issue-prs.
Machine review of the issue 5361 branch diff. Complexity on the type
validator 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.
@natechadwick-intsof natechadwick-intsof added operator:grok Change authored by Grok operator:night-issue-prs Overnight issue-to-PR workflow model:grok-4.7 Session model grok-4.7 labels Oct 8, 2026
> 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. Independent Erlang review of b856297: 0 blocking bugs. May merge: yes. prepareSchemeParameterTypeChange cognitive=20 is under the bug line. Ollama CUDA OOM is not a product defect. Full report is in this PR body and docs/ai-generated/code-reviews/pr-5374-erlang.md.

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

@natechadwick-intsof
natechadwick-intsof merged commit 93afa0e into main Oct 8, 2026
6 checks passed
@natechadwick-intsof
natechadwick-intsof deleted the fix/issue-5361-location-scheme-parameter-type branch October 8, 2026 03:18
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 Change authored by Grok operator:night-issue-prs Overnight issue-to-PR workflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

issue 4531 slice 95: PublishingShell change one location scheme parameter type

1 participant