Feature: Pre-merge infra validation hook for pal-e-services and pal-e-deployments PRs #187
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ldraney/claude-custom#187
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Feature
Lineage
Standalone -- migrated from
todo-pre-merge-infra-validationin pal-e-docs. The pal-e-deployments CI piece (Woodpecker kustomize validation) was already completed (pal-e-deployments #14/#15). What remains is the PreToolUse hook in claude-custom.Repo
forgejo_admin/claude-customUser Story
As a platform engineer merging infra PRs,
I want merge attempts on infra repos to be blocked unless validation evidence exists in the PR,
So that Change Failure Rate is reduced by catching bad infra changes before merge.
Context
Currently no pre-merge validation enforcement for infrastructure changes. Kustomize overlays and terraform changes are only tested after merge, creating Change Failure Rate risk. The
sop-platform-tf-changesSOP documents the desired validation patterns but enforcement is manual.The hook should trigger on
PreToolUse/mcp__forgejo__merge_approved_prand check per-repo evidence patterns:tofu planoutput in PR body or comments via Forgejo APIkubectl kustomizeoutput in PR body or comments via Forgejo APIFor non-infra repos, the hook passes silently (exit 0).
File Targets
Files the agent should modify or create:
hooks/check-infra-validation.sh-- new hook script implementing the validation gatesettings.json-- add PreToolUse hook entry formcp__forgejo__merge_approved_prFiles the agent should NOT touch:
hooks/block-mcp-merge.sh-- existing merge gate, separate concernAcceptance Criteria
Test Expectations
Constraints
block-mcp-merge.sh(same event, different check)curlfor Forgejo/Woodpecker API calls (match existing hook patterns)Checklist
Related
pal-e-agency-- projectsop-platform-tf-changes-- SOP documenting validation patternshook-catalog-- coverage gaps table identifies this gap