Skip to content

Code quality: readable names, docs, type hints, ruff, CI - #42

Merged
krokicki merged 7 commits into
mainfrom
code-quality
Oct 13, 2026
Merged

krokicki merged 7 commits into
mainfrom
code-quality

Conversation

@krokicki

@krokicki krokicki commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Readability pass over autodev/ and mia_data/: one-letter and cryptic names replaced (self.s → self.state, p → pr, cw/vw → crop_workspace/verify_workspace, _c → safe_text, ...), type hints on object parameters (Config, GitHub, Mirror, job clients, Temporal Client) via TYPE_CHECKING imports, and spec-reference comments replaced with plain-language descriptions of each module, class and non-obvious method.
  • Wire compatibility: JobArgs fields were renamed (ws/n/crop_ws → workspace/n_crops/crop_workspace) since activity inputs are not replayed. VerifyResult.n keeps its name because it is an activity result present in recorded Temporal histories and in-flight workflows.
  • Ruff (pixi run lint, pixi run fmt): E/F/W/I/UP/B rules at line length 120, plus ruff format applied repo-wide in its own commit. Fixes it prompted: sorted imports, collections.abc imports, datetime.UTC, PEP 695 type parameters, explicit zip strictness, and in tests a mutable default argument, a loop-variable closure, blind Exception asserts and l variables.
  • CI: GitHub Actions runs lint and tests on pull requests and pushes to main.
  • requires-python moves to 3.12 (pixi already pins it and seed.py uses 3.12 f-string syntax). .gitignore covers all local autodev*.yaml configs.

Review tip: the format commit (8a432e8) is whitespace only; view the others individually.

Test plan

  • pixi run lint clean
  • pixi run test: 324 passed, including replay tests against recorded histories
  • CI workflow green on this PR (first Actions run in this repo)

🤖 Generated with Claude Code

krokicki and others added 7 commits October 13, 2026 09:22
… mia_data

Rename one-letter and cryptic variables (self.s -> self.state, p -> pr,
cw/vw -> crop_workspace/verify_workspace, _c -> safe_text, ...), add type
hints for Config/GitHub/Mirror/jobs/client parameters via TYPE_CHECKING
imports, and replace spec-reference comments with short descriptions of
what each module, class and non-obvious method does.

JobArgs fields ws/n/crop_ws become workspace/n_crops/crop_workspace
(activity inputs, not replayed). VerifyResult.n keeps its name because it
is an activity result present in recorded Temporal histories.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
ruff joins the test feature with E/F/W/I/UP/B rules at line length 120.
Fixes: sorted imports, typing imports from collections.abc, datetime.UTC,
PEP 695 type parameters for the permanent_errors decorators, explicit
zip strictness, and in tests a mutable default argument, a loop-variable
closure, blind exception asserts and `l` variable names.

requires-python moves to 3.12, which the pixi environment already pins and
the code already relies on (nested f-string quotes).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
`pixi run fmt` formats and autofixes, `pixi run lint` fails on drift.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Re-applies PR #40 on the renamed, formatted code: issue_lead in the PR
body, free-form catalog label keys, and the snippet issue wording.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@krokicki
krokicki merged commit 3d05aa2 into main Oct 13, 2026
1 check passed
@krokicki
krokicki deleted the code-quality branch October 13, 2026 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant