TEST-INFRA: [ci-pipeline-design] CI Pipeline Design Improvements #1647

Closed
opened 2026-04-02 23:22:39 +00:00 by freemo · 3 comments
Owner

Metadata

  • Branch: task/v3.8.0-ci-pipeline-design-improvements
  • Commit Message: chore(ci): improve ci pipeline design for reduced execution time and better maintainability
  • Milestone: v3.8.0
  • Parent Epic: (to be linked — see orphan note below)

Background and Context

This issue outlines several opportunities to improve the CI pipeline design for the cleveragents/cleveragents-core repository. The proposed changes aim to reduce execution time, improve maintainability, and enhance the overall efficiency of the CI process.

Findings

  1. Redundant dead_code Session: The dead_code nox session is redundant because the security_scan session already includes a Vulture dead-code detection step. This creates unnecessary overhead and maintenance.
  2. Lack of Caching for nox Virtual Environments: The CI pipeline does not cache the nox virtual environments between runs. This results in reinstalling dependencies for every CI job, which significantly slows down the pipeline.
  3. No Dependency Caching for uv: The uv package manager is used, but there is no caching mechanism for the downloaded packages. This means that uv has to fetch the packages from the internet in every CI run, which is inefficient.
  4. Sequential Execution of Independent nox Sessions: The nox sessions for lint, format, typecheck, and docs are independent and can be run in parallel to reduce the overall CI execution time.
  5. Inefficient behave-parallel Installation: The behave-parallel package is installed by creating a temporary directory and writing the package source code to it. This is inefficient and can be replaced by installing the package directly from a Git repository or a local directory.
  6. Hardcoded COVERAGE_THRESHOLD: The coverage threshold is hardcoded in the noxfile.py, which makes it difficult to update and manage. It would be better to move this to a configuration file.
  7. Missing e2e_tests in Default Sessions: The e2e_tests session is not included in the default nox sessions, which means it is not run automatically in the CI pipeline. This can lead to regressions in the end-to-end functionality.
  8. Lack of a Centralized Script for CI Checks: The CI checks are scattered across different nox sessions. It would be beneficial to have a centralized script that runs all the necessary checks, which would simplify the CI configuration and make it easier to maintain.

Proposed Solutions

  • Remove the dead_code nox session.
  • Implement caching for nox virtual environments.
  • Configure caching for uv packages.
  • Run independent nox sessions in parallel.
  • Install behave-parallel from a Git repository or a local directory.
  • Move the COVERAGE_THRESHOLD to a configuration file.
  • Add the e2e_tests session to the default nox sessions.
  • Create a centralized script for running all CI checks.

Subtasks

  • Remove the redundant dead_code nox session from noxfile.py and CI workflow
  • Implement caching for nox virtual environments in .forgejo/workflows/ci.yml
  • Configure caching for uv downloaded packages in CI workflow
  • Refactor CI workflow to run independent nox sessions (lint, format, typecheck, docs) in parallel
  • Replace inefficient behave-parallel inline installation with a proper package source (Git repo or local directory)
  • Move COVERAGE_THRESHOLD from noxfile.py to a configuration file (e.g., pyproject.toml)
  • Add e2e_tests session to the default nox sessions list
  • Create a centralized CI check script that consolidates all required checks
  • Run nox (all default sessions), fix any errors
  • Verify coverage >= 97% via nox -s coverage_report

Definition of Done

This issue is complete when:

  • The dead_code nox session is removed.
  • nox virtual environments are cached between CI runs.
  • uv packages are cached between CI runs.
  • Independent nox sessions are run in parallel.
  • behave-parallel is installed from a Git repository or a local directory.
  • The COVERAGE_THRESHOLD is moved to a configuration file.
  • The e2e_tests session is included in the default nox sessions.
  • A centralized script for running all CI checks is created.
  • All nox stages pass.
  • Coverage >= 97%
  • 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.

⚠️ Orphan Notice: No parent Epic was provided at creation time. This issue must be manually linked to an appropriate parent Epic (e.g., a CI/Test Infrastructure Epic). Please update the Parent Epic field above and create the dependency link.


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

