Skip to content

Plugin Directory: Pin release resolution on legacy data shapes. - #809

Closed
obenland wants to merge 1 commit into
WordPress:trunkfrom
obenland:legacy-data-resolution-tests
Closed

Plugin Directory: Pin release resolution on legacy data shapes.#809
obenland wants to merge 1 commit into
WordPress:trunkfrom
obenland:legacy-data-resolution-tests

Conversation

@obenland

Copy link
Copy Markdown
Member

Follow-up to [15077] / #807: characterization tests for the data shapes the cron path feeds through the new release resolution, which clean fixtures don't naturally produce.

cron_trigger() selects any plugin whose update_source row looks out of sync, so over time every plugin in the directory — including ones untouched for a decade — flows through get_current_release(). These tests pin the legacy shapes that resolution must handle:

  • Empty version and stable_tag metas resolve no release, and the row write neither errors nor defers.
  • A plugin with no releases meta gets it prefilled from the tags meta, resolves by stable tag, and its old release doesn't defer the row.
  • An elapsed cooldown window on an old release doesn't defer the write — resolving more releases than the old version-keyed lookup must not re-hold legacy version bumps.
  • Integer-typed tags (rows written before the string cast in add_release()) resolve, and the strict merge lands on them instead of duplicating.
  • Tag names that aren't the version string (v2.0) resolve by the stable tag; the old lookup couldn't find these at all.

Test-only; no production code changes.

🤖 Generated with Claude Code

The cron path feeds every plugin's historical data through the new
resolution, so the shapes tests can't invent from clean fixtures are
pinned explicitly: empty version/stable_tag metas, releases prefilled
from the tags meta, elapsed cooldown windows on old releases, integer-
typed tags from before the string cast, and tag names that aren't the
version string.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 14, 2026 19:12

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props obenland.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@bazza bazza closed this in 34bcad2 Aug 14, 2026
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