docs(policy): fix guardrails docstring drift and temporal test-table row - #1986
Open
rhbelson wants to merge 1 commit into
Open
docs(policy): fix guardrails docstring drift and temporal test-table row#1986rhbelson wants to merge 1 commit into
rhbelson wants to merge 1 commit into
Conversation
- 02-guardrails-in-policy/deploy.py: the ApplicationTool free-text field is 'message' in the actual tool schema and all four guardrail policies scan context.input.message, but the module docstring, tool description, and a comment referred to a nonexistent 'customer_notes' field. Also the SSN policy is named 'block_ssn' in code but the docstring listed 'block_pii'. Aligned the docs with the code (no runtime change). - 03-temporal-policies/bankingassistant/README.md: Policy 1 test-table row 3 was self-contradictory (prompt said 'to ACC-2003', the to_account column said 'ACC-9999', and the looked-up account was ACC-2002). Made the prompt and column agree on ACC-9999 and named the looked-up account in the DENY reason so the walkthrough is coherent.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two documentation-correctness fixes in
01-features/07-centralize-and-govern-your-ai-infrastructure/02-policy, found while preparing the Diving Deep with AgentCore Workshop (v2). Both are docs/comment-only — no runtime behavior changes.1. Guardrails in Policy — docstring/comment drift (
02-guardrails-in-policy/deploy.py)The
ApplicationToolfree-text field is namedmessagein the actual tool schema, and all four guardrail policies scancontext.input.message. But the module docstring, thecreate_applicationtool description, and an inline comment referred to a nonexistentcustomer_notesfield. The docstring also listed the SSN policy asblock_pii, while the code creates it asblock_ssn. This aligns the docs with the code so a reader following the file isn't misled.2. Temporal Policies — self-contradictory test-table row (
03-temporal-policies/bankingassistant/README.md)Policy 1's test table row 3 used three different account IDs for one case: the prompt said transfer to ACC-2003, the
to_accountcolumn said ACC-9999, and the running example only ever looked up ACC-2002. The row still lands on DENY, but the mismatch makes the walkthrough incoherent. Fixed the prompt and column to agree onACC-9999and named the looked-up account (ACC-2002) in the DENY reason.Testing
Docs/comment-only changes; verified against the actual tool schema and guardrail policy code in
deploy.py. No code paths altered.