Skip to content

(MOT-4277) fix(harness): align CI gating and transcript labels - #647

Merged
ytallo merged 3 commits into
mainfrom
fix/harness-e2e-ci-score-floor
Jul 30, 2026
Merged

(MOT-4277) fix(harness): align CI gating and transcript labels#647
ytallo merged 3 commits into
mainfrom
fix/harness-e2e-ci-score-floor

Conversation

@ytallo

@ytallo ytallo commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • keeps degraded quality and hard-gate results visible in E2E reports and the benchmark dashboard
  • fails CI only when the median scenario score is below 50% or a technical failure occurs
  • applies the policy consistently to main and daily benchmark runs
  • shows the actual wrapped function name and payload-only requests in transcripts

Root cause

Hard-gate failures were classified as unconditionally blocking even when the run had a score above the intended CI floor. A reactive_automation execution scoring 80% therefore exited with code 1 and marked the workflow as failed.

Transcript entries also exposed the generic agent_trigger wrapper even though the wrapped function id was available in arguments.function.

Impact

Executions at or above 50% can remain visibly degraded without failing the pipeline. Scores below 50%, missing scores, provider or judge errors, resource limits, and infrastructure failures remain blocking.

Function calls in the transcript are labeled with actionable names such as database::query and state::set, and their request panels omit the redundant { function, payload } wrapper.

Validation

  • cargo test --locked --manifest-path harness/Cargo.toml -p harness-e2e (60 passed)
  • cargo clippy --locked --manifest-path harness/Cargo.toml -p harness-e2e --all-targets -- -D warnings
  • cargo fmt --manifest-path harness/Cargo.toml --all -- --check
  • node --test .github/benchmark-site/*.test.cjs
  • git diff --check

Refs MOT-4277

Summary by CodeRabbit

  • New Features

    • Added configurable CI score floors for end-to-end test workflows, defaulting to 50%.
    • Quality-advisory runs now remain non-blocking when scores meet the configured floor, while technical failures and scores below the floor still block CI.
    • Added command-line and environment-variable options to override the score floor.
    • Improved transcript display for wrapped tool calls by showing the underlying function name and unwrapped arguments.
  • Documentation

    • Updated end-to-end testing guidance to describe score-floor and advisory behavior.

@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
workers Ready Ready Preview Jul 30, 2026 7:13pm
workers-tech-spec Ready Ready Preview Jul 30, 2026 7:13pm

Request Review

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The change unwraps agent_trigger tool metadata in benchmark transcripts and introduces configurable CI score-floor gating for Harness E2E workflows, including technical-failure handling, workflow wiring, tests, and documentation.

Changes

Transcript display normalization

Layer / File(s) Summary
Unwrap agent-trigger tool metadata
.github/benchmark-site/execution-transcript.js, .github/benchmark-site/execution-transcript.test.cjs
Display helpers expose wrapped function identifiers and payload arguments during transcript normalization, with tests covering wrapped and passthrough calls.

E2E CI score-floor gating

Layer / File(s) Summary
Configure and propagate the CI score floor
.github/workflows/_harness-e2e.yml, .github/workflows/harness-e2e-daily.yml, .github/workflows/harness-e2e-main.yml, harness/tests/e2e/src/main.rs
Workflows and CLI arguments define a validated ci_score_floor and pass it through HARNESS_E2E_CI_SCORE_FLOOR.
Evaluate advisory outcomes against the score floor
harness/tests/e2e/src/report.rs, harness/tests/e2e/src/main.rs, .github/workflows/_harness-e2e.yml, harness/tests/e2e/README.md
Advisory runs block technical failures and scores below the floor while allowing sufficient-score quality and hard-gate outcomes; tests, summaries, and documentation reflect the rule.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant HarnessWorkflow
  participant E2eRunner
  participant E2eReport
  HarnessWorkflow->>E2eRunner: Set HARNESS_E2E_CI_SCORE_FLOOR
  E2eRunner->>E2eReport: Evaluate fails_ci_gate(score_floor)
  E2eReport-->>E2eRunner: Return CI gate result
  E2eRunner-->>HarnessWorkflow: Pass, warn, or fail the workflow
Loading

Possibly related PRs

  • iii-hq/workers#644: Updates related transcript normalization for tool-call metadata in the same benchmark transcript module.

Suggested labels: no-ticket

Poem

A rabbit unwrapped a tool-call string,
And found the payload hiding within.
The score floor stood firm at the gate,
While technical failures met their fate.
“Hop onward,” said Bun, “the tests now sing!”

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 42.86% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the two main changes: CI gating alignment and transcript label updates.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/harness-e2e-ci-score-floor

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

skill-check — worker

0 verified, 50 skipped (no docs/).

Layer Result
structure
vale
ai
render

Four for four. Nicely done.

@ytallo ytallo changed the title (MOT-4277) fix(harness): gate CI below 50 percent (MOT-4277) fix(harness): align CI gating and transcript labels Jul 30, 2026
@ytallo
ytallo marked this pull request as ready for review July 30, 2026 19:53
@ytallo
ytallo merged commit ef18b4c into main Jul 30, 2026
17 of 18 checks passed

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
harness/tests/e2e/src/report.rs (1)

633-656: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Add exact-floor and missing-score coverage.

The gate contract is boundary-sensitive: a score equal to the floor must pass, while a missing score must fail. Add tests for median_score == 50 and a non-technical quality failure whose score is None.

This follows the stated policy that scores at or above the floor are allowed while missing scores remain blocking.

Also applies to: 659-663

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@harness/tests/e2e/src/report.rs` around lines 633 - 656, Add coverage in
advisory_ci_gate_uses_the_score_floor_for_quality_and_hard_gate_failures for a
non-technical quality run with median_score equal to 50 that passes
fails_ci_gate, and for a non-technical quality failure with no score that fails
it. Keep the existing below-floor and hard-gate assertions unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/_harness-e2e.yml:
- Around line 17-25: Align the CI policy documentation across all three sites:
in .github/workflows/_harness-e2e.yml lines 17-25, describe that quality or
hard-gate failures at or above the configured ci_score_floor are advisory while
technical failures and missing scores remain blocking; in lines 339-345, include
missing scores in the blocking summary; and in harness/tests/e2e/README.md lines
109-113, refer to the configured floor instead of hard-coding 50.

---

Nitpick comments:
In `@harness/tests/e2e/src/report.rs`:
- Around line 633-656: Add coverage in
advisory_ci_gate_uses_the_score_floor_for_quality_and_hard_gate_failures for a
non-technical quality run with median_score equal to 50 that passes
fails_ci_gate, and for a non-technical quality failure with no score that fails
it. Keep the existing below-floor and hard-gate assertions unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c5a354ce-4bc7-47b5-ae14-0c9618fce996

📥 Commits

Reviewing files that changed from the base of the PR and between ebebcee and 851baa6.

📒 Files selected for processing (8)
  • .github/benchmark-site/execution-transcript.js
  • .github/benchmark-site/execution-transcript.test.cjs
  • .github/workflows/_harness-e2e.yml
  • .github/workflows/harness-e2e-daily.yml
  • .github/workflows/harness-e2e-main.yml
  • harness/tests/e2e/README.md
  • harness/tests/e2e/src/main.rs
  • harness/tests/e2e/src/report.rs

Comment on lines +17 to +25
description: Only fail degraded results below the CI score floor
required: false
type: boolean
default: false
ci_score_floor:
description: Minimum median score allowed by the advisory CI policy
required: false
type: number
default: 50

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Align all CI policy descriptions with the actual gate.

The implementation uses the configured floor (50 by default), while technical failures and missing scores remain blocking.

  • .github/workflows/_harness-e2e.yml#L17-L25: state that quality/hard-gate failures at or above the floor are advisory, but technical failures and missing scores still block.
  • .github/workflows/_harness-e2e.yml#L339-L345: include missing scores in the blocking summary.
  • harness/tests/e2e/README.md#L109-L113: describe the configured floor rather than hard-coding 50.
📍 Affects 2 files
  • .github/workflows/_harness-e2e.yml#L17-L25 (this comment)
  • .github/workflows/_harness-e2e.yml#L339-L345
  • harness/tests/e2e/README.md#L109-L113
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/_harness-e2e.yml around lines 17 - 25, Align the CI policy
documentation across all three sites: in .github/workflows/_harness-e2e.yml
lines 17-25, describe that quality or hard-gate failures at or above the
configured ci_score_floor are advisory while technical failures and missing
scores remain blocking; in lines 339-345, include missing scores in the blocking
summary; and in harness/tests/e2e/README.md lines 109-113, refer to the
configured floor instead of hard-coding 50.

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