feat: require issue type and workflow status labels (Closes #513) #518

Merged
sysadmin merged 1 commits from codex/issue-513-workflow-labels into master 2026-07-09 07:44:55 -05:00
Owner

Closes #513

Summary

Adds the canonical issue label taxonomy and workflow status transition helpers so issues can carry one type:* label and one status:* label, with discussion issues explicitly tagged type:discussion.

Changes

  • issue_workflow_labels.py defines canonical type:* and status:* label specs, validation, issue-creation label composition, and status replacement transitions.
  • manage_labels.py now creates the canonical workflow labels from the shared specs.
  • gitea_create_issue can recommend or require workflow labels and apply supplied label names.
  • gitea_mark_issue(..., action="start") replaces old status:* labels with status:in-progress instead of appending.
  • gitea_create_pr preflights and applies status:pr-open for the locked issue after PR creation.
  • gitea_set_issue_labels and gitea_create_label accept worktree_path in code so label mutations can satisfy the branches-only guard after this server code is deployed.
  • Documentation/runbooks now define the canonical taxonomy and transition rules.

Validation

python3 -m py_compile issue_workflow_labels.py manage_labels.py create_issue.py gitea_mcp_server.py task_capability_map.py tests/test_issue_workflow_labels.py tests/test_manage_labels.py tests/test_create_issue.py tests/test_mcp_server.py tests/test_issue_write_tool_gates.py
# passed

python3 -m pytest tests/test_issue_workflow_labels.py tests/test_manage_labels.py tests/test_create_issue.py tests/test_mcp_server.py::TestCreateIssue tests/test_mcp_server.py::TestMarkIssue tests/test_mcp_server.py::TestCreatePR tests/test_mcp_server.py::TestIssueLocking::test_create_pr_honors_scratch_worktree_lock tests/test_resolve_task_capability.py tests/test_issue_write_tool_gates.py -q
# 76 passed, 5 subtests passed

python3 -m pytest tests/ -q
# 1 failed, 1795 passed, 6 skipped, 1 warning, 33 subtests passed

The full-suite failure is pre-existing on clean prgs/master:

git worktree add --detach branches/baseline-master-issue-513 prgs/master
python3 -m pytest tests/test_mcp_server.py::TestMergePR::test_merge_blocked_on_stale_approval_head -q
# same failure: AssertionError: None is not true

Notes

The PR is created by the currently running MCP server, which predates this branch's new PR-open label transition code. After this PR is merged and the MCP server is restarted, future gitea_create_pr calls will enforce and apply status:pr-open.

Closes #513 ## Summary Adds the canonical issue label taxonomy and workflow status transition helpers so issues can carry one `type:*` label and one `status:*` label, with discussion issues explicitly tagged `type:discussion`. ## Changes - `issue_workflow_labels.py` defines canonical `type:*` and `status:*` label specs, validation, issue-creation label composition, and status replacement transitions. - `manage_labels.py` now creates the canonical workflow labels from the shared specs. - `gitea_create_issue` can recommend or require workflow labels and apply supplied label names. - `gitea_mark_issue(..., action="start")` replaces old `status:*` labels with `status:in-progress` instead of appending. - `gitea_create_pr` preflights and applies `status:pr-open` for the locked issue after PR creation. - `gitea_set_issue_labels` and `gitea_create_label` accept `worktree_path` in code so label mutations can satisfy the branches-only guard after this server code is deployed. - Documentation/runbooks now define the canonical taxonomy and transition rules. ## Validation ```bash python3 -m py_compile issue_workflow_labels.py manage_labels.py create_issue.py gitea_mcp_server.py task_capability_map.py tests/test_issue_workflow_labels.py tests/test_manage_labels.py tests/test_create_issue.py tests/test_mcp_server.py tests/test_issue_write_tool_gates.py # passed python3 -m pytest tests/test_issue_workflow_labels.py tests/test_manage_labels.py tests/test_create_issue.py tests/test_mcp_server.py::TestCreateIssue tests/test_mcp_server.py::TestMarkIssue tests/test_mcp_server.py::TestCreatePR tests/test_mcp_server.py::TestIssueLocking::test_create_pr_honors_scratch_worktree_lock tests/test_resolve_task_capability.py tests/test_issue_write_tool_gates.py -q # 76 passed, 5 subtests passed python3 -m pytest tests/ -q # 1 failed, 1795 passed, 6 skipped, 1 warning, 33 subtests passed ``` The full-suite failure is pre-existing on clean `prgs/master`: ```bash git worktree add --detach branches/baseline-master-issue-513 prgs/master python3 -m pytest tests/test_mcp_server.py::TestMergePR::test_merge_blocked_on_stale_approval_head -q # same failure: AssertionError: None is not true ``` ## Notes The PR is created by the currently running MCP server, which predates this branch's new PR-open label transition code. After this PR is merged and the MCP server is restarted, future `gitea_create_pr` calls will enforce and apply `status:pr-open`.
jcwalker3 added 1 commit 2026-07-08 03:21:33 -05:00
Owner

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #518
issue: #513
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 82807-d7ca726e1bfc
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/merge-pr561
phase: claimed
candidate_head: b7755f26e3
target_branch: master
target_branch_sha: 1ffa911dbc
last_activity: 2026-07-09T02:24:02Z
expires_at: 2026-07-09T04:24:02Z
blocker: none

<!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #518 issue: #513 reviewer_identity: sysadmin profile: prgs-reviewer session_id: 82807-d7ca726e1bfc worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/merge-pr561 phase: claimed candidate_head: b7755f26e3709d7c73dda389e8124e1e55e8df36 target_branch: master target_branch_sha: 1ffa911dbc20041eb080b3c7304ac4198f73c408 last_activity: 2026-07-09T02:24:02Z expires_at: 2026-07-09T04:24:02Z blocker: none
Owner

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #518
issue: #513
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 82807-d7ca726e1bfc
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/merge-pr561
phase: released
candidate_head: b7755f26e3
target_branch: master
target_branch_sha: 1ffa911dbc
last_activity: 2026-07-09T02:24:26Z
expires_at: 2026-07-09T04:24:26Z
blocker: manual-release

<!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #518 issue: #513 reviewer_identity: sysadmin profile: prgs-reviewer session_id: 82807-d7ca726e1bfc worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/merge-pr561 phase: released candidate_head: b7755f26e3709d7c73dda389e8124e1e55e8df36 target_branch: master target_branch_sha: 1ffa911dbc20041eb080b3c7304ac4198f73c408 last_activity: 2026-07-09T02:24:26Z expires_at: 2026-07-09T04:24:26Z blocker: manual-release
Owner

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #518
issue: #513
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 88396-ce2b22382bf3
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-513-workflow-labels
phase: claimed
candidate_head: b7755f26e3
target_branch: master
target_branch_sha: none
last_activity: 2026-07-09T12:43:59Z
expires_at: 2026-07-09T14:43:59Z
blocker: none

<!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #518 issue: #513 reviewer_identity: sysadmin profile: prgs-reviewer session_id: 88396-ce2b22382bf3 worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-513-workflow-labels phase: claimed candidate_head: b7755f26e3709d7c73dda389e8124e1e55e8df36 target_branch: master target_branch_sha: none last_activity: 2026-07-09T12:43:59Z expires_at: 2026-07-09T14:43:59Z blocker: none
sysadmin approved these changes 2026-07-09 07:44:17 -05:00
sysadmin left a comment
Owner

APPROVE PR #518 (Closes #513)

Head: b7755f26e3709d7c73dda389e8124e1e55e8df36
Reviewer: sysadmin / prgs-reviewer
Author: jcwalker3 (not self-review)

Scope (12 files)

  • New issue_workflow_labels.py canonical type:* / status:* taxonomy + transitions
  • manage_labels.py creates canonical specs
  • gitea_create_issue label composition / require_workflow_labels
  • gitea_mark_issue start replaces status:* (no append)
  • gitea_create_pr applies status:pr-open after create
  • Docs + tests

Validation

pytest tests/test_issue_workflow_labels.py tests/test_manage_labels.py tests/test_create_issue.py tests/test_issue_write_tool_gates.py -q
# 42 passed, 5 subtests passed

APPROVE — mergeable; ready for prgs-merger.

## APPROVE PR #518 (Closes #513) **Head:** `b7755f26e3709d7c73dda389e8124e1e55e8df36` **Reviewer:** sysadmin / prgs-reviewer **Author:** jcwalker3 (not self-review) ### Scope (12 files) - New `issue_workflow_labels.py` canonical type:* / status:* taxonomy + transitions - `manage_labels.py` creates canonical specs - `gitea_create_issue` label composition / require_workflow_labels - `gitea_mark_issue` start replaces status:* (no append) - `gitea_create_pr` applies status:pr-open after create - Docs + tests ### Validation ``` pytest tests/test_issue_workflow_labels.py tests/test_manage_labels.py tests/test_create_issue.py tests/test_issue_write_tool_gates.py -q # 42 passed, 5 subtests passed ``` **APPROVE** — mergeable; ready for prgs-merger.
Owner

adopted_at: 2026-07-09T12:44:39Z
adopted_by_identity: sysadmin
adopted_by_profile: prgs-merger
adopted_from_session_id: 88396-ce2b22382bf3
adopted_from_profile: prgs-reviewer
adopted_from_reviewer_identity: sysadmin
adopted_from_comment_id: 7870
adoption_reason: merger-handoff-approved-head

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #518
issue: #513
reviewer_identity: sysadmin
profile: prgs-merger
session_id: 90312-a515e606d336
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-513-workflow-labels
phase: adopted
candidate_head: b7755f26e3
target_branch: master
target_branch_sha: none
last_activity: 2026-07-09T12:44:39Z
expires_at: 2026-07-09T14:44:39Z
blocker: none

<!-- mcp-review-lease-adoption:v1 --> adopted_at: 2026-07-09T12:44:39Z adopted_by_identity: sysadmin adopted_by_profile: prgs-merger adopted_from_session_id: 88396-ce2b22382bf3 adopted_from_profile: prgs-reviewer adopted_from_reviewer_identity: sysadmin adopted_from_comment_id: 7870 adoption_reason: merger-handoff-approved-head <!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #518 issue: #513 reviewer_identity: sysadmin profile: prgs-merger session_id: 90312-a515e606d336 worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-513-workflow-labels phase: adopted candidate_head: b7755f26e3709d7c73dda389e8124e1e55e8df36 target_branch: master target_branch_sha: none last_activity: 2026-07-09T12:44:39Z expires_at: 2026-07-09T14:44:39Z blocker: none
sysadmin merged commit 5ada9e6cc0 into master 2026-07-09 07:44:55 -05:00
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Scaled-Tech-Consulting/Gitea-Tools#518