RepoGate
Autonomous PR Quality & Cryptographic Attestation Gate Agent.
RepoGate is an enterprise-grade automated gatekeeper for GitHub Pull Requests. It evaluates code modifications across 6 rigorous safety gates, detects duplicate or superseded race-condition PRs, identifies silent regressions, and produces tamper-evident cryptographic proofs bound to a persistent Agent DID via EIP-191 ECDSA signatures.
Quickstart (v1.1 Distribution Architecture)
1. Installation
RepoGate core is pure Python and runs independently of Node.js:
# Recommended for CLI usage
pipx install t3n-repogate
# Or install in your active Python environment
pip install t3n-repogate
Note: For developers building from source or testing the development branch:
pip install dist/*.whl
2. Audit a Pull Request
Run a comprehensive 6-gate audit against any public or private GitHub PR:
# Basic terminal output
repogate audit https://github.com/OWNER/REPO/pull/123
# Save machine-readable JSON report
repogate audit https://github.com/OWNER/REPO/pull/123 --output report.json
# Authenticate with GitHub Token (or set GITHUB_TOKEN environment variable)
export GITHUB_TOKEN="your_github_token"
repogate audit https://github.com/OWNER/REPO/pull/123
3. Verify Cryptographic Proof
RepoGate features a Python-native EIP-191 proof verifier. Proofs can be verified anywhere without Node.js or npm dependencies:
repogate verify report.json proof.json
- Exit Code
0: Proof is valid, report is untampered, and signed by the canonical authorized identity. - Exit Code
1: Hash mismatch (tampering detected), wrong signer, invalid DID, or corrupted signature. - Exit Code
2: File I/O, network, or execution error.
GitHub Action Integration
RepoGate can be integrated directly into your repository's PR workflows without cloning or running Node.js.
Note:
@v1becomes available after the v1.1 GA release. During pre-release, use@mainor commit SHAs.
name: RepoGate
on:
pull_request:
permissions:
actions: read
contents: read
issues: read
pull-requests: read
statuses: read
jobs:
repogate:
runs-on: ubuntu-latest
steps:
- id: repogate
uses: 1998LJ/t3n-repogate@v1
with:
github-token: ${{ github.token }}
fail-on-block: "true" # Default: fails the workflow if PR is marked BLOCKED
- name: Inspect Verdict
if: always()
run: |
echo "Target: ${{ steps.repogate.outputs.target }}"
echo "Risk: ${{ steps.repogate.outputs.risk-score }}"
echo "Decision: ${{ steps.repogate.outputs.recommended-action }}"
echo "Report: ${{ steps.repogate.outputs.report-path }}"
Action Modes
- Enforcement Gate (
fail-on-block: "true"): Automatically blocks the workflow (exit code 1) if RepoGate determines the PR isBLOCKED. - Advisory Mode (
fail-on-block: "false"): Evaluates risk and exports machine-readable findings without breaking the CI pipeline.
Architecture Overview
External Developer / CI
│
▼
repogate CLI
├── audit ──> Python 6-Gate Engine ──> GitHub REST API ──> Machine-Readable Report
└── verify ──> Python-Native EIP-191 Verifier ──> Packaged Trust Anchor (agent_identity.json)
│
└── (Optional Reference Oracle: Node/ethers verify_proof.js)
- Python Execution Engine: Evaluates PR diffs, commits, CI status, and regression risk.
- Cryptographic Trust Anchor: Encapsulated in
repogate.data/agent_identity.jsonand permanently bound to canonical Agent DID (did:t3n:78131a400e1762aeac8d86e90b76449e02cf8169). - Node/T3N Layer: Serves as a reference implementation, proof generator, and cross-language compatibility oracle (
verify_proof.js/t3n_auth.js). Node.js 24 is only needed for attestation development, never for CLI execution.
The 6 Enforcement Gates
- Duplicate PR Gate: Identifies identical issue resolutions and previously closed/merged PR duplicates.
- Superseded Race Gate: Flags competing PRs that modify identical target files within close intervals.
- CI Status Gate: Validates head commit GitHub Actions runs (success / pending / failure).
- Regression Guard: Intercepts removed tests, loosened assertions, and suppressed pytest markers.
- Scope Guard: Detects out-of-scope modifications, massive multi-file changes, and unintended file mutations.
- Policy Guard: Intercepts unconfirmed bounty claims, fake SLA commitments, leaked tokens, and unauthorized licenses.
Development Setup
Requirements: Python 3.10+ (and optionally Node.js 24+ for reference oracle testing).
# 1. Clone repository
git clone https://github.com/1998LJ/t3n-repogate.git
cd t3n-repogate
# 2. Set up Python environment
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
# 3. Optional: Set up Node oracle dependencies
npm ci
Running Checks Locally
# Code formatting & static lint
ruff check .
ruff format --check .
# Full Python test suite (unit tests, CLI tests, adversarial tests)
python3 -m unittest discover -s tests -v
# Cross-language Node reference oracle test
npm test
# Standard isolated PEP 517 build
python3 -m build
License
This project is licensed under the MIT License.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file t3n_repogate-1.1.0.tar.gz.
File metadata
- Download URL: t3n_repogate-1.1.0.tar.gz
- Upload date:
- Size: 27.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d3765d56f2cc5271b267907861787e439454ba4d8a5f0012b96c8659b171ad9
|
|
| MD5 |
570ef0f205cb5c40ba3a99e14e0344f6
|
|
| BLAKE2b-256 |
1e57714cfbd5ce3b3e2b3ad98b263a62f98622135133947d2008bb4d66eade51
|
Provenance
The following attestation bundles were made for t3n_repogate-1.1.0.tar.gz:
Publisher:
release.yml on 1998LJ/t3n-repogate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
t3n_repogate-1.1.0.tar.gz -
Subject digest:
7d3765d56f2cc5271b267907861787e439454ba4d8a5f0012b96c8659b171ad9 - Sigstore transparency entry: 2871065493
- Sigstore integration time:
-
Permalink:
1998LJ/t3n-repogate@cde941e52b10884001f551c39b4e05f24b51e7f4 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/1998LJ
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@cde941e52b10884001f551c39b4e05f24b51e7f4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file t3n_repogate-1.1.0-py3-none-any.whl.
File metadata
- Download URL: t3n_repogate-1.1.0-py3-none-any.whl
- Upload date:
- Size: 19.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
073fba0d338be6917798bef6fd1c696c74aea4163f93335ddb6622c60c9fa61b
|
|
| MD5 |
9fc40c3755da762a52549679175b7764
|
|
| BLAKE2b-256 |
550547020554ea88769a2197b04b46302c81308f6ceaf542cdfd06ab6db36cca
|
Provenance
The following attestation bundles were made for t3n_repogate-1.1.0-py3-none-any.whl:
Publisher:
release.yml on 1998LJ/t3n-repogate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
t3n_repogate-1.1.0-py3-none-any.whl -
Subject digest:
073fba0d338be6917798bef6fd1c696c74aea4163f93335ddb6622c60c9fa61b - Sigstore transparency entry: 2871065542
- Sigstore integration time:
-
Permalink:
1998LJ/t3n-repogate@cde941e52b10884001f551c39b4e05f24b51e7f4 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/1998LJ
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@cde941e52b10884001f551c39b4e05f24b51e7f4 -
Trigger Event:
push
-
Statement type: