Add task-routing and permission-boundary regression tests #160

Merged
sysadmin merged 1 commits from feat/issue-145-add-task-routing-permission-boundary-regression-tests into master 2026-07-05 09:58:14 -05:00
Owner

Adds focused regression tests for #139 role-aware routing and #137 permission separation per issue #145.

  • Proves comment permissions do not imply close or cross types
  • Author vs reviewer capability boundaries
  • Self blocks remain
  • Structured failure guidance from resolver and eligibility
  • Synthetic tests only

Closes #145

Adds focused regression tests for #139 role-aware routing and #137 permission separation per issue #145. - Proves comment permissions do not imply close or cross types - Author vs reviewer capability boundaries - Self blocks remain - Structured failure guidance from resolver and eligibility - Synthetic tests only Closes #145
jcwalker3 added 1 commit 2026-07-05 02:36:52 -05:00
- Add 5 new tests covering AC from #145:
  - issue.comment does not imply close_issue
  - pr.comment does not imply issue.comment (via explicit forbidden)
  - reviewer profile cannot push_branch
  - structured guidance for missing merge permission
  - self-approve (self-review gate) blocked with reasons
- Tests are fully synthetic (patches, no live Gitea)
- Updated file docstring
- All 10 tests pass; no behavior changes to prod code

Closes #145
sysadmin reviewed 2026-07-05 09:57:59 -05:00
sysadmin left a comment
Owner

Approved at pinned head 575da171563c5d364422147218994f54ded6b715.

Reviewed against #145. The PR is scoped to synthetic regression coverage in tests/test_resolve_task_capability.py and does not alter production behavior. The added tests cover issue-comment vs issue-close separation, PR-comment vs issue-comment separation, reviewer authoring boundary guidance, structured missing-permission guidance for author attempting merge, and self-review eligibility blocking.

Validation run:

  • git diff --check refs/remotes/prgs/master...HEAD: passed.
  • python3 -m py_compile $(git ls-files '*.py'): passed.
  • /Users/jasonwalker/Development/Gitea-Tools/venv/bin/python3 -m pytest tests/test_resolve_task_capability.py -q: 10 passed.
  • /Users/jasonwalker/Development/Gitea-Tools/venv/bin/python3 -m pytest tests/ -q: 540 passed, 6 skipped.
  • Secret/provenance sweep over the changed test diff: no matches.
Approved at pinned head `575da171563c5d364422147218994f54ded6b715`. Reviewed against #145. The PR is scoped to synthetic regression coverage in `tests/test_resolve_task_capability.py` and does not alter production behavior. The added tests cover issue-comment vs issue-close separation, PR-comment vs issue-comment separation, reviewer authoring boundary guidance, structured missing-permission guidance for author attempting merge, and self-review eligibility blocking. Validation run: - `git diff --check refs/remotes/prgs/master...HEAD`: passed. - `python3 -m py_compile $(git ls-files '*.py')`: passed. - `/Users/jasonwalker/Development/Gitea-Tools/venv/bin/python3 -m pytest tests/test_resolve_task_capability.py -q`: 10 passed. - `/Users/jasonwalker/Development/Gitea-Tools/venv/bin/python3 -m pytest tests/ -q`: 540 passed, 6 skipped. - Secret/provenance sweep over the changed test diff: no matches.
sysadmin merged commit 67bc31eda5 into master 2026-07-05 09:58:14 -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#160