Skip to content

[codex] Update approval E2E expectations - #3054

Merged
henrypark133 merged 1 commit into
stagingfrom
fix/ci-e2e
Apr 29, 2026
Merged

henrypark133 merged 1 commit into
stagingfrom
fix/ci-e2e

Conversation

@henrypark133

Copy link
Copy Markdown
Collaborator

Summary

  • update approval E2Es to explicitly set the HTTP tool permission to ask_each_time before scenarios that require a real approval gate
  • keep the new default HTTP permission behavior from 8e54e51 intact
  • align the libsql tool_info assertion with the actual tool_activate(name="...") guidance

Root Cause

Commit 8e54e51 moved the HTTP tool default to AlwaysAllow, so fresh E2E servers no longer produced pending approval gates for tests that implicitly depended on the old default.

Validation

  • cargo build --no-default-features --features libsql
  • tests/e2e/.venv/bin/pytest tests/e2e/scenarios/test_tool_approval.py -v --timeout=120
  • tests/e2e/.venv/bin/pytest tests/e2e/scenarios/test_skills.py tests/e2e/scenarios/test_tool_approval.py tests/e2e/scenarios/test_webhook.py -v --timeout=120
  • cargo test --test e2e_builtin_tool_coverage --no-default-features --features libsql tool_info_clarifies_message_and_channel_setup_roles -- --nocapture

@github-actions github-actions Bot added size: XS < 10 changed lines (excluding docs) risk: low Changes to docs, tests, or low-risk modules contributor: core 20+ merged PRs labels Apr 29, 2026
@henrypark133
henrypark133 marked this pull request as ready for review April 29, 2026 03:42
Copilot AI review requested due to automatic review settings April 29, 2026 03:42

@nickpismenkov nickpismenkov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@henrypark133
henrypark133 merged commit 8a6cbcf into staging Apr 29, 2026
20 checks passed
@henrypark133
henrypark133 deleted the fix/ci-e2e branch April 29, 2026 03:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates E2E expectations around tool approval gates after the default HTTP tool permission changed, ensuring tests that depend on a real approval pause explicitly configure the HTTP tool to require per-call approval.

Changes:

  • Update the builtin tool coverage assertion to match the current tool_search guidance: tool_activate(name="...").
  • Add a small E2E helper to force the HTTP tool permission to ask_each_time, and call it before scenarios that need a real approval gate.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
tests/e2e_builtin_tool_coverage.rs Aligns tool_search description assertion with the current tool_activate(name="...") guidance.
tests/e2e/scenarios/test_tool_approval.py Ensures approval-gate-dependent E2Es explicitly configure HTTP tool permission to ask_each_time before triggering real HTTP tool calls.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -626,6 +651,7 @@ async def test_normal_text_not_intercepted_with_approval_card(page):

async def test_text_approval_resolves_real_tool_call(browser, managed_gateway_server):

Copilot AI Apr 29, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two test functions with the exact same name test_text_approval_resolves_real_tool_call in this module (one earlier taking page, and this one taking browser, managed_gateway_server). In Python the later definition overwrites the earlier one at import time, so one of these tests will never run under pytest. Rename one of the tests (and optionally adjust the docstring) so both scenarios are collected and executed.

Suggested change
async def test_text_approval_resolves_real_tool_call(browser, managed_gateway_server):
async def test_text_approval_resolves_real_tool_call_with_managed_gateway(
browser, managed_gateway_server
):

Copilot uses AI. Check for mistakes.
@@ -838,6 +864,7 @@ async def handle_gate_resolve(route):
async def test_slash_approve_is_thread_scoped_api(managed_gateway_server):

Copilot AI Apr 29, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two test functions named test_slash_approve_is_thread_scoped_api in this module (one using ironclaw_server, and this one using managed_gateway_server). The second definition overwrites the first, so pytest will only execute one of them. Rename one of the tests so both variants are collected.

Suggested change
async def test_slash_approve_is_thread_scoped_api(managed_gateway_server):
async def test_slash_approve_is_thread_scoped_api_managed_gateway(managed_gateway_server):

Copilot uses AI. Check for mistakes.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates end-to-end tests by introducing a helper function _require_http_approval to standardize the configuration of HTTP tool approval gates across multiple test scenarios. It also updates a documentation string in the Rust test suite. However, the review identified critical issues where several test function names are duplicated within tests/e2e/scenarios/test_tool_approval.py, which will cause pytest to silently overwrite and skip the initial test definitions. These function names must be made unique to ensure all test cases are executed.


async def test_text_approval_resolves_real_tool_call(page):
"""Typing 'yes' should resolve a real approval gate triggered by a tool call."""
await _require_http_approval(_page_base_url(page))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The test function name test_text_approval_resolves_real_tool_call is duplicated in this file (see line 316 and line 652). In Python, the second definition will overwrite the first, meaning the test case at line 316 will be silently skipped by pytest. Please rename these functions to be unique (e.g., by appending _simple and _gateway).


async def test_slash_approve_is_thread_scoped_api(ironclaw_server):
"""Sending '/approve' in thread A must not resolve a pending gate in thread B."""
await _require_http_approval(ironclaw_server)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The test function name test_slash_approve_is_thread_scoped_api is duplicated in this file (see line 346 and line 864). The second definition will overwrite the first, causing the first test implementation to be skipped. Please rename them to be unique.

@henrypark133 henrypark133 mentioned this pull request Apr 29, 2026
This was referenced May 7, 2026
theredspoon pushed a commit to theredspoon/ironclaw that referenced this pull request Jun 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor: core 20+ merged PRs risk: low Changes to docs, tests, or low-risk modules size: XS < 10 changed lines (excluding docs)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants