Skip to content

Add branch/PR integration audit script, runbook, and Make target#22

Merged
mdheller merged 5 commits intomainfrom
codex/integrate-branches-and-prs-into-main
Apr 8, 2026
Merged

Add branch/PR integration audit script, runbook, and Make target#22
mdheller merged 5 commits intomainfrom
codex/integrate-branches-and-prs-into-main

Conversation

@mdheller
Copy link
Copy Markdown
Member

@mdheller mdheller commented Apr 8, 2026

Motivation

  • Provide a lightweight, deterministic audit step to verify ancestry and PR lineage before merging multi-day branch/PR work into main to avoid dropped commits or merge drift.
  • Capture an operational, low-risk runbook so integrators follow a repeatable checklist that preserves evidence and enables quick rollback anchors.
  • Surface merge-state guidance (SAFE FAST-FORWARD, ALREADY INTEGRATED, DIVERGED) so merges are chosen with clear intent and minimal surprises.

Description

  • Add tools/audit_branch_pr_integration.sh, a POSIX-compatible script that compares a source ref and a target branch, lists merge commits, counts missing commits, computes the merge base, and classifies the merge status.
  • Add docs/vnext/integration/branch_pr_merge_runbook.md with preconditions, the audit-first workflow, recommended merge commands, post-merge checks, and recommended recovery tagging.
  • Update docs/vnext/integration/README.md to link the new runbook for discoverability.
  • Add a Makefile target integration-audit that runs ./tools/audit_branch_pr_integration.sh main HEAD to standardize invocation from the repo root and set executable permissions on the script.

Testing

  • Ran ./tools/audit_branch_pr_integration.sh work HEAD, which executed successfully and reported a safe fast-forward state for the inspected refs.
  • Ran make integration-audit, which failed early and reported that the local main branch did not exist (this is an expected environment-state failure to be resolved by fetching/creating main).
  • Attempted make verify, which failed to complete due to external dependency/network limitations: Rust cargo failed to download crates (HTTP 403), Go tests failed due to missing go.sum entries for golang.org/x/crypto/chacha20poly1305, and the Python fixture verifier failed due to a missing cryptography package.
  • The above failures are environment/dependency related and do not reflect the changes to the audit tooling and runbook, which exercised correctly in the repository context.

Codex Task

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 033c7e5517

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tools/audit_branch_pr_integration.sh
@mdheller mdheller merged commit 00fa457 into main Apr 8, 2026
5 of 7 checks passed
@mdheller mdheller deleted the codex/integrate-branches-and-prs-into-main branch April 8, 2026 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant