Skip to content

ci: make PR preflight deterministic and observable - #9410

Merged
Git-on-my-level merged 2 commits into
mainfrom
codex/pr-preflight-9408
Jul 10, 2026
Merged

Git-on-my-level merged 2 commits into
mainfrom
codex/pr-preflight-9408

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Jul 10, 2026 •

Copy link
Copy Markdown
Member

What changed and why

Closes #9408.

Adds one fast PR-contract engine shared by local development and GitHub Hygiene. It selects checks from the exact base/head diff, validates current PR metadata, and reports per-phase timings and remediation. Hygiene now fetches the current PR body through the GitHub API, including on body edits and reruns.

Pre-push execution is now single-flight per worktree and exact input fingerprint. Identical concurrent pushes join one run; different input fails with the active PID, phase, and stable log path. Hook-owned child process groups and locks are cleaned up without touching unrelated Git or app processes.

The fast contract path remains separate from expensive builds and tests. On this 11-file PR it completed in 0.43 seconds.

Product invariants affected

none

How it was verified

  • python3 .github/scripts/test_pr_preflight.py — 6 tests passed, including a PR fix(desktop): keep managed agents on cloud routing #9402-equivalent missing-invariant/missing-flow fixture and two-process single-flight coverage.
  • python3 .github/scripts/test_check_product_invariants.py — 14 tests passed.
  • python3 .github/scripts/test_check_brand_ui.py — 6 tests passed.
  • actionlint -shellcheck '' .github/workflows/repo-checks.yml — passed.
  • scripts/pr-preflight --pr-body-file .github/PULL_REQUEST_TEMPLATE.md — 4 selected contract checks passed in 0.43 seconds after the final rebase.
  • Live GitHub API check against PR fix(desktop): keep managed agents on cloud routing #9402 — loaded the current body and updated_at, then passed the selected contract checks in 0.99 seconds.
  • .github/scripts/run-pre-push.sh and the real git push hook — passed workflow contracts, OpenAPI generation, backend type checking, Swift debug build, Rust cargo check, ratchets, and formatting checks. Stable phase/status/log artifacts were inspected during the run.

Tests

Regression coverage lives in .github/scripts/test_pr_preflight.py. It covers current-body parsing/provenance, deterministic check selection, the original #9402 failure modes, identical-run joining, different-input rejection, result propagation, and observable state/log files.

Scoped cleanups (optional)

None.

Review in cubic

@mintlify

mintlify Bot commented Jul 10, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
omi 🟢 Ready View Preview Jul 10, 2026, 9:48 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@Git-on-my-level
Git-on-my-level merged commit 78b49b0 into main Jul 10, 2026
18 of 21 checks passed
@Git-on-my-level
Git-on-my-level deleted the codex/pr-preflight-9408 branch July 10, 2026 21:59

This branch was successfully deployed

1 active deployment
staging - docs — f027176e Deployed Jul 10, 2026 by mintlify[bot]
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.

devex/ci: make desktop PR preflight deterministic and observable

1 participant