Web UI: Gated action framework (#434) #455

Merged
sysadmin merged 5 commits from feat/issue-434-gated-actions into master 2026-07-09 10:39:29 -05:00
Owner

Summary

Implements the disabled-by-default gated action framework for future UI write paths (#434).

Changes

  • webui/gated_actions.py — action registry aligned with task_capability_map; mutation-ledger previews; attempt_action fail-closed
  • webui/gated_action_views.py/actions page with disabled buttons and ledger previews
  • Routes: /actions, /api/actions, /api/actions/{id}/preview, /api/actions/{id}/attempt (403 fail-closed)
  • Nav link + home bullet; docs and skeleton tests updated
  • tests/test_webui_gated_actions.py — 11 tests (registry alignment, disabled defaults, no MCP imports, route behavior)

Verification

python -m unittest discover -s tests -p 'test_webui_*.py' -q
# 46 tests OK

Acceptance criteria

  • All actions disabled by default in MVP
  • Every action declares required MCP capability and profile role
  • Action preview renders mutation ledger (even when disabled)
  • No review/merge/delete/comment/create buttons enabled without gates
  • Tests prove ungated actions cannot invoke mutations

Closes #434

## Summary Implements the disabled-by-default gated action framework for future UI write paths (#434). ## Changes - `webui/gated_actions.py` — action registry aligned with `task_capability_map`; mutation-ledger previews; `attempt_action` fail-closed - `webui/gated_action_views.py` — `/actions` page with disabled buttons and ledger previews - Routes: `/actions`, `/api/actions`, `/api/actions/{id}/preview`, `/api/actions/{id}/attempt` (403 fail-closed) - Nav link + home bullet; docs and skeleton tests updated - `tests/test_webui_gated_actions.py` — 11 tests (registry alignment, disabled defaults, no MCP imports, route behavior) ## Verification ```bash python -m unittest discover -s tests -p 'test_webui_*.py' -q # 46 tests OK ``` ## Acceptance criteria - [x] All actions disabled by default in MVP - [x] Every action declares required MCP capability and profile role - [x] Action preview renders mutation ledger (even when disabled) - [x] No review/merge/delete/comment/create buttons enabled without gates - [x] Tests prove ungated actions cannot invoke mutations Closes #434
jcwalker3 added 1 commit 2026-07-07 14:34:49 -05:00
Register future write actions with task_capability_map metadata,
mutation-ledger previews, and fail-closed execution in the read-only MVP.
Adds /actions routes, disabled UI buttons, and tests proving ungated
attempts cannot invoke mutations.

Closes #434
Author
Owner

pr: #455
branch: feat/issue-434-gated-actions
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-434-gated-actions
profile: prgs-author
session_id: unknown
phase: claimed
head_before: 84b841c727
expires_at: 2026-07-09T04:42:47Z
reviewer_active: no

<!-- mcp-conflict-fix-lease:v1 --> pr: #455 branch: feat/issue-434-gated-actions worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-434-gated-actions profile: prgs-author session_id: unknown phase: claimed head_before: 84b841c72765ee1249cc6b9e4957ce1bf51ae606 expires_at: 2026-07-09T04:42:47Z reviewer_active: no
jcwalker3 added 1 commit 2026-07-08 21:44:06 -05:00
Merge prgs/master into PR branch.
Owner

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #455
issue: #434
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 38902-49f495a955f7
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-feat-issue-434-gated-actions
phase: claimed
candidate_head: 22d47352309f7a77eeb55743b171694f4a475141
target_branch: master
target_branch_sha: none
last_activity: 2026-07-09T03:13:59Z
expires_at: 2026-07-09T05:13:59Z
blocker: none

<!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #455 issue: #434 reviewer_identity: sysadmin profile: prgs-reviewer session_id: 38902-49f495a955f7 worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-feat-issue-434-gated-actions phase: claimed candidate_head: 22d47352309f7a77eeb55743b171694f4a475141 target_branch: master target_branch_sha: none last_activity: 2026-07-09T03:13:59Z expires_at: 2026-07-09T05:13:59Z blocker: none
Owner

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #455
issue: #434
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 38902-49f495a955f7
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-feat-issue-434-gated-actions
phase: released
candidate_head: 22d47352309f7a77eeb55743b171694f4a475141
target_branch: master
target_branch_sha: none
last_activity: 2026-07-09T03:14:09Z
expires_at: 2026-07-09T05:14:09Z
blocker: manual-release

<!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #455 issue: #434 reviewer_identity: sysadmin profile: prgs-reviewer session_id: 38902-49f495a955f7 worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-feat-issue-434-gated-actions phase: released candidate_head: 22d47352309f7a77eeb55743b171694f4a475141 target_branch: master target_branch_sha: none last_activity: 2026-07-09T03:14:09Z expires_at: 2026-07-09T05:14:09Z blocker: manual-release
sysadmin added 1 commit 2026-07-08 22:40:06 -05:00
jcwalker3 added 1 commit 2026-07-09 07:42:15 -05:00
Owner

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #455
issue: #434
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: continue-prgs-rc-455-678278
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-434-gated-actions
phase: claimed
candidate_head: 46709537c1
target_branch: master
target_branch_sha: none
last_activity: 2026-07-09T13:31:25Z
expires_at: 2026-07-09T15:31:25Z
blocker: none

<!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #455 issue: #434 reviewer_identity: sysadmin profile: prgs-reviewer session_id: continue-prgs-rc-455-678278 worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-434-gated-actions phase: claimed candidate_head: 46709537c11ef77b908aa848aa79b8df3c0aea34 target_branch: master target_branch_sha: none last_activity: 2026-07-09T13:31:25Z expires_at: 2026-07-09T15:31:25Z blocker: none
sysadmin requested changes 2026-07-09 08:31:34 -05:00
Dismissed
sysadmin left a comment
Owner

Review REQUEST_CHANGES — PR #455

Cannot approve: Gitea reports Conflicted / Not Mergeable against current master.

Master has advanced (including web UI hygiene #453, audit paste #452, thread ledger #511, BLOCKED+DIAGNOSE #554). This stack tip must be rebased/merged onto current master and conflicts resolved by the author.

Canonical PR State

STATE: blocked on merge conflicts with master
WHO_IS_NEXT: author
NEXT_ACTION: merge or rebase onto current prgs/master, resolve conflicts, re-run web UI tests, push mergeable tip, re-request review
NEXT_PROMPT:

Fix PR #455 conflicts with master on branch feat/issue-434-gated-actions. Rebase or merge prgs/master, resolve conflicts, re-run relevant webui pytest, push, hand off for re-review.

WHAT_HAPPENED: Reviewer skipped full code review because PR is not mergeable
WHY: Conflicted base after master advanced; re-review only after green mergeable tip
ISSUE: #434
HEAD_SHA: 46709537c1
REVIEW_STATUS: REQUEST_CHANGES
MERGE_READY: no
BLOCKERS: merge conflict with master — unblocks when author resolves conflicts against prgs/master, pushes a mergeable tip, and re-requests review
VALIDATION: not run at conflicted tip
LAST_UPDATED_BY: sysadmin (prgs-reviewer)

## Review REQUEST_CHANGES — PR #455 Cannot approve: Gitea reports **Conflicted / Not Mergeable** against current master. Master has advanced (including web UI hygiene #453, audit paste #452, thread ledger #511, BLOCKED+DIAGNOSE #554). This stack tip must be rebased/merged onto current master and conflicts resolved by the author. ## Canonical PR State STATE: blocked on merge conflicts with master WHO_IS_NEXT: author NEXT_ACTION: merge or rebase onto current prgs/master, resolve conflicts, re-run web UI tests, push mergeable tip, re-request review NEXT_PROMPT: ```text Fix PR #455 conflicts with master on branch feat/issue-434-gated-actions. Rebase or merge prgs/master, resolve conflicts, re-run relevant webui pytest, push, hand off for re-review. ``` WHAT_HAPPENED: Reviewer skipped full code review because PR is not mergeable WHY: Conflicted base after master advanced; re-review only after green mergeable tip ISSUE: #434 HEAD_SHA: 46709537c11ef77b908aa848aa79b8df3c0aea34 REVIEW_STATUS: REQUEST_CHANGES MERGE_READY: no BLOCKERS: merge conflict with master — unblocks when author resolves conflicts against prgs/master, pushes a mergeable tip, and re-requests review VALIDATION: not run at conflicted tip LAST_UPDATED_BY: sysadmin (prgs-reviewer)
Owner

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #455
issue: #434
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: continue-prgs-rc-455-678278
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-434-gated-actions
phase: claimed
candidate_head: 46709537c1
target_branch: master
target_branch_sha: cc4b95839d
last_activity: 2026-07-09T13:55:33Z
expires_at: 2026-07-09T15:55:33Z
blocker: none

<!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #455 issue: #434 reviewer_identity: sysadmin profile: prgs-reviewer session_id: continue-prgs-rc-455-678278 worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-434-gated-actions phase: claimed candidate_head: 46709537c11ef77b908aa848aa79b8df3c0aea34 target_branch: master target_branch_sha: cc4b95839dce8715d2d0ca6764e5e927968ae2ae last_activity: 2026-07-09T13:55:33Z expires_at: 2026-07-09T15:55:33Z blocker: none
Owner

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #455
issue: #434
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: continue-prgs-rc-455-678278
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-434-gated-actions
phase: released
candidate_head: 46709537c1
target_branch: master
target_branch_sha: cc4b95839d
last_activity: 2026-07-09T13:55:47Z
expires_at: 2026-07-09T15:55:47Z
blocker: manual-release

<!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #455 issue: #434 reviewer_identity: sysadmin profile: prgs-reviewer session_id: continue-prgs-rc-455-678278 worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-434-gated-actions phase: released candidate_head: 46709537c11ef77b908aa848aa79b8df3c0aea34 target_branch: master target_branch_sha: cc4b95839dce8715d2d0ca6764e5e927968ae2ae last_activity: 2026-07-09T13:55:47Z expires_at: 2026-07-09T15:55:47Z blocker: manual-release
jcwalker3 added 1 commit 2026-07-09 08:59:17 -05:00
# Conflicts:
#	docs/webui-local-dev.md
#	tests/test_webui_skeleton.py
#	webui/app.py
Owner

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #455
issue: #434
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: continue-prgs-rc-455-678278
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-434-gated-actions
phase: claimed
candidate_head: ddb1dd941b
target_branch: master
target_branch_sha: cc4b95839d
last_activity: 2026-07-09T15:04:17Z
expires_at: 2026-07-09T17:04:17Z
blocker: none

<!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #455 issue: #434 reviewer_identity: sysadmin profile: prgs-reviewer session_id: continue-prgs-rc-455-678278 worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-434-gated-actions phase: claimed candidate_head: ddb1dd941b5e599004cf998215ab1de3ee2bcf8c target_branch: master target_branch_sha: cc4b95839dce8715d2d0ca6764e5e927968ae2ae last_activity: 2026-07-09T15:04:17Z expires_at: 2026-07-09T17:04:17Z blocker: none
sysadmin approved these changes 2026-07-09 10:04:32 -05:00
sysadmin left a comment
Owner

Canonical PR State

STATE: review-approved
WHO_IS_NEXT: merger
NEXT_ACTION: merge PR #455 after explicit operator authorization
NEXT_PROMPT:

Use prgs-merger on remote=prgs org=Scaled-Tech-Consulting repo=Gitea-Tools.
Merge PR #455 at expected_head_sha=ddb1dd941b5e599004cf998215ab1de3ee2bcf8c only if still approved and mergeable.

WHAT_HAPPENED: Reviewed PR #455 (Web UI gated actions); approved head ddb1dd941b.
WHY: Disabled-by-default gated action framework aligned with task capabilities; fail-closed attempt path.
ISSUE: #434
HEAD_SHA: ddb1dd941b
REVIEW_STATUS: APPROVED
MERGE_READY: yes (awaiting explicit merge authorization)
BLOCKERS: none
VALIDATION: pytest tests/test_webui_*.py -> 79 passed
LAST_UPDATED_BY: sysadmin (prgs-reviewer)

Review notes

  • Not self-review (author jcwalker3).
  • Web UI stack: prefer merge order 455 then 456 then 457 if docs/app overlap conflicts arise.
## Canonical PR State STATE: review-approved WHO_IS_NEXT: merger NEXT_ACTION: merge PR #455 after explicit operator authorization NEXT_PROMPT: ```text Use prgs-merger on remote=prgs org=Scaled-Tech-Consulting repo=Gitea-Tools. Merge PR #455 at expected_head_sha=ddb1dd941b5e599004cf998215ab1de3ee2bcf8c only if still approved and mergeable. ``` WHAT_HAPPENED: Reviewed PR #455 (Web UI gated actions); approved head ddb1dd941b5e599004cf998215ab1de3ee2bcf8c. WHY: Disabled-by-default gated action framework aligned with task capabilities; fail-closed attempt path. ISSUE: #434 HEAD_SHA: ddb1dd941b5e599004cf998215ab1de3ee2bcf8c REVIEW_STATUS: APPROVED MERGE_READY: yes (awaiting explicit merge authorization) BLOCKERS: none VALIDATION: pytest tests/test_webui_*.py -> 79 passed LAST_UPDATED_BY: sysadmin (prgs-reviewer) ## Review notes - Not self-review (author jcwalker3). - Web UI stack: prefer merge order 455 then 456 then 457 if docs/app overlap conflicts arise.
Owner

adopted_at: 2026-07-09T15:39:09Z
adopted_by_identity: sysadmin
adopted_by_profile: prgs-merger
adopted_from_session_id: continue-prgs-rc-455-678278
adopted_from_profile: prgs-reviewer
adopted_from_reviewer_identity: sysadmin
adopted_from_comment_id: 8179
adoption_reason: merger-handoff-approved-head

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #455
issue: #434
reviewer_identity: sysadmin
profile: prgs-merger
session_id: 1956-5bfb383ad655
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/merger-queue
phase: adopted
candidate_head: ddb1dd941b
target_branch: master
target_branch_sha: cc4b95839d
last_activity: 2026-07-09T15:39:09Z
expires_at: 2026-07-09T17:39:09Z
blocker: none

<!-- mcp-review-lease-adoption:v1 --> adopted_at: 2026-07-09T15:39:09Z adopted_by_identity: sysadmin adopted_by_profile: prgs-merger adopted_from_session_id: continue-prgs-rc-455-678278 adopted_from_profile: prgs-reviewer adopted_from_reviewer_identity: sysadmin adopted_from_comment_id: 8179 adoption_reason: merger-handoff-approved-head <!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #455 issue: #434 reviewer_identity: sysadmin profile: prgs-merger session_id: 1956-5bfb383ad655 worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/merger-queue phase: adopted candidate_head: ddb1dd941b5e599004cf998215ab1de3ee2bcf8c target_branch: master target_branch_sha: cc4b95839dce8715d2d0ca6764e5e927968ae2ae last_activity: 2026-07-09T15:39:09Z expires_at: 2026-07-09T17:39:09Z blocker: none
sysadmin merged commit 49aa3b2812 into master 2026-07-09 10:39: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#455