From 2697a5f61bc97148d483f8fafb48e5f36640cb7a Mon Sep 17 00:00:00 2001 From: "Molecule AI Dev Engineer A (Kimi)" Date: Tue, 26 May 2026 08:13:03 +0000 Subject: [PATCH] fix(lint): ignore unmodified workflow files in pre-flip CoE check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Old branches that haven't rebased onto main carry stale copies of workflow files updated after the branch was cut. Comparing those stale copies against the current base produced false-positive flips of continue-on-error: true → false, blocking PRs that never touched the workflow file. Filter the comparison set to workflow files whose content actually differs between base and head. Co-Authored-By: Claude Opus 4.7 --- .gitea/scripts/lint_pre_flip_continue_on_error.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.gitea/scripts/lint_pre_flip_continue_on_error.py b/.gitea/scripts/lint_pre_flip_continue_on_error.py index 38c37efcf..0c315d239 100644 --- a/.gitea/scripts/lint_pre_flip_continue_on_error.py +++ b/.gitea/scripts/lint_pre_flip_continue_on_error.py @@ -641,6 +641,15 @@ def main(argv: list[str] | None = None) -> int: base_workflows = workflows_at_sha(BASE_SHA) head_workflows = workflows_at_sha(HEAD_SHA) + # Ignore workflow files that are identical on both sides — old branches + # that haven't rebased onto main carry stale copies of workflows that + # were updated later. Comparing those stale copies against the current + # base produces false-positive "flips". + base_workflows = { + p: t for p, t in base_workflows.items() + if p in head_workflows and head_workflows[p] != t + } + head_workflows = {p: t for p, t in head_workflows.items() if p in base_workflows} flips = detect_flips(base_workflows, head_workflows) if not flips: -- 2.52.0