chore: improve harness workflow guidance (#1941)

This commit is contained in:
Carlos Florêncio
2026-07-25 19:30:58 +01:00
committed by GitHub
parent a4d53bdf42
commit 3d7b43e37b
14 changed files with 177 additions and 19 deletions
+12
View File
@@ -31,6 +31,8 @@
# - since: { head_oid, committed_at } or null
# - failed_checks: [{ name, workflow, status, conclusion, run_id, job_id, details_url, target_url }]
# - pending_checks: [{ name, workflow, status, run_id, job_id, details_url, target_url }]
# - successful_checks: [{ name, workflow, status, conclusion, run_id, job_id, details_url, target_url }]
# - passed_check_count: <N>
# - checks_head_sha: <SHA or null>
# - checks_snapshot_complete: <boolean>
# - unresolved_review_thread_count: <N>
@@ -483,6 +485,10 @@ summarize_state_json() {
and .status != "failure"
and .status != "error";
def successful_check:
(.status == "completed" and .conclusion == "success")
or (.status == "success" and (.conclusion == null or .conclusion == "success"));
{
pr,
since,
@@ -498,6 +504,12 @@ summarize_state_json() {
| select(pending_status and .conclusion == null)
| {name, workflow, status, run_id, job_id, details_url, target_url}
],
successful_checks: [
effective_checks[]
| select(successful_check)
| {name, workflow, status, conclusion, run_id, job_id, details_url, target_url}
],
passed_check_count: ([effective_checks[] | select(successful_check)] | length),
unresolved_review_thread_count,
filtered_review_thread_count,
review_evidence,
+1
View File
@@ -1161,6 +1161,7 @@ test_summary_mode_returns_compact_fixup_state() {
assert_jq "summary pending check count" '.pending_checks | length == 2' "$json"
assert_jq "summary pending check" '.pending_checks[0] | .name == "claude-review" and .status == "in_progress" and .run_id == "27340000003"' "$json"
assert_jq "summary pending status context keeps target url" '.pending_checks[] | select(.name == "external pending") | .status == "pending" and .details_url == null and .target_url == "https://ci.example.test/build/1"' "$json"
assert_jq "summary exposes normalized passing checks" '(.passed_check_count == (.successful_checks | length)) and any(.successful_checks[]; .name == "web lint" and .conclusion == "success") and any(.successful_checks[]; .name == "opencode-review-same-repo" and .conclusion == "success")' "$json"
assert_jq "summary unresolved count" '.unresolved_review_thread_count == 2' "$json"
assert_jq "summary filtered thread count" '.filtered_review_thread_count == 1' "$json"
assert_jq "summary unresolved threads" '.unresolved_threads | length == 1' "$json"