|
|
5639d085b4
|
feat(#154): Implement context estimator
Implements formula-based context estimation for predicting token
usage before issue assignment.
Formula:
base = (files × 7000) + complexity + tests + docs
total = base × 1.3 (30% safety buffer)
Features:
- EstimationInput/Result data models with validation
- ComplexityLevel, TestLevel, DocLevel enums
- Agent recommendation (haiku/sonnet/opus) based on tokens
- Validation against actual usage with tolerance checking
- Convenience function for quick estimations
- JSON serialization support
Implementation:
- issue_estimator.py: Core estimator with formula
- models.py: Data models and enums (100% coverage)
- test_issue_estimator.py: 35 tests, 100% coverage
- ESTIMATOR.md: Complete API documentation
- requirements.txt: Python dependencies
- .coveragerc: Coverage configuration
Test Results:
- 35 tests passing
- 100% code coverage (excluding __main__)
- Validates against historical issues
- All edge cases covered
Acceptance Criteria Met:
✅ Context estimation formula implemented
✅ Validation suite tests against historical issues
✅ Formula includes all components (files, complexity, tests, docs, buffer)
✅ Unit tests for estimator (100% coverage, exceeds 85% requirement)
✅ All components tested (low/medium/high levels)
✅ Agent recommendation logic validated
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
2026-02-01 17:42:59 -06:00 |
|
|
|
de3f3b9204
|
feat(#156): Create coordinator bot user documentation and setup scripts
Add comprehensive documentation and automated scripts for setting up the mosaic
coordinator bot user in Gitea. This enables the coordinator system to manage
issue assignments, comments, and orchestration.
Changes:
- docs/1-getting-started/3-configuration/4-gitea-coordinator.md: Complete setup guide
* Step-by-step bot user creation via UI and API
* Repository permission configuration
* API token generation and storage
* Comprehensive testing procedures
* Security best practices and troubleshooting
- scripts/coordinator/create-gitea-bot.sh: Automated bot creation script
* Creates mosaic bot user with proper configuration
* Sets up repository permissions
* Generates API token
* Tests authentication
* Provides credential output for secure storage
- scripts/coordinator/test-gitea-bot.sh: Bot functionality test suite
* Tests authentication
* Verifies repository access
* Tests issue operations (read, list, assign, comment)
* Validates label management
* Confirms all required permissions
- scripts/coordinator/README.md: Scripts usage documentation
* Workflow guides
* Configuration reference
* Troubleshooting section
* Token rotation procedures
- .env.example: Added Gitea coordinator configuration template
* GITEA_URL, GITEA_BOT_USERNAME, GITEA_BOT_TOKEN
* GITEA_BOT_PASSWORD, GITEA_REPO_OWNER, GITEA_REPO_NAME
* Security notes for credential storage
All acceptance criteria met:
✓ Documentation for bot user creation
✓ Automated setup script
✓ Testing procedures and scripts
✓ Configuration templates
✓ Security best practices
✓ Troubleshooting guide
Addresses Milestone: M4.1-Coordinator
Relates to: #140, #157, #158
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
2026-02-01 17:32:03 -06:00 |
|