Goal
Improve code quality and reliability in this repository by:
- adding missing or incomplete type annotations,
- introducing or expanding unit tests,
- fixing real bugs discovered during inspection, testing, or implementation.
Scope
Apply incremental, targeted changes only.
Required work:
- Identify modules with missing or inconsistent type annotations and improve them.
- Add unit tests for the modules that are modified.
- Reproduce and fix real bugs that are discovered while reading the code, annotating types, or running tests.
- Keep the implementation limited to the affected modules and their directly related tests.
Constraints
- Do not refactor unrelated code.
- Do not add new dependencies unless strictly required.
- Prefer the smallest safe change set.
- Preserve current behavior unless a bug is being fixed.
- If repository reality contradicts the current plan, stop and report it instead of expanding scope.
Expected output
Please produce:
- a concrete plan,
- a list of files to change,
- type-annotation improvements,
- unit tests for the changed behavior,
- bug fixes only when supported by evidence,
- validation results.
Acceptance criteria
The task is complete only if:
- the modified Python code has meaningful type annotations,
- new or updated unit tests exist for the changed behavior,
- each claimed bug fix includes:
- what the bug was,
- how it was detected or reproduced,
- how it was fixed,
- relevant tests pass,
- the final diff remains within the approved scope.
Notes
Prioritize correctness over breadth.
If the repository is too inconsistent for a clean incremental change, report blockers instead of widening scope.
Goal
Improve code quality and reliability in this repository by:
Scope
Apply incremental, targeted changes only.
Required work:
Constraints
Expected output
Please produce:
Acceptance criteria
The task is complete only if:
Notes
Prioritize correctness over breadth.
If the repository is too inconsistent for a clean incremental change, report blockers instead of widening scope.