Skip to content

E2E: clear versioned starter ranking cache in api-mode reset - #505

Draft
ineagu with Copilot wants to merge 1 commit into
developmentfrom
copilot/fix-e2e-failure-release-pr-503
Draft

E2E: clear versioned starter ranking cache in api-mode reset#505
ineagu with Copilot wants to merge 1 commit into
developmentfrom
copilot/fix-e2e-failure-release-pr-503

Conversation

Copilot AI commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Release PR #503’s E2E failure was caused by a cache-version mismatch: Starter_Ranking::VERSION moved to v3, while the E2E API-mode toggle still deleted only v2 transients. When tests switched API mode to down, stale v3 ranking cache was reused and starter_order returned cached slugs instead of [].

  • Use runtime ranking version in E2E cache reset

    • In e2e-tests/mu-plugins/tpc-e2e.php, the /tpc-e2e/v1/api-mode callback now derives the cache version from \TIOB\Starter_Ranking::VERSION (with safe fallback).
  • Invalidate both ranking data and lock transients

    • For both gutenberg and elementor, the callback now clears:
      • tpc_starter_order_{version}_{builder}
      • tpc_starter_order_{version}_{builder}_lock
  • Keep scope limited to test helper mismatch

    • No production ranking logic changes.
    • No search-transient invalidation added, since the failing scenario is specific to starter_order cache reuse.
$ranking_version = class_exists( '\TIOB\Starter_Ranking' )
	? \TIOB\Starter_Ranking::VERSION
	: 'v3';

foreach ( array( 'gutenberg', 'elementor' ) as $builder ) {
	$key = 'tpc_starter_order_' . $ranking_version . '_' . $builder;
	delete_transient( $key );
	delete_transient( $key . '_lock' );
}

@ineagu
ineagu changed the base branch from master to development July 30, 2026 09:45
Copilot AI changed the title [WIP] Fix E2E failure in release PR #503 from GitHub Actions job 90830022480 E2E: clear versioned starter ranking cache in api-mode reset Jul 30, 2026
Copilot AI requested a review from ineagu July 30, 2026 09:55
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.

2 participants