Skip to content

test: add policy boundary condition tests for evaluateAction [FaaFyfxR9WAQrL7FcAgEHJvztd8cVMxvjHRS55rw1nwH] - #7

Closed
waterWang wants to merge 2 commits into
FeeeeelixWong:mainfrom
waterWang:main
Closed

test: add policy boundary condition tests for evaluateAction [FaaFyfxR9WAQrL7FcAgEHJvztd8cVMxvjHRS55rw1nwH]#7
waterWang wants to merge 2 commits into
FeeeeelixWong:mainfrom
waterWang:main

Conversation

@waterWang

Copy link
Copy Markdown

Summary

Adds deterministic boundary condition tests for evaluateAction covering all edge cases specified in the issue.

Tests added

  • Invalid amounts: NaN, zero, and negative transfer amounts are blocked
  • Per-action cap: amounts above cap blocked, exactly at cap allowed
  • Daily cap: exactly reaching daily cap allowed, exceeding by smallest practical value blocked
  • Intent note: shorter than 12 trimmed characters blocked, exactly 12 chars allowed
  • Whitespace handling: leading/trailing whitespace does not bypass recipient allowlist or intent note length check

Also fixed a pre-existing unused import warning in receipt.test.ts.

Closes #3

Cover NaN, zero, negative amounts; per-action cap boundaries;
daily cap boundaries; intent note length; and whitespace handling.

Closes FeeeeelixWong#3
@FeeeeelixWong

Copy link
Copy Markdown
Owner

Closing this PR because it is not an independent, focused submission. PRs #7, #8, and #9 currently point to the same head commit (b506729) and contain both the Issue #3 policy tests and the Issue #2 receipt verifier. This duplicates the two active pull requests and mixes unrelated task scopes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agent task: Cover policy boundary conditions

2 participants