[Bug]: Validation error example uses non-existent TASK_STATE_RUNNING enum and lowercase enum values
- Vorherrschende Sprache
- Shell
- Sterne
- 25.7k
- Forks
- 2.6k
- Ø Merge
- 3 T. 6 Std.
- Gemergte PRs (30 T.)
- 16
Beschreibung
### What happened?
The validation error example in Section 6.5 of the specification has two inconsistencies:
1. **Mismatched error reference**: The request query parameter sends `status=TASK_STATE_RUNNING` but the error message references `'running'` instead of `'TASK_STATE_RUNNING'`
2. **Lowercase enum values**: The error message lists valid values as `pending, working, completed, failed, canceled` (lowercase, incomplete list), but Section 5.5 mandates SCREAMING_SNAKE_CASE per the ProtoJSON specification, and all other spec examples use this format (e.g., `TASK_STATE_WORKING` on line 1494)
Additionally, `TASK_STATE_RUNNING` does not exist in the `TaskState` enum defined in `a2a.proto` (the correct value is `TASK_STATE_WORKING`), but since this is a validation error example showing an intentionally invalid request, the invalid enum is acceptable — the error response should just be consistent with the rest of the spec.
### Relevant log output
```
# Section 5.5 (line 1215) says:
# Enum values MUST be represented as their string names as defined
# in the Protocol Buffer definition (typically SCREAMING_SNAKE_CASE).
# But the validation error example (line 1587) says:
"Must be one of: pending, working, completed, failed, canceled"
# Other examples in the spec correctly use:
status=TASK_STATE_WORKING (line 1494)
"state": "TASK_STATE_WORKING" (line 1511)
```
### Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Beitragsleitfaden
Rechercherichtung
Find the specification document, likely in the repository's docs or spec folder. Locate Section 6.5 and the validation error example around line 1587. Compare with Section 5.5 and the enum definition in a2a.proto. The fix is to update the error message to list valid SCREAMING_SNAKE_CASE enum values (e.g., TASK_STATE_PENDING) and ensure the referenced invalid value matches the request. Verify by checking other examples for consistency.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Bereich
- documentation
- Issue-Typ
- Dokumentation
- Schwierigkeit
- 1/5
- Geschätzter Aufwand
- Unter einer Stunde
- Aktivitätsstatus
- Ruhig
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 85/100