Skip to content

test(wizard): fix Claude Code flow test after demo step removal#1297

Merged
muddlebee merged 1 commit intoTracer-Cloud:mainfrom
muddlebee:fix/wizard-tests-demo-stub-removal
May 5, 2026
Merged

test(wizard): fix Claude Code flow test after demo step removal#1297
muddlebee merged 1 commit intoTracer-Cloud:mainfrom
muddlebee:fix/wizard-tests-demo-stub-removal

Conversation

@muddlebee
Copy link
Copy Markdown
Collaborator

Summary

Upstream run_wizard no longer calls build_demo_action_response() (see _render_saved_summary_render_next_steps). test_run_wizard_claude_code_skips_api_key_and_runs_cli_onboarding was the only test still monkeypatching flow.build_demo_action_response, which no longer exists on flow, causing AttributeError in CI.

Changes

  • Remove the obsolete monkeypatch from the Claude Code wizard test.

Testing

  • uv run pytest tests/cli/wizard/test_flow.py -q (26 passed)

run_wizard no longer calls flow.build_demo_action_response; the patch
raised AttributeError in CI.
@muddlebee muddlebee merged commit 1890964 into Tracer-Cloud:main May 5, 2026
6 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

🧑‍💻 @muddlebee has entered the contributor hall of fame. Merged. Done. Shipped. Go touch grass (then come back with another PR). 🌱


👋 Join us on Discord - OpenSRE : hang out, contribute, or hunt for features and issues. Everyone's welcome.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 5, 2026

Greptile Summary

  • Removes the monkeypatch.setattr(flow, "build_demo_action_response", ...) call from test_run_wizard_claude_code_skips_api_key_and_runs_cli_onboarding because build_demo_action_response was removed from flow and patching a non-existent attribute raises AttributeError in CI.
  • build_demo_action_response still exists in app/cli/wizard/validation.py; the removal is scoped only to the flow module-level attribute, so no other tests are affected.
  • No logic or assertions were changed; the test's coverage and intent remain intact.

Confidence Score: 5/5

Safe to merge — single-line test cleanup with no logic changes.

The change removes exactly one obsolete monkeypatch that caused an AttributeError; all 26 tests pass, no assertions were altered, and there are no new risks introduced.

No files require special attention.

Important Files Changed

Filename Overview
tests/cli/wizard/test_flow.py Removes an obsolete monkeypatch.setattr for flow.build_demo_action_response that no longer exists, fixing an AttributeError in CI.

Sequence Diagram

sequenceDiagram
    participant Test as test_run_wizard_claude_code_...
    participant flow as flow module
    participant store as wizard_store

    Test->>flow: monkeypatch select_prompt, get_store_path, probe_local_target
    Test->>flow: monkeypatch _run_cli_llm_onboarding, save_local_config, sync_provider_env, save_llm_api_key
    Note over Test,flow: build_demo_action_response patch removed (no longer on flow)
    Test->>flow: run_wizard()
    flow->>flow: _render_saved_summary → _render_next_steps
    flow->>store: save_local_config(...)
    flow-->>Test: exit_code = 0
    Test->>Test: assert cli_onboarding_providers == ["claude-code"]
    Test->>Test: assert saved_llm_keys == []
Loading

Reviews (1): Last reviewed commit: "test(wizard): drop stale build_demo stub..." | Re-trigger Greptile

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