Skip to content

[codex] Validate changelog matrix before sweep reuse#1853

Merged
Oseltamivir merged 6 commits into
mainfrom
codex/remove-production-changelog-gate
Jun 19, 2026
Merged

[codex] Validate changelog matrix before sweep reuse#1853
Oseltamivir merged 6 commits into
mainfrom
codex/remove-production-changelog-gate

Conversation

@Oseltamivir

@Oseltamivir Oseltamivir commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • remove the strict immutable-history check-changelog behavior from run-sweep.yml
  • replace it with a setup-compatible check-changelog job before sweep reuse
  • require exactly two validations: a final newline and successful process_changelog.py matrix generation
  • remove the obsolete strict validator CLI mode and historical strict-validation CI step from Add failed-ingest recovery and pre-reuse changelog validation [skip-sweep] #1821
  • retain the existing reuse, setup, merge-recovery, and sweep-label conflict behavior

Why

PR #1852 removed the duplicate associated-PR validation from the test workflow, but the production workflow still enforced immutable historical entries. That caused PR #1833 to fail with entry 497 changed.

A newline-only precheck is insufficient. Run 27729613948 failed after PR #1717 merged because conflict resolution changed the existing PR #1798 line; process_changelog.py then rejected the diff before generating a matrix. The replacement check executes that same processor before the reuse gate, so malformed conflict resolutions cannot bypass setup via sweep reuse.

There are no PR-link or other exceptions: a PR must have a final newline and generate a valid matrix to pass this gate.

#1821 cleanup

No complete file from #1821 is redundant without removing active functionality. The recovery command/helper, merge-preparation helper, reusable-artifact validation, and focused test workflow all still have live callers. This PR removes the dead strict-validation branch and its historical CI step instead.

Validation


Note

Medium Risk
Changes production sweep and reuse gating for perf-changelog.yaml; push-to-main no longer runs the old strict validator job, relying on setup's processor instead.

Overview
Replaces the strict immutable-history check-changelog gate in run-sweep.yml with a PR-only check that matches sweep setup: trailing newline plus successful process_changelog.py matrix generation via validate_matrix_compatible_change. Drops has-additions / metadata-only outputs and no longer blocks setup on “no new entries”; push-to-main skips check-changelog while setup still runs process_changelog.py.

reuse-sweep-gate no longer requires appended entries—only a successful matrix check on synchronize before evaluating /reuse-sweep-run. merge_with_reuse.sh waits for check-changelog then all PR checks before squash-merge. Docs (README, KLAUD_DEBUG) and gating tests are updated; the historical strict-validator CI step is removed from test-changelog-gate.yml.

Reviewed by Cursor Bugbot for commit 11f5456. Bugbot is set up for automated code reviews on this repo. Configure here.

@Oseltamivir Oseltamivir changed the title [codex] Remove production changelog gate [codex] Validate changelog matrix before sweep reuse Jun 19, 2026
Comment thread utils/changelog_gate_tests/test_validate_perf_changelog.py Fixed
@Oseltamivir Oseltamivir marked this pull request as ready for review June 19, 2026 04:15
@Oseltamivir Oseltamivir requested a review from a team June 19, 2026 04:15
@claude

claude Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Claude finished @Oseltamivir's task in 2m 40s —— View job


PR Review: Validate changelog matrix before sweep reuse

  • Read changed files and understand the changes
  • Check for bugs, logic errors, and blocking issues
  • Post review findings

LGTM — no blocking issues found.

The refactor correctly replaces the immutable-history check-changelog gate with a lighter --matrix-compatible precheck (final newline + process_changelog.py matrix generation). The key behavioral changes are well-reasoned:

  1. check-changelog now PR-only — push-to-main events skip it, and setup accepts skipped via the new success || skipped clause. Pushes still get validated by process_changelog.py inside setup itself.

  2. has-additions output removed — the reuse gate and setup no longer condition on it, which removes the metadata-only skip path for push events. This is an intentional simplification; setup's own matrix generation handles empty-matrix cases.

  3. Conflicting sweep labels moved to setup — functionally equivalent since a check-changelog failure already blocked setup. Moving it to setup keeps check-changelog focused on changelog validation only.

  4. merge_with_reuse.sh uses gh pr checks --watch — replaces the custom wait_for_check polling loop with a single gh pr checks call that waits for all checks, not just check-changelog. Simpler and catches any check failure before merge.

The test suite is thorough — the exhaustive cross-product covers 1154 scenarios (down from 2312 after removing the has-additions axis) and the reference spec independently encodes the intended gating logic. The test_matrix_compatible_check_rejects_pr_1717_conflict_resolution test pinning real commit SHAs is a nice regression guard.

Re: CodeQL dual-import finding — the import validate_perf_changelog as validator on line 8 is needed for monkeypatch.setattr(validator, ...) in the new tests. The existing from validate_perf_changelog import (...) serves the pre-existing tests. Both imports are load-bearing; the CodeQL warning is a false positive in this context.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 60928c8. Configure here.

Comment thread .github/workflows/run-sweep.yml
@Oseltamivir Oseltamivir merged commit c70778d into main Jun 19, 2026
6 checks passed
@Oseltamivir Oseltamivir deleted the codex/remove-production-changelog-gate branch June 19, 2026 04:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants