Skip to content

Review and cleanup#3

Merged
bluemoonfoundry merged 2 commits intomainfrom
review_and_cleanup
Feb 28, 2026
Merged

Review and cleanup#3
bluemoonfoundry merged 2 commits intomainfrom
review_and_cleanup

Conversation

@bluemoonfoundry
Copy link
Owner

No description provided.

sidcarton1587 and others added 2 commits February 27, 2026 11:16
This commit addresses all 5 critical issues identified in the external code review:

## Critical Bug Fixes

1. **Server Runtime Error (CRITICAL)**
   - Fixed vangard/server.py to call process() instead of run()
   - Resolves AttributeError that would occur on all FastAPI endpoints

2. **Cross-Platform Subprocess Execution**
   - Refactored BaseCommand.exec_remote_script() to use list-based commands
   - Improved security and cross-platform compatibility
   - Updated tests to work with new list-based approach

3. **Missing Network Timeout**
   - Added 30-second timeout to urllib.request.urlopen()
   - Prevents hanging on unresponsive DAZ Script Server

4. **Inconsistent Type Hinting**
   - Enhanced type hints throughout BaseCommand.py
   - Added comprehensive docstrings with parameter descriptions
   - Improved IDE support and maintainability

## Major Architectural Refactoring

5. **Modular DazCopilotUtils (1,649 → 8 focused modules)**
   - Refactored monolithic DazCopilotUtils.dsa into 8 modules:
     * DazCoreUtils.dsa (141 lines) - Core utilities
     * DazLoggingUtils.dsa (205 lines) - Logging and events
     * DazFileUtils.dsa (195 lines) - File I/O
     * DazStringUtils.dsa (174 lines) - String manipulation
     * DazNodeUtils.dsa (303 lines) - Node management
     * DazTransformUtils.dsa (212 lines) - Transforms
     * DazCameraUtils.dsa (185 lines) - Camera operations
     * DazRenderUtils.dsa (358 lines) - Rendering

   - DazCopilotUtils.dsa now serves as backward-compatible facade
   - 100% backward compatibility maintained
   - New scripts can include only needed modules

## Documentation

- Added BUGFIX_SUMMARY.md - Detailed bug fix documentation
- Added REFACTORING_COMPLETE.md - Refactoring summary
- Added vangard/scripts/README_MODULES.md - Comprehensive module docs

## Test Results

✅ All 189 tests pass
   - 122 command tests
   - 39 unit tests
   - 8 integration tests

No breaking changes introduced.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bluemoonfoundry bluemoonfoundry merged commit 3f2633c into main Feb 28, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants