CI: lint regressions in throbber.py/plan.py and failing Robot throbber test #8328

Open
opened 2026-04-13 08:55:04 +00:00 by HAL9000 · 0 comments
Owner

Summary

  • CI lint job is failing on the latest pull-request pipeline (run 12770) because ruff raised rule B010 in src/cleveragents/tui/widgets/throbber.py after new setattr calls were added.
  • The same pipeline’s integration suite is red: the Robot test "Throbber Rejects Invalid Styles" now reports 1 != 0, so invalid styles are leaking through the validation path.
  • A slightly older failure (run 12455) shows ruff rule B904 triggered in src/cleveragents/cli/commands/plan.py; the raise typer.Exit(1) call inside an except block is missing from None or a chained exception.

Evidence

Run 12770 · lint job (ci-log-run12770-job0.log)

2026-04-11T01:06:30.7545880Z B010 [*] Do not call `setattr` with a constant attribute value. It is not any safer than normal property access.
2026-04-11T01:06:30.7546552Z    --> src/cleveragents/tui/widgets/throbber.py:214:13
...
2026-04-11T01:06:30.7549667Z Found 2 errors.
2026-04-11T01:06:30.7594200Z nox > Command ruff check src/ scripts/ examples/ features/ robot/ failed with exit code 1

Run 12770 · integration_tests job (ci-log-run12770-job5.log)

2026-04-11T01:09:17.9834632Z Throbber Rejects Invalid Styles :: Invalid styles raise ValueError... | FAIL |
2026-04-11T01:09:17.9834763Z 1 != 0
2026-04-11T01:09:17.9835139Z Robot.Tui Throbber :: Integration coverage for the CleverAgents TU... | FAIL |

Run 12455 · lint job (ci_run_12455_lint.log)

2026-04-09T22:22:24.9815687Z B904 Within an `except` clause, raise exceptions with `raise ... from err` or `raise ... from None`
2026-04-09T22:22:24.9816123Z     --> src/cleveragents/cli/commands/plan.py:4220:9
...
2026-04-09T22:22:24.9857197Z nox > Command ruff check src/ scripts/ examples/ features/ robot/ failed with exit code 1

Suggested remediation

  • Replace the new setattr(..., "display", is_visible) / setattr(..., "visible", ...) calls with direct attribute assignment (or guard them) so ruff B010 passes and the TUI widget updates remain type-safe.
  • Investigate the throbber style validator: the Robot scenario expects a ValueError path that now returns a non-zero "invalid style" count.
  • Chain or silence the typer.Exit exception (raise typer.Exit(1) from None) inside src/cleveragents/cli/commands/plan.py so ruff B904 is satisfied.

Duplicate Check

  • Searched open issues for "throbber", "ruff B010", and "raise typer.Exit" – no existing reports found covering these CI failures.

Automated by CleverAgents Bot
Supervisor: Test Infrastructure Pool | Agent: test-infra-worker

## Summary - CI lint job is failing on the latest pull-request pipeline (run 12770) because `ruff` raised rule B010 in `src/cleveragents/tui/widgets/throbber.py` after new `setattr` calls were added. - The same pipeline’s integration suite is red: the Robot test "Throbber Rejects Invalid Styles" now reports `1 != 0`, so invalid styles are leaking through the validation path. - A slightly older failure (run 12455) shows `ruff` rule B904 triggered in `src/cleveragents/cli/commands/plan.py`; the `raise typer.Exit(1)` call inside an `except` block is missing `from None` or a chained exception. ## Evidence ### Run 12770 · lint job (`ci-log-run12770-job0.log`) ```text 2026-04-11T01:06:30.7545880Z B010 [*] Do not call `setattr` with a constant attribute value. It is not any safer than normal property access. 2026-04-11T01:06:30.7546552Z --> src/cleveragents/tui/widgets/throbber.py:214:13 ... 2026-04-11T01:06:30.7549667Z Found 2 errors. 2026-04-11T01:06:30.7594200Z nox > Command ruff check src/ scripts/ examples/ features/ robot/ failed with exit code 1 ``` ### Run 12770 · integration_tests job (`ci-log-run12770-job5.log`) ```text 2026-04-11T01:09:17.9834632Z Throbber Rejects Invalid Styles :: Invalid styles raise ValueError... | FAIL | 2026-04-11T01:09:17.9834763Z 1 != 0 2026-04-11T01:09:17.9835139Z Robot.Tui Throbber :: Integration coverage for the CleverAgents TU... | FAIL | ``` ### Run 12455 · lint job (`ci_run_12455_lint.log`) ```text 2026-04-09T22:22:24.9815687Z B904 Within an `except` clause, raise exceptions with `raise ... from err` or `raise ... from None` 2026-04-09T22:22:24.9816123Z --> src/cleveragents/cli/commands/plan.py:4220:9 ... 2026-04-09T22:22:24.9857197Z nox > Command ruff check src/ scripts/ examples/ features/ robot/ failed with exit code 1 ``` ## Suggested remediation - Replace the new `setattr(..., "display", is_visible)` / `setattr(..., "visible", ...)` calls with direct attribute assignment (or guard them) so `ruff` B010 passes and the TUI widget updates remain type-safe. - Investigate the throbber style validator: the Robot scenario expects a `ValueError` path that now returns a non-zero "invalid style" count. - Chain or silence the `typer.Exit` exception (`raise typer.Exit(1) from None`) inside `src/cleveragents/cli/commands/plan.py` so `ruff` B904 is satisfied. ### Duplicate Check - Searched open issues for "throbber", "ruff B010", and "raise typer.Exit" – no existing reports found covering these CI failures. --- **Automated by CleverAgents Bot** Supervisor: Test Infrastructure Pool | Agent: test-infra-worker
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#8328
No description provided.