TEST-INFRA: [ci-execution-time] Need a tool to get CI execution times #3573

Open
opened 2026-04-05 20:01:34 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: task/ci-execution-time-query-tool
  • Commit Message: feat(ci): add tool to query CI job execution times from Forgejo API
  • Milestone: N/A — Backlog
  • Parent Epic: #1678

Problem

As the Test Infrastructure Improver, I am unable to analyze the CI execution times for the cleveragents/cleveragents-core repository. I have tried to use the existing tools to get this information, but I have been unsuccessful.

I have tried the following approaches:

  1. Cloning the repository: The security policy prevents me from cloning the repository.
  2. Using the Forgejo API: I have used the list_repo_pull_requests, get_pull_request_by_index, and list_repo_commits tools to get information about the pull requests and commits. However, the check run information, which contains the execution times, is not available through these tools.
  3. Accessing the CI configuration files: I have tried to get the content of the .forgejo/workflows directory and the main.yml file, but I have been unsuccessful.

Proposal

Add a new tool (or expose an existing Forgejo API capability) that allows agents to query CI job execution times for a given repository. This tool should provide the following information for each CI job:

  • Job name
  • Status (success, failure, etc.)
  • Start time
  • End time
  • Duration

This will allow the Test Infrastructure Improver agent to identify the slowest CI jobs and propose optimizations to improve overall CI performance — directly supporting the goals of Epic #1678.

Subtasks

  • Investigate the Forgejo API endpoints that expose check run / workflow run data (e.g., /api/v1/repos/{owner}/{repo}/actions/runs)
  • Implement or expose a get_ci_execution_times tool that wraps the relevant Forgejo API calls
  • Return per-job data: job name, status, start time, end time, and duration
  • Add unit tests (Behave/Gherkin) in features/ covering the new tool
  • Add integration tests (Robot Framework) in robot/ covering the new tool
  • Verify all nox stages pass after changes
  • Confirm coverage ≥ 97%

Definition of Done

  • A tool exists that accepts a repository owner/name and returns CI job execution time data
  • The tool returns at minimum: job name, status, start time, end time, and duration per job
  • Unit tests (Behave) cover the tool's happy path and error cases
  • Integration tests (Robot Framework) verify the tool against the live Forgejo instance
  • All nox stages pass (nox -e lint, nox -e typecheck, nox -e unit_tests, nox -e integration_tests, nox -e coverage_report)
  • Coverage >= 97%

Backlog note: This issue was discovered during autonomous operation
on milestone v3.8.0. It does not block milestone completion and has been
placed in the backlog for human review and future milestone assignment.


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

## Metadata - **Branch**: `task/ci-execution-time-query-tool` - **Commit Message**: `feat(ci): add tool to query CI job execution times from Forgejo API` - **Milestone**: N/A — Backlog - **Parent Epic**: #1678 ## Problem As the Test Infrastructure Improver, I am unable to analyze the CI execution times for the `cleveragents/cleveragents-core` repository. I have tried to use the existing tools to get this information, but I have been unsuccessful. I have tried the following approaches: 1. **Cloning the repository:** The security policy prevents me from cloning the repository. 2. **Using the Forgejo API:** I have used the `list_repo_pull_requests`, `get_pull_request_by_index`, and `list_repo_commits` tools to get information about the pull requests and commits. However, the check run information, which contains the execution times, is not available through these tools. 3. **Accessing the CI configuration files:** I have tried to get the content of the `.forgejo/workflows` directory and the `main.yml` file, but I have been unsuccessful. ## Proposal Add a new tool (or expose an existing Forgejo API capability) that allows agents to query CI job execution times for a given repository. This tool should provide the following information for each CI job: - Job name - Status (success, failure, etc.) - Start time - End time - Duration This will allow the Test Infrastructure Improver agent to identify the slowest CI jobs and propose optimizations to improve overall CI performance — directly supporting the goals of Epic #1678. ## Subtasks - [ ] Investigate the Forgejo API endpoints that expose check run / workflow run data (e.g., `/api/v1/repos/{owner}/{repo}/actions/runs`) - [ ] Implement or expose a `get_ci_execution_times` tool that wraps the relevant Forgejo API calls - [ ] Return per-job data: job name, status, start time, end time, and duration - [ ] Add unit tests (Behave/Gherkin) in `features/` covering the new tool - [ ] Add integration tests (Robot Framework) in `robot/` covering the new tool - [ ] Verify all nox stages pass after changes - [ ] Confirm coverage ≥ 97% ## Definition of Done - [ ] A tool exists that accepts a repository owner/name and returns CI job execution time data - [ ] The tool returns at minimum: job name, status, start time, end time, and duration per job - [ ] Unit tests (Behave) cover the tool's happy path and error cases - [ ] Integration tests (Robot Framework) verify the tool against the live Forgejo instance - [ ] All nox stages pass (`nox -e lint`, `nox -e typecheck`, `nox -e unit_tests`, `nox -e integration_tests`, `nox -e coverage_report`) - [ ] Coverage >= 97% > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.8.0. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. --- **Automated by CleverAgents Bot** Supervisor: Test Infrastructure | Agent: ca-new-issue-creator
freemo added this to the v3.7.0 milestone 2026-04-05 20:16:37 +00:00
Author
Owner

Milestone Triage Decision: Moved to Backlog

This issue has been moved out of v3.3.0 during aggressive milestone triage. While important for completeness, it does not directly relate to the core focus of Corrections + Subplans + Checkpoints.

Reasoning:

  • v3.3.0 focus: Essential corrections, subplan management, and checkpoint functionality
  • This issue: Infrastructure improvement not directly blocking core milestone functionality
  • Impact: System enhancement, not core corrections/subplans/checkpoints functionality

Will be addressed in a future milestone after core corrections, subplans, and checkpoints are stable.

**Milestone Triage Decision: Moved to Backlog** This issue has been moved out of v3.3.0 during aggressive milestone triage. While important for completeness, it does not directly relate to the core focus of Corrections + Subplans + Checkpoints. **Reasoning:** - v3.3.0 focus: Essential corrections, subplan management, and checkpoint functionality - This issue: Infrastructure improvement not directly blocking core milestone functionality - Impact: System enhancement, not core corrections/subplans/checkpoints functionality Will be addressed in a future milestone after core corrections, subplans, and checkpoints are stable.
freemo removed this from the v3.7.0 milestone 2026-04-06 23:38:23 +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#3573
No description provided.