Skip to content

engine: update dependencies, enforce coverage, and expand tests - #7291

Closed
Ludy87 wants to merge 11 commits into
mainfrom
update_python_dep_20260804
Closed

engine: update dependencies, enforce coverage, and expand tests#7291
Ludy87 wants to merge 11 commits into
mainfrom
update_python_dep_20260804

Conversation

@Ludy87

@Ludy87 Ludy87 commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR updates the AI Engine toolchain and strengthens its automated quality checks.

Changes

  • Update the AI Engine's runtime, development, and pre-commit dependencies.
  • Add pytest-cov and a dedicated task engine:test:coverage task.
  • Enforce a minimum of 90% coverage for every measured source file.
  • Run coverage in CI, publish the report in the workflow summary, and upload HTML/XML/JSON reports as an artifact.
  • Extend Ruff configuration and formatting coverage for repository Python files.
  • Add and expand unit tests for:
    • orchestrator routing and dispatch,
    • PDF editing workflows,
    • API streaming helpers,
    • ledger agents and formula validation,
    • application utilities,
    • edge cases and error handling.
  • Ignore generated coverage output.

Motivation

Keeping the engine dependencies current and enforcing per-file coverage improves reliability, makes regressions easier to detect, and gives contributors and reviewers accessible coverage reports.

Testing

  • task engine:test:coverage
  • task engine:check

Checklist

General

Documentation

Testing

  • I have run the relevant checks locally
  • I have tested my changes locally

@dosubot dosubot Bot added size:M This PR changes 30-99 lines ignoring generated files. enhancement New feature or request labels Aug 4, 2026
@stirlingbot stirlingbot Bot added dependencies Pull requests that update a dependency file GitHub Issues or pull requests related to GitHub configuration and integrations engine Issues or pull requests related to the engine and removed enhancement New feature or request labels Aug 4, 2026
Ludy87 added 2 commits August 4, 2026 18:00
Replace collections.abc AsyncIterator/Iterator with AsyncGenerator/Generator in engine runtime and tests. Update ConcurrencyLimitedModel.request_stream return annotation to AsyncGenerator[StreamedResponse, None] and adjust test_config_routes._client to Generator[TestClient, None, None]. Typing-only change to reflect actual generator/async-generator return shapes; no runtime behaviour changes.
Drop redundant "# noqa: BLE001" inline comments from broad except blocks and update type annotations for async/generator signatures. Changes: remove BLE001 noqa in config.py and service.py, tighten ConcurrencyLimitedModel.request_stream return type in runtime.py to AsyncGenerator[StreamedResponse], simplify test generator annotation in test_config_routes.py, and a minor README formatting tweak. These edits align code with linting/typing rules and improve type correctness.
@stirlingbot stirlingbot Bot added the Documentation Improvements or additions to documentation label Aug 4, 2026
Add npm to the apt-get install line in docker/embedded/Dockerfile, Dockerfile.fat and Dockerfile.ultra-lite so npm is available in embedded builds. Also add an npm --version check in the ultra-lite Dockerfile. This ensures frontend/build tooling is present in the embedded images.
@stirlingbot stirlingbot Bot added the Docker Pull requests that update Docker code label Aug 4, 2026
@stirlingbot stirlingbot Bot added has conflicts Pull request has merge conflicts with the base branch and removed Docker Pull requests that update Docker code labels Aug 4, 2026
@stirlingbot stirlingbot Bot added has conflicts Pull request has merge conflicts with the base branch and removed has conflicts Pull request has merge conflicts with the base branch labels Aug 6, 2026
@Ludy87
Ludy87 requested review from a team as code owners August 11, 2026 14:54
@stirlingbot stirlingbot Bot removed the has conflicts Pull request has merge conflicts with the base branch label Aug 11, 2026
Relax pre-commit pins and increase ruff line-length in engine/pyproject.toml; add per-file ruff ignores and update engine/uv.lock. Apply many non-functional Python formatting and linting adjustments across scripts and test step files: consolidate multi-line strings/args, collapse long f-strings, reorder/clean imports, add # noqa markers (BLE001, E501, N806 etc.), and minor refactors to improve style and silence linters. No behavioral changes intended — changes are formatting/lint-related to satisfy tooling and reduce warnings.
@Ludy87
Ludy87 requested a review from a team as a code owner August 11, 2026 16:29
@dosubot dosubot Bot removed the size:M This PR changes 30-99 lines ignoring generated files. label Aug 11, 2026
@dosubot dosubot Bot added the size:L This PR changes 100-499 lines ignoring generated files. label Aug 11, 2026
@stirlingbot stirlingbot Bot added Front End Issues or pull requests related to front-end development Back End Issues related to back-end development Translation Issues or pull requests related to translation API API-related issues or pull requests Test Testing-related issues or pull requests labels Aug 11, 2026
Ludy87 added 2 commits August 11, 2026 18:31
Formatting-only changes across the engine: collapsed several multi-line expressions into single-line forms, tightened f-strings and SQL literals, and removed extraneous line breaks/parentheses. Affected files include the tool model generator, multiple agents (contradiction, ledger, math_presentation, pdf_edit, pdf_questions), document stores (pgvector, sqlite, rag_capability), models (tool_io, tool_models), services (tool_io_compat, tracking), settings, and tests. No functional behavior changes intended—these edits are purely stylistic to improve readability and satisfy formatting/linting.
@Ludy87 Ludy87 changed the title deps(engine): upgrade Python dependencies and enforce coverage reporting engine: update dependencies, enforce coverage, and expand tests Aug 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Generated Models Check Failed

One or more generated files are out of date with the Java OpenAPI spec and will need to be regenerated before they can be merged in.

Run task tool-models to regenerate them, then commit the updated files.

@Ludy87
Ludy87 marked this pull request as draft August 11, 2026 16:53
@Ludy87 Ludy87 closed this Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API API-related issues or pull requests Back End Issues related to back-end development dependencies Pull requests that update a dependency file Documentation Improvements or additions to documentation engine Issues or pull requests related to the engine Front End Issues or pull requests related to front-end development GitHub Issues or pull requests related to GitHub configuration and integrations size:L This PR changes 100-499 lines ignoring generated files. Test Testing-related issues or pull requests Translation Issues or pull requests related to translation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant