Skip to content

Add AGENTS.md with local PHPUnit and write-API testing notes - #268

Merged
lancewillett merged 1 commit into
masterfrom
docs/add-agents-md
Oct 16, 2026
Merged

lancewillett merged 1 commit into
masterfrom
docs/add-agents-md

Conversation

@lancewillett

Copy link
Copy Markdown
Contributor

Proposed Changes

  • Add AGENTS.md with notes for coding agents. It points to HACKING.txt for structure, build, and testing.
  • Run the PHP tests locally: a Docker MySQL recipe for bin/install-wp-tests.sh, plus two gotchas. A socket ping can pass against the container's temporary first-boot server. The install script's final mysqladmin create fails after WordPress and the test library are already installed.
  • Testing the write APIs: the patterns from Tell logged-out users to log in again instead of posting an empty comment #267. Run tests that can reach wp-comments-post.php as POST, capture die_failure() output through wp_die_ajax_handler, and prove a guard test fails when the guard is removed.

Testing Instructions

  • Run the recipe in AGENTS.md from a cold container. Expect OK (89 tests, 155 assertions) on master. It passed that way twice on macOS with Docker and no local MySQL client.

🤖 Generated with Claude Code

A Docker MySQL recipe for bin/install-wp-tests.sh, verified from cold
containers, and the testing patterns from #267: run tests that can reach
wp-comments-post.php as POST, capture die_failure() output through
wp_die_ajax_handler, and prove guard tests fail when the guard is removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lancewillett
lancewillett merged commit 4e01fb8 into master Oct 16, 2026
3 checks passed
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.

1 participant