sdk: caller-side label requirements are all-of in the SDKs, any-of in sam-node
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 52/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- go, javascript, python
Línea de trabajo
Start with sdk/README.md:40, api/datalog.go:641, sdk/python/src/agent_mesh/mcp_client.py:58, and sdk/js/src/mcp.ts:117. Run internal/node/labels_gate_test.go:77 and compare the same inputs against both SDK predicates. Confirm which semantics is authoritative, then make the affected checks and tests agree for empty, full, partial, and total matches.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
The parity matrix in sdk/README.md:40 lists "Caller-side label requirements on the provider's credential" as yes for both SDKs. The semantics differ: sam-node treats the caller's required labels as any-of, both SDKs treat them as all-of.
The divergence
| semantics | code | |
|---|---|---|
sam-node |
any-of | api/datalog.go:641 — strings.Join(clauses, " or "), via checkPeerLabels |
| Python SDK | all-of | sdk/python/src/agent_mesh/mcp_client.py:58 |
| JS SDK | all-of | sdk/js/src/mcp.ts:117 |
Proof
Running the inputs from the Go test's own any-of requirement matches one key case (internal/node/labels_gate_test.go:77, expectErr: false) through the SDK predicate:
provider: {region: na-us, team: platform}
required: {region: eu, team: platform}
sam-node -> allowed (labels_gate_test.go:77 - observed PASS)
SDK -> LabelsNotSatisfiedError: missing region=eu
The two agree everywhere else. An empty requirement, a full match and a total mismatch all behave identically; the only divergence is more than one required pair with a partial match.
Impact
The SDKs are the stricter side, so this fails closed — all-of is a subset of any-of, and no SDK call is admitted that sam-node would refuse. The effect is availability: an agent that passes more than one required label is refused a provider the mesh would have allowed, and the same call succeeds through the sidecar.
Which side is authoritative
I read Go as the contract — the behaviour is pinned by a test case named for it, and mcp_client.py:49 documents itself as checkPeerLabels. But that is the question worth settling before either side moves: if all-of was the intent, then the Go check, its test and the header contract are what should change.
Offer
Happy to send the patch in whichever direction you pick — SDKs to any-of, or Go to all-of. Two files plus tests either way.
- Lenguaje dominante
- Go
- Estrellas
- 926
- Forks
- 138
- Merge medio
- 9 h 26 min
- PR fusionados (30 d)
- 129
Preparar el entorno
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de google/sam
-
debug network-info: observed_addresses reports announced addresses, not observed onesPosiblemente ocupada @Mukezh la tomó hace 3 días. Abiertogood first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
google/sam#484 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Testnet hub is unhealthyAbiertotestnet-health
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
Los mantenedores suelen responder en 1 día
-
Observability storyAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Los mantenedores suelen responder en 1 día
-
Database data migrationAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
Can we replace the MCP to A2A with the official CLI https://github.com/a2aproject/a2a-cli ?Posiblemente ocupada @kaisoz la tomó hace 18 días. Abierto
google/sam#378 · 3 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de google/sam
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
siderolabs/terraform-provider-talos#414 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
JuliaComputing/jh#63 · 1 comentario ·
-
area/proxy kind/bug priority/backlog triage/accepted
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
lexfrei/cloudflare-tunnel-gateway-controller#840 ·
Los mantenedores suelen responder en 1 día
-
Priority: Normal Type: Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
cloudflare/cloudflared#1747 ·