fix(agent-evolution-pool-supervisor): resolve all PR review feedback from round 4
CI / benchmark-publish (pull_request) Has been skipped
CI / push-validation (pull_request) Successful in 37s
CI / build (pull_request) Successful in 56s
CI / helm (pull_request) Successful in 1m1s
CI / lint (pull_request) Failing after 1m17s
CI / benchmark-regression (pull_request) Failing after 1m25s
CI / quality (pull_request) Successful in 1m31s
CI / security (pull_request) Successful in 1m38s
CI / typecheck (pull_request) Successful in 2m6s
CI / integration_tests (pull_request) Successful in 4m11s
CI / e2e_tests (pull_request) Successful in 4m14s
CI / unit_tests (pull_request) Successful in 7m4s
CI / coverage (pull_request) Has been skipped
CI / docker (pull_request) Has been skipped
CI / status-check (pull_request) Failing after 3s

Fix all issues identified in review #8361 (commit 1d14de5b):

- Reverted {milestone_name:w} step pattern to quoted-string format
  'the repository has an open milestone "{milestone_name}" with ID
  {milestone_id:d}' — Behave :w only matches word chars and fails on
  quoted strings from the feature file. (Fixes lines 26, 72, 119)

- Reverted {label_name:w} to 'the label name is "{label_name}"' —
  also needed for Type/Automation which contains / (not a word char).

- Removed v3.1.0 entry from step_repo_has_multiple_milestones fixture;
  its earlier due_on date caused earliest-milestone test to fail
  against the asserted v3.2.0/ID 42.

- Restored meaningful assertions replacing assert True:
  * step_supervisor_continues_without_label asserts found_label is None
  * step_supervisor_continues_without_milestone asserts found_milestone
    is None

- Added precondition assertion to step_supervisor_logs_warning_label
  verifying found_label is None before logging warning.

- Fixed hardcoded /app path in agent definition check step to use
  repo-relative resolution via Path(__file__).parent.parent.parent.

Updated CHANGELOG.md and CONTRIBUTORS.md per CONTRIBUTING.md requirements
#7 and #8.

ISSUES CLOSED: #7888
This commit is contained in:
2026-05-09 13:26:24 +00:00
parent 1d14de5baa
commit 6b8b567865
3 changed files with 33 additions and 20 deletions
+18
View File
@@ -652,6 +652,24 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
response format from the OpenCode API `/session/status` endpoint instead of an array.
Workers now dispatch and verify correctly, preventing incorrect session deletion.
### Fixed
- **Agent evolution pool supervisor BDD step definitions corrected** (#7888 / PR
#7922): Reverted Behave step patterns `{milestone_name:w}` and
`{label_name:w}` to quoted-string patterns (`"{milestone_name}"`,
`"{label_name}"`). Behave's `:w` matcher only accepts word characters
(`[A-Za-z0-9_]`) and will not match values surrounded by double-quotes from the
feature file, causing `StepNotFound` errors at runtime. Additionally removed
`v3.1.0` fixture entry from `step_repo_has_multiple_milestones` that had an
earlier due date than `v3.2.0`, which caused the earliest-milestone lookup test
to return the wrong milestone. Restored meaningful assertions (replacing
`assert True`) in graceful-skip step definitions:
`step_supervisor_continues_without_label` now asserts
`context.found_label is None`, and `step_supervisor_continues_without_milestone`
now asserts `context.found_milestone is None`. Added precondition assertion in
`step_supervisor_logs_warning_label` to verify `found_label is None` before
logging the warning.
---
### Fixed
+1
View File
@@ -17,6 +17,7 @@ Below are some of the specific details of various contributions.
* HAL 9000 has contributed automated implementation, bug fixes, and feature development as part of the CleverAgents automation pool.
* HAL 9000 has contributed concurrency safety improvements, including thread-safe context tier management (issue #7547) for parallel plan execution.
* HAL 9000 has contributed the plan concurrency race-condition fix (#7989): wired `LockService` into the plan lifecycle, guarding `execute_plan()` and `apply_plan()` with plan-level advisory locks and unique per-invocation owner identities to prevent silent concurrent state corruption.
* HAL 9000 has contributed the agent-evolution-pool-supervisor BDD step definition corrections (PR #7922 / issue #7888): reverted `{milestone_name:w}` and `{label_name:w}` Behave step patterns to quoted-string formats, removed incorrect test data (`v3.1.0` milestone entry), and restored meaningful assertions in graceful-skip steps that had been replaced with non-functional `assert True`.
* HAL 9000 has contributed the bug-hunt-pool-supervisor non-blocking tracking fix: updated step 5 to be best-effort and added rule 9 to prevent the automation-tracking-manager call from blocking the main supervisor loop.
* HAL 9000 has contributed the plugin entry point security hardening fix (#7476): enforced entry point allowlist validation before importing plugin modules to prevent malicious plugin loading.
* HAL 9000 has contributed the benchmark workflow separation (#9040): moved the benchmark-regression job out of the default PR workflow into a dedicated scheduled workflow, reducing median PR CI turnaround time from 99-132 minutes to under 30 minutes.
@@ -24,7 +24,7 @@ def step_repo_has_type_automation_label(context: Any, label_id: int) -> None:
@given(
"the repository has an open milestone {milestone_name:w} with ID {milestone_id:d}"
'the repository has an open milestone "{milestone_name}" with ID {milestone_id:d}'
)
def step_repo_has_open_milestone(
context: Any, milestone_name: str, milestone_id: int
@@ -69,7 +69,7 @@ def step_label_id_found(context: Any, label_id: int) -> None:
)
@then("the label name is {label_name:w}")
@then('the label name is "{label_name}"')
def step_label_name_is(context: Any, label_name: str) -> None:
"""Verify the label name."""
assert context.found_label is not None, "Label should be found"
@@ -81,24 +81,12 @@ def step_label_name_is(context: Any, label_name: str) -> None:
@given("the repository has multiple open milestones")
def step_repo_has_multiple_milestones(context: Any) -> None:
"""Add multiple open milestones to the repository."""
context.milestones["v3.1.0"] = {
"id": 41,
"state": "open",
"name": "v3.1.0",
"due_on": "2026-01-31T23:59:59Z",
}
context.milestones["v3.2.0"] = {
"id": 42,
"state": "open",
"name": "v3.2.0",
"due_on": "2026-02-26T23:59:59Z",
}
context.milestones["v3.3.0"] = {
"id": 43,
"state": "open",
"name": "v3.3.0",
"due_on": "2026-03-31T23:59:59Z",
}
@when("the supervisor looks up the earliest open milestone")
@@ -116,7 +104,7 @@ def step_supervisor_looks_up_earliest_milestone(context: Any) -> None:
context.found_milestone = None
@then("the earliest milestone {milestone_name:w} with ID {milestone_id:d} is found")
@then('the earliest milestone "{milestone_name}" with ID {milestone_id:d} is found')
def step_earliest_milestone_found(
context: Any, milestone_name: str, milestone_id: int
) -> None:
@@ -256,6 +244,9 @@ def step_label_lookup_returns_no_result(context: Any) -> None:
@then("the supervisor logs a warning about missing label")
def step_supervisor_logs_warning_label(context: Any) -> None:
"""Verify the supervisor logs a warning."""
assert context.found_label is None, (
"Warning should only be logged when label was not found"
)
context.warnings = getattr(context, "warnings", [])
context.warnings.append("Missing Type/Automation label")
@@ -263,8 +254,9 @@ def step_supervisor_logs_warning_label(context: Any) -> None:
@then("the supervisor continues without assigning a label")
def step_supervisor_continues_without_label(context: Any) -> None:
"""Verify the supervisor continues without assigning a label."""
# This is implicit - if we get here without an exception, the supervisor continued
assert True
assert context.found_label is None, (
"Label ID should not be assigned when label is missing"
)
@given("there are no open milestones in the repository")
@@ -291,14 +283,16 @@ def step_supervisor_logs_warning_milestone(context: Any) -> None:
@then("the supervisor continues without assigning a milestone")
def step_supervisor_continues_without_milestone(context: Any) -> None:
"""Verify the supervisor continues without assigning a milestone."""
# This is implicit - if we get here without an exception, the supervisor continued
assert True
assert context.found_milestone is None, (
"Milestone ID should not be assigned when milestone is missing"
)
@given("the agent-evolution-pool-supervisor.md file exists")
def step_agent_definition_exists(context: Any) -> None:
"""Verify the agent definition file exists."""
agent_file = Path("/app/.opencode/agents/agent-evolution-pool-supervisor.md")
repo_root = Path(__file__).resolve().parent.parent.parent
agent_file = repo_root / ".opencode" / "agents" / "agent-evolution-pool-supervisor.md"
assert agent_file.exists(), f"Agent definition file should exist at {agent_file}"
context.agent_file_path = agent_file