Skip to content

Forms: Add ability output schemas#49950

Closed
DevinWalker wants to merge 1 commit into
trunkfrom
codex/forms-abilities-output-schemas
Closed

Forms: Add ability output schemas#49950
DevinWalker wants to merge 1 commit into
trunkfrom
codex/forms-abilities-output-schemas

Conversation

@DevinWalker

@DevinWalker DevinWalker commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Fixes #

This PR is open because Forms is already the strongest Jetpack Abilities API integration, and agents need dependable response shapes to use it safely. It keeps the change limited to output contracts and a small no-op guard so the broader rollout can stay reviewable.

Proposed changes

  • Add explicit output schemas for the Jetpack Forms abilities so agent clients can reason about response shapes.
  • Tighten jetpack-forms/update-response so calls must include a mutation field, matching the declared object output contract.
  • Return the admin edit URL from jetpack-forms/get-form instead of the public permalink.
  • Strengthen Forms ability tests for public metadata, output schemas, no-op update handling, and edit URL behavior.

Related product discussion/links

Does this pull request change what data or activity we track or use?

No.

Testing instructions

  • From projects/packages/forms, run:
    • php vendor/bin/phpunit-select-config phpunit.#.xml.dist --colors=always tests/php/abilities/Forms_Abilities_Test.php
  • Confirm the test passes with 30 tests, 227 assertions.
  • Optional broader check: CI=true jp test php packages/forms -v currently reaches PHPUnit but fails in existing webhook localhost tests unrelated to these Forms abilities changes.

@DevinWalker DevinWalker added Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Status] Needs Review This PR is ready for review. labels Jun 25, 2026
@DevinWalker DevinWalker self-assigned this Jun 25, 2026
@DevinWalker DevinWalker added Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Status] Needs Review This PR is ready for review. labels Jun 25, 2026
@DevinWalker DevinWalker force-pushed the codex/forms-abilities-output-schemas branch from bd196b9 to ed08f60 Compare June 25, 2026 03:57
@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WoA dev site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin (Jetpack), and enable the codex/forms-abilities-output-schemas branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack codex/forms-abilities-output-schemas

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


Follow this PR Review Process:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

If you have questions about anything, reach out in #jetpack-developers for guidance!

@jp-launch-control

Copy link
Copy Markdown

Code Coverage Summary

Coverage changed in 1 file.

File Coverage Δ% Δ Uncovered
projects/packages/forms/src/abilities/class-forms-abilities.php 600/651 (92.17%) 1.56% 0 💚

Full summary · PHP report · JS report

@DevinWalker DevinWalker deleted the codex/forms-abilities-output-schemas branch June 25, 2026 04:28
@github-actions github-actions Bot removed [Status] In Progress [Status] Needs Review This PR is ready for review. labels Jun 25, 2026
@DevinWalker

Copy link
Copy Markdown
Contributor Author

Superseded by #49954 after renaming the source branch from codex/forms-abilities-output-schemas to add/forms-abilities-output-schemas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Feature] Contact Form [Package] Forms [Tests] Includes Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant