From d9089a9a563f72d01bfb74447729ca5ce0dd29c3 Mon Sep 17 00:00:00 2001 From: openhands Date: Mon, 24 Aug 2026 02:01:44 +0000 Subject: [PATCH] fix(ci): align ready-for-dev gates with OpenHands pipefail-safe approach Bring the ready-for-dev readiness gates in line with the current OpenHands/OpenHands approach while keeping the SDK-specific reproduction criteria (python/pytest/uv/pip for bugs, Desired Behavior + Acceptance Criteria for enhancements): - check_issue_readiness.py exits 1 for not-ready issues in both text and --json modes; the workflow absorbs it with `|| true` so `set -euo pipefail` no longer aborts the run before label/comment handling, and JSON output stays machine-readable. - Post the upserted readiness comment when the ready-for-dev label is applied manually (labeled event), not only on open/reopen/transition. - Share a markdown_sections helper that ignores headings and HUMAN:/AGENT: markers inside fenced code blocks in both the issue readiness and PR description checks, so pasted logs or quoted templates cannot create or spoof sections. - Keep the SDK-specific linked-PR gate refresh job and the PR description ready-for-dev enforcement unchanged. Tests cover ready/not-ready JSON execution (exit code + parseable JSON), fenced-heading parsing, and label add/remove transitions refreshing linked PR gates. Fixes #4605 Co-authored-by: openhands --- .github/scripts/check_issue_readiness.py | 19 +-- .github/scripts/check_pr_description.py | 19 ++- .github/scripts/markdown_sections.py | 95 ++++++++++++++ .github/workflows/issue-readiness-check.yml | 10 +- tests/cross/test_check_issue_readiness.py | 129 ++++++++++++++++++- tests/cross/test_check_pr_description.py | 52 +++++++- tests/cross/test_refresh_linked_pr_checks.py | 24 +++- 7 files changed, 321 insertions(+), 27 deletions(-) create mode 100644 .github/scripts/markdown_sections.py diff --git a/.github/scripts/check_issue_readiness.py b/.github/scripts/check_issue_readiness.py index 208fdb1aa8..e037b722a5 100644 --- a/.github/scripts/check_issue_readiness.py +++ b/.github/scripts/check_issue_readiness.py @@ -14,7 +14,13 @@ GitHub issue forms render each field as an `###