TEST-INFRA: [ci-execution-time] Unable to determine CI execution time due to missing check run data in Forgejo API #1729

Open
opened 2026-04-02 23:36:45 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: task/ci-execution-time-forgejo-check-run-data
  • Commit Message: task(ci): expose check run duration data via Forgejo API for CI execution time analysis
  • Milestone: v3.8.0
  • Parent Epic: #1678

Background and Context

The Test Infrastructure Improver agent performs a ci-execution-time analysis to identify slow test suites and CI performance bottlenecks. This analysis requires access to check run data — specifically the list of check runs associated with a pull request or commit and the duration of each check run.

The Forgejo API, as currently exposed through the available MCP tools, does not provide this data. As a result, the agent is unable to complete its CI execution time analysis, blocking meaningful CI performance improvements.

Current Behavior

When the Test Infrastructure Improver agent attempts to retrieve CI execution time data for pull requests, it cannot access:

  • Check runs associated with a pull request or commit.
  • The start time, end time, or duration of each check run.

This makes it impossible to identify which CI jobs are slow or to propose targeted optimizations.

Expected Behavior

The Forgejo API (or its MCP tool wrapper) should expose check run data — including durations — for pull requests and commits, enabling the agent to:

  1. Retrieve all check runs for a given PR or commit SHA.
  2. Read the duration (or start/end timestamps) of each check run.
  3. Identify slow test suites and CI jobs based on this data.

Acceptance Criteria

  • The Forgejo API provides an endpoint (or the existing commit/PR endpoints are enriched) to retrieve check runs and their durations for a given pull request or commit.
  • The MCP tool layer exposes this data in a form accessible to the Test Infrastructure Improver agent.
  • The Test Infrastructure Improver agent is able to use this data to identify slow CI jobs and propose optimizations.

Supporting Information

  • Parent Epic: #1678 (CI Execution Time Optimization)
  • This issue was discovered during a ci-execution-time analysis pass by the Test Infrastructure Improver agent, which was unable to retrieve check run duration data.
  • Forgejo does expose a /repos/{owner}/{repo}/statuses/{sha} endpoint and a /repos/{owner}/{repo}/commits/{ref}/statuses endpoint, but these return commit statuses (pass/fail), not check run durations.

Subtasks

  • Investigate which Forgejo API endpoints currently expose check run or workflow job data
  • Determine whether Forgejo's Actions API (/repos/{owner}/{repo}/actions/runs) provides per-job duration data
  • Expose check run duration data through the MCP tool layer (or document the correct API call pattern)
  • Update the Test Infrastructure Improver agent to use the new/documented API to retrieve CI execution times
  • Add BDD scenarios (Behave) covering the CI execution time retrieval workflow
  • Add integration tests verifying the agent can retrieve and parse check run durations
  • Verify coverage >= 97% via nox -s coverage_report
  • Run nox (all default sessions), fix any errors

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly.
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.
  • All nox stages pass.
  • Coverage >= 97%.

Automated by CleverAgents Bot
Supervisor: Test Infrastructure | Agent: ca-new-issue-creator

## Metadata - **Branch**: `task/ci-execution-time-forgejo-check-run-data` - **Commit Message**: `task(ci): expose check run duration data via Forgejo API for CI execution time analysis` - **Milestone**: v3.8.0 - **Parent Epic**: #1678 ## Background and Context The Test Infrastructure Improver agent performs a `ci-execution-time` analysis to identify slow test suites and CI performance bottlenecks. This analysis requires access to check run data — specifically the list of check runs associated with a pull request or commit and the duration of each check run. The Forgejo API, as currently exposed through the available MCP tools, does not provide this data. As a result, the agent is unable to complete its CI execution time analysis, blocking meaningful CI performance improvements. ## Current Behavior When the Test Infrastructure Improver agent attempts to retrieve CI execution time data for pull requests, it cannot access: - Check runs associated with a pull request or commit. - The start time, end time, or duration of each check run. This makes it impossible to identify which CI jobs are slow or to propose targeted optimizations. ## Expected Behavior The Forgejo API (or its MCP tool wrapper) should expose check run data — including durations — for pull requests and commits, enabling the agent to: 1. Retrieve all check runs for a given PR or commit SHA. 2. Read the duration (or start/end timestamps) of each check run. 3. Identify slow test suites and CI jobs based on this data. ## Acceptance Criteria - [ ] The Forgejo API provides an endpoint (or the existing commit/PR endpoints are enriched) to retrieve check runs and their durations for a given pull request or commit. - [ ] The MCP tool layer exposes this data in a form accessible to the Test Infrastructure Improver agent. - [ ] The Test Infrastructure Improver agent is able to use this data to identify slow CI jobs and propose optimizations. ## Supporting Information - Parent Epic: #1678 (CI Execution Time Optimization) - This issue was discovered during a `ci-execution-time` analysis pass by the Test Infrastructure Improver agent, which was unable to retrieve check run duration data. - Forgejo does expose a `/repos/{owner}/{repo}/statuses/{sha}` endpoint and a `/repos/{owner}/{repo}/commits/{ref}/statuses` endpoint, but these return commit statuses (pass/fail), not check run durations. ## Subtasks - [ ] Investigate which Forgejo API endpoints currently expose check run or workflow job data - [ ] Determine whether Forgejo's Actions API (`/repos/{owner}/{repo}/actions/runs`) provides per-job duration data - [ ] Expose check run duration data through the MCP tool layer (or document the correct API call pattern) - [ ] Update the Test Infrastructure Improver agent to use the new/documented API to retrieve CI execution times - [ ] Add BDD scenarios (Behave) covering the CI execution time retrieval workflow - [ ] Add integration tests verifying the agent can retrieve and parse check run durations - [ ] Verify coverage >= 97% via `nox -s coverage_report` - [ ] Run `nox` (all default sessions), fix any errors ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. - All nox stages pass. - Coverage >= 97%. --- **Automated by CleverAgents Bot** Supervisor: Test Infrastructure | Agent: ca-new-issue-creator
freemo added this to the v3.8.0 milestone 2026-04-02 23:37:15 +00:00
Author
Owner

Closing as duplicate of #1543 (TLS/clone failure — Priority/Critical, MoSCoW/Must Have).


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: ca-project-owner

Closing as duplicate of #1543 (TLS/clone failure — Priority/Critical, MoSCoW/Must Have). --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
freemo 2026-04-02 23:41:28 +00:00
freemo 2026-04-02 23:47:31 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
cleveragents/cleveragents-core#1729
No description provided.