Skip to content

fix: restore Black 24.8.0 formatting broken by CodeQL autofix ruff format#756

Merged
Bryan-Roe merged 2 commits into
mainfrom
copilot/fix-unit-tests-failure
Jul 6, 2026
Merged

fix: restore Black 24.8.0 formatting broken by CodeQL autofix ruff format#756
Bryan-Roe merged 2 commits into
mainfrom
copilot/fix-unit-tests-failure

Conversation

Copilot AI commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

The CodeQL autofix workflow (ruff format) reformatted multi-line assert statements to assert cond, (\n msg\n), which conflicts with Black 24.8.0's expected form assert (\n cond\n), msg. This caused the pre-commit black --check step to fail and skip the test run entirely.

Changes

  • tests/test_aria_auto_execute_html.py, tests/test_orchestrator_health_integration.py, tests/test_parallel_status.py, tests/test_training_analytics_cli.py, tests/test_ui_playwright.py, tests/test_agent_mode_delegation_contracts.py — reformatted assert statements back to Black 24.8.0 canonical style
  • shared/db_logging.py — reformatted an overly long function signature that ruff format had left on one line

Before (ruff format output, fails black --check):

assert proc.returncode == 0, (
    f"expected zero exit with pipefail enabled, got {proc.returncode}; stderr={proc.stderr!r}"
)

After (Black 24.8.0):

assert (
    proc.returncode == 0
), f"expected zero exit with pipefail enabled, got {proc.returncode}; stderr={proc.stderr!r}"

Copilot AI requested review from Copilot and removed request for Copilot July 6, 2026 21:26

Copilot AI commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

@Bryan-Roe Unfortunately, I hit an error while trying to use the custom Copilot setup steps configured for this repository and had to close this PR. The error I am seeing is:

no `copilot-setup-steps` job found in your `copilot-setup-steps.yml` workflow file. Please ensure you have a single job named `copilot-setup-steps`. For more details, see https://gh.io/copilot/actions-setup-steps

Once you or someone with the necessary access fixes the problem, please unassign and then reassign issue #0 to me and I'll retry. Thanks!

…ofix

The CodeQL autofix workflow used ruff format which changed assert statements
to the style `assert cond, (\n    msg\n)`. Black 24.8.0 (used in pre-commit)
prefers `assert (\n    cond\n), msg`, causing the pre-commit check to fail.

Apply Black to the 7 affected files to restore correct formatting.
Copilot AI requested review from Copilot and removed request for Copilot July 6, 2026 21:30
@Bryan-Roe Bryan-Roe marked this pull request as ready for review July 6, 2026 21:30
@Bryan-Roe Bryan-Roe self-requested a review as a code owner July 6, 2026 21:30
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@sourcery-ai sourcery-ai 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.

Sorry @Bryan-Roe, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@github-actions github-actions Bot added the tests label Jul 6, 2026
Copilot AI changed the title [WIP] Fix failing GitHub Actions job 'Unit tests' fix: restore Black 24.8.0 formatting broken by CodeQL autofix ruff format Jul 6, 2026
@Bryan-Roe Bryan-Roe removed their request for review July 6, 2026 21:31
Copilot AI requested a review from Bryan-Roe July 6, 2026 21:31
@Bryan-Roe Bryan-Roe removed their assignment Jul 6, 2026
@Bryan-Roe Bryan-Roe removed their request for review July 6, 2026 21:31
@Bryan-Roe Bryan-Roe added this to the milestone milestone Jul 6, 2026
@Bryan-Roe Bryan-Roe merged commit 54edda6 into main Jul 6, 2026
73 of 97 checks passed
@Bryan-Roe Bryan-Roe deleted the copilot/fix-unit-tests-failure branch July 6, 2026 21:33
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

🔐 CodeQL — Open Alerts on this PR

Severity Count
high 6
note 65
warning 13
medium 6
error 10

Copilot Autofix suggestions (if enabled) appear as inline review comments on the affected lines.
See the full list in the Security tab.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants