Skip to content

feat: add metadata JSON readiness output#1113

Open
panva wants to merge 1 commit into
nodejs:mainfrom
panva:metadata-json-readiness
Open

feat: add metadata JSON readiness output#1113
panva wants to merge 1 commit into
nodejs:mainfrom
panva:metadata-json-readiness

Conversation

@panva

@panva panva commented Jul 8, 2026

Copy link
Copy Markdown
Member

This adds structured readiness output to git node metadata --json so automation can consume PR landability checks without matching human-readable CLI output.

The JSON output includes:

  • ready
  • readiness
  • exitCode
  • metadata
  • reasonCodes
  • reasons

It also adds stable reason codes from PRChecker for the existing readiness checks.

Exit Codes

git node metadata --json uses category-level exit codes:

  • 0: PR is ready
  • 20: PR is not ready for deferrable metadata reasons
  • 40: PR is not ready for a hard or mixed reason
  • 1: unexpected tool/runtime failure

20-29 are reserved for future deferrable metadata states, and 40-49 are reserved for future hard metadata failure states.

The current deferrable set is scoped to the lightweight commit-queue selector use case from nodejs/node#64343:

  • missing-approval
  • missing-tsc-approval
  • wait-time

@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.54579% with 34 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.44%. Comparing base (9250fba) to head (d416c6a).

Files with missing lines Patch % Lines
lib/pr_checker.js 92.63% 12 Missing ⚠️
components/git/metadata.js 67.64% 11 Missing ⚠️
components/metadata.js 85.52% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1113      +/-   ##
==========================================
+ Coverage   62.01%   62.44%   +0.43%     
==========================================
  Files          46       48       +2     
  Lines        7505     7884     +379     
==========================================
+ Hits         4654     4923     +269     
- Misses       2851     2961     +110     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Expose stable PR readiness reason codes from PRChecker and add
git node metadata --json for machine-readable metadata readiness
results.

The JSON output includes readiness classification, reserved exit-code
categories, generated metadata, unique reason codes, and detailed
reasons.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
@panva panva force-pushed the metadata-json-readiness branch from 7949e79 to d416c6a Compare July 8, 2026 12:51
@panva panva changed the title tools: add metadata JSON readiness output feat: add metadata JSON readiness output Jul 8, 2026
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.

1 participant