Automattic / Automattic/markdown-database-integration
Fix WP-CLI global --path collisions in markdown import/export
- Dominant language
- PHP
- Stars
- 5
- Forks
- 1
- Avg merge
- 2h 38m
- Merged PRs (30d)
- 155
Description
## Problem
Every WP-CLI invocation on an installation with Markdown Database Integration active emits registration warnings for both markdown-db import and markdown-db export because each command declares a custom --path argument, which conflicts with WP-CLI global WordPress-root selector.
This was reproduced with a read-only wp intelligence --help invocation. The warnings are unrelated to the requested command and occur during plugin command registration.
## Evidence
markdown-database-integration.php registers markdown-db import and markdown-db export during WP-CLI bootstrap. Their command documentation in inc/class-wp-markdown-cli.php declares [--path=] for a Markdown content root. WP-CLI also reserves global --path= for the WordPress installation root, producing the warning for both registrations.
## Acceptance criteria
- Import and export use a non-conflicting, consistently named content-root option.
- wp --path= markdown-db import and export register without warnings and retain explicit content-root selection.
- Command help and examples document the global root selector separately from the content-root option.
- Add a registration-level CLI test that fails on global-option collisions for these commands.
## AI assistance
OpenAI gpt-5.6-terra via OpenCode reproduced the sanitized bootstrap warnings, inspected the installed runtime and repository registration paths, checked existing Markdown Database Integration trackers, and drafted this report under Chris Huber direction.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with markdown-database-integration.php and the command documentation in inc/class-wp-markdown-cli.php, then reproduce the warnings with wp --path= markdown-db import and export. Update the documented content-root option consistently and add a registration-level CLI test; done means both commands register without global-option warnings while retaining explicit content-root selection.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100