Skip to content

testKit: report all root unready APIs on loading timeout + configurable timeout#351

Open
bodia-uz wants to merge 1 commit into
masterfrom
feat/unready-entry-points-report
Open

testKit: report all root unready APIs on loading timeout + configurable timeout#351
bodia-uz wants to merge 1 commit into
masterfrom
feat/unready-entry-points-report

Conversation

@bodia-uz

@bodia-uz bodia-uz commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Why

When createAppHostAndWaitForLoading times out, the message reports a single API from getRootUnreadyAPI(), which walks one dependency chain from an arbitrary first unready entry point — sibling branches are dropped, so when several independent APIs are missing only one (sometimes not the actionable one) is shown.

The 3s timeout is also hardcoded. In heavy integration setups host creation alone exceeds the test runner's timeout, so this informative rejection loses the race and developers only see a bare Exceeded timeout of 5000 ms from Jest.

What

  • repluggableAppDebug.utils.getRootUnreadyAPIs() (plural) — dependencies of unready entry points that are neither ready nor declared by another unready entry point, i.e. the actual blockers (missing entry point/pact, or a contribution that never completed). Replaces the single-chain walk (net −32 lines, no longer loops forever on dependency cycles); getRootUnreadyAPI() is deprecated and returns the first element.
  • the testKit timeout message lists all root unready APIs
  • createAppHostAndWaitForLoading(packages, pacts, timeout = 3000) — optional third parameter, default unchanged

Debug-util specs migrated to the plural util; testKit specs unchanged + two added (multi-root message, custom timeout).

🤖 Generated with Claude Code

@bodia-uz
bodia-uz force-pushed the feat/unready-entry-points-report branch from 2397d1a to 2441dbd Compare July 6, 2026 15:54
@bodia-uz bodia-uz changed the title Report all root unready APIs on host loading timeout + configurable testKit timeout testKit: report all root unready APIs on loading timeout + configurable timeout Jul 6, 2026
@bodia-uz
bodia-uz force-pushed the feat/unready-entry-points-report branch 4 times, most recently from 75980f7 to ebb6474 Compare July 6, 2026 16:48
…y APIs on timeout

getRootUnreadyAPI walked a single dependency chain from an arbitrary first
unready entry point - sibling branches were dropped and only one API was
reported even when several independent APIs are missing. Replace the walk
with getRootUnreadyAPIs (plural) on repluggableAppDebug.utils: dependencies
of unready entry points that are neither ready nor declared by another
unready entry point. The singular util becomes its first element.

The testKit timeout message now lists all of them, and the hardcoded 3s
timeout becomes an optional parameter (default unchanged) so heavy hosts can
raise it above their boot time and let this error surface before the test
runner's own opaque timeout.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@bodia-uz
bodia-uz force-pushed the feat/unready-entry-points-report branch from ebb6474 to 0eb1099 Compare July 6, 2026 17:04
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