Skip to content

refactor(c901): fix UAT harness (4 files) below C901 threshold, remove from grandfather list#1955

Merged
kingpanther13 merged 1 commit into
masterfrom
refactor/c901-b9-uat
Jul 18, 2026
Merged

refactor(c901): fix UAT harness (4 files) below C901 threshold, remove from grandfather list#1955
kingpanther13 merged 1 commit into
masterfrom
refactor/c901-b9-uat

Conversation

@kingpanther13

Copy link
Copy Markdown
Member

What does this PR do?

Fixes the 4 UAT-harness files from the C901 (McCabe complexity) grandfather list tracked in issue #925, by extracting private helper functions with no behavior change:

  • tests/uat/ha_wait.py: wait_for_ha_ready (12)
  • tests/uat/openai_agent.py: tool_call_loop (18)
  • tests/uat/run_uat.py: run_cli (17), run (17), run_agent_scenario (14), make_phase_summary (11)
  • tests/uat/stories/run_story.py: run_stories (27), _run_test_prompt (14), append_result (14), _extract_tool_sequence (13)

Removes all 4 from pyproject.toml's C901 per-file-ignore list.

Stacked on #1953 (which stacks on #1940) to keep the shared grandfather-list edits conflict-free; base retargets to master as its parents merge.

No docstring, CLI-argument, or string-literal change: an AST-level comparison of before/after confirms docstrings, signatures, and every pre-existing string literal (prompts, report text, CLI help) are byte-identical; the only additions are private _helper functions carrying relocated logic.

Type of change

  • 🐛 Bug fix
  • ✨ New feature
  • 📚 Documentation
  • 🔧 Maintenance/refactor
  • 🧪 Tests only
  • 💥 Breaking change

Testing

  • I have tested these changes with a LLM agent

  • All automated tests pass (uv run pytest)

  • Code follows style guidelines (uv run ruff check)

  • ruff check repo-wide with the 4 per-file ignores removed (C901 live): all checks pass

  • ruff format --check: clean

  • python -m py_compile on all 4 files: clean

  • The UAT harness has no automated test coverage by design (it drives live LLM agents); verification is lint + compile + AST-level identity of all pre-existing defs and strings

Checklist

  • I have updated documentation if needed

@ghhamcp

ghhamcp commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

@codex review — apply the review criteria in .gemini/styleguide.md in addition to AGENTS.md guidance

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: e17f2775e3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@kingpanther13
kingpanther13 force-pushed the refactor/c901-b8-test-infra branch from 859b48d to a1ee347 Compare July 18, 2026 22:43
Base automatically changed from refactor/c901-b8-test-infra to master July 18, 2026 22:43
@kingpanther13
kingpanther13 force-pushed the refactor/c901-b9-uat branch from e17f277 to 030cb70 Compare July 18, 2026 22:44
@kingpanther13
kingpanther13 marked this pull request as ready for review July 18, 2026 22:59
@kingpanther13
kingpanther13 requested review from a team and Patch76 July 18, 2026 22:59
@ghhamcp

ghhamcp commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

@codex review — apply the review criteria in .gemini/styleguide.md in addition to AGENTS.md guidance

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: 030cb70abb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@kingpanther13
kingpanther13 merged commit 88473d7 into master Jul 18, 2026
33 checks passed
@kingpanther13
kingpanther13 deleted the refactor/c901-b9-uat branch July 18, 2026 23:02
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.

2 participants