Skip to content

fix(webex-core): bound services readiness by startup deadline - #5140

Open
robstax wants to merge 1 commit into
webex:nextfrom
robstax:rstachof/bound-services-ready-deadline
Open

fix(webex-core): bound services readiness by startup deadline#5140
robstax wants to merge 1 commit into
webex:nextfrom
robstax:rstachof/bound-services-ready-deadline

Conversation

@robstax

@robstax robstax commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

COMPLETES #N/A

No linked issue. This is an SDK follow-up to WebexServices/webex-web-client#11544.

This pull request addresses

When services.waitForCatalogInit is enabled, catalog initialization is bounded by catalogInitTimeout, but readiness finalization can subsequently wait without a timeout while credentials are refreshing. A refresh that remains in flight can therefore keep services.ready and webex.ready pending beyond the advertised startup bound.

by making the following changes

  • Create one startup deadline when gated catalog initialization begins and reuse it for catalog initialization and readiness finalization.
  • Wait for an in-flight credential refresh only until the remaining startup deadline, then release services readiness.
  • Recheck refresh state after registering the listener and remove the listener after either refresh completion or deadline settlement.
  • Apply the same contract to Services V1 and Services V2.
  • Add focused tests for hung refreshes, normal refresh completion, deadline settlement, and listener cleanup.

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

  • yarn workspace @webex/webex-core build:src
  • yarn workspace @webex/webex-core test:unit --targets services/services.js — 78 tests passed.
  • yarn workspace @webex/webex-core test:unit --targets services-v2/services-v2.ts — 81 tests passed.
  • yarn lint:staged — ESLint passed for all four changed files.
  • Webex Web Client signed-in Playwright regression with the feature enabled and both catalog and refresh requests held open — startup was released at the shared deadline.
  • Webex Web Client signed-in Playwright negative case with the feature disabled — existing immediate-ready behavior was preserved.
  • The same Playwright test against the previously published SDK reproduced the regression: enabled failed at services.ready; disabled passed.

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

I certified that

  • I have read and followed contributing guidelines
  • I discussed changes with code owners prior to submitting this pull request
  • I have not skipped any automated checks
  • All existing and new tests passed
  • I have updated the documentation accordingly

Make sure to have followed the contributing guidelines before submitting.


⚠️ AI Assisted Content 🤖

@robstax
robstax requested review from a team as code owners August 3, 2026 15:20
@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-5140.d3m3l2kee0btzx.amplifyapp.com

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.

1 participant