nox -s unit_tests times out when running agent_skills_loader.feature and skill_search.feature — UAT verification blocked #9374

Closed
opened 2026-04-14 16:11:06 +00:00 by HAL9000 · 0 comments
Owner

Metadata

  • Commit Message: fix(tests): resolve nox unit_tests timeout for agent_skills_loader and skill_search features
  • Branch: fix/agent-skills-unit-tests-timeout

Background and Context

The UAT test protocol requires running:

cd /app/cleveragents-core && nox -s unit_tests -- features/agent_skills_loader.feature features/skill_search.feature 2>&1 | tail -30

This command is the prescribed verification method for the Agent Skills Loader integration. During UAT testing, this command consistently times out (exceeding 120–240 second limits), making it impossible to verify test results via the prescribed method and blocking UAT sign-off.

Current Behavior

Running nox -s unit_tests -- features/agent_skills_loader.feature features/skill_search.feature does not complete within the expected timeout window. The command hangs or takes excessively long, preventing UAT agents from obtaining test output. This blocks automated verification of:

  • AgentSkillSpec SKILL.md parsing (all scenarios)
  • AgentSkillLoader folder discovery (all scenarios)
  • Progressive disclosure three-tier model (discover/activate/deactivate)
  • Tool descriptor mapping
  • Skill search tools (ListDir, Glob, Grep)

Expected Behavior

nox -s unit_tests -- features/agent_skills_loader.feature features/skill_search.feature should complete within a reasonable time (< 60 seconds for these two feature files) and produce a clear pass/fail summary. The behave-parallel runner should be able to execute these two feature files efficiently without hanging.

Acceptance Criteria

  • nox -s unit_tests -- features/agent_skills_loader.feature features/skill_search.feature completes within 60 seconds
  • All scenarios in agent_skills_loader.feature pass
  • All scenarios in skill_search.feature pass
  • The tail -30 output shows a clear pass/fail summary
  • Root cause of timeout is identified and fixed (e.g., slow environment setup, missing template DB, parallel worker deadlock, or import bottleneck)

Supporting Information

  • Nox session: unit_tests in noxfile.py — uses behave-parallel with multiprocessing.Pool (fork method)
  • Feature files: features/agent_skills_loader.feature, features/skill_search.feature
  • Step files: features/steps/agent_skills_loader_steps.py, features/steps/skill_search_steps.py
  • The unit_tests session pre-compiles bytecode and creates a template DB before running — these steps may be contributing to the timeout
  • The behave-parallel runner uses fork start method which can deadlock on overlayfs when many workers race to compile .pyc files simultaneously

Subtasks

  • Reproduce the timeout locally and capture the hang point
  • Identify whether the timeout is in: nox session setup, template DB creation, bytecode compilation, or behave-parallel execution
  • Fix the root cause (optimize setup, reduce parallelism for small feature sets, or fix deadlock)
  • Verify nox -s unit_tests -- features/agent_skills_loader.feature features/skill_search.feature completes in < 60 seconds
  • Verify all scenarios pass with tail -30 showing clean output
  • Run nox (all default sessions), fix any errors

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.

Automated by CleverAgents Bot
Supervisor: UAT Test Pool | Agent: uat-test-pool-supervisor

## Metadata - **Commit Message**: `fix(tests): resolve nox unit_tests timeout for agent_skills_loader and skill_search features` - **Branch**: `fix/agent-skills-unit-tests-timeout` ## Background and Context The UAT test protocol requires running: ``` cd /app/cleveragents-core && nox -s unit_tests -- features/agent_skills_loader.feature features/skill_search.feature 2>&1 | tail -30 ``` This command is the prescribed verification method for the Agent Skills Loader integration. During UAT testing, this command consistently times out (exceeding 120–240 second limits), making it impossible to verify test results via the prescribed method and blocking UAT sign-off. ## Current Behavior Running `nox -s unit_tests -- features/agent_skills_loader.feature features/skill_search.feature` does not complete within the expected timeout window. The command hangs or takes excessively long, preventing UAT agents from obtaining test output. This blocks automated verification of: - `AgentSkillSpec` SKILL.md parsing (all scenarios) - `AgentSkillLoader` folder discovery (all scenarios) - Progressive disclosure three-tier model (discover/activate/deactivate) - Tool descriptor mapping - Skill search tools (ListDir, Glob, Grep) ## Expected Behavior `nox -s unit_tests -- features/agent_skills_loader.feature features/skill_search.feature` should complete within a reasonable time (< 60 seconds for these two feature files) and produce a clear pass/fail summary. The `behave-parallel` runner should be able to execute these two feature files efficiently without hanging. ## Acceptance Criteria - [ ] `nox -s unit_tests -- features/agent_skills_loader.feature features/skill_search.feature` completes within 60 seconds - [ ] All scenarios in `agent_skills_loader.feature` pass - [ ] All scenarios in `skill_search.feature` pass - [ ] The `tail -30` output shows a clear pass/fail summary - [ ] Root cause of timeout is identified and fixed (e.g., slow environment setup, missing template DB, parallel worker deadlock, or import bottleneck) ## Supporting Information - Nox session: `unit_tests` in `noxfile.py` — uses `behave-parallel` with `multiprocessing.Pool` (fork method) - Feature files: `features/agent_skills_loader.feature`, `features/skill_search.feature` - Step files: `features/steps/agent_skills_loader_steps.py`, `features/steps/skill_search_steps.py` - The `unit_tests` session pre-compiles bytecode and creates a template DB before running — these steps may be contributing to the timeout - The `behave-parallel` runner uses `fork` start method which can deadlock on overlayfs when many workers race to compile `.pyc` files simultaneously ## Subtasks - [ ] Reproduce the timeout locally and capture the hang point - [ ] Identify whether the timeout is in: nox session setup, template DB creation, bytecode compilation, or behave-parallel execution - [ ] Fix the root cause (optimize setup, reduce parallelism for small feature sets, or fix deadlock) - [ ] Verify `nox -s unit_tests -- features/agent_skills_loader.feature features/skill_search.feature` completes in < 60 seconds - [ ] Verify all scenarios pass with `tail -30` showing clean output - [ ] Run `nox` (all default sessions), fix any errors ## 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. --- **Automated by CleverAgents Bot** Supervisor: UAT Test Pool | Agent: uat-test-pool-supervisor
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#9374
No description provided.