Skip to content

test(e2e): QA.4 tool-policy violation UI indicator#14

Merged
Shaivpidadi merged 1 commit intodevfrom
feat/nova-qa4-tool-policy-e2e
Apr 23, 2026
Merged

test(e2e): QA.4 tool-policy violation UI indicator#14
Shaivpidadi merged 1 commit intodevfrom
feat/nova-qa4-tool-policy-e2e

Conversation

@Shaivpidadi
Copy link
Copy Markdown
Member

Summary

  • Adds tests/e2e/tool-policy.spec.ts with deterministic coverage of the tool-level precheck decision path.
  • Asserts that a denied tool call surfaces a red Tool Result bubble, a Deny badge (🚫 + reason hint), and increments the Blocked stats tile.
  • Asserts the UI stays interactive after a block so the user can retry.
  • Asserts that a redacted tool call surfaces a Redact badge + redacted payload and increments the Redacted tile without red styling.

Uses the same SSE-mock pattern as budget-limit.spec.ts so the test runs deterministically against staging, where a real deny-list tool invocation would depend on non-deterministic LLM behaviour.

Closes GOV-594. Refs TASKS.md §QA.4.

Test plan

  • pnpm type-check
  • pnpm test:e2e tool-policy against staging (requires KEYCLOAK_USER, KEYCLOAK_PASSWORD)
  • CI e2e job green on push
  • Traces retained on failure (playwright.config.ts already sets trace: 'retain-on-failure')

Add a dedicated Playwright spec that verifies the chat UI correctly
surfaces tool-level precheck decisions. Covers three cases via a mocked
/api/chat SSE stream (same pattern as budget-limit.spec.ts):

- denied tool call -> red Tool Result bubble, deny badge with the block
  icon and reason hint, Blocked stats tile increments
- chat remains interactive after a tool-policy block so the user can retry
- redacted tool call -> Redact badge + redacted payload visible, Redacted
  stats tile increments, no red styling (redact is not a block)

Mocking keeps the test deterministic against staging, where real
deny-list tool invocations depend on non-deterministic LLM behaviour.

Refs TASKS.md QA.4; GOV-594.
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
chat-agent-example Ready Ready Preview, Comment Apr 23, 2026 8:15pm

@Shaivpidadi Shaivpidadi merged commit 3803f8a into dev Apr 23, 2026
4 checks passed
@Shaivpidadi Shaivpidadi deleted the feat/nova-qa4-tool-policy-e2e branch April 23, 2026 20:24
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.

1 participant