Skip to content

examples: add HOLD coverage for payment guard service#146

Merged
safal207 merged 1 commit into
mainfrom
codex/github-mention-add-hold-coverage-for-agent-payment-guard-se
May 26, 2026
Merged

examples: add HOLD coverage for payment guard service#146
safal207 merged 1 commit into
mainfrom
codex/github-mention-add-hold-coverage-for-agent-payment-guard-se

Conversation

@safal207
Copy link
Copy Markdown
Owner

Motivation

  • Ensure the Agent Payment Guard HTTP service example explicitly covers HOLD behavior for recurring payments that lack approval so mode semantics are fully demonstrated.
  • Provide explicit assertions for both enforce and shadow modes and make the service-level audit expectations deterministic.

Description

  • Update examples/agent-payment-guard/run_service_check.sh to POST the payment_proposal.recurring_without_approval.json fixture and assert HOLD + RECURRING_PAYMENT_REQUIRES_APPROVAL in enforce mode.
  • Add a matching POST and assertions for HOLD in shadow mode, verifying execution_allowed differs by mode while would_block remains true.
  • Update the service audit assertion to expect count==4 and verify the explicit decision sequence ACCEPT, BLOCK, HOLD, HOLD.
  • Preserve hash-chained audit verification by keeping the python3 scripts/verify_audit_log.py .proofpath/audit.jsonl check unchanged.

Testing

  • Ran bash examples/agent-payment-guard/run_demo_check.sh; it passed.
  • Ran bash examples/agent-payment-guard/run_service_check.sh; it passed and exercised both HOLD cases.
  • Ran python3 scripts/verify_audit_log.py .proofpath/audit.jsonl; hash-chain verification passed.

Codex Task

@safal207 safal207 merged commit 9018102 into main May 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant