fix(tests): restore agent-evolution-pool-supervisor.md deleted by commit 3c8cf60 breaking unit tests #11208

Closed
opened 2026-05-14 03:31:26 +00:00 by hurui200320 · 0 comments
Member

Metadata

  • Commit Message: fix(tests): restore agent-evolution-pool-supervisor.md or remove its orphaned BDD scenarios
  • Branch: bugfix/m3-restore-agent-evolution-pool-supervisor

Background and Context

Commit 3c8cf601101de38ca439028eb1cd8ac7d71b7a05 ("build: got auto-agents to a working state with deterministic starting"), authored by the Rebase Agent bot on 2026-05-13, deleted the file .opencode/agents/agent-evolution-pool-supervisor.md as part of a large-scale restructuring of agent definition files.

However, the BDD unit test suite contains a feature file — features/agent_evolution_pool_supervisor_metadata.feature — with a scenario titled "Agent definition documents label and milestone lookup steps" that asserts the agent definition file exists on disk and validates its content. Because the file was deleted without updating or removing the corresponding tests, the unit_tests nox session now fails on master.

Current Behavior

Running nox -s unit_tests on master (HEAD a61a418b) produces the following assertion failure:

Scenario: Agent definition documents label and milestone lookup steps
  Given the agent-evolution-pool-supervisor is configured ... passed
  And the repository has the Type/Automation label with ID 1397 ... passed
  And the repository has an open milestone "v3.2.0" with ID 42 ... passed
  Given the agent-evolution-pool-supervisor.md file exists ... FAILED

ASSERT FAILED: Agent definition file should exist at one of:
  [PosixPath('.opencode/agents/agent-evolution-pool-supervisor.md'),
   PosixPath('/app/.opencode/agents/agent-evolution-pool-supervisor.md')]

The step implementation in features/steps/agent_evolution_pool_supervisor_metadata_steps.py checks for the file at .opencode/agents/agent-evolution-pool-supervisor.md (or its absolute equivalent) and raises an AssertionError when it is absent.

Expected Behavior

The master branch must have a passing unit_tests suite at all times. Either:

  1. Option A (Preferred): The agent-evolution-pool-supervisor.md file is restored to .opencode/agents/ with content that satisfies all assertions in the feature file (label lookup section, milestone lookup section, worker-passing explanation, and error-handling documentation). This is the preferred fix because the feature file documents meaningful behaviour that should remain tested.

  2. Option B (Fallback): If the agent has been intentionally and permanently retired, the entire feature file (features/agent_evolution_pool_supervisor_metadata.feature) and its step definitions (features/steps/agent_evolution_pool_supervisor_metadata_steps.py) are removed in the same commit, with a clear explanation in the commit body of why the agent was retired.

Whichever option is chosen, nox -s unit_tests must pass cleanly on master after the fix.

Acceptance Criteria

  • nox -s unit_tests exits with code 0 on master after the fix is merged.
  • No scenario in features/agent_evolution_pool_supervisor_metadata.feature is skipped, errored, or failing (or the file is removed entirely under Option B).
  • If Option A: .opencode/agents/agent-evolution-pool-supervisor.md exists and contains sections covering label lookup, milestone lookup, passing metadata to the worker, and error handling for missing label/milestone.
  • If Option B: both features/agent_evolution_pool_supervisor_metadata.feature and features/steps/agent_evolution_pool_supervisor_metadata_steps.py are deleted, and the commit message explains the retirement rationale.
  • nox -s typecheck and nox -s lint continue to pass.
  • Coverage remains ≥ 97% (nox -s coverage_report).

Supporting Information

  • Offending commit: 3c8cf601101de38ca439028eb1cd8ac7d71b7a05
  • Failing feature file: features/agent_evolution_pool_supervisor_metadata.feature
  • Failing step file: features/steps/agent_evolution_pool_supervisor_metadata_steps.py
  • Failing step: Given the agent-evolution-pool-supervisor.md file exists (last scenario in the feature)
  • Deleted file: .opencode/agents/agent-evolution-pool-supervisor.md
  • The deleted file previously described how the supervisor looks up the Type/Automation label ID and the earliest open milestone before dispatching a worker to create improvement PRs, and how it handles missing label/milestone gracefully.

Subtasks

  • Decide between Option A (restore agent file) or Option B (remove orphaned tests)
  • Implement chosen option: restore .opencode/agents/agent-evolution-pool-supervisor.md or delete the feature + step files
  • Run nox -s unit_tests locally and confirm all scenarios pass (or the deleted file's scenarios are gone)
  • Run nox -s lint and nox -s typecheck — fix any issues
  • Run nox -s coverage_report — confirm coverage ≥ 97%
  • Run full nox default sessions — confirm no regressions
  • Push branch and open a pull request targeting master

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.
## Metadata - **Commit Message**: `fix(tests): restore agent-evolution-pool-supervisor.md or remove its orphaned BDD scenarios` - **Branch**: `bugfix/m3-restore-agent-evolution-pool-supervisor` ## Background and Context Commit `3c8cf601101de38ca439028eb1cd8ac7d71b7a05` ("build: got auto-agents to a working state with deterministic starting"), authored by the Rebase Agent bot on 2026-05-13, deleted the file `.opencode/agents/agent-evolution-pool-supervisor.md` as part of a large-scale restructuring of agent definition files. However, the BDD unit test suite contains a feature file — `features/agent_evolution_pool_supervisor_metadata.feature` — with a scenario titled **"Agent definition documents label and milestone lookup steps"** that asserts the agent definition file exists on disk and validates its content. Because the file was deleted without updating or removing the corresponding tests, the `unit_tests` nox session now fails on `master`. ## Current Behavior Running `nox -s unit_tests` on `master` (HEAD `a61a418b`) produces the following assertion failure: ``` Scenario: Agent definition documents label and milestone lookup steps Given the agent-evolution-pool-supervisor is configured ... passed And the repository has the Type/Automation label with ID 1397 ... passed And the repository has an open milestone "v3.2.0" with ID 42 ... passed Given the agent-evolution-pool-supervisor.md file exists ... FAILED ASSERT FAILED: Agent definition file should exist at one of: [PosixPath('.opencode/agents/agent-evolution-pool-supervisor.md'), PosixPath('/app/.opencode/agents/agent-evolution-pool-supervisor.md')] ``` The step implementation in `features/steps/agent_evolution_pool_supervisor_metadata_steps.py` checks for the file at `.opencode/agents/agent-evolution-pool-supervisor.md` (or its absolute equivalent) and raises an `AssertionError` when it is absent. ## Expected Behavior The `master` branch must have a passing `unit_tests` suite at all times. Either: 1. **Option A (Preferred):** The `agent-evolution-pool-supervisor.md` file is restored to `.opencode/agents/` with content that satisfies all assertions in the feature file (label lookup section, milestone lookup section, worker-passing explanation, and error-handling documentation). This is the preferred fix because the feature file documents meaningful behaviour that should remain tested. 2. **Option B (Fallback):** If the agent has been intentionally and permanently retired, the entire feature file (`features/agent_evolution_pool_supervisor_metadata.feature`) and its step definitions (`features/steps/agent_evolution_pool_supervisor_metadata_steps.py`) are removed in the same commit, with a clear explanation in the commit body of why the agent was retired. Whichever option is chosen, `nox -s unit_tests` must pass cleanly on `master` after the fix. ## Acceptance Criteria - [ ] `nox -s unit_tests` exits with code 0 on `master` after the fix is merged. - [ ] No scenario in `features/agent_evolution_pool_supervisor_metadata.feature` is skipped, errored, or failing (or the file is removed entirely under Option B). - [ ] If Option A: `.opencode/agents/agent-evolution-pool-supervisor.md` exists and contains sections covering label lookup, milestone lookup, passing metadata to the worker, and error handling for missing label/milestone. - [ ] If Option B: both `features/agent_evolution_pool_supervisor_metadata.feature` and `features/steps/agent_evolution_pool_supervisor_metadata_steps.py` are deleted, and the commit message explains the retirement rationale. - [ ] `nox -s typecheck` and `nox -s lint` continue to pass. - [ ] Coverage remains ≥ 97% (`nox -s coverage_report`). ## Supporting Information - **Offending commit:** `3c8cf601101de38ca439028eb1cd8ac7d71b7a05` - **Failing feature file:** `features/agent_evolution_pool_supervisor_metadata.feature` - **Failing step file:** `features/steps/agent_evolution_pool_supervisor_metadata_steps.py` - **Failing step:** `Given the agent-evolution-pool-supervisor.md file exists` (last scenario in the feature) - **Deleted file:** `.opencode/agents/agent-evolution-pool-supervisor.md` - The deleted file previously described how the supervisor looks up the `Type/Automation` label ID and the earliest open milestone before dispatching a worker to create improvement PRs, and how it handles missing label/milestone gracefully. ## Subtasks - [ ] Decide between Option A (restore agent file) or Option B (remove orphaned tests) - [ ] Implement chosen option: restore `.opencode/agents/agent-evolution-pool-supervisor.md` **or** delete the feature + step files - [ ] Run `nox -s unit_tests` locally and confirm all scenarios pass (or the deleted file's scenarios are gone) - [ ] Run `nox -s lint` and `nox -s typecheck` — fix any issues - [ ] Run `nox -s coverage_report` — confirm coverage ≥ 97% - [ ] Run full `nox` default sessions — confirm no regressions - [ ] Push branch and open a pull request targeting `master` ## 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.
hurui200320 added this to the v3.2.0 milestone 2026-05-14 03:32:41 +00:00
hurui200320 2026-05-14 06:08:37 +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#11208
No description provided.