feat: map commit_files in task capability resolver (#262)
Add commit_files and gitea_commit_files resolver entries for gitea.repo.commit, align gitea_commit_files tool gates with other issue-write mutations, and add regression tests for author allow, reviewer deny, preflight order, and resolver/tool alignment. Refs #262 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This commit is contained in:
@@ -2301,6 +2301,30 @@ def gitea_commit_files(
|
||||
Returns:
|
||||
dict with success status and commit/branch information.
|
||||
"""
|
||||
ok, block_reasons = role_session_router.check_author_mutation_after_reviewer_stop(
|
||||
"commit_files"
|
||||
)
|
||||
if not ok:
|
||||
return {
|
||||
"success": False,
|
||||
"performed": False,
|
||||
"commit": "",
|
||||
"branch": "",
|
||||
"reasons": block_reasons,
|
||||
}
|
||||
blocked = _namespace_mutation_block(
|
||||
"commit_files", commit="", branch="", remote=remote
|
||||
)
|
||||
if blocked:
|
||||
return blocked
|
||||
blocked = _profile_permission_block(
|
||||
task_capability_map.required_permission("commit_files"),
|
||||
commit="",
|
||||
branch="",
|
||||
)
|
||||
if blocked:
|
||||
return blocked
|
||||
|
||||
verify_preflight_purity(remote)
|
||||
h, o, r = _resolve(remote, host, org, repo)
|
||||
auth = _auth(h)
|
||||
|
||||
Reference in New Issue
Block a user