Skip to content

Add a Forge-native pre-push repository validation gate - #272

Open
eshulman2 wants to merge 2 commits into
mainfrom
issue-263-forge-native
Open

Add a Forge-native pre-push repository validation gate#272
eshulman2 wants to merge 2 commits into
mainfrom
issue-263-forge-native

Conversation

@eshulman2

Copy link
Copy Markdown
Collaborator

Summary

  • add a centralized repository-change validation boundary to both Forge Git push paths
  • validate against the trusted origin/merge base before publication
  • reject protected exact/glob paths, unsafe symlinks, oversized changes, malformed Git metadata, and missing base references
  • return a typed successful validation result and convert rejected publication into the existing GitError boundary
  • provide a composable OutputValidator interface used by Scan agent-derived code and text for secrets before publication #77 and future deterministic checks

Forge architecture

This PR intentionally stays at the GitOperations publication boundary. It does not add sandbox artifact-transfer policy or intercept Jira/GitHub clients.

Test plan

  • 11 focused repository-validation and GitOperations tests pass
  • Ruff passes on changed implementation and tests

Closes #263

Follow-up: #77

@eshulman2
eshulman2 force-pushed the issue-263-forge-native branch from ae71dec to 9d17a31 Compare August 6, 2026 18:27
@eshulman2
eshulman2 force-pushed the issue-263-forge-native branch from 9d17a31 to 5d8cc7b Compare August 6, 2026 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a fail-closed pre-push validation gate in GitOperations

1 participant