fix(schema): add missing items to context_delegate.insights array#34
Conversation
OpenAI-compatible providers reject tool schemas where array properties
lack an items declaration. Added items: { type: 'string' } and a
regression test that validates all array properties across all tools.
Closes #33
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Claude finished @mkreyman's task —— View job Claude Code is reviewing this PR… Code Review Progress
Code ReviewThis PR effectively addresses the JSON Schema compliance issue that was causing OpenAI-compatible providers to reject the tool schema. Here's my detailed analysis: ✅ Core Fix QualityThe fix is correct and minimal:
✅ Excellent Test CoverageThe regression test (src/tests/integration/issue33-array-items-schema.test.ts) is exceptionally well-designed:
Code Quality Notes:
✅ Version Management
✅ No Security or Performance Issues
🟡 Minor Suggestions for Improvement
✅ Overall AssessmentThis is a high-quality fix that:
The approach is exactly right: minimal fix + robust testing to prevent regression. Recommendation: ✅ APPROVE This PR is ready to merge. The fix is correct, well-tested, and follows best practices. |
…comment handling Review findings: - insights items type changed from string to object (handler accesses insight.patterns, insight.relationships, etc.) - Fixed misleading docstring that said dist/index.js when test reads src/index.ts - Added block comment stripping to match tool-profiles-integration.test.ts convention Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Round 2 review fixes: - CHANGELOG: string → object to match actual code - CHANGELOG: add missing [0.12.2] link reference - Scanner: track block-comment state inline instead of stripping (preserves original line numbers for accurate debugging) - Scanner: remove redundant regex branch Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Claude finished @mkreyman's task —— View job Claude Code is reviewing this PR… Code Review Progress
Code ReviewThis PR effectively addresses the JSON Schema compliance issue that was causing OpenAI-compatible providers to reject the tool schema. Here's my detailed analysis: ✅ Core Fix QualityThe fix is correct and minimal:
✅ Excellent Test CoverageThe regression test (src/tests/integration/issue33-array-items-schema.test.ts) is exceptionally well-designed:
Code Quality Notes:
✅ Version Management
✅ No Security or Performance Issues
🟡 Minor Suggestions for Improvement
✅ Overall AssessmentThis is a high-quality fix that:
The approach is exactly right: minimal fix + robust testing to prevent regression. Recommendation: ✅ APPROVE This PR is ready to merge. The fix is correct, well-tested, and follows best practices. |
- Add properties to context_delegate.input.insights items (patterns,
relationships, trends, themes) instead of bare { type: 'object' }
- Add properties: {} to context_link.metadata bare object schema
- Fix test scanner to handle single-line array declarations
- Update CHANGELOG to reflect all schema hardening
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Claude finished @mkreyman's task —— View job Claude Code is reviewing this PR… Code Review Progress
Code ReviewThis PR effectively addresses the JSON Schema compliance issue that was causing OpenAI-compatible providers to reject the tool schema. Here's my detailed analysis: ✅ Core Fix QualityThe fix is correct and minimal:
✅ Excellent Test CoverageThe regression test (src/tests/integration/issue33-array-items-schema.test.ts) is exceptionally well-designed:
Code Quality Notes:
✅ Version Management
✅ No Security or Performance Issues
🟡 Minor Suggestions for Improvement
✅ Overall AssessmentThis is a high-quality fix that:
The approach is exactly right: minimal fix + robust testing to prevent regression. Recommendation: ✅ APPROVE This PR is ready to merge. The fix is correct, well-tested, and follows best practices. |
Spawns the actual MCP server over stdio and validates: Schema validation (via tools/list): - Every tool has name, description, inputSchema - Every array property has items declared (#33 regression) - Every property type is a valid JSON Schema type - Every required field references an existing property - Enum values match their declared type - No duplicate tool names Smoke tests (via tools/call): - Save and retrieve a context item - Search for saved items - Get server status - Unknown tool returns error - Missing required args handled gracefully - Default profile exposes all 38 tools Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Claude finished @mkreyman's task —— View job Code ReviewThis PR effectively addresses the JSON Schema compliance issue that was causing OpenAI-compatible providers to reject the tool schema. Here's my detailed analysis: ✅ Core Fix QualityThe fix is correct and minimal:
✅ Excellent Test CoverageThe regression test (src/tests/integration/issue33-array-items-schema.test.ts) is exceptionally well-designed:
Code Quality Notes:
✅ Version Management
✅ No Security or Performance Issues
🟡 Minor Suggestions for Improvement
✅ Overall AssessmentThis is a high-quality fix that:
The approach is exactly right: minimal fix + robust testing to prevent regression. Recommendation: ✅ APPROVE This PR is ready to merge. The fix is correct, well-tested, and follows best practices. |

Summary
context_delegate.input.insightsarray property missing requireditemsdeclaration, which caused OpenAI-compatible providers to reject the tool schema withinvalid_function_parameterstype: 'array'property hasitemsdeclaredTest plan
issue33-array-items-schema.test.tsfails before fix, passes afterCloses #33
🤖 Generated with Claude Code