a2aproject / a2aproject/a2a-tck

TCK sends wrong field names/structure for CreateTaskPushNotificationConfig (configId + nested config vs flat id)

Aperta Adatta ai principianti
#145 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
50
Fork
40
Merge medio
7g 1h
PR unite (30g)
1

Descrizione

## Summary

The TCK's `jsonrpc_client.create_task_push_notification_config` sends:

```json
{"taskId": "...", "configId": "...", "config": {"url": "...", "token": "..."}}
```

The v1.0 spec defines `TaskPushNotificationConfig` as a **flat** message (post-PR #1500):

```protobuf
message TaskPushNotificationConfig {
string tenant = 1;
string id = 2;
string task_id = 3;
string url = 4 [(google.api.field_behavior) = REQUIRED];
string token = 5;
AuthenticationInfo authentication = 6;
}
```

The SDK correctly serializes this flat via `MessageToDict()`:

```json
{"taskId": "...", "id": "...", "url": "...", "token": "..."}
```

## Two Mismatches

1. **Field name:** TCK sends `configId` — spec field is `id`
2. **Structure:** TCK nests `url`/`token`/`authentication` inside a `config` sub-object — spec has them flat on `TaskPushNotificationConfig`

## Location

`tests/utils/transport/jsonrpc_client.py`:
```python
response = self._make_jsonrpc_request(
method="CreateTaskPushNotificationConfig",
params={"taskId": task_id, "configId": config_id, "config": config},
)
```

## Impact

All push notification config create/get/list/delete tests fail with `-32602 InvalidParams` against any v1.0 agent built with the official SDK.

## Spec Reference

`TaskPushNotificationConfig` in `specification/a2a.proto` (current HEAD, post [a2aproject/A2A#1500](https://github.com/a2aproject/A2A/pull/1500))

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

The issue is in tests/utils/transport/jsonrpc_client.py in the create_task_push_notification_config method. Compare the current params structure with the flat TaskPushNotificationConfig message in specification/a2a.proto. Update the method to send the correct flat fields (id, url, token) instead of configId and a nested config object. Run the push notification config tests to verify they no longer fail with InvalidParams.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
api, testing
Tipo di issue
Bug
Difficoltà
2/5
Tempo stimato
1-3 ore
Stato di attività
Ferma
Chiarezza
Specificata chiaramente
Idoneità per principianti
65/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.