feat(workflow): pre-task role/session router blocks reviewer tasks in author sessions (Issue #206) #217

Merged
sysadmin merged 1 commits from feat/issue-206-role-session-router into master 2026-07-05 16:20:29 -05:00
Owner

Summary

Adds a pre-task role/session router so reviewer tasks fail closed in author-bound MCP sessions instead of drifting into author-side fallback work.

  • New role_session_router module with wrong_role_stop, route_to_author_session, etc.
  • New MCP tool gitea_route_task_session — call before any mutation
  • Blocks gitea_create_issue after a reviewer wrong_role_stop (no process-issue fallback)
  • Extends gitea_resolve_task_capability task map for blind PR queue / approve / request-changes aliases
  • assess_role_route_handoff for Controller Handoff fields: task_type, required_role, active_role, route_result

Closes #206

Tests run

git diff --check prgs/master...HEAD          # clean
python3 -m py_compile $(git ls-files '*.py')   # clean
pytest tests/test_role_session_router.py tests/test_resolve_task_capability.py -q  # 17 passed
pytest tests/ --ignore=branches -q             # all passed (exit 0)

Secret/provenance sweep

Method: git diff prgs/master...HEAD grep for token/password/api_key/Bearer patterns — clean.

Safety confirmation

  • No PR review, approval, request-changes, or merge performed
  • Issue #206 marked status:in-progress only (not closed)
  • No other issues or PRs mutated except claim on #206 and this PR creation
## Summary Adds a pre-task role/session router so reviewer tasks fail closed in author-bound MCP sessions instead of drifting into author-side fallback work. - New `role_session_router` module with `wrong_role_stop`, `route_to_author_session`, etc. - New MCP tool `gitea_route_task_session` — call before any mutation - Blocks `gitea_create_issue` after a reviewer `wrong_role_stop` (no process-issue fallback) - Extends `gitea_resolve_task_capability` task map for blind PR queue / approve / request-changes aliases - `assess_role_route_handoff` for Controller Handoff fields: task_type, required_role, active_role, route_result Closes #206 ## Tests run ```bash git diff --check prgs/master...HEAD # clean python3 -m py_compile $(git ls-files '*.py') # clean pytest tests/test_role_session_router.py tests/test_resolve_task_capability.py -q # 17 passed pytest tests/ --ignore=branches -q # all passed (exit 0) ``` ## Secret/provenance sweep Method: `git diff prgs/master...HEAD` grep for token/password/api_key/Bearer patterns — **clean**. ## Safety confirmation - No PR review, approval, request-changes, or merge performed - Issue #206 marked `status:in-progress` only (not closed) - No other issues or PRs mutated except claim on #206 and this PR creation
jcwalker3 added 1 commit 2026-07-05 16:13:31 -05:00
Add gitea_route_task_session and role_session_router to fail closed when
reviewer tasks start under author-bound MCP sessions. Block author-side
issue creation fallback after wrong_role_stop. Add handoff proof helper and
tests.

Closes #206

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
sysadmin reviewed 2026-07-05 16:20:25 -05:00
sysadmin left a comment
Owner

PR #217 verified. 100% test success (883 tests passed). Diff formatting is clean. Secret sweep is clean. Base is master. No self-review constraints violated. Recommending approval.

PR #217 verified. 100% test success (883 tests passed). Diff formatting is clean. Secret sweep is clean. Base is master. No self-review constraints violated. Recommending approval.
sysadmin merged commit 5a1db875bc into master 2026-07-05 16:20:29 -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#217