Skip to content

<!-- Authored per the the-loop:writing skill. -->

Testing plan: the-loop pr ready ​

Derived from requirements.md and design.md. The results are in evidence/verification.md.

Test matrix ​

#TypeApplies?Scope / what it provesWhere it runs
T1Unit (client)yesmark_pull_ready sends the markPullRequestReadyForReview mutation with the node id as a variable, returns not isDraft, and refuses an unusable id before any requestcli/tests/test_ghapi.py -k ready
T2Unit (core)yesa draft PR of a registered work item is marked ready (exit 0, changed: true, event emitted); an already-ready PR is a no-op; a closed or merged PR is exit 1 with no write; a still-draft answer and a GitHub refusal are exit 1cli/tests/test_github_ops.py -k ready
T3Unit (abuse)yesan unowned PR is refused before any request; an untrusted host is a ValueError before any request; a bare number without --work-item is a ValueErrorsame
T4CLIyesthe-loop pr ready 12 --work-item … prints the line and exits 0 in-processcli/tests/test_github_verbs_cli.py -k ready
T5Integration (Gherkin)yesthe route through the real service app marks a registered work item's draft ready and refuses an unowned PRcli/tests/test_github_verbs_integration.py -k ready
T6Contractyesthe served OpenAPI surface equals the authored contract (worker and manager); the MCP tool list includes mark_pull_request_readycli/tests/test_api_contract_parity.py, cli/tests/test_mcp_integration.py
T7Regression (full suite + hooks)yesruff, ruff format, pyright, all CLI tests, markdownlintmake check equivalents
T8Securityyes (review)guard before request, node id from GitHub not the caller, trusted hostsevidence/security-review.md
T9UI / accessibility / snapshot / migration / performancen/ano UI, no stored data, at most two requests per call

Requirement trace ​

RequirementTests
R1.1, R1.6T2, T4, T5
R1.2T3, T4
R1.3, R1.4, R1.5T2
R2.1T4
R2.2, R2.3T5, T6
R2.4T6 (manager role serves the route); the proxy is the same _acting_member path as pr merge
R2.5T2
R3.1, R3.2review of the doc diff (evidence/documentation.md)
Security considerationsT3, T8

Verification environment ​

This repository's own checkout; no service, fixture or credential beyond the test suite. GitHub is ghfakes.FakeGitHubClient for core and CLI tests and the github_replay HTTP double for the client test.

Not covered by an automated test ​

The live mutation against github.com. The replay test pins the exact GraphQL document and variables; the live check is the next draft PR the-loop opens.

Released under the MIT License.