## Metadata - **Branch**: `task/v3.8.0-ci-pipeline-design-improvements` - **Commit Message**: `chore(ci): improve ci pipeline design for reduced execution time and better maintainability` - **Milestone**: v3.8.0 - **Parent Epic**: *(to be linked — see orphan note below)* ## Background and Context This issue outlines several opportunities to improve the CI pipeline design for the `cleveragents/cleveragents-core` repository. The proposed changes aim to reduce execution time, improve maintainability, and enhance the overall efficiency of the CI process. ## Findings 1. **Redundant `dead_code` Session:** The `dead_code` nox session is redundant because the `security_scan` session already includes a Vulture dead-code detection step. This creates unnecessary overhead and maintenance. 2. **Lack of Caching for `nox` Virtual Environments:** The CI pipeline does not cache the `nox` virtual environments between runs. This results in reinstalling dependencies for every CI job, which significantly slows down the pipeline. 3. **No Dependency Caching for `uv`:** The `uv` package manager is used, but there is no caching mechanism for the downloaded packages. This means that `uv` has to fetch the packages from the internet in every CI run, which is inefficient. 4. **Sequential Execution of Independent `nox` Sessions:** The `nox` sessions for `lint`, `format`, `typecheck`, and `docs` are independent and can be run in parallel to reduce the overall CI execution time. 5. **Inefficient `behave-parallel` Installation:** The `behave-parallel` package is installed by creating a temporary directory and writing the package source code to it. This is inefficient and can be replaced by installing the package directly from a Git repository or a local directory. 6. **Hardcoded `COVERAGE_THRESHOLD`:** The coverage threshold is hardcoded in the `noxfile.py`, which makes it difficult to update and manage. It would be better to move this to a configuration file. 7. **Missing `e2e_tests` in Default Sessions:** The `e2e_tests` session is not included in the default `nox` sessions, which means it is not run automatically in the CI pipeline. This can lead to regressions in the end-to-end functionality. 8. **Lack of a Centralized Script for CI Checks:** The CI checks are scattered across different `nox` sessions. It would be beneficial to have a centralized script that runs all the necessary checks, which would simplify the CI configuration and make it easier to maintain. ## Proposed Solutions - Remove the `dead_code` nox session. - Implement caching for `nox` virtual environments. - Configure caching for `uv` packages. - Run independent `nox` sessions in parallel. - Install `behave-parallel` from a Git repository or a local directory. - Move the `COVERAGE_THRESHOLD` to a configuration file. - Add the `e2e_tests` session to the default `nox` sessions. - Create a centralized script for running all CI checks. ## Subtasks - [ ] Remove the redundant `dead_code` nox session from `noxfile.py` and CI workflow - [ ] Implement caching for `nox` virtual environments in `.forgejo/workflows/ci.yml` - [ ] Configure caching for `uv` downloaded packages in CI workflow - [ ] Refactor CI workflow to run independent `nox` sessions (`lint`, `format`, `typecheck`, `docs`) in parallel - [ ] Replace inefficient `behave-parallel` inline installation with a proper package source (Git repo or local directory) - [ ] Move `COVERAGE_THRESHOLD` from `noxfile.py` to a configuration file (e.g., `pyproject.toml`) - [ ] Add `e2e_tests` session to the default `nox` sessions list - [ ] Create a centralized CI check script that consolidates all required checks - [ ] Run `nox` (all default sessions), fix any errors - [ ] Verify coverage >= 97% via `nox -s coverage_report` ## Definition of Done This issue is complete when: - [ ] The `dead_code` nox session is removed. - [ ] `nox` virtual environments are cached between CI runs. - [ ] `uv` packages are cached between CI runs. - [ ] Independent `nox` sessions are run in parallel. - [ ] `behave-parallel` is installed from a Git repository or a local directory. - [ ] The `COVERAGE_THRESHOLD` is moved to a configuration file. - [ ] The `e2e_tests` session is included in the default `nox` sessions. - [ ] A centralized script for running all CI checks is created. - [ ] All nox stages pass. - [ ] Coverage >= 97% - [ ] 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. --- > ⚠️ **Orphan Notice**: No parent Epic was provided at creation time. This issue must be manually linked to an appropriate parent Epic (e.g., a CI/Test Infrastructure Epic). Please update the Parent Epic field above and create the dependency link. --- **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:24:37 +00:00
Author
Owner

⚠️ Orphan Issue — Manual Action Required

This issue was created without a parent Epic. Per CONTRIBUTING.md, orphan issues are not permitted — every issue must be linked to a parent Epic using Forgejo's dependency system (child issue blocks parent Epic).

Action needed: A project maintainer must:

  1. Identify or create an appropriate parent Epic for CI/Test Infrastructure work.
  2. Update the Parent Epic field in the Metadata section of this issue body.
  3. Create the dependency link so that this issue (#1647) blocks the parent Epic:
    curl -s -X POST "https://git.cleverthis.com/api/v1/repos/cleveragents/cleveragents-core/issues/1647/blocks" \
      -H "Authorization: token <FORGEJO_PAT>" \
      -H "Content-Type: application/json" \
      -d '{"dependency_id": <PARENT_EPIC_NUMBER>}'
    

Suggested candidates for parent Epic (CI/infrastructure related):

  • #376 — Legendary: Hardening, Testing & Security
  • #739 — Epic: E2E Testing Suite for Acceptance Criteria and Workflow Examples

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

⚠️ **Orphan Issue — Manual Action Required** This issue was created without a parent Epic. Per `CONTRIBUTING.md`, orphan issues are **not permitted** — every issue must be linked to a parent Epic using Forgejo's dependency system (child issue **blocks** parent Epic). **Action needed:** A project maintainer must: 1. Identify or create an appropriate parent Epic for CI/Test Infrastructure work. 2. Update the `Parent Epic` field in the Metadata section of this issue body. 3. Create the dependency link so that this issue (#1647) **blocks** the parent Epic: ```bash curl -s -X POST "https://git.cleverthis.com/api/v1/repos/cleveragents/cleveragents-core/issues/1647/blocks" \ -H "Authorization: token <FORGEJO_PAT>" \ -H "Content-Type: application/json" \ -d '{"dependency_id": <PARENT_EPIC_NUMBER>}' ``` Suggested candidates for parent Epic (CI/infrastructure related): - #376 — Legendary: Hardening, Testing & Security - #739 — Epic: E2E Testing Suite for Acceptance Criteria and Workflow Examples --- **Automated by CleverAgents Bot** Supervisor: Test Infrastructure | Agent: ca-new-issue-creator
Author
Owner

Closing as duplicate of #1604 (CI setup consolidation). This CI improvement is already tracked.


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

Closing as duplicate of #1604 (CI setup consolidation). This CI improvement is already tracked. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
Author
Owner

Closing as duplicate (marked State/Duplicate). This CI Pipeline Design Improvements issue duplicates existing CI pipeline improvement issues.


Automated by CleverAgents Bot
Supervisor: Backlog Grooming | Agent: ca-backlog-groomer

Closing as duplicate (marked `State/Duplicate`). This CI Pipeline Design Improvements issue duplicates existing CI pipeline improvement issues. --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: ca-backlog-groomer
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#1647
No description provided.