TEST-INFRA: [flaky-tests] Unable to access Forgejo API #2024

Open
opened 2026-04-03 02:41:47 +00:00 by freemo · 2 comments
Owner

Background

During an automated attempt to identify flaky tests by querying CI run history via the Forgejo API, all curl requests to the Forgejo REST API returned empty results. This indicates a network policy or environment restriction is blocking direct HTTP access from the agent execution environment to the Forgejo host. Without access to CI run history, it is impossible to identify flaky tests programmatically.

Current Behavior

All curl requests to $FORGEJO_URL/api/v1/... return empty responses (no data, no error body). The agent is unable to retrieve CI pipeline run history, job logs, or test result artifacts needed to identify flaky tests.

Expected Behavior

The agent execution environment should be able to reach the Forgejo API (or a designated proxy/mirror) so that automated tooling can query CI run history and test result data to identify flaky tests.

Acceptance Criteria

  • The root cause of the empty API responses is identified (network policy, missing env var, firewall rule, etc.)
  • A documented workaround or fix is in place so that agents can access CI run history
  • Flaky test identification can proceed once this blocker is resolved

Supporting Information

  • All curl attempts to the Forgejo API returned empty results — no HTTP error codes were surfaced, suggesting a silent network drop
  • The $FORGEJO_PAT and $FORGEJO_URL environment variables are present in the environment
  • This issue was discovered while attempting to complete flaky-test identification work under Epic #401

Metadata

  • Branch: task/test-infra-forgejo-api-access
  • Commit Message: fix(test-infra): resolve Forgejo API network access block in agent environment
  • Milestone: v3.5.0
  • Parent Epic: #401

Subtasks

  • Reproduce the empty-response behaviour and capture network diagnostics (e.g., curl -v, DNS resolution, routing)
  • Identify whether the block is a firewall rule, network policy, missing proxy config, or DNS issue
  • Apply fix or document approved workaround (e.g., proxy env vars, allowlist rule)
  • Verify that a curl call to the Forgejo API returns valid JSON from within the agent environment
  • Update any agent runbooks or environment setup docs to prevent recurrence

Definition of Done

  • Root cause of the Forgejo API access failure is documented
  • A fix or approved workaround is implemented and verified
  • An agent can successfully query CI run history via the Forgejo API from the standard execution environment
  • All nox stages pass
  • Coverage >= 97%

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

## Background During an automated attempt to identify flaky tests by querying CI run history via the Forgejo API, all `curl` requests to the Forgejo REST API returned empty results. This indicates a network policy or environment restriction is blocking direct HTTP access from the agent execution environment to the Forgejo host. Without access to CI run history, it is impossible to identify flaky tests programmatically. ## Current Behavior All `curl` requests to `$FORGEJO_URL/api/v1/...` return empty responses (no data, no error body). The agent is unable to retrieve CI pipeline run history, job logs, or test result artifacts needed to identify flaky tests. ## Expected Behavior The agent execution environment should be able to reach the Forgejo API (or a designated proxy/mirror) so that automated tooling can query CI run history and test result data to identify flaky tests. ## Acceptance Criteria - The root cause of the empty API responses is identified (network policy, missing env var, firewall rule, etc.) - A documented workaround or fix is in place so that agents can access CI run history - Flaky test identification can proceed once this blocker is resolved ## Supporting Information - All `curl` attempts to the Forgejo API returned empty results — no HTTP error codes were surfaced, suggesting a silent network drop - The `$FORGEJO_PAT` and `$FORGEJO_URL` environment variables are present in the environment - This issue was discovered while attempting to complete flaky-test identification work under Epic #401 ## Metadata - **Branch**: `task/test-infra-forgejo-api-access` - **Commit Message**: `fix(test-infra): resolve Forgejo API network access block in agent environment` - **Milestone**: v3.5.0 - **Parent Epic**: #401 ## Subtasks - [ ] Reproduce the empty-response behaviour and capture network diagnostics (e.g., `curl -v`, DNS resolution, routing) - [ ] Identify whether the block is a firewall rule, network policy, missing proxy config, or DNS issue - [ ] Apply fix or document approved workaround (e.g., proxy env vars, allowlist rule) - [ ] Verify that a `curl` call to the Forgejo API returns valid JSON from within the agent environment - [ ] Update any agent runbooks or environment setup docs to prevent recurrence ## Definition of Done - [ ] Root cause of the Forgejo API access failure is documented - [ ] A fix or approved workaround is implemented and verified - [ ] An agent can successfully query CI run history via the Forgejo API from the standard execution environment - [ ] All nox stages pass - [ ] Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: Unknown | Agent: ca-new-issue-creator
freemo added this to the v3.5.0 milestone 2026-04-03 02:41:51 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: High (confirmed) — Inability to access the Forgejo API from agent environments blocks automated flaky test identification, which is a prerequisite for CI reliability.
  • Milestone: v3.5.0 (confirmed — this is a blocker for test infrastructure work under the Autonomy Hardening milestone)
  • MoSCoW: Should Have — While not a core feature, this blocks automated tooling that is important for maintaining CI quality. The flaky test identification work under Epic #401 cannot proceed without this.
  • Parent Epic: #401 (confirmed correct)

The issue is well-documented with clear diagnostic steps. Root cause investigation should focus on network policies, proxy configuration, and DNS resolution within the agent execution environment.


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

Issue triaged by project owner: - **State**: Verified - **Priority**: High (confirmed) — Inability to access the Forgejo API from agent environments blocks automated flaky test identification, which is a prerequisite for CI reliability. - **Milestone**: v3.5.0 (confirmed — this is a blocker for test infrastructure work under the Autonomy Hardening milestone) - **MoSCoW**: Should Have — While not a core feature, this blocks automated tooling that is important for maintaining CI quality. The flaky test identification work under Epic #401 cannot proceed without this. - **Parent Epic**: #401 (confirmed correct) The issue is well-documented with clear diagnostic steps. Root cause investigation should focus on network policies, proxy configuration, and DNS resolution within the agent execution environment. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: High — inability to analyze flaky tests blocks test infrastructure improvement
  • Milestone: v3.5.0
  • MoSCoW: Should Have — already correctly labeled; flaky test analysis is important for CI reliability but not blocking core feature development

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

Issue triaged by project owner: - **State**: Verified - **Priority**: High — inability to analyze flaky tests blocks test infrastructure improvement - **Milestone**: v3.5.0 - **MoSCoW**: Should Have — already correctly labeled; flaky test analysis is important for CI reliability but not blocking core feature development --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
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#2024
No description provided.