feat: add ready-for-dev issue and PR readiness gates - #358
Conversation
Add an issue-readiness workflow that manages the ready-for-dev label with type-specific criteria tailored to the TypeScript client: bug reports need a reproducible JavaScript/TypeScript command (npm, pnpm, yarn, or npx) in the Actual Behavior section, and both bugs and enhancements need Acceptance Criteria checklist items (enhancements also need Desired Behavior). - check-issue-readiness.mjs always exits 0 in --json mode so not-ready results drive label/comment behavior without failing the workflow under set -euo pipefail - post-readiness-comment.mjs upserts a single feedback comment via a hidden marker (idempotent) - pr-description-check.yml gates PRs on linked issues carrying ready-for-dev (issues predating the rollout are grandfathered) - refresh-linked-pr-checks.mjs re-runs the PR gate for open PRs linked to an issue whose ready-for-dev label changed - Issue forms for bug reports and feature requests produce the sections the readiness check evaluates - Jest tests exercise the real CLI code paths via child processes, with a local HTTP server standing in for the GitHub API Fixes #357 Co-authored-by: openhands <openhands@all-hands.dev>
Endpoint auditContract: pinned release artifact
Actionable client-only calls (0)none Actionable server-only operations (12)
Documented non-divergences (13)Client calls intentionally absent from the filtered contract (11)
Reason: Operational Agent Server endpoints intentionally excluded from the filtered public release artifact.
Reason: Client-ahead API stacked on the pending Agent Server meta-profiles implementation.
Reason: Client-ahead API stacked on the pending Agent Server pre-flight LLM validation endpoint. Server operations covered by an exposed browser URL (2)
Reason: RemoteWorkspace.startWorkspaceSession exposes these authenticated URLs for browser iframe and file requests; they are not HttpClient method calls. |
Why
Issue #357 asks for a
ready-for-devissue workflow with CI enforcement, modeled on the equivalent automation inOpenHands/OpenHandsandOpenHands/software-agent-sdkbut repo-appropriate for this TypeScript client (Node scripts instead of Python, Jest tests instead of pytest, npm-ecosystem reproduction commands).Summary
.github/workflows/issue-readiness-check.yml+.github/scripts/check-issue-readiness.mjs): evaluatesbug/enhancementissues against type-specific criteria. Bugs need a reproducible JavaScript/TypeScript command (npm,pnpm,yarn, ornpx) in### Actual Behaviorplus an Acceptance Criteria checklist item; enhancements need### Desired Behaviorplus the checklist. Adds/removes theready-for-devlabel idempotently.--jsonmode the readiness script always exits 0 and the workflow branches on the JSON, so a not-ready issue never fails the workflow underset -euo pipefail..github/scripts/post-readiness-comment.mjs): a single comment upserted by a hidden<!-- issue-readiness-check -->marker, posted on open/reopen and on label transitions only..github/workflows/pr-description-check.yml+.github/scripts/check-pr-description.mjs):pull_request_targetcheck that fails unless every linked issue (Fixes #N, or bare#Nin## Issue Number) exists and carriesready-for-dev; issues created before the rollout date (2026-08-25) are grandfathered so existing PRs are not retroactively blocked. Bot PRs (dependabot, release-please) are exempt..github/scripts/refresh-linked-pr-checks.mjs): whenready-for-devis added/removed on an issue, the latest PR Description Check run is re-triggered for every open PR that links it (via cross-reference timeline events), so the gate never goes stale..github/ISSUE_TEMPLATE/bug_report.yml,feature_request.yml) so the sections the checker evaluates actually exist for reporters.src/__tests__/issue-readiness.test.ts,src/__tests__/pr-description-check.test.ts): 35 Jest tests running the real script CLIs in child processes, including the--jsonexit-0 contract and the linked-issue gate against a local HTTP server standing in for the GitHub API (no mocks).Issue Number
Fixes #357
How to Test
npm run lint && npm run build && npm run test:coverage && npm run format:checkall pass locally (343 tests, 20 suites).npx jest src/__tests__/issue-readiness.test.ts src/__tests__/pr-description-check.test.ts.npm-style repro command and watch theready-for-devlabel and feedback comment; open a PR linking a non-ready issue and confirm the PR Description Check fails, then passes once the issue becomes ready (label change re-runs the check).Note:
READY_FOR_DEV_ROLLOUT_ISOincheck-pr-description.mjsis set to 2026-08-25 (day after authoring). If this PR lands later, bump the constant to the day after merge.Video/Screenshots
N/A — CI/workflow-only change.
Type
Notes
ready-for-devlabel already exists in this repo.pull_request_targetworkflow only checks out the base branch SHA (trusted code) and never PR code, matching the security pattern used by the existingpr.yml.@neubig can click here to continue refining the PR