Skip to content

fix(ci): align ready-for-dev gates with OpenHands pipefail-safe approach - #4607

Draft
neubig wants to merge 1 commit into
mainfrom
fix/issue-4605-ready-for-dev-gates
Draft

fix(ci): align ready-for-dev gates with OpenHands pipefail-safe approach#4607
neubig wants to merge 1 commit into
mainfrom
fix/issue-4605-ready-for-dev-gates

Conversation

@neubig

@neubig neubig commented Aug 24, 2026

Copy link
Copy Markdown
Member

HUMAN:


AGENT:

This PR was created by an AI agent (OpenHands) on behalf of the user.

Why

Issue #4605 asks to bring this repository's ready-for-dev process in line with the current OpenHands/OpenHands approach while keeping the SDK-specific reproduction guidance. Concretely, the readiness evaluator must not fail the workflow merely because an issue is not ready when the workflow runs under set -euo pipefail, JSON mode must stay machine-readable, readiness comments must remain upserted, linked PR readiness checks must refresh when the label changes, and linked-PR readiness must be enforced in CI via the existing PR description check.

Summary

  • check_issue_readiness.py now exits 1 for a not-ready issue in both text and --json modes (uniform exit semantics, matching OpenHands/OpenHands #16514); the workflow step absorbs it with || true so set -euo pipefail cannot abort the run before label add/remove and comment handling. JSON output remains machine-readable on stdout.
  • The readiness comment step also fires on labeled events for ready-for-dev (matching OpenHands/OpenHands #16830), so a manually applied label produces an upserted confirmation/explanation comment.
  • New shared .github/scripts/markdown_sections.py helper (ported from OpenHands/OpenHands #16595) masks fenced code blocks; both check_issue_readiness.py and check_pr_description.py now ignore ###/## headings and HUMAN:/AGENT: markers inside fences, so pasted logs or quoted templates cannot create or spoof sections.
  • SDK-specific criteria are preserved unchanged: bug issues require a reproducible python/pytest/uv/pip command in Actual Behavior; enhancements require Desired Behavior; both require an Acceptance Criteria checklist. The SDK-specific linked-PR gate refresh job (refresh-linked-pr-gates + refresh_linked_pr_checks.py) and PR-description ready-for-dev enforcement (with the pre-rollout grandfathering) are unchanged.

Issue Number

Fixes #4605

How to Test

  • uv run pytest tests/cross/test_check_issue_readiness.py tests/cross/test_check_pr_description.py tests/cross/test_refresh_linked_pr_checks.py -q — 43 passed. New tests cover ready/not-ready --json execution (exit code + parseable JSON), fenced-heading parsing, quoted-template HUMAN/AGENT markers, and label add/remove transitions refreshing linked PR gates.
  • Simulated the workflow step verbatim under set -euo pipefail with ready and not-ready event payloads: both complete the step and produce ready=true/ready=false plus the reasons file, so label/comment handling always runs.
  • uv run pre-commit run --files <changed files> — all hooks pass (ruff, pycodestyle, pyright, yamlfmt, import rules).
  • Full tests/cross run: 405 passed; the only failures are test_remote_conversation_live_server.py cases, which fail locally because the sandbox shell itself runs inside the same tmux server those tests tear down — they are unrelated to this change (no SDK code paths touched) and run on isolated CI runners.

Video/Screenshots

N/A — CI/workflow-only change.

Design Doc

N/A

Type

  • Bug fix
  • Feature
  • Refactor
  • Breaking change
  • Docs / chore

Notes

  • The PR Description Check workflow only runs on non-draft PRs; the HUMAN note must be filled in by a human before this PR is marked ready for review.

@neubig can click here to continue refining the PR


🐳 Agent Server images for this PR — GHCR package, pull/run commands, and all pushed tags (click to expand)

GHCR package: https://github.com/OpenHands/agent-sdk/pkgs/container/agent-server

Variants & Base Images

Variant Architectures Base Image Docs / Tags
java amd64, arm64 eclipse-temurin:17-jdk Link
python amd64, arm64 nikolaik/python-nodejs:python3.13-nodejs22-slim Link
golang amd64, arm64 golang:1.21-bookworm Link

Pull (multi-arch manifest)

# Each variant is a multi-arch manifest supporting both amd64 and arm64
docker pull ghcr.io/openhands/agent-server:d9089a9-python

Run

docker run -it --rm \
  -p 8000:8000 \
  --name agent-server-d9089a9-python \
  ghcr.io/openhands/agent-server:d9089a9-python

All tags pushed for this build

ghcr.io/openhands/agent-server:d9089a9-golang-amd64
ghcr.io/openhands/agent-server:d9089a9a563f72d01bfb74447729ca5ce0dd29c3-golang-amd64
ghcr.io/openhands/agent-server:fix-issue-4605-ready-for-dev-gates-golang-amd64
ghcr.io/openhands/agent-server:d9089a9-golang_tag_1.21-bookworm-amd64
ghcr.io/openhands/agent-server:d9089a9-golang-arm64
ghcr.io/openhands/agent-server:d9089a9a563f72d01bfb74447729ca5ce0dd29c3-golang-arm64
ghcr.io/openhands/agent-server:fix-issue-4605-ready-for-dev-gates-golang-arm64
ghcr.io/openhands/agent-server:d9089a9-golang_tag_1.21-bookworm-arm64
ghcr.io/openhands/agent-server:d9089a9-java-amd64
ghcr.io/openhands/agent-server:d9089a9a563f72d01bfb74447729ca5ce0dd29c3-java-amd64
ghcr.io/openhands/agent-server:fix-issue-4605-ready-for-dev-gates-java-amd64
ghcr.io/openhands/agent-server:d9089a9-eclipse-temurin_tag_17-jdk-amd64
ghcr.io/openhands/agent-server:d9089a9-java-arm64
ghcr.io/openhands/agent-server:d9089a9a563f72d01bfb74447729ca5ce0dd29c3-java-arm64
ghcr.io/openhands/agent-server:fix-issue-4605-ready-for-dev-gates-java-arm64
ghcr.io/openhands/agent-server:d9089a9-eclipse-temurin_tag_17-jdk-arm64
ghcr.io/openhands/agent-server:d9089a9-python-amd64
ghcr.io/openhands/agent-server:d9089a9a563f72d01bfb74447729ca5ce0dd29c3-python-amd64
ghcr.io/openhands/agent-server:fix-issue-4605-ready-for-dev-gates-python-amd64
ghcr.io/openhands/agent-server:d9089a9-nikolaik_s_python-nodejs_tag_python3.13-nodejs22-slim-amd64
ghcr.io/openhands/agent-server:d9089a9-python-arm64
ghcr.io/openhands/agent-server:d9089a9a563f72d01bfb74447729ca5ce0dd29c3-python-arm64
ghcr.io/openhands/agent-server:fix-issue-4605-ready-for-dev-gates-python-arm64
ghcr.io/openhands/agent-server:d9089a9-nikolaik_s_python-nodejs_tag_python3.13-nodejs22-slim-arm64
ghcr.io/openhands/agent-server:d9089a9-golang
ghcr.io/openhands/agent-server:d9089a9a563f72d01bfb74447729ca5ce0dd29c3-golang
ghcr.io/openhands/agent-server:fix-issue-4605-ready-for-dev-gates-golang
ghcr.io/openhands/agent-server:d9089a9-golang_tag_1.21-bookworm
ghcr.io/openhands/agent-server:d9089a9-java
ghcr.io/openhands/agent-server:d9089a9a563f72d01bfb74447729ca5ce0dd29c3-java
ghcr.io/openhands/agent-server:fix-issue-4605-ready-for-dev-gates-java
ghcr.io/openhands/agent-server:d9089a9-eclipse-temurin_tag_17-jdk
ghcr.io/openhands/agent-server:d9089a9-python
ghcr.io/openhands/agent-server:d9089a9a563f72d01bfb74447729ca5ce0dd29c3-python
ghcr.io/openhands/agent-server:fix-issue-4605-ready-for-dev-gates-python
ghcr.io/openhands/agent-server:d9089a9-nikolaik_s_python-nodejs_tag_python3.13-nodejs22-slim

About Multi-Architecture Support

  • Each variant tag (e.g., d9089a9-python) is a multi-arch manifest supporting both amd64 and arm64
  • Docker automatically pulls the correct architecture for your platform
  • Individual architecture tags (e.g., d9089a9-python-amd64) are also available if needed

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 <openhands@all-hands.dev>
@github-actions

Copy link
Copy Markdown
Contributor

Python API breakage checks — ✅ PASSED

Result:PASSED

Action log

@github-actions

Copy link
Copy Markdown
Contributor

REST API breakage checks (OpenAPI) — ✅ PASSED

Result:PASSED

Action log

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.

Add and enforce ready-for-dev issue and PR readiness gates

2 participants