Skip to content

Add evidence-aware PR promotion gate - #466

Closed
yaojin3616 wants to merge 11 commits into
cobusgreyling:mainfrom
yaojin3616:codex/pr-promotion-engine
Closed

Add evidence-aware PR promotion gate#466
yaojin3616 wants to merge 11 commits into
cobusgreyling:mainfrom
yaojin3616:codex/pr-promotion-engine

Conversation

@yaojin3616

@yaojin3616 yaojin3616 commented Aug 6, 2026

Copy link
Copy Markdown

Summary

  • add an exact-SHA promotion contract requiring review, checks, test deployment, versioned test data, path-aware E2E, and risk acceptance
  • add a deterministic issue-first repair planner with kill switch, ownership lock, sensitive-area policy, attempt circuit breaker, and one-target ranking
  • add a repair lease controller that re-fetches exact PR SHA/attempt state, acquires one global lock, advances attempts, assigns risk, and safely releases
  • add a first-class issue-pr-repair pattern and multi-tool starter installable through loop-init
  • scaffold runnable, dry-run-first GitHub label installation, trusted evidence collection, and lease adapters
  • add working coAligne GitHub/Drone adapters for repair intake, promotion reconciliation, and dry-run-first merging
  • retry transient GitHub intake reads while keeping writes non-retried
  • trust legacy creator-less Drone statuses only through an exact configured URL prefix

Repair priority

  1. confirmed bug without a linked PR
  2. actionable review feedback
  3. deterministic required-check failure
  4. diagnosis for an unconfirmed bug or unknown check failure

Flaky/infrastructure failures, sensitive work, exhausted attempts, and non-owned PR branches fail closed or become proposal-only.

Install and dry run

npx @cobusgreyling/loop-init . --pattern issue-pr-repair --tool codex
node scripts/install-github-labels.mjs --repository owner/repo
node scripts/collect-repair-evidence.mjs \
  --repository owner/repo \
  --required-check required-check-name \
  --output .loop/repair-evidence.json
npx @cobusgreyling/loop-gate repair-plan \
  --contract repair.yaml \
  --evidence .loop/repair-evidence.json \
  --json

The label and lease adapters are dry-run by default. Repository-specific test deployment and receipt publishing remain explicit.

Verification

  • npm --prefix tools/loop-init test (66 passing, all pattern/tool combinations)
  • fresh scaffold integration: mock GitHub intake → deterministic plan → proposed lease
  • npm --prefix tools/loop-gate test (55 passing)
  • node --test examples/coaligne/test/adapters.test.mjs (16 passing)
  • bash scripts/ci-validate-gates.sh passed across the repository
  • live generic collector against coAligne: 0 bug issues, 4 PRs, decision idle
  • bounded read retries cover the transient GitHub EOF observed during the live trial
  • live lease dry-run validated PR Add loop worktree story #299 HEAD and produced one risk/attempt/lock transition without mutating GitHub
  • live promotion collection accepted creator-less Drone status only through the configured Drone URL prefix
  • deterministic ready/stale promotion fixtures passed

The controllers are dry-run by default. Sensitive promotion policy and engine changes remain subject to human review.

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Thanks @yaojin3616 for contributing a tool example — visible, reviewable PRs like this grow the reference for everyone.

What happens next

  • Maintainer aims for same-day review on story, adopter, and scoped docs/example PRs (CONTRIBUTING.md).
  • good first issue PRs: comment on the linked issue so we can assign and close on merge.

More ways to help

— loop-engineering maintainers

@yaojin3616 yaojin3616 closed this Aug 6, 2026
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.

1 participant