Skip to content

cluster: Widget XML stop-ship batches A+B+C (#2883/#2884/#2885) - #2897

Merged
natechadwick merged 7 commits into
mainfrom
cluster/night-issue-20260811-widget-xml-stop-ship
Aug 11, 2026
Merged

natechadwick merged 7 commits into
mainfrom
cluster/night-issue-20260811-widget-xml-stop-ship

Conversation

@natechadwick-intsof

Copy link
Copy Markdown
Collaborator

Summary

Overnight same-file thrash absorption for Widget def XML stop-ship batches A/B/C.

Three independent PRs each re-implemented PSWidgetXmlInstallEmitter + dual-ship package-build materialize and rewrote the same thrash paths with different batch-only inventory counts. This cluster unions all three ship-exits onto main so product committed Widget XML goes 48 → 1 (only waived perc.Test).

Thrash files (shared by ≥3 PRs)

  • modules/perc-packages/src/main/java/com/percussion/packages/PSPackageBuilder.java
  • modules/perc-packages/src/main/java/com/percussion/packages/widgetxml/PSWidgetXmlDualShip.java
  • modules/perc-packages/src/main/java/com/percussion/packages/widgetxml/PSWidgetXmlInstallEmitter.java
  • modules/perc-packages/src/main/java/com/percussion/packages/widgetxml/PSWidgetXmlPackageCompiler.java
  • modules/perc-packages/src/test/java/com/percussion/packages/widgetxml/PSWidgetXmlDualShipTest.java
  • modules/perc-packages/src/test/java/com/percussion/packages/widgetxml/PSWidgetXmlInstallEmitterTest.java
  • docs/ai-generated/tasks/template-assembler-normalization/dual-ship-widget-xml-exit.md
  • docs/ai-generated/tasks/template-assembler-normalization/widget-xml-inventory.md

Plus per-batch Widget XML deletes under Packages/**/sys__UserDependency--rxconfig/Widgets/ and M1 criteria refresh (definition-xml-shim-removal-criteria.md).

What landed

Supersedes

Supersedes Original PR Head Absorbed Notes
yes #2890 fix/issue-2883-stop-ship-widget-xml-batch-a yes Batch A (−8); Fixes #2883
yes #2891 fix/issue-2884-stop-ship-widget-xml-batch-b yes Batch B (−20); Fixes #2884
yes #2892 fix/issue-2885-widget-def-xml-batch-c yes Batch C (−19) + M1; Fixes #2885

Test plan / gates

cd modules/perc-packages
..\..\mvnw.cmd clean install
→ BUILD SUCCESS
→ Tests run: 117, Failures: 0, Errors: 0, Skipped: 0
→ package-build materializes install Widget XML for all A+B+C modern-only packages

Committed product Widget XML after cluster: 1 (perc.Test waiver only).

Checklist

  • Product documentation: N/A (engineering dual-ship / inventory docs only; no operator-facing product-docs surface change)
  • Pre-PR Maven: modules/perc-packages standalone clean install green
  • Unit tests: dual-ship A/B/C ship-exit materialize round-trips
  • Does not merge/approve; leaves cluster open for human review

Operator

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

Fixes #2883
Fixes #2884
Fixes #2885

…#2883)

Remove committed sys__UserDependency--rxconfig/Widgets/*.xml from batch A
product packages (baseWidgets, defaultLanguage, event, openGraph, twitter)
now that modern widgets/<stem>/ roots exist (#2862). Add
PSWidgetXmlInstallEmitter so package build materializes install Widget XML
from modern for modern-only packages (deployer/PSWidgetDao wire format).
Keep PSLegacyDefinitionXmlShim and upgrade compilers. Document 48→40
committed Widget def XML count.

Fixes #2883
Refs #2630 #2626 #2862

> Co-Authored by Grok Build using grok-4.5 with agent main.
…ic) (#2884)

Remove committed sys__UserDependency--rxconfig/Widgets/*.xml from batch B
product packages (high-traffic + residual long-tail, 20 widgets / 14 pkgs)
now that modern widgets/<stem>/ roots exist (#2862). Add
PSWidgetXmlInstallEmitter so package build materializes install Widget XML
from modern for modern-only packages (deployer/PSWidgetDao wire format).
Leave batch A dual-ship committed XML (sibling #2883). Keep
PSLegacyDefinitionXmlShim and upgrade compilers. Document 48→28 committed
Widget def XML count.

Fixes #2884
Refs #2630 #2626 #2862

> Co-Authored by Grok Build using grok-4.5 with agent main.
#2885)

Remove committed sys__UserDependency--rxconfig/Widgets/*.xml from batch C
product packages (19 widgets / 19 packages) now that modern widgets/<stem>/
roots exist (#2862). Add PSWidgetXmlInstallEmitter so package build
materializes install Widget XML from modern for modern-only packages.
Refresh definition-xml-shim-removal-criteria M1 snapshot (48→29) and
widget inventory; waive perc.Test. Keep PSLegacyDefinitionXmlShim.

Fixes #2885
Refs #2630 #2626 #2852 #2862

> Co-Authored by Grok Build using grok-4.5 with agent main.
Union A+B ship-exit: keep batch A modern-only tests, add batch B ship-exit
materialize round-trip, dual-issue docs/inventory (48→20 remaining for C+Test).

> Co-Authored by Grok Code using grok-4.5 with agent night-issue-prs-cluster.
Union A+B+C ship-exit: batch C modern-only materialize tests, inventory 48→1
(perc.Test waiver), M1 product non-waived Widget XML cleared in criteria snapshot.

> Co-Authored by Grok Code using grok-4.5 with agent night-issue-prs-cluster.
@kilo-code-bot

kilo-code-bot Bot commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 3 Issues Found | Recommendation: Address before merge

Overview

Severity Count
WARNING 1
SUGGESTION 2
Issue Details (click to expand)

WARNING

File Line Issue
modules/perc-packages/src/main/java/com/percussion/packages/widgetxml/PSWidgetXmlInstallEmitter.java 113 No duplicate-stem guard before writing install Widget XML

SUGGESTION

File Line Issue
modules/perc-packages/src/main/java/com/percussion/packages/widgetxml/PSWidgetXmlInstallEmitter.java 196 Redundant conditional branches in resource filtering
modules/perc-packages/src/main/java/com/percussion/packages/widgetxml/PSWidgetXmlInstallEmitter.java 388 Content CDATA formatting differs from Code CDATA and original Widget XML
Files Reviewed (9 files)
  • modules/perc-packages/src/main/java/com/percussion/packages/PSPackageBuilder.java
  • modules/perc-packages/src/main/java/com/percussion/packages/widgetxml/PSWidgetXmlDualShip.java
  • modules/perc-packages/src/main/java/com/percussion/packages/widgetxml/PSWidgetXmlInstallEmitter.java
  • modules/perc-packages/src/main/java/com/percussion/packages/widgetxml/PSWidgetXmlPackageCompiler.java
  • modules/perc-packages/src/test/java/com/percussion/packages/PSDirectoryWidgetAutoQueryModelTest.java
  • modules/perc-packages/src/test/java/com/percussion/packages/PSDirectoryWidgetSchemaOrgTest.java
  • modules/perc-packages/src/test/java/com/percussion/packages/widgetxml/PSWidgetXmlDualShipTest.java
  • modules/perc-packages/src/test/java/com/percussion/packages/widgetxml/PSWidgetXmlInstallEmitterTest.java

Fix these issues in Kilo Cloud

Previous Review Summaries (2 snapshots, latest commit 8d89f3a)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 8d89f3a)

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
WARNING 1
Issue Details (click to expand)

WARNING

File Line Issue
modules/perc-packages/src/test/java/com/percussion/packages/widgetxml/PSWidgetXmlDualShipTest.java 446 Batch C test missing no-op second-materialize assertion that batch A/B include
Files Reviewed (8 files)
  • modules/perc-packages/src/main/java/com/percussion/packages/PSPackageBuilder.java
  • modules/perc-packages/src/main/java/com/percussion/packages/widgetxml/PSWidgetXmlDualShip.java
  • modules/perc-packages/src/main/java/com/percussion/packages/widgetxml/PSWidgetXmlInstallEmitter.java
  • modules/perc-packages/src/main/java/com/percussion/packages/widgetxml/PSWidgetXmlPackageCompiler.java
  • modules/perc-packages/src/test/java/com/percussion/packages/PSDirectoryWidgetAutoQueryModelTest.java
  • modules/perc-packages/src/test/java/com/percussion/packages/PSDirectoryWidgetSchemaOrgTest.java
  • modules/perc-packages/src/test/java/com/percussion/packages/widgetxml/PSWidgetXmlDualShipTest.java
  • modules/perc-packages/src/test/java/com/percussion/packages/widgetxml/PSWidgetXmlInstallEmitterTest.java

Fix these issues in Kilo Cloud

Previous review (commit ae114a6)

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
WARNING 1
Issue Details (click to expand)

WARNING

File Line Issue
modules/perc-packages/src/test/java/com/percussion/packages/widgetxml/PSWidgetXmlDualShipTest.java 446 Batch C test missing no-op second-materialize assertion that batch A/B include
Files Reviewed (8 files)
  • modules/perc-packages/src/main/java/com/percussion/packages/PSPackageBuilder.java
  • modules/perc-packages/src/main/java/com/percussion/packages/widgetxml/PSWidgetXmlDualShip.java
  • modules/perc-packages/src/main/java/com/percussion/packages/widgetxml/PSWidgetXmlInstallEmitter.java
  • modules/perc-packages/src/main/java/com/percussion/packages/widgetxml/PSWidgetXmlPackageCompiler.java
  • modules/perc-packages/src/test/java/com/percussion/packages/PSDirectoryWidgetAutoQueryModelTest.java
  • modules/perc-packages/src/test/java/com/percussion/packages/PSDirectoryWidgetSchemaOrgTest.java
  • modules/perc-packages/src/test/java/com/percussion/packages/widgetxml/PSWidgetXmlDualShipTest.java
  • modules/perc-packages/src/test/java/com/percussion/packages/widgetxml/PSWidgetXmlInstallEmitterTest.java

Fix these issues in Kilo Cloud


Reviewed by step-3.7-flash · Input: 190K · Output: 20.3K · Cached: 2.7M

Review guidance: REVIEW.md from base branch main

Mirror batch A/B: after first materializeInstallWidgetXml, assert a second
call returns 0 so overwrites of already-present install XML are caught.

Evidence: cd modules/perc-packages; ../../mvnw.cmd clean install → BUILD SUCCESS

> Co-Authored by Grok CLI using grok-4 with agent night-issue-prs-post-work.
natechadwick-intsof added a commit that referenced this pull request Aug 11, 2026
Mirror batch A/B: after first materializeInstallWidgetXml, assert a second
call returns 0 so overwrites of already-present install XML are caught.

Evidence: cd modules/perc-packages; ../../mvnw.cmd clean install → BUILD SUCCESS

> Co-Authored by Grok CLI using grok-4 with agent night-issue-prs-post-work.
@natechadwick
natechadwick enabled auto-merge (squash) August 11, 2026 13:32
@natechadwick
natechadwick disabled auto-merge August 11, 2026 16:00
@natechadwick-intsof
natechadwick-intsof force-pushed the cluster/night-issue-20260811-widget-xml-stop-ship branch from 8d89f3a to 23154c7 Compare August 11, 2026 16:04
@natechadwick
natechadwick merged commit aab9112 into main Aug 11, 2026
4 checks passed
@natechadwick
natechadwick deleted the cluster/night-issue-20260811-widget-xml-stop-ship branch August 11, 2026 16:07
throw new PSWidgetXmlException(
"Cannot emit install Widget XML without stem/id under " + packageDir);
}
Path out = widgetsDir.resolve(stem + ".xml");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

WARNING: No duplicate-stem guard before writing install Widget XML

materializeInstallWidgetXml writes stem + ".xml" in a loop without checking whether a previous widget already claimed that path. If two modern widgets ever resolve to the same stem (e.g. duplicate manifest ids), the second silently overwrites the first and the return value overcounts. compileModernWidgets sorts by id but does not deduplicate.

Consider tracking written stems in a Set<String> and either skipping duplicates with a warning or failing fast.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

String type = res.getType() != null ? res.getType().trim().toLowerCase(Locale.ROOT) : "";
if ("image".equals(type) || "file".equals(type) || type.isEmpty()) {
// Thumbnail already handled; skip generic files that are not CSS/JS.
if (!"css".equals(type) && !"js".equals(type)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

SUGGESTION: Redundant conditional branches in resource filtering

The outer if ("image" || "file" || empty) combined with the inner if (!css && !js) is completely redundant with the subsequent if (!css && !js) at line 200. For image/file/empty types the inner branch always continues, and line 200 would produce the identical result. The outer block adds no behavioral value and could confuse future maintainers into thinking it gates a distinct case.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

model.getContentType() != null && !model.getContentType().isBlank()
? model.getContentType()
: "velocity";
sb.append("\t<Content type=\"").append(escapeAttr(contentType)).append("\"><![CDATA[");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

SUGGESTION: Content CDATA formatting differs from Code CDATA and original Widget XML

The emitted <Content type="..."><![CDATA[...]]></Content> has no internal newlines or indentation, while the <Code> element above it and the original committed Widget XML templates both use indented CDATA sections. This produces install XML that differs in whitespace from the committed originals, which may complicate diff-based review of generated artifacts.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

natechadwick pushed a commit that referenced this pull request Aug 11, 2026
…ces (#3004)

PR #2897 removed dual-ship sys__UserDependency--rxconfig/Widgets/*.xml from
product packages (modern widgets/<stem>/ only). Four sitemanage package-file
regression tests still asserted on the removed install Widget XML paths and
failed on main (4 failures / 1009 tests).

Update PercOpenGraph, SocialButtons, TwitterSummaryCards, and Registration
deprecation tests to read component-package.json / snippets while preserving
the same behavioral assertions.

Evidence: cd projects/sitemanage; ../../mvnw.cmd clean install → BUILD SUCCESS

> Co-Authored by Grok using grok-4.5 with agent main.
natechadwick pushed a commit that referenced this pull request Aug 12, 2026
* feat(sitemanage): default modernPackageRoots for product/H2 installs (#3130)

When widgetDao.modernPackageRoots is blank, discover package roots under
${rxdeploydir}/Packages/Modern (PSModernPackageRootDefaults), materializing
from the perc-packages classpath when the install tree is empty. Stage
Packages/Modern in the distribution and include it in upgrade overwrite.

Keeps PSLegacyDefinitionXmlShim dual-run fallback (#2852). Tests cover
modern-present and modern-absent selection. Criteria/dual-run docs updated.

Parent: #2630 · Fixes #3130

> Co-Authored by Grok Build using grok-4.5 with agent main.

* fix(dual-run): selection metrics evidence harness for M2 (#3131)

Add cumulative modern/legacy (and gadget none) dual-run counters,
snapshot maps, and formatSelectionMetricsSummary() on PSWidgetDao and
GadgetRegistry. CI harness tests assert modern vs legacy selection
metrics; criteria doc documents how to measure M2. No shim deletion.

Parent: #2630

> Co-Authored by Grok Build using grok-4.5 with agent main.

* docs(#3132): criteria M2 snapshot + operator dual-run checklist

Refresh definition-XML shim removal criteria Status snapshot (2026-08-12)
for M1/M2/M3/G1-G6 with merged PR links (#3024/#3025/#3026, cluster #2897)
and open evidence PRs (#3130/#3131). Expand dual-run operator checklist for
H2 qa-up and product install: how to read metrics, when shim must stay, and
what evidence closes M2. Explicitly keep #2852 blocked until M1-M3+G1-G6.
No code deletion.

Parent: #2630 · Fixes #3132

> Co-Authored by Grok Build using grok-4.5 with agent main.

* fix(dual-run): Zip Slip guards + diagnostic logs for modern package roots (#3130)

Address PR #3134 review threads: log resolved modern root paths and full
IOException stack; jar URI parse without URL round-trip; safeResolveUnder on
classpath materialize (CodeQL Zip Slip); unit coverage for path escape.

> Co-Authored by Grok CLI using agent overnight-pr-follow-up.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

2 participants