Repository navigation
Refuse moving an issue to review or merge until its pull request is recorded - #4409
Merged
Merged
Conversation
Contributor
Author
|
APPROVE at cfff47d Independent review of the PR's own diff (base 6645d6a; main's later frontend-only PRs not considered). What I checked and ran (CPU only):
Blocking: none. Should-fix: none. Nits (non-blocking):
🤖 Generated with Claude Code |
…ecorded A new seeded core Play refuses setting an issue's status to in_review or ready_to_merge while its pull_request field is empty, and says to record the pull request first. It is registered against issue, so a plain task is never checked. Tests cover the refusal, an issue with a pull request moving on, and a plain task. Existing issue tests record a pull request before review. The shape record and its change log carry the new seeded Play. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
mstomar125
force-pushed
the
plays-pr-recorded
branch
from
December 2, 2026 09:18
cfff47d to
13db05f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A new seeded core Play, "Require a pull request before an issue is reviewed". It refuses setting an issue's status to
in_revieworready_to_mergewhile the issue'spull_requestfield is empty. The refusal says to record the pull request first. It is registered againstissue, so a plain task is not checked. It is the rule of step 15 of Working an Issue in nodespace-core, written as a Play. It follows the shape of #4404: Play incore_plays.rs, change-log entry (additive / seeded_content), shape record regenerated (shape:gen,shape:checkclean),skill:gen/skill:checkreport the skill reference is up to date (no change).Why
The field is on the node and the check needs no judgment, so the rule should be enforced instead of read from a skill. The rule fires on a status change, not on creation: an issue created already in_review with no pull request is not refused (same limit as #4404).
Tests (core_model_plays_test.rs)
an_issue_without_a_pull_request_cannot_go_to_review_or_merge(both statuses refused, message says to record the pull request first, cancelling is free)an_issue_with_a_pull_request_goes_to_review_and_merge(also: clearing the field takes the permission away again)a_plain_task_goes_to_review_without_a_pull_requestissue_and_software_project_test.rs(helperissue(), one retype test) andpackages/agent/tests/it/workflow_seeds.rs(test harnesscreateonly; no agent source or seed changed).--lib(2386),--test itmodules core_model_plays / core_queries / issue_and_software / typed_flat (101), nodespace-agent--test it workflow_seeds(26), shape:check, skill:check, fmt; pre-push gate passed.Mutation checks (each mutation applied alone, the 3 new tests run)
ready_to_merge: refusal test fails. Rule droppingin_review: refusal test fails. Pull-request condition replaced byfalse: fails. Rule registered againsttask: the 2 issue tests fail. Message text changed: refusal test fails.taskis not seen by the plain-task test, because a task has nopull_requestfield and the condition errors, which a reject rule treats as allow. The issue tests catch the registration, and the plain-task test only documents the behaviour.url). A link with an empty url cannot be stored, so the condition was simplified to!has(node.pull_request); the always-true / never-true / status-list / registration mutations were not re-run on the final text. The final text is covered by the 3 tests above, run green.Overlaps
statusandpull_requestof the issue).packages/agent/tests/it/workflow_seeds.rs(a test harness helper), which is in the agent package; flagging for Michael. Conflicts are possible with any open PR touching that helper orcore_plays.rs/ the shape record change log.Unverified
Note on a related item (project link at task creation)
A Play can trigger on
node_created, on a relationship added or removed (matched on the source node type only), and on a schedule. None can check a project link at creation: a node and its links are separate writes, so an invariant onnode_createdruns before any link can exist and would refuse every task, and a link-added trigger cannot see an absent link. This stays in the filing skill, which is not in this repo.🤖 Generated with Claude Code