// SPDX-License-Identifier: CC-BY-SA-4.0 // SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell (hyperpolymath) j.d.a.jewell@open.ac.uk // Owner: Jonathan D.A. Jewell j.d.a.jewell@open.ac.uk
Status: Active & Operational
Last Updated: 2026-06-03
Version: 1.0.0
The Inbox Steward Automation System is a closed-loop automation pipeline that:
- Monitors pull requests across the repository fleet
- Validates they pass all required CICD checks
- Auto-merges qualifying PRs from trusted contributors
- Learns patterns from merged PRs
- Propagates learned rules to all repos
- Monitors compliance across the entire fleet
This creates a self-improving automation system where lessons from one repo benefit all repos.
┌─────────────────────────┐ ┌─────────────────────────┐ ┌─────────────────────────┐
│ gitbot-fleet │────▶│ .git-private-farm │────▶│ hypatia │
│ (inbox-steward.yml) │ │ (inbox-steward- │ │ (inbox-steward-intake.yml)│
│ │ │ propagate.yml │ │ │
│ 1. Monitors PRs │ │ 1. Receives ruleset │ │ 1. Receives reports │
│ 2. Validates CICD passes │ │ updates from Hypatia │ │ 2. Analyzes patterns │
│ 3. Auto-merges if clean │ │ 2. Applies to all repos │ │ 3. Updates ruleset │
│ 4. Dispatches to farm │ │ 3. Triggers re-scanning │ │ 4. Dispatches to farm │
│ │ │ 4. Validates │ │ │
└─────────────────────────┘ └─────────────┬───────────┘ └─────────────┬───────────┘
│ │
▼ ▼
┌─────────────────────────────────────┐
│ CLOSED-LOOP FEEDBACK │
│ PRs → Patterns → Rules → Propagation │
└─────────────────────────────────────┘
File: .github/workflows/inbox-steward.yml
Purpose: Automatically process PRs through the CICD gate
Triggers:
- Pull request events (opened, synchronize, ready_for_review, converted_to_draft, review_requested)
- Pull request review events (submitted, dismissed)
- Check suite completion
- Workflow run completion (Dogfood Gate, Scorecard Enforcer, Hypatia Security Scan, Static Analysis Gate)
- Scheduled (every 15 minutes)
- Manual (workflow_dispatch)
Jobs:
- Scans all open PRs in the repository
- Filters for PRs that:
- Are not draft
- Have mergeable_state of "clean", "has_hooks", or "blocked"
- Have all required checks passed (no failures)
- Outputs: List of PRs ready for processing
- Validates each PR against merge criteria:
- Dogfood Gate passed
- Scorecard Enforcer passed (if applicable)
- Hypatia Security Scan passed
- No blocking reviews (CHANGES_REQUESTED)
- Has approvals OR from trusted contributor
- Outputs: Validated PRs and auto-merge candidates
- Auto-merges qualifying PRs with squash merge
- Requires: Trusted contributor (hyperpolymath, dependabot, renovate) OR has approvals
- Dispatches success event to .git-private-farm
- Records results in shared-context/inbox-steward/
- Sends stewardship report to Hypatia
- Includes: Total PRs checked, validated count, auto-merged count
- Trigger: Always runs if identify or validate succeeded
- Generates GitHub Actions summary
- Shows: PRs checked, passed checks, auto-merged count, failures
File: .github/workflows/inbox-steward-intake.yml
Purpose: Process steward reports and learn patterns
Triggers:
- repository_dispatch (inbox-steward-report)
- Manual (workflow_dispatch)
Jobs:
- Records steward report to
data/inbox-steward-reports/ - Commits report to git history
- Format:
{timestamp, source_repo, total_prs, validated_prs, auto_merged_prs, run_url}
- Analyzes last 20 merged PRs from source repo
- Identifies patterns:
- Common file types changed
- Workflow file changes (frequency)
- Common fix types (from PR titles)
- Average PR size (additions/deletions)
- Suggests rule updates:
- High workflow changes → Enhance workflow validation
- Frequent dependency updates → Enable Dependabot automation
- Large PRs → Warn on PR size limits
- Updates
.hypatia-baseline.jsonwith learned rules - Auto-applies critical/high priority updates
- Creates rule update file in
data/ruleset-updates/ - Commits changes to git
- Sends propagation event to .git-private-farm
- Includes: patterns, rule_updates, action
- Generates GitHub Actions summary
- Shows: Report metrics, analysis results, actions taken, rule updates applied
File: .github/workflows/inbox-steward-propagate.yml
Purpose: Apply learned rules across the fleet
Triggers:
- repository_dispatch (inbox-steward-propagate)
- Manual (workflow_dispatch)
Jobs:
- Parses the propagation event from Hypatia
- Extracts: source_repo, patterns, rule_updates, action
- Gets all repos from
farm-manifest.json(.repos | keys[]) - Identifies which repos need each rule type:
- workflow_hygiene → Repos with
.github/workflows/ - dependency_automation → Repos with dependabot.yml or renovate.json
- pr_size_limit → All repos
- Default → All repos
- workflow_hygiene → Repos with
- For each target repo:
- Clones the repo
- Applies each rule update (creates missing workflow files)
- Commits to a branch
- Opens a PR for review
- Logs all actions to
shared-context/inbox-steward-propagate/
- Triggers dogfood-gate and hypatia-scan in updated repos
- Ensures new rules are validated
- Verifies rules were applied correctly
- Checks for presence of workflow files
- Generates GitHub Actions summary
- Shows: Propagation metrics, targets identified, rules applied, verification results
File: .github/workflows/inbox-steward-monitor.yml
Purpose: Verify automation applies to all repos
Triggers:
- Scheduled (weekly, Sundays at 00:00 UTC)
- After Inbox Steward Propagate completes
- Manual (workflow_dispatch)
Jobs:
- Gets all repos from
farm-manifest.json - Outputs: Total repo count
- For each repo, checks for required workflows:
inbox-steward.ymldogfood-gate.ymlhypatia-scan.ymlscorecard-enforcer.yml
- Identifies compliant and non-compliant repos
- Analyzes non-compliant repos
- Identifies:
- Most commonly missing workflows
- Repos with no automation at all
- Compliance gaps by workflow type
- Sends compliance report to Hypatia
- Includes: Total repos, compliant count, non-compliant count, gap analysis
- Creates detailed GitHub Actions summary
- Generates markdown report file
For a PR to be auto-merged by Inbox Steward:
| Criteria | Required Value | Notes |
|---|---|---|
| Draft status | false |
Must not be a draft PR |
| Mergeable state | clean, has_hooks, or blocked |
GitHub merge queue states |
| All checks passed | true |
No failed check runs |
| Dogfood Gate | success |
Required |
| Scorecard Enforcer | success |
Required if exists |
| Hypatia Security Scan | success |
Required |
| Blocking reviews | 0 |
No CHANGES_REQUESTED reviews |
| Author | Trusted contributor OR has approval | Trusted: hyperpolymath, dependabot, renovate |
The following rules were added to .hypatia-baseline.json:
| Rule ID | Severity | Type | Action | Reason |
|---|---|---|---|---|
| inbox_steward_missing | low | workflow_audit | create | Inbox steward automation for PR processing |
| inbox_steward_intake_missing | low | workflow_audit | create | Hypatia intake for inbox steward reports |
| Rule ID | Severity | Type | Action | Reason |
|---|---|---|---|---|
| IA001 | medium | inbox_automation | enable_auto_merge | Enable auto-merge for trusted contributors |
| IA002 | medium | inbox_automation | require_dogfood_gate | All PRs must pass Dogfood Gate before auto-merge |
| IA003 | medium | inbox_automation | require_scorecard | All PRs must pass Scorecard Enforcer before auto-merge |
| IA004 | high | inbox_automation | require_hypatia_scan | All PRs must pass Hypatia Security Scan before auto-merge |
| IA005 | low | inbox_automation | trusted_contributors | Define trusted contributors (hyperpolymath, dependabot, renovate) |
| IA006 | medium | inbox_automation | propagate_rules | Propagate learned rules across fleet |
| IA007 | low | inbox_automation | monitor_application | Monitor application to all repos |
All workflows require these GitHub Secrets:
- Purpose: Cross-repository API access
- Permissions:
repo(full control)workflow(full control)security-events(read/write)repository-projects(read)actions(read)
- Scope: All repositories in the org
- Purpose: Dispatch events to Hypatia
- Permissions: Same as FARM_PAT
- Scope: hyperpolymath/hypatia repository
.github/workflows/inbox-steward.yml(NEW)
.github/workflows/inbox-steward-intake.yml(NEW).hypatia-baseline.json(MODIFIED)
.github/workflows/inbox-steward-propagate.yml(NEW).github/workflows/inbox-steward-monitor.yml(NEW)
PRs Processed:
-
gitbot-fleet#258 - Dependabot deps update
- Status: ✅ MERGED
- Commit: e61a1a60e9081e724a580347d7854c090d980677
-
gitbot-fleet#257 - Hypatia closed-loop contract
- Status: ✅ MERGED
- Commit: 2c3123177f510a0275a27bf362685128cf5bb22f
-
hypatia#434 - Idris proof surface gating
- Status: ✅ MERGED
- Commit: cc6e5e28098ca46e76d2ae2d3e8ebc6a646fe489
Workflow Runs:
- gitbot-fleet/inbox-steward: SUCCESS (26922966999)
- All configs clean and on main branches
# Test inbox-steward without actual merges
gh workflow run inbox-steward.yml -f dry_run=true# Run inbox-steward manually
gh workflow run inbox-steward.yml -f dry_run=false
# Run monitor
cd dot-git-private-farm
gh workflow run inbox-steward-monitor.yml -f dry_run=false# Check all workflows exist
ls -la .github/workflows/inbox-steward*.yml
# Validate JSON syntax
jq empty .github/workflows/inbox-steward.yml
jq empty .github/workflows/inbox-steward-intake.yml
jq empty .github/workflows/inbox-steward-propagate.yml
jq empty .github/workflows/inbox-steward-monitor.yml
# Validate baseline
jq empty .hypatia-baseline.jsonIf you see Unexpected symbol: '$' in workflow validation:
- Ensure bash expressions are not used inside GitHub Actions expressions
- Use bash variables instead:
VAR="${{ needs.job.outputs.value }}"thenecho "$VAR"
If checkout steps fail:
- Use
actions/checkout@v4instead of specific SHAs - Use
secrets.GITHUB_TOKENfor checkout - Use
secrets.FARM_PATfor API calls
The propagate and monitor workflows require farm-manifest.json:
- Ensure it exists in .git-private-farm
- Structure:
.reposis an object with repo names as keys - Extract repos with:
jq -r '.repos | keys[]' farm-manifest.json
- Workflows make many API calls
- Consider rate limiting with
sleepbetween calls - Use
FARM_PATwith appropriate scopes
- Auto-approval for Dependabot: Automatically approve Dependabot PRs that pass checks
- PR Size Enforcement: Block PRs that exceed size limits
- Auto-labeling: Apply labels based on PR content
- Slack Notifications: Notify when PRs are auto-merged
- Metrics Dashboard: Track automation metrics over time
- System Owner: hyperpolymath
- Repository: hyperpolymath/gitbot-fleet
- Documentation: This file
- Status: Active & Operational
Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe vibe@mistral.ai