Skip to content

Fix lint/CI duplication and script robustness issues - #124

Merged
mergify[bot] merged 1 commit into
project-chip:v2.16-cli-developfrom
antonio-amjr:fix/dev_tooling_ci_scripts
Sep 25, 2026
Merged

mergify[bot] merged 1 commit into
project-chip:v2.16-cli-developfrom
antonio-amjr:fix/dev_tooling_ci_scripts

Conversation

@antonio-amjr

Copy link
Copy Markdown
Contributor

Fix: project-chip/certification-tool#1131

Changes

  • .github/workflows/python-lint.yml: removed a dead pip install black flake8 mypy pydantic types-requests step (every actual lint invocation uses poetry run, so this step populated an environment nothing reads from), and added the missing isort --check-only th_cli step so CI now checks exactly what scripts/lint.sh checks locally. Previously isort issues could pass CI but fail local lint (or vice versa).
  • scripts/lint.sh: added set -e — previously only the last linter's exit code counted, so earlier failures (mypy, black) were silently ignored.
  • scripts/generate_client.sh, scripts/th_cli_install.sh: quoted several unquoted variable expansions ($PROJECT_ROOT/..., $SHARED_CONST_DIR/...) that would break on paths containing spaces.

Not changed (reviewed, left alone)

  • scripts/run_pytest.sh, scripts/check_deps.py, scripts/format.sh — no defects found.
  • scripts/datamodel_generate_client.py (1039 lines) — spot-checked, no defects found; a full line-by-line audit felt disproportionate for this low-risk batch given it's a rarely-run manual codegen tool.
  • th_cli_install.sh's poetry self update (auto-upgrades the developer's global Poetry on every install) — possibly intentional, left as-is pending confirmation it's safe to remove.

Testing

No poetry/pytest/mypy available in the environment these fixes were authored in. Verified via bash -n (syntax) on all shell scripts and manual YAML validation of the workflow file. Please run CI on this branch before merging to confirm the added isort --check-only step passes and the lint-action step still behaves as expected without the removed pip install step.

@antonio-amjr antonio-amjr self-assigned this Sep 23, 2026
@antonio-amjr antonio-amjr added the enhancement New feature or request label Sep 23, 2026
@coderabbitai

coderabbitai Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 648dcd20-e6b0-4a0d-817d-18fc64402c91

📥 Commits

Reviewing files that changed from the base of the PR and between f41adf1 and 91d77a5.

📒 Files selected for processing (4)
  • .github/workflows/python-lint.yml
  • scripts/generate_client.sh
  • scripts/lint.sh
  • scripts/th_cli_install.sh

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The Python lint workflow removes direct package installation commands and adds an isort check through Poetry. The lint script exits when a command fails. The client-generation and shared-constants installation scripts quote paths in the affected commands.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 91d77

No actionable merge risk was identified in the reviewed tooling changes.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The changes address CLI lint alignment and shell robustness in the scripts listed by [#1131]. The workflow now runs isort --check-only th_cli, and scripts/lint.sh runs the same check with fail-fas… Consolidate the CI and local lint/format commands behind one maintained source of truth. Review the applicable scripts from [#1131], including the backend/scripts/test-cov-html.sh item if that path belongs to the target repository. Verify…
✅ Passed checks (4 passed)
Check name Status Explanation
Out of Scope Changes check ✅ Passed The changed files support the linked issue's CLI linting, code-generation, installation-script, and CI objectives. The quoting changes and fail-fast change are supporting robustness improvements in th…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 3…
Title check ✅ Passed The title clearly summarizes the main changes: fixing duplicated lint and CI logic and improving script robustness.
Description check ✅ Passed The description directly explains the workflow, linting, quoting, testing, and review changes in the pull request.
Full details: Linked Issues check

Explanation

The changes address CLI lint alignment and shell robustness in the scripts listed by [#1131]. The workflow now runs isort --check-only th_cli, and scripts/lint.sh runs the same check with fail-fast behavior. However, the workflow and scripts/lint.sh still contain separate lint and format command definitions, so the acceptance criterion that CI and local scripts no longer duplicate this logic is not met. The PR provides no evidence that the documented Poetry commands work; the author reports that Poetry was unavailable. The head tree also has no backend/scripts/test-cov-html.sh, so the applicability of that named issue item cannot be established from the reviewed files.

Resolution

Consolidate the CI and local lint/format commands behind one maintained source of truth. Review the applicable scripts from [#1131], including the backend/scripts/test-cov-html.sh item if that path belongs to the target repository. Verify the documented Make and Poetry commands in CI or another reviewable automated check.

  • Fix all pre-merge checks with AI

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@antonio-amjr
antonio-amjr marked this pull request as ready for review September 24, 2026 17:02
@mergify

mergify Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Queued — the merge queue status continues in this comment ↓.

@mergify

mergify Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Merge Queue Status

  • ✅ Entered queue — 2026-09-25 12:14 UTC · Rule: default · triggered by @antonio-amjr with the merge queue checkbox
  • ✅ Checks skipped · PR is already up-to-date
  • ✅ Merged — 2026-09-25 12:14 UTC · at d5c84db6530ad6c8f935ba28de707b49d79575d1

This pull request spent 15 seconds in the queue, including 1 second running CI.

Required conditions to merge

@mergify mergify Bot added the queued label Sep 25, 2026
@mergify
mergify Bot merged commit d5c84db into project-chip:v2.16-cli-develop Sep 25, 2026
5 checks passed
@mergify mergify Bot removed the queued label Sep 25, 2026
@antonio-amjr
antonio-amjr deleted the fix/dev_tooling_ci_scripts branch September 25, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants