sdk: caller-side label requirements are all-of in the SDKs, any-of in sam-node
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 52/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- go, javascript, python
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Go
- スター
- 926
- フォーク
- 138
- 平均マージ
- 9時間 26分
- マージ済み PR(30日)
- 129
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
google/sam のほかの issue
-
debug network-info: observed_addresses reports announced addresses, not observed ones対応中かも @Mukezh が 2 日前に担当しました。 オープンgood first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
google/sam#484 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
testnet-health
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
メンテナーはふだん 1 日以内に返信
-
Observability storyオープン
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
Can we replace the MCP to A2A with the official CLI https://github.com/a2aproject/a2a-cli ?対応中かも @kaisoz が 17 日前に担当しました。 オープン
google/sam#378 · コメント 3 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
volodya-lombrozo/aidy#333 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
rossoctl/context-guru#314 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
OwO-Network/DLX#236 · コメント 1 件 · リアクション 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100