Skip to content

[ci] Branch protection: resync linear-history + drop required-signatures#38

Merged
trilamsr merged 1 commit into
mainfrom
chore/branch-protection-resync
May 15, 2026
Merged

[ci] Branch protection: resync linear-history + drop required-signatures#38
trilamsr merged 1 commit into
mainfrom
chore/branch-protection-resync

Conversation

@trilamsr

Copy link
Copy Markdown
Contributor

Problem

GitHub Settings → Branches → `main` was flipped in two ways during PR #28's merge window: `required_linear_history` re-enabled, `required_signatures` disabled. Both in-repo source-of-truth files (the YAML checklist + the apply-script JSON payload) absorbed the opposite values via PR #28's squash, so the docs no longer match live state. Next idempotent run of `scripts/apply-branch-protection.sh` would revert the live policy.

Impact

Re-aligns documented intent with live policy. No `main` behavior change — this is documentation catching up.

Solution

  • `.github/branch-protection.yml:15`: `require_linear_history: true`, with a comment naming the known cost (blocks squash-merge for branches that absorbed merge commits) and the documented escape hatch (squash-collapse + force-push as a per-PR exception to `feedback_no_history_rewrites`).
  • `.github/branch-protection.yml:38`: `require_signed_commits: false`, with a comment naming the actual provenance chain on `main` today (PR-required gate + DCO `Signed-off-by:` + GitHub web-flow auto-sign on squash-merge) and the re-enable trigger (external contributors joining, or an explicit audit binding).
  • `scripts/apply-branch-protection.sh:44,48`: JSON payload flipped to match.

Test plan

  • `gh api /repos/TraceCoreAI/tracecore/branches/main/protection` → `{required_linear_history: true, required_signatures: false}` matches `.github/branch-protection.yml` lines 15 + 38 and `scripts/apply-branch-protection.sh` lines 44 + 48.
  • `bash -n scripts/apply-branch-protection.sh` exits 0 (shell syntax clean).

…_signatures

GitHub Settings → Branches → `main` was flipped in two ways: linear-history
re-enabled (after being disabled in PR #28's resolution window), and
signed commits dropped. Both source-of-truth files updated to match
the live state:

- `.github/branch-protection.yml:15`: `require_linear_history: true`,
  with a comment that names the known cost (squash-merge blocks for
  branches that absorbed merge commits) and the documented escape
  hatch (squash-collapse + force-push as a per-PR exception to
  MEMORY.md `feedback_no_history_rewrites`).
- `.github/branch-protection.yml:38`: `require_signed_commits: false`,
  with a comment that names the actual provenance chain on `main`
  today (PR-required gate + DCO `Signed-off-by:` trailer + GitHub
  web-flow auto-signing of every squash-merge commit) and the
  re-enable trigger (external contributors joining, or an explicit
  audit binding).
- `scripts/apply-branch-protection.sh:44,48`: JSON payload flipped
  to match, so the next idempotent re-apply preserves the live
  state rather than reverting.

No behavior change on `main` — this commit aligns the documentation
to the policy choice already in effect via the GitHub UI.

Signed-off-by: Tri Lam <trilamsr@gmail.com>
@trilamsr trilamsr enabled auto-merge (squash) May 15, 2026 12:39
@trilamsr trilamsr merged commit 8bb253a into main May 15, 2026
5 checks passed
@trilamsr trilamsr deleted the chore/branch-protection-resync branch May 15, 2026 12:46
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