Skip to content

chore(ci): gate releases on configurable consumer builds - #752

Open
bhabalan wants to merge 9 commits into
webex:nextfrom
bhabalan:codex/consumer-build-release-gate
Open

bhabalan wants to merge 9 commits into
webex:nextfrom
bhabalan:codex/consumer-build-release-gate

Conversation

@bhabalan

@bhabalan bhabalan commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

COMPLETES https://jira-eng-sjc12.cisco.com/jira/browse/CAI-8661

Adds the requested configurable consumer bundler release checks. Related regression fix: #751, now included through merges from next. No separate issue was supplied.

This pull request addresses

The fixture uses Momentum UI 26.197.0, matching both Contact Center sample apps, as requested. All five bundlers are enabled. This version is below Station Login's declared >=26.201.9 peer minimum; that existing mismatch is documented rather than changing a package contract in this workflow PR. Fork evidence and current runs.

A package can pass the repository's Webpack build and fail when a host app uses another bundler. We need consumer checks before publishing, with an opt out for each bundler.

This revision preserves the existing release tooling: package-tools sync/increment, build:prod, and workspace deploy:npm. The custom archive publisher was removed.

by making the following changes

  • Add a read-only consumer workflow for PRs to next and for release checks.
  • Read one tooling/consumer-builds/config.json file for both paths. Webpack, Vite, Parcel, Rollup, and esbuild are enabled by default. Set a bundler's enabled flag to false to omit its check. Invalid flags and disabling all five fail validation.
  • Use the existing package tools to select release versions and build production packages once. Pack all nine Contact Center workspaces for consumer checks. Save the prepared package manifest changes as a Git patch with the candidate artifact, and retain the existing production distributable cache.
  • Build the consumer with each enabled bundler in a separate job. Check public React imports, the direct AI Assistant import, and Web Component registration in Chromium below a nested URL. Use standard CSS, Sass, font, and image support.
  • Require all enabled checks to pass before publishing. Restore the prepared versions and production build, verify candidate hashes and identities, repack the restored workspaces, compare their normalized contents with the tested candidates, then run the original workspace deploy:npm command with the changed package selection and branch tag. A missing build cache or manifest patch conflict stops publishing.
  • Preserve workspace-specific publish scripts, including the exclusion of @webex/test-fixtures. Keep the existing version outputs, documentation, tags, and release comments.
  • Pass the npm token through YARN_NPM_AUTH_TOKEN only in the deploy step. Preparation and consumer jobs have no publishing credentials.
  • Read bundler configuration in a separate assignment in both workflows so command errors stop the job. Reject invalid and all-disabled config before writing a matrix. Keep tooling tests independent of operator opt-outs.
  • Keep @momentum-ui/react-collaboration at the Contact Center samples' 26.197.0. Add a regression test that checks the fixture and lockfile against both sample pins. Document the Station Login peer-range exception and the newer Momentum CSS failures.
  • Pin the consumer tools and UI peers in an independent fixture lockfile. Save failure logs and package hashes as workflow artifacts.
  • Add regression tests and update ai-docs/CONSUMER_BUILDS.md and its spec index links.

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Tooling change
  • Internal code refactor

The following scenarios were tested

  • The testing is done with the amplify link

  • Immutable Yarn install and development and production builds on the current PR branch.

  • 76 consumer gate tests passed, within all 100 root tooling tests. Helper line coverage exceeds 90%. Tests cover bundler opt outs, invalid configuration, archive integrity and identity, build and browser failures, manifest patch restoration and conflicts, empty patches, release job dependencies, the existing deploy command, and deployment failure propagation.

  • A separate local fixture used real Yarn 4.5.1 with harmless workspace deploy scripts. Prepared versions, package selection, forwarded access/tag arguments, test-fixtures exclusion, and failed deployment handling passed. No publish command ran.

  • Yarn accepted the deploy step's auth environment setting with a dummy value.

  • actionlint, formatting, and the repository styles check. Styles reported zero errors and six existing warnings in the unchanged Web Component sample.

  • All five current-head fork consumer builds and Chromium startup checks passed. All five local checks also passed. The ten result reports match the same nine candidate archive hashes.

  • Real Yarn 4.5.1 verification with all nine production archives passed for matching workspaces, failed with exit code 1 after modifying cc-widgets/dist/index.js, and passed after restoration. Candidate archives stayed unchanged.

  • On the final head, changing only parcel.enabled to false passed all 100 tooling tests and produced a four-bundler matrix. A direct Parcel command failed before installation while disabled. The five-bundler default config was restored.

  • Ten shell tests execute the actual workflow configuration steps, including invalid flags, missing config, all-disabled config, and valid opt-outs.

  • Full pre-commit hook passed without a bypass: 1,915 passed test executions across 98 suite executions, with seven existing skips. The root script runs the meetings suite twice. Styles passed with zero errors and six existing warnings.

  • Staged secret-pattern scan and git diff --check.

Consumer Pinned version Production build and Chromium startup at dec8f305
Webpack 5.111.1 Passed
Vite 8.3.4 Passed
Parcel 2.16.4 Passed
Rollup 4.64.5 Passed
esbuild 0.28.2 Passed

The full hook passed on the final commit. An earlier local attempt had a Jest worker SIGSEGV in IncomingTask; its four tests passed on isolated retry, and the complete hook passed on retry without a bypass.

The original baseline at c298215c failed the Vite check on the inline wellness loader. The branch includes #751 through its merges from next. The earlier fork run passed all five tools with the same Contact Center UI pin. Updating to 26.201.9 caused Vite and Parcel to reject vendor CSS; local 26.214.0 checks reproduced it. The fixture therefore keeps the Contact Center samples' version by request. Both install commands use --legacy-peer-deps; this evidence does not validate Station Login's higher declared minimum.

The current head is dec8f3058056edd7882de8b9b54a404158a85200. The consumer run passed all six jobs: package preparation and all five bundlers. The unit/lint run passed, including all 100 tooling tests and 1,915 passed test executions, with seven existing skips. The fork test merge and PR head have the same Git tree. All five CI reports and all five local results match the same nine archive hashes.

These checks cover the fixture and pinned versions. They do not cover all consumer settings, development servers, media playback, CSP policies, or authenticated agent sessions.

Testing and configuration: Consumer build release checks.

Rollback: revert this workflow change. To omit one bundler check, change its config flag.

The GAI Coding Policy And Copyright Annotation Best Practices

  • GAI was not used (or, no additional notation is required)
  • Code was generated entirely by GAI
    • GAI Coding Policy and Copyright Annotation Best Practices: OpenAI Codex generated the code, tests, and documentation. Existing copyright notices are retained. Human review is required before merge.
  • GAI was used to create a draft that was subsequently customized or modified
  • Coder created a draft manually that was non-substantively modified by GAI (e.g., refactoring was performed by GAI on manually written code)
  • Tool used for AI assistance (GitHub Copilot / Other - specify)
    • Github Copilot
    • Other - OpenAI Codex
  • This PR is related to
    • Feature
    • Defect fix
    • Tech Debt
    • Automation

Checklist before merging

  • I have not skipped any automated checks
  • All existing and new tests passed
    • All executed checks passed. Seven existing unit cases and two label-gated authenticated E2E jobs were skipped.
  • I have updated the testing document
  • I have tested the functionality with amplify link

Make sure to have followed the contributing guidelines before submitting.

@aws-amplify-us-east-2

Copy link
Copy Markdown

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-752.d1b38q61t1z947.amplifyapp.com

@bhabalan
bhabalan marked this pull request as ready for review October 16, 2026 05:23
@bhabalan
bhabalan requested a review from a team as a code owner October 16, 2026 05:23
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-27T21:06:04.505714Z efe075b New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@bhabalan bhabalan added the validated Indicates that the PR is ready for actions label Oct 16, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 46833d8cab

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tooling/consumer-builds/candidates.cjs Outdated
@github-actions github-actions Bot removed the validated Indicates that the PR is ready for actions label Oct 22, 2026
@bhabalan
bhabalan requested review from akulakum and rsarika October 22, 2026 06:15
@bhabalan bhabalan added the validated Indicates that the PR is ready for actions label Oct 26, 2026

@akulakum akulakum left a comment

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.

Two inline comments covering published-content verification and the consumer fixture's supported peer version.

Comment thread .github/workflows/deploy.yml
"dependencies": {
"@momentum-ui/core": "19.16.0",
"@momentum-ui/icons": "8.28.5",
"@momentum-ui/react-collaboration": "26.197.0",

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.

[Nonblocking] Use a supported Momentum UI peer version in the fixture

The fixture pins @momentum-ui/react-collaboration to 26.197.0, but @webex/cc-station-login declares a minimum of 26.201.9. Because both install commands use --legacy-peer-deps, the checks run with this unsupported combination. Could we update the pin and lockfile to a version satisfying all tested packages’ peer requirements?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in fbfb39d1. The fixture now pins @momentum-ui/react-collaboration to 26.201.9, and its npm lockfile was regenerated. I checked the fixture pins against every tested Contact Center package's direct peer requirements, including cc-station-login; all ranges are satisfied. The fixture manifest and resolved lockfile versions also match.

Validation evidence and fresh fork run.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The requested peer pin and lockfile update are present. The supported-peer fork matrix exposed an upstream CSS error: MeetingRowContent.style.scss emits ::part(icon) path, which Vite and Parcel reject. Webpack, Rollup, and esbuild passed.

I also tried published 26.214.0 locally; its nested Sass emits the same selector and both checks failed. Sampled intermediate versions contain the same block. The fixture keeps the minimum supported 26.201.9, and the CSS failures remain visible in the gate. I am leaving this thread open to track that dependency blocker. Full evidence and current reruns.

@bhabalan bhabalan Oct 27, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The requested direction for this PR is to keep the Momentum version already used by Contact Center. Both the React sample and Web Component sample pin 26.197.0.

dec8f305 keeps that fixture pin and lockfile, enables all five bundlers, and adds a test that checks both sample pins and the lockfile. All five local production builds and Chromium startup checks passed. All five also passed in the current fork run; its reports match the same nine archives used locally.

This is an explicit exception to the requested peer-range alignment. Station Login still declares >=26.201.9; 21 of the 22 direct peer requirements are satisfied, with that single mismatch. The standing doc and PR description state the limit and the use of --legacy-peer-deps. Updating to 26.201.9 reproduced vendor CSS failures in Vite and Parcel, and 26.214.0 also failed both local checks. No published package peer range is changed here. I am leaving this nonblocking thread open for review of the version choice. Evidence.

@github-actions github-actions Bot removed the validated Indicates that the PR is ready for actions label Oct 27, 2026
@bhabalan

bhabalan commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor Author

Fork test evidence and review fixes

Current head: dec8f3058056edd7882de8b9b54a404158a85200.

All five bundlers passed locally and in fork CI. The fork unit/lint run also passed. The fork test merge and PR head have the same Git tree.

Bundler Production build and Chromium startup
Webpack Passed
Vite Passed
Parcel Passed
Rollup Passed
esbuild Passed

All five CI reports and all five local results match the same nine candidate archive hashes and package versions. The downloaded archives passed SHA-256 and embedded identity checks. Build logs, results, and candidate manifest are available as Actions artifacts for seven days; the verified hashes are also recorded below.

Contact Center UI version

The fixture keeps Momentum UI 26.197.0, matching the React sample and Web Component sample, as requested. All five bundlers are enabled. A new regression test checks the fixture and lockfile against both sample pins.

This is below Station Login's declared >=26.201.9 minimum. Of 22 direct peer requirements, 21 are satisfied and this is the sole exception. Both fixture install commands use --legacy-peer-deps. The evidence tests the existing Contact Center integration; it does not prove compatibility with Station Login's higher declared minimum. The nonblocking peer-version thread remains open for reviewer acceptance of this choice.

Review fixes

  • consumer-builds:verify repacks restored workspaces into a separate temporary directory and compares package identities, file paths, executable flags, and SHA-256 file hashes with the tested archives. A mismatch stops the existing deploy:npm step. Thirteen regression cases cover archive changes, cleanup, and CLI success/failure.
  • Both workflow configuration steps stop on Node errors before writing a matrix. Ten tests execute the real step scripts for valid opt-outs, invalid configuration, and an all-disabled matrix.
  • Configuration tests follow the checked-in flags, and runner tests use explicit test settings. Config-only opt-outs remain supported.
  • The custom publisher remains removed. Releases keep package-tools sync/increment, build:prod, and workspace deploy:npm.

Validation

  • Fork CI and the full local commit hook passed 1,915 test executions across 98 suite executions, with seven existing skips. This includes all 100 root tooling tests and 76 consumer-gate tests. The root script runs the meetings suite twice. The two label-gated authenticated E2E jobs were skipped.
  • All five local consumer builds and Chromium startup checks passed with the final UI pin and the same nine archives tested by fork CI.
  • On the final head, changing only parcel.enabled to false passed all 100 tooling tests and produced a four-bundler matrix. A direct Parcel command failed before installation while disabled. The five-bundler default config was restored.
  • Real Yarn 4.5.1 verification with nine production archives passed for matching workspaces, rejected a modified cc-widgets/dist/index.js with exit code 1, and passed after restoration. Candidate archives stayed unchanged. That proof uses the exact verifier code in this head.
  • Workflow lint, formatting, the committed credential-pattern scan, and git diff --check passed. Local styles reported zero errors and six existing warnings.
  • An earlier local hook attempt hit a Jest worker SIGSEGV in IncomingTask. Its four tests passed on isolated retry, and the full hook passed on retry without a bypass. The final commit hook passed.
Earlier dependency checks

The run with Momentum UI 26.201.9 passed Webpack, Rollup, and esbuild; Vite and Parcel rejected ::part(icon) path from MeetingRowContent.style.scss. Local 26.214.0 checks reproduced the failure. The current fixture keeps the Contact Center samples' 26.197.0 pin and passes all five checks. The temporary three-bundler config in 52988ff2 is superseded by dec8f305.

Verified candidate SHA-256 values

All nine packages use version 1.28.0-ccwidgets.126.

Package Archive SHA-256
@webex/cc-ai-assistant af961fe93b10e5dd84ec385d5bb6c0d1995097f4a661c6d8ef8923ee30609cd6
@webex/cc-components 6e2f55c812365388e88b518c10ce93840c02c4d2ca308775fe0a1553561337dd
@webex/cc-digital-channels f60e14175b69ad85b2d9b6ac3ed996b3ac311d6de82e18cc6fdb3f51f835e305
@webex/cc-station-login 276c9b92eebf54e4c501e02ef77e78f52a4d5d86809edd83e05e56939472ffe4
@webex/cc-store db923a630a6a34b74d2a3cd5a48ce341ab2d93d282c601f6c5f84dcd0c5d9a17
@webex/cc-task 29881afd20f14e78848ef9005c66301a2b76d88b35fd770db131ca087f915378
@webex/cc-ui-logging e3a7e0ebc81bc1ec94e598535906223c4460440221b7f974a87a66b00fb6cb45
@webex/cc-user-state c5865e182bbd2087b76e8edaaf3ef879c1023d0515b06c3fc26dfedcba5f83aa
@webex/cc-widgets 5e3d4d7f308af1bf497c3cdbbf4cc03fca4d289995e1caf6798c3b380cfd812b

No packages were published. These checks cover the fixture and pinned versions, without an authenticated SDK session, media playback, or CSP validation.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fbfb39d13f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/consumer-builds.yml Outdated
Comment thread tooling/tests/consumer-builds.js Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0e33daae36

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tooling/consumer-builds/config.json

@rsarika rsarika left a comment

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.

Looks good to me. One minor follow-up below.

env: {...process.env, NODE_OPTIONS: '--max-old-space-size=8192', PARCEL_WORKERS: '2'},
stdio: ['ignore', log, log],
});
execute('npm', ['ci', '--legacy-peer-deps', '--no-audit', '--no-fund']);

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.

Minor follow-up: let's align the fixture with Station Login's declared Momentum peer range once the upstream CSS issue is fixed. With --legacy-peer-deps, the gate can pass without checking that dependency contract. The exception is documented, so I'm fine with handling this separately.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants