close
Skip to content

Filter Guidelines service queries by content guideline type #529

@henryperkins

Description

@henryperkins

Summary

AI plugin 0.9.0's internal Guidelines service can read the latest wp_guideline without filtering by wp_guideline_type=content. Gutenberg 23.1 made Guidelines type-aware and default artifact guidelines can exist alongside content guidelines, so an artifact guideline can shadow the content guideline in prompt assembly.

Observed behavior

The service queries the latest wp_guideline row without a tax_query. In a site with both artifact and content guideline terms, the newest artifact guideline can be selected for content prompt grounding.

Expected behavior

When the wp_guideline_type taxonomy exists, the content prompt Guidelines service should query wp_guideline_type=content.

Reproduction

  1. Install Gutenberg 23.1.x and AI plugin 0.9.0.
  2. Create one wp_guideline assigned wp_guideline_type=artifact.
  3. Create one wp_guideline assigned wp_guideline_type=content.
  4. Make the artifact guideline newer than the content guideline.
  5. Invoke the AI plugin Guidelines formatting service for content prompt assembly.
  6. Observe that the newest artifact guideline can be selected.

Metadata

Metadata

Assignees

Type

No fields configured for Bug.

Projects

Status
Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions