Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Add post-payment delivery validation without retrying possible spend

オープン
#651 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python

調査の方向性

src/bedrock_agentcore/payments/integrations/langgraph/README.md の AgentCore LangGraph 支払いフローから始め、名前付きの 3 つのエントリポイントである wrap_tool_call、awrap_tool_call、Strands after_tool_call を追跡します。challenge、1 つの credential、1 回の有料リトライ、malformed output を含む偽の PaymentManager フローを再現します。完了の条件は、オプションの callback が一貫したセマンティクスを共有し、拒否時にも支出の可能性を示す証拠を保持し、別の自動支払い試行を防ぎ、callback が存在しない場合の動作を変更しないことです。

索引モデルが issue の本文から書いたものです。

説明

enhancement

Is your feature request related to a problem? Please describe.

The AgentCore Payments LangGraph middleware and Strands plugin can detect a
payment challenge, obtain a credential, retry the tool, and return the paid
result. There is no opt-in application-output gate between that paid retry and
result promotion.

That leaves a buyer unable to reject malformed or contract-invalid application
output while preserving two facts: a payment credential may already have spent,
and the middleware must not automatically pay or retry again.

A credential-free reproduction uses a fake PaymentManager and a local tool:

  1. The first tool call returns an x402 or MPP payment challenge.
  2. The fake manager returns one payment credential.
  3. The paid retry returns HTTP 200 with malformed application output.
  4. The current middleware returns that output through LangGraph sync,
    LangGraph async, or Strands without a buyer-owned validation hook.

No AWS account, wallet, signature, or live payment is needed to reproduce the
control-flow gap.

Describe the solution you'd like

Add an optional post-payment delivery callback to the existing integrations.
When configured, it should:

  • receive the raw paid result plus an immutable snapshot of the selected
    payment requirement or challenge;
  • run after exactly one credential generation and one paid retry;
  • preserve the original paid result and explicit possible-spend evidence when
    validation rejects or raises;
  • return a deterministic failure through the native LangGraph or Strands path;
  • set native retry behavior so the same result cannot trigger another automatic
    payment attempt; and
  • leave current behavior unchanged when the callback is absent.

Protocol-native evidence should retain its authority label. An x402 Payment
Response or MPP Receipt can be exposed as observed, unverified evidence. Calling
settlement verified should require a separate protocol-specific verifier that
reconciles the native transaction or reference against the frozen payment
terms.

The three public integration paths should share the same semantics:

  • LangGraph wrap_tool_call
  • LangGraph awrap_tool_call
  • Strands after_tool_call

Describe alternatives you've considered

  • Tool-specific wrappers duplicate payment middleware and can lose the selected
    challenge and possible-spend context.
  • LLM inspection after the result returns is not a fail-closed output contract.
  • Requiring a seller to echo protocol, network, scheme, challenge or offer ID,
    amount, asset, payee, credential digest, and transaction in one custom bag is
    not portable. Standard x402 settlement responses and MPP receipts do not echo
    that complete set, and seller-authored echoes are not independent settlement
    verification.

Additional context

Current source references:

The repository's current contribution policy asks external users to report
problems and request features rather than submit code pull requests, so this is
intentionally a feature request without an external patch.

主要言語
Python
スター
777
フォーク
155
平均マージ
1日 12時間
マージ済み PR(30日)
14

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

aws/bedrock-agentcore-sdk-python のほかの issue

aws/bedrock-agentcore-sdk-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。