fix(yolo-manifest): declare image mode and normalize input schema#98
Open
fix(yolo-manifest): declare image mode and normalize input schema#98
Conversation
…base64 Implements Phase 12 input contract: - Replace frame_base64 (base64 string) with image_bytes (bytes) - Update all tool functions to decode bytes → numpy array - Remove base64 validation/decoding helpers - Remove 'default' tool fallback (violates Phase 12) - Update tool input schemas to declare image_bytes - Add input contract tests (9 tests, all passing) This fixes the root cause of #164: YOLO was expecting frame_base64 but TaskProcessor sends image_bytes. Both YOLO and OCR now use the unified Phase 12 contract. Test results: - tests_contract/test_input_contract.py: 9/9 PASSED - mypy: clean - ruff: clean Closes #164 Amp-Thread-ID: https://ampcode.com/threads/T-019c3d29-4079-72fc-98f6-c6493dddb940 Co-authored-by: Amp <amp@ampcode.com>
fix(#164): Update YOLO plugin to Phase 12 input contract (image_bytes)
Amp-Thread-ID: https://ampcode.com/threads/T-019c3d29-4079-72fc-98f6-c6493dddb940 Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019c3d29-4079-72fc-98f6-c6493dddb940 Co-authored-by: Amp <amp@ampcode.com>
- Add ruff linting with auto-fix - Add ruff formatter - Add mypy type checking - Remove unused cv2 import from plugin.py Prevents future remote failures from style/type issues. Amp-Thread-ID: https://ampcode.com/threads/T-019c3d5f-6f6a-741f-a6c4-34cb29d2472a Co-authored-by: Amp <amp@ampcode.com>
fix(pre-commit): Add ruff and mypy to pre-commit hooks
- Fix line-length in moderation/conftest.py (92 > 88 chars) - Remove duplicate tests_heavy/constants.py (identical to tests_contract/constants.py) Ruff: E501 line-length error Mypy: Module duplication error Amp-Thread-ID: https://ampcode.com/threads/T-019c3d5f-6f6a-741f-a6c4-34cb29d2472a Co-authored-by: Amp <amp@ampcode.com>
fix: Resolve pre-commit ruff and mypy failures
…match OCR plugin - Added "mode": "image" to YOLO manifest - Replaced legacy "frame_base64" with unified "image_base64" - Converted tools dict → tools list for schema consistency - Removed video/multi-frame semantics from YOLO image tools - Ensures YOLO follows the same routing path as OCR for uploaded images - Fixes incorrect fallback to legacy video tracker pipeline validator: enforce mode field and mode/tools consistency - Added "mode" to required manifest fields - Enforces mode must be "image" or "frame" - Validates consistency between mode and tools structure - mode="image" requires list tools with image_base64 - mode="frame" requires dict tools with frame_base64
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #164