From 87858ec86609f3dff14334c8f4a38607b8d6798d Mon Sep 17 00:00:00 2001 From: Daniel Petty Date: Wed, 4 Nov 2026 15:56:09 +0000 Subject: [PATCH] fix(roadmap): pin the delivery title refusal (#3368) --- .../.openspec.yaml | 0 .../design.md | 0 .../proposal.md | 0 .../tasks.md | 4 +- tests/roadmap/test_roadmap_implement_job.py | 44 +++++++++++++++++++ 5 files changed, 46 insertions(+), 2 deletions(-) rename openspec/changes/{3368-stop-a-delivery-title-that-the => archive/2026-11-04-3368-stop-a-delivery-title-that-the}/.openspec.yaml (100%) rename openspec/changes/{3368-stop-a-delivery-title-that-the => archive/2026-11-04-3368-stop-a-delivery-title-that-the}/design.md (100%) rename openspec/changes/{3368-stop-a-delivery-title-that-the => archive/2026-11-04-3368-stop-a-delivery-title-that-the}/proposal.md (100%) rename openspec/changes/{3368-stop-a-delivery-title-that-the => archive/2026-11-04-3368-stop-a-delivery-title-that-the}/tasks.md (85%) diff --git a/openspec/changes/3368-stop-a-delivery-title-that-the/.openspec.yaml b/openspec/changes/archive/2026-11-04-3368-stop-a-delivery-title-that-the/.openspec.yaml similarity index 100% rename from openspec/changes/3368-stop-a-delivery-title-that-the/.openspec.yaml rename to openspec/changes/archive/2026-11-04-3368-stop-a-delivery-title-that-the/.openspec.yaml diff --git a/openspec/changes/3368-stop-a-delivery-title-that-the/design.md b/openspec/changes/archive/2026-11-04-3368-stop-a-delivery-title-that-the/design.md similarity index 100% rename from openspec/changes/3368-stop-a-delivery-title-that-the/design.md rename to openspec/changes/archive/2026-11-04-3368-stop-a-delivery-title-that-the/design.md diff --git a/openspec/changes/3368-stop-a-delivery-title-that-the/proposal.md b/openspec/changes/archive/2026-11-04-3368-stop-a-delivery-title-that-the/proposal.md similarity index 100% rename from openspec/changes/3368-stop-a-delivery-title-that-the/proposal.md rename to openspec/changes/archive/2026-11-04-3368-stop-a-delivery-title-that-the/proposal.md diff --git a/openspec/changes/3368-stop-a-delivery-title-that-the/tasks.md b/openspec/changes/archive/2026-11-04-3368-stop-a-delivery-title-that-the/tasks.md similarity index 85% rename from openspec/changes/3368-stop-a-delivery-title-that-the/tasks.md rename to openspec/changes/archive/2026-11-04-3368-stop-a-delivery-title-that-the/tasks.md index 3c5a537a6..5f5fc4397 100644 --- a/openspec/changes/3368-stop-a-delivery-title-that-the/tasks.md +++ b/openspec/changes/archive/2026-11-04-3368-stop-a-delivery-title-that-the/tasks.md @@ -4,9 +4,9 @@ Reads: `src/devops_cli/roadmap/implement_run.py`, `src/devops_cli/roadmap/pull_form.py`, `tests/roadmap/test_roadmap_implement_job.py`. Changes: `tests/roadmap/test_roadmap_implement_job.py`. -- [ ] 1.1 Add a test for an issue title `wip(cli): add a flag`, whose type the project does not declare, and assert the job stops the item and writes no pull request title +- [x] 1.1 Add a test for an issue title `wip(cli): add a flag`, whose type the project does not declare, and assert the job stops the item and writes no pull request title - Verification: `uv run devops ci test tests/roadmap/test_roadmap_implement_job.py` -- [ ] 1.2 Add a test for a Planned item whose delivery title has no type, and assert the job stops before `_publish` pushes, so `origin` holds no branch and no draft pull request exists +- [x] 1.2 Add a test for a Planned item whose delivery title has no type, and assert the job stops before `_publish` pushes, so `origin` holds no branch and no draft pull request exists - Verification: `uv run devops ci test tests/roadmap/test_roadmap_implement_job.py` ## Workflow follow-up diff --git a/tests/roadmap/test_roadmap_implement_job.py b/tests/roadmap/test_roadmap_implement_job.py index 01c153b3d..f935ae832 100644 --- a/tests/roadmap/test_roadmap_implement_job.py +++ b/tests/roadmap/test_roadmap_implement_job.py @@ -283,6 +283,50 @@ def test_a_title_that_the_check_refuses_stops_the_item_before_the_job_writes_it( assert "not in the form" in job_world.issue_comments()[0] +def test_a_title_with_an_undeclared_type_stops_the_item_before_the_job_writes_it( + job_world: JobWorld, monkeypatch: pytest.MonkeyPatch +) -> None: + """The `Semantic PR title` check refuses a type that the project does not declare (#3368), + and a person may edit the issue title to hold one after staging.""" + monkeypatch.setattr( + "devops_cli.roadmap.implement_run.delivery_title", + lambda *_args: "wip(cli): add a flag", + ) + + applied = job_world.run(two_groups()) + + status, record = _item(job_world) + assert (applied.stopped, status, record.get("implement.stopped")) == ( + (1,), + "Blocked", + "pull request", + ) + assert job_world.sent("PATCH", f"pulls/{PULL}") == [] + assert "is not a type of the project" in job_world.issue_comments()[0] + + +def test_a_title_with_no_type_stops_a_planned_item_before_the_first_push( + planned_world: JobWorld, monkeypatch: pytest.MonkeyPatch +) -> None: + """A Planned item whose delivery title has no Conventional Commit type stops before `_publish` + pushes the branch, so `origin` holds no branch and no draft pull request exists (#3368).""" + monkeypatch.setattr( + "devops_cli.roadmap.implement_run.delivery_title", lambda *_args: "Add a flag: " + ) + + applied = planned_world.run(two_groups()) + + status, record = _item(planned_world) + assert (applied.stopped, status, record.get("implement.stopped")) == ( + (1,), + "Blocked", + "push", + ) + assert planned_world.repo.origin_git("branch", "--list", BRANCH).strip() == "" + assert planned_world.sent("POST", "pulls") == [] + assert "not in the form" in planned_world.issue_comments()[0] + + def test_the_changes_of_the_archive_and_the_documents_are_in_the_pushed_tree( job_world: JobWorld, ) -> None: