Skip to content

Add Agent Ready Content integration loader - #7250

Open
shekharnwagh wants to merge 2 commits into
developfrom
add/vipcms-2262-agent-ready-integration-loader
Open

shekharnwagh wants to merge 2 commits into
developfrom
add/vipcms-2262-agent-ready-integration-loader

Conversation

@shekharnwagh

Copy link
Copy Markdown
Contributor

Description

Adds Agent Ready Content to the VIP integration framework. The loader selects the latest available release, gives precedence to customer-loaded copies, and stays inactive when the release files are missing.

Changelog Description

Added

Pre-review checklist

  • This change works and has been tested locally or in Codespaces (or has an appropriate fallback).
  • This change works and has been tested on a sandbox.
  • This change has relevant unit tests (if applicable).
  • This change uses a rollout method to ease with deployment (if applicable - especially for large scale actions that require writes).
  • This change has relevant documentation additions / updates (if applicable).
  • I've created a changelog description that aligns with the provided examples.

Pre-deploy checklist

  • VIP staff: Ensure any alerts added/updated conform to internal standards (see internal documentation).

Steps to Test

Use WordPress 6.8+ and PHP 8.2+, with no customer-loaded copy of Agent Ready Content. Replace the placeholders below with your checkout paths and environment slug.

  1. Check out this PR in vip-go-mu-plugins and copy the released plugin from vip-go-mu-plugins-ext:

    rsync -r "<path-to-vip-go-mu-plugins-ext>/vip-integrations/agent-ready-content-0.3/" \
      "<path-to-vip-go-mu-plugins>/vip-integrations/agent-ready-content-0.3/"
  2. Configure your dev-env to use this checkout, then start it. For a new environment, replace update with create.

    vip dev-env update --slug="<env-slug>" \
      --mu-plugins="<path-to-vip-go-mu-plugins>"
    vip dev-env start --slug="<env-slug>" --editor vscode
  3. Add this entry to ~/.local/share/vip/dev-environment/<env-slug>/integrations-config/integrations.json, preserving other integration entries:

    {
      "agent-ready-content": {
        "env": {
          "status": "enabled"
        }
      }
    }

    If XDG_DATA_HOME is set, use that directory instead of ~/.local/share. Changes apply on the next request.

  4. Verify that is_active and is_loaded are both true:

    vip dev-env exec --slug="<env-slug>" -- wp eval \
      'var_export( Automattic\VIP\Integrations\wpvip_get_integration_info( "agent-ready-content" ) );'
  5. Open Settings → Agent Ready Content in WordPress Admin. Verify that a published post serves Markdown through .md, /markdown, and ?markdown=true, and that /llms.txt loads. The normal post URL should still serve HTML.

  6. Change this integration's env.status to "disabled" in integrations.json. Repeat the status command and confirm that both fields are false and the settings page is unavailable.

  7. Run the focused tests from the vip-go-mu-plugins checkout:

    ./bin/test.sh --filter Agent_Ready_Content_Integration_Test

@shekharnwagh shekharnwagh self-assigned this Sep 15, 2026
@shekharnwagh
shekharnwagh requested a review from a team as a code owner September 15, 2026 12:26
Copilot AI lite review requested due to automatic review settings September 15, 2026 12:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Add the WordPress-version guard and success-path test coverage.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds an Agent Ready Content integration loader that selects the latest release, honors customer-loaded copies, and remains inactive when unavailable.

Changes:

  • Registers the conditional integration loader.
  • Implements release discovery and loading precedence.
  • Adds focused integration tests.
File summaries
File Summary
vip-integrations.php Includes and registers the integration loader.
tests/integrations/test-agent-ready-content.php Tests loaded and unavailable states; the success path lacks coverage (nit, 1 vote).
integrations/agent-ready-content.php Implements release loading; requires a WordPress-version guard before loading 6.8+ releases (critical, 2 votes).
Review details

Suppressed comments (1)

integrations/agent-ready-content.php:49

  • The added tests cover only the already-loaded and unavailable branches; they never exercise this success path. A wrong entry-file path or a failure to require the latest available release would therefore still pass the suite. Please add a valid-release fixture/mock and assert that the entry file is loaded and the integration remains active.
			require_once $load_path;
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread integrations/agent-ready-content.php
@codecov

codecov Bot commented Sep 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 70.83333% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 37.69%. Comparing base (a695bec) to head (8d62cef).

Files with missing lines Patch % Lines
vip-integrations.php 0.00% 4 Missing ⚠️
integrations/agent-ready-content.php 85.00% 3 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #7250      +/-   ##
=============================================
+ Coverage      37.65%   37.69%   +0.03%     
- Complexity      5477     5484       +7     
=============================================
  Files            303      304       +1     
  Lines          21875    21899      +24     
=============================================
+ Hits            8238     8255      +17     
- Misses         13637    13644       +7     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Direct loading bypasses WordPress's plugin requirement checks and can
load Agent Ready Content on unsupported versions. Mark the integration
inactive before loading when WordPress is older than 6.8.
@shekharnwagh
shekharnwagh force-pushed the add/vipcms-2262-agent-ready-integration-loader branch from 41de993 to 8d62cef Compare September 15, 2026 13:11
@sonarqubecloud

Copy link
Copy Markdown

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