Commit Graph

1049 Commits

Author SHA1 Message Date
Sven Lito
7c6ec4a928 fix: resolve pip detection inconsistency in non-interactive shells
- Convert virtual environment Python paths to absolute paths to ensure
  consistency across different shell environments (Git Bash, WSL, etc.)
- Add enhanced diagnostic information when pip detection fails to help
  users troubleshoot path and environment issues
- Improve error messages with specific guidance for different platforms
- Fix black configuration to exclude .zen_venv directory from formatting
- Add comprehensive test suite for pip detection edge cases

Fixes #188
2025-08-08 23:49:24 +07:00
Sven Lito
bbf4afa327 feat: optimize PR Docker build to only run for relevant changes
- Add path filters to only trigger Docker builds for Python/Docker-related changes
- Includes: **.py, requirements*.txt, pyproject.toml, Dockerfile, docker-compose.yml, .dockerignore
- Avoids unnecessary builds for documentation-only or workflow-only PRs
- Saves CI resources and avoids permission issues for irrelevant changes
2025-08-08 17:51:24 +07:00
Sven Lito
a5597bbcde feat: add semantic PR validation workflow
- Validates PR titles against conventional commit standards
- Adds helpful comments when titles don't follow format
- Auto-deletes comments when titles are fixed
- Uses standard GITHUB_TOKEN (no special app setup needed)
- Enforces consistency with semantic-release workflow
2025-08-08 17:48:53 +07:00
Sven Lito
fcaf0d6917 fix: correct pre-commit global exclude pattern and remove redundant excludes
- Remove $ anchor from global exclude pattern to properly exclude files within directories
- Remove redundant exclude properties from black and ruff hooks since global exclude now handles it
- Ensures isort hook also excludes test_simulation_files/ consistently

Addresses reviewer feedback on PR #217
2025-08-08 17:39:25 +07:00
Sven Lito
af3a81543c feat: streamline GitHub Actions workflows and improve contributor experience
- Replace complex auto-version.yml with simple PR Docker build workflow
  - Builds Docker images for all PRs using pr-number-sha tagging
  - Removes redundant versioning logic (semantic-release handles this)
  - Adds automatic PR comments with Docker usage instructions

- Optimize test.yml workflow triggers
  - Remove redundant push triggers on main branch
  - Focus on PR testing only for better developer feedback

- Add docker-release.yml for production releases
  - Triggers on GitHub release publication
  - Multi-platform builds (linux/amd64, linux/arm64)
  - Updates release notes with Docker installation instructions

- Add semantic-release.yml workflow for automated versioning
  - Uses conventional commits for version bumping
  - Automatically generates releases and tags
  - Integrates with Docker workflow via release triggers

- Add pre-commit configuration for automatic code quality
  - Includes ruff (with auto-fix), black, isort
  - Provides faster development workflow option

- Enhance contribution documentation
  - Add pre-commit hook option as recommended approach
  - Keep manual script option for comprehensive testing
  - Improve developer workflow guidance

Fixes #215 (automatic changelog generation)
Addresses #110 (Docker builds automation)
References #107 (improved version tracking)

This creates a clean, modern CI/CD pipeline that eliminates redundancy
while addressing multiple community requests around changelog generation,
Docker builds, and release automation.
2025-08-08 17:33:51 +07:00
Fahad
e29deb23db Improvements to consensus 2025-08-08 12:59:41 +05:00
Fahad
b212cae5de Fixed labeling 2025-08-08 12:35:30 +05:00
Fahad
1c3dea3a08 Fixed labeling 2025-08-08 12:33:41 +05:00
Fahad
cded4c1251 Merge branch 'refactor-image-validation' 2025-08-08 12:01:28 +05:00
Fahad
9c3bf26b83 Bump version 2025-08-08 11:57:53 +05:00
Fahad
74ec6210f9 Better portability 2025-08-08 11:55:27 +05:00
Beehive Innovations
e67a66f582 Merge pull request #193 from nsp/feat/continue-setup-without-api-keys
feat: Continue Python environment setup even without API keys
2025-08-07 23:29:50 -07:00
Beehive Innovations
d969582473 Merge pull request #179 from GiGiDKR/fix-pr#151
fix: PR#151 - Enhance cross-platform support
2025-08-07 23:21:25 -07:00
Beehive Innovations
a1e0a57d6a Merge pull request #192 from nsp/refactor-image-validation
refactor: Extract image validation to provider base class
2025-08-07 23:19:41 -07:00
Fahad
f9dd55cfd3 Fix linting issues: add missing base64 import and remove unused import
- Add missing base64 import in providers/base.py
- Remove unused base64 import from providers/openai_compatible.py
- All tests now pass (19/19 image validation tests)
- Code quality checks pass 100%
2025-08-08 11:17:50 +05:00
Beehive Innovations
c993942efc Update base.py
removed unused import
2025-08-08 10:13:19 +04:00
Beehive Innovations
f7a079bc35 Merge branch 'main' into refactor-image-validation 2025-08-07 23:12:00 -07:00
Fahad
19ae3c5e9c Fixed tests 2025-08-08 11:11:22 +05:00
Beehive Innovations
28eed993d9 Merge pull request #191 from rwl4/grok4-support
Add configuration for Grok 4.
2025-08-07 23:08:03 -07:00
Beehive Innovations
912cde42d1 Update test_xai_provider.py 2025-08-08 10:06:38 +04:00
Beehive Innovations
8a884c57d6 Merge branch 'main' into grok4-support 2025-08-07 23:04:15 -07:00
Fahad
fcb0fe3ef2 Fix o3-pro model resolution to use o3-pro consistently
- Use o3-pro throughout the codebase instead of o3-pro-2025-06-10
- Update test expectations to match o3-pro model name
- Update cassette to use o3-pro for consistency
- Ensure responses endpoint routing works correctly with o3-pro

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-08 10:52:23 +05:00
Fahad
2fdc8fad72 Resolve merge conflicts in o3-pro response parsing fix
- Use new output_text field format for o3-pro responses
- Update test expectations to use resolved model name o3-pro-2025-06-10
- Keep HTTP transport recorder and PII sanitization improvements
- Preserve both bug fix and recent GPT-5 updates

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-08 10:48:56 +05:00
Fahad
5ef13d1628 GPT 5 nano 2025-08-08 10:43:25 +05:00
Beehive Innovations
bea021a021 Merge pull request #207 from GiGiDKR/fix/workflow-localization-signature-harmonization
fix: harmonize method signatures and add localization support for workflow tools
2025-08-07 22:35:46 -07:00
Beehive Innovations
fc89d79c74 Merge pull request #174 from dpieski/main
fix: WSL script crash when wslvar command unavailable
2025-08-07 22:32:39 -07:00
Beehive Innovations
55bdb72a78 Update run-server.sh
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-08-08 09:32:00 +04:00
Fahad
7761cec1bc Updated config 2025-08-08 10:05:27 +05:00
Fahad
2fa2d5a408 Fixed contamination in consensus https://github.com/BeehiveInnovations/zen-mcp-server/issues/162
Fixed broken test
2025-08-08 10:04:40 +05:00
Fahad
2bbb858d93 Fixed broken test 2025-08-08 09:54:23 +05:00
Fahad
d24987c103 Fixed broken test 2025-08-08 09:46:28 +05:00
Fahad
7f37efcbfe Grok-4 support 2025-08-08 09:39:07 +05:00
Fahad
6e7f07c49d Improved "/zen:continue" prompt instructions to re-use previous model 2025-08-08 09:21:30 +05:00
Fahad
8203baa4ef Ensure continuation id is passed back 2025-08-08 09:01:44 +05:00
Fahad
1a8ec2e12f GPT-5, GPT-5-mini support
Improvements to model name resolution
Improved instructions for multi-step workflows when continuation is available
Improved instructions for chat tool
Improved preferred model resolution, moved code from registry -> each provider
Updated tests
2025-08-08 08:51:34 +05:00
Fahad
9a4791cb06 Updated description 2025-08-08 05:26:45 +05:00
Raymond Lucke
22b22f7518 Merge pull request #1 from energee/grok4-support
Update docs for grok 4
2025-07-25 11:53:51 -07:00
GiGiDKR
d327c90d82 fix: use precise type hint Optional[dict[str, Any]] for arguments parameter
- Update arguments parameter type hint from Optional[dict] to Optional[dict[str, Any]] in workflow_mixin.py
- Ensures consistency with BaseTool and improves static analysis and code clarity
- No functional changes, only type annotation improvement

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-07-25 07:00:22 +02:00
OhMyApps
81551f8452 fix: harmonize method signatures and add localization support for workflow tools
- Add LOCALE-based localization support to all workflow tools
- Harmonize method signatures for prepare_prompt and _prepare_file_content_for_prompt
- Remove obsolete methods and clarify comments
- Ensure consistent behavior between SimpleTool and WorkflowTool
2025-07-25 06:48:44 +02:00
Josh Vera
7003ae60e0 lint 2025-07-13 12:13:43 -06:00
Josh Vera
780d4ef207 fix: Clear restriction service in o3-pro test setup for proper isolation
The o3-pro test now clears the restriction service singleton in its
setup_method to ensure it re-reads environment variables set by the
@patch.dict decorator. This prevents cached restrictions from previous
tests (like test_fallback_with_shorthand_restrictions) from blocking
the o3-pro model.

This is a minimal, targeted fix that only affects the specific test
that needs it, without breaking other tests that may depend on the
restriction service state.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-13 11:59:54 -06:00
Josh Vera
68866ba95b formatting 2025-07-13 11:48:37 -06:00
Josh Vera
3d24226446 fix: Use monkeypatch for proper test isolation in model restrictions
Replace @patch.dict decorator with pytest monkeypatch fixture in
test_fallback_with_shorthand_restrictions to ensure proper environment
variable cleanup between tests. This prevents OPENAI_ALLOWED_MODELS
from leaking into subsequent tests.

Also remove the manual clearing of _restriction_service singleton
as it's no longer needed with proper environment variable isolation.

This fixes test isolation issues where o3-pro tests would fail when
run after restriction tests due to environment variable persistence.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-13 11:47:26 -06:00
Josh Vera
6fa7cbcf0d fix: Ensure dummy API keys are set for tests with no_mock_provider marker
The test failures in CI were caused by tests with @pytest.mark.no_mock_provider
that prevented dummy API keys from being set. In CI with no real API keys,
this led to 'Model not available' errors.

Changed pytest_collection_modifyitems to always set dummy keys if missing,
regardless of markers. This ensures tests work in CI while still allowing
real API keys to be used when present.

Fixes test_conversation_field_mapping.py failures in CI across Python 3.10-3.12.
2025-07-13 11:29:02 -06:00
Josh Vera
f00a5eaa36 docs: Update VCR testing documentation and fix PEP 8 import order
- Update docs/vcr-testing.md with new PII sanitization features
- Document transport_helpers.inject_transport() for simpler test setup
- Add sanitize_cassettes.py script documentation
- Update file structure to include all new components
- Fix PEP 8: Move copy import to top of openai_compatible.py
- Enhance security notes about automatic sanitization

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-13 10:56:59 -06:00
Josh Vera
ac7d489cb4 refactor: Simplify logging and conform to pytest conventions
- Removed excessive debug logging in http_transport_recorder.py
- Consolidated redundant log statements
- Fixed exception logging to use logger.exception()
- Removed emojis from log messages for cleaner output
- Removed __main__ block from test_o3_pro_output_text_fix.py per pytest conventions
- Applied black formatting to comply with CI checks

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-13 10:49:37 -06:00
Josh Vera
9248947e39 fix: Resolve o3-pro test isolation issues and convert print to logging
- Fix test isolation by clearing LOCALE env var in o3-pro test
- Add restriction service cleanup in test_model_restrictions.py
- Fix PII sanitizer phone regex to not match timestamps
- Convert all print statements to logging in test files per PR review
- Re-record o3-pro cassette with correct environment

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-13 10:41:43 -06:00
Josh Vera
3b1c80865b fix: Resolve test isolation issues for o3-pro test
- Fixed test_fallback_with_shorthand_restrictions to clear restriction
  service singleton in finally block, preventing state leakage
- Updated o3-pro test to use @patch.dict for OPENAI_ALLOWED_MODELS,
  following standard pattern and allowing both o3-pro and o3-pro-2025-06-10
- Removed invalid cassette file that had wrong request content

The test now passes in both isolated and full suite runs.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-13 10:22:03 -06:00
Josh Vera
538ac55880 fix: Clear restriction service singleton in o3-pro test setup
The test was failing when run in the full test suite because the
ModelRestrictionService singleton persisted restrictions from previous
tests. Specifically, test_fallback_with_shorthand_restrictions sets
OPENAI_ALLOWED_MODELS="mini" which blocked o3-pro.

Added utils.model_restrictions._restriction_service = None to ensure
the test starts with clean restriction state.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-13 10:08:05 -06:00
Josh Vera
1b09238c7a cleanup: Remove redundant o3-pro test files
The bisect and simplified test files were created during investigation
to understand fixture requirements, but they test the same core functionality
as test_o3_pro_output_text_fix.py. Now that we have the final clean
implementation, these files are redundant.

Removed:
• test_o3_pro_fixture_bisect.py - 4 test methods testing fixture combinations
• test_o3_pro_simplified.py - 2 test methods testing minimal requirements

The main test_o3_pro_output_text_fix.py remains and covers all the necessary
o3-pro output_text parsing validation.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-13 09:56:10 -06:00