-
Notifications
You must be signed in to change notification settings - Fork 49
Description
🏥 CI Failure Investigation - Run #21035582213
Summary
CI failed due to incomplete schema update in PR #10068. The title field for create_project was made optional in the tool schema (safe_outputs_tools.json) but remains marked as required in the validation config (safe_output_validation_config.go), causing a validation mismatch.
Failure Details
- Run: #21035582213
- Commit:
571d1543c057dea593da2c94b127f26311837251 - PR: Fix create_project tool validation by making title optional and add configurable title-prefix #10068 - "Fix create_project tool validation by making title optional and add configurable title-prefix"
- Trigger: PR merge to main
- Severity: HIGH
Root Cause Analysis
PR #10068 added a title-prefix configuration feature to allow auto-generation of project titles when the title parameter is not provided. The implementation updated:
✅ pkg/workflow/js/safe_outputs_tools.json - Removed title from required array
✅ actions/setup/js/create_project.cjs - Added auto-generation logic using title-prefix
✅ pkg/workflow/create_project.go - Added TitlePrefix config field
✅ pkg/workflow/safe_outputs_config_generation.go - Added title-prefix handling
❌ MISSED: pkg/workflow/safe_output_validation_config.go line 250 still has Required: true for the title field
The Problem
// pkg/workflow/safe_output_validation_config.go:250
"create_project": {
DefaultMax: 1,
Fields: map[string]FieldValidation{
"title": {Required: true, Type: "string", Sanitize: true, MaxLength: 256}, // ❌ Should be false
// ...
},
},This creates a mismatch:
- Tool schema says: title is optional (can be auto-generated)
- Validation config says: title is required (must be provided)
Impact
Any workflow using create_project without an explicit title parameter (relying on auto-generation) will fail runtime validation with an error like:
Error: Required field 'title' is missing
This breaks the intended functionality of the title-prefix feature.
Recommended Fix
File: pkg/workflow/safe_output_validation_config.go
Line: 250
Change:
"create_project": {
DefaultMax: 1,
Fields: map[string]FieldValidation{
- "title": {Required: true, Type: "string", Sanitize: true, MaxLength: 256},
+ "title": {Required: false, Type: "string", Sanitize: true, MaxLength: 256},
"owner": {Type: "string", Sanitize: true, MaxLength: 128},
// ...
},
},Validation Steps:
- Make the change above
- Run
make testto verify tests pass - Run
make agent-finishto ensure full validation - Commit and push
Prevention Strategies
For Future Development
Rule: When changing a field's required status in any tool schema, ALWAYS update BOTH:
pkg/workflow/js/safe_outputs_tools.json(tool schema)pkg/workflow/safe_output_validation_config.go(validation config)
These files must stay in sync. The validation config enforces what the tool schema declares.
Detection Pattern
Search for the pattern: "making X field optional" or "removing X from required"
When found, verify updates in:
- Tool schema JSON file
- Validation config Go file
- Implementation code (JavaScript)
- Go config structs
AI Team Self-Improvement
Add to AGENTS.md or developer instructions:
### Safe Output Schema Changes
When modifying safe-output tool schemas (making fields optional/required):
1. **ALWAYS update both files together**:
- `pkg/workflow/js/safe_outputs_tools.json` - Tool schema definition
- `pkg/workflow/safe_output_validation_config.go` - Runtime validation rules
2. **Search both files** for the field name when making changes
3. **Pattern to remember**:
- Making a field optional? Update `Required: true` → `Required: false` in validation config
- Making a field required? Update `Required: false` → `Required: true` and add to `required` array in JSON
4. **Validation**: Run `make test` to catch mismatches before committingHistorical Context
This is a common pattern when adding "optional with auto-generation" features. Previous similar changes successfully updated both files. This appears to be an oversight rather than a systemic issue.
Pattern: INCOMPLETE_SCHEMA_UPDATE
First occurrence: Run #21035582213
Related failures: None found
Investigation Metadata
- Investigator: CI Failure Doctor
- Investigation Date: 2026-01-15T15:20:00Z
- Investigation File:
/tmp/gh-aw/cache-memory/investigations/2026-01-15-21035582213.json - Method: Code analysis (GitHub API unavailable)
AI generated by CI Failure Doctor
To add this workflow in your repository, run
gh aw add githubnext/agentics/workflows/ci-doctor.md@ea350161ad5dcc9624cf510f134c6a9e39a6f94d. See usage guide.