Skip to content

chore: engineering hygiene — version-sync, lint/type gate, reformat, supply-chain, OSS scaffolding (regenerated on current main)#77

Closed
abrichr wants to merge 2 commits into
mainfrom
chore/engineering-hygiene-v2
Closed

chore: engineering hygiene — version-sync, lint/type gate, reformat, supply-chain, OSS scaffolding (regenerated on current main)#77
abrichr wants to merge 2 commits into
mainfrom
chore/engineering-hygiene-v2

Conversation

@abrichr

@abrichr abrichr commented Jul 13, 2026

Copy link
Copy Markdown
Member

Summary

Finalizes openadapt-flow's engineering hygiene, regenerated cleanly on current main. Supersedes #62, whose 42-file reformat was generated on old main and now conflicts with everything merged since (#72/#74/#75/#76 and the auto-releases). Please close #62 — this PR replaces it.

No runtime logic changes. Two commits, deliberately isolated:

  1. chore: — config, deps, scaffolding, CI/supply-chain.
  2. style: — pure ruff format + import-sort reformat (revertable on its own; it collapses some hand-aligned dicts/imports, which is expected).

What's in it

1. Version-sync (the real bug)openadapt_flow.__version__ was stale at 0.1.0 while pyproject/PyPI are 0.13.0. Synced to 0.13.0 and added version_variables = ["openadapt_flow/__init__.py:__version__"] to [tool.semantic_release] so releases keep them in lockstep.

2. Lint/type deps + config — added ruff, mypy, pytest-cov to the [dev] extra; added [tool.ruff] (lint+format), [tool.mypy] (core package, ignore_missing_imports, numpy follow-skip), and [tool.coverage]. The mypy ignore_errors debt list (23 modules) was regenerated against current main, not copied from #62 — mypy is Success on the other ~70 modules. Added py.typed + wheel force-include.

3. Reformat (FRESH)ruff format openadapt_flow tests run on current main, isolated in the style: commit.

4. CI — ADDED lint to the existing ci.yml, did not replace it. The fast required test gate from #76 (e2e-excluded, PR-only trigger, concurrency-cancel, post-merge matrix/wheel/windows) is left exactly as-is. The new lint job (ruff check + ruff format --check + mypy) is a separate, non-dependency job, so the required status context stays exactly test — branch protection is untouched. Add lint as its own required context if you want it to block merges.

5. Supply chain — SHA-pinned all actions in release.yml (ci.yml was already pinned by #76); added .github/dependabot.yml (actions + pip). Flagged the org-wide ADMIN_TOKEN → repo-scoped token/App follow-up (settings change).

6. OSS scaffolding — CONTRIBUTING, SECURITY (PHI-aware private reporting), CODE_OF_CONDUCT, .github/ISSUE_TEMPLATE/, PULL_REQUEST_TEMPLATE, CODEOWNERS. None existed on main.

Verification (local, Python 3.12, committed tree)

  • ruff check openadapt_flowAll checks passed
  • ruff format --check openadapt_flow tests176 files already formatted
  • mypySuccess: no issues found in 94 source files
  • pytest -q --ignore=tests/e2e1091 passed, 16 skipped

🤖 Generated with Claude Code

https://claude.ai/code/session_01CKrVJJy5jWVCkXAqgUqtqZ

abrichr and others added 2 commits July 13, 2026 15:08
…in, OSS scaffolding

Raises the engineering system to match the code/test quality. No runtime logic
changes. Regenerated cleanly on current main (supersedes the now-stale #62).

Version drift (real bug):
- openadapt_flow.__version__ was 0.1.0 while pyproject/PyPI are 0.13.0. Synced
  to 0.13.0 and added version_variables to [tool.semantic_release] so releases
  keep __init__.py in lockstep with pyproject going forward.

Quality gates (added and green, not aspirational):
- ruff lint+format config ([tool.ruff]); mypy config ([tool.mypy]) scoped to the
  core package, lenient to start, with a documented ignore_errors list of the
  23 modules carrying known type debt (regenerated against current main;
  tighten incrementally). mypy is Success on the other ~70 modules.
- Added py.typed (PEP 561) + wheel force-include so downstream type-checkers
  honor our annotations.
- Added ruff/mypy/pytest-cov to the dev extra; [tool.coverage] for visibility.

CI (.github/workflows/ci.yml):
- ADDED a `lint` job (ruff check + ruff format --check + mypy) on PRs. The fast
  required `test` gate from #76 is left exactly as-is — `lint` is a separate,
  non-dependency job so the required status context stays exactly `test`.

Supply chain:
- SHA-pinned all GitHub Actions in release.yml (ci.yml was already pinned by
  #76) with the version in a trailing comment; added Dependabot for actions +
  pip. Flagged in release.yml that the org-wide ADMIN_TOKEN should become a
  repo-scoped fine-grained token/App (settings change).

Docs / OSS scaffolding:
- Added CONTRIBUTING, SECURITY (PHI-aware private reporting), CODE_OF_CONDUCT,
  issue/PR templates, and CODEOWNERS.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CKrVJJy5jWVCkXAqgUqtqZ
Mechanical only — `ruff format openadapt_flow tests` plus `ruff check --fix`
(import sorting I001 + one unused-import F401). No behavior changes. Isolated in
its own commit so it is reviewable and revertable independently of the chore
config commit; note it collapses some hand-aligned dicts/imports, which is
expected. This makes the new `lint` CI job green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CKrVJJy5jWVCkXAqgUqtqZ
@abrichr

abrichr commented Jul 13, 2026

Copy link
Copy Markdown
Member Author

Superseded by #86, which regenerates this engineering-hygiene pass on the current (settled) main (0.19.0). The reformat here was generated on an old main and no longer applies; all the platform work it predated has since merged. #86 re-derives the mypy debt list against current main, adds the CI lint job without touching the required test context, and is fully green (ruff/mypy clean, 1173 passed). Closing in favor of #86.

@abrichr abrichr closed this Jul 13, 2026
abrichr added a commit that referenced this pull request Jul 13, 2026
…supply-chain (final, on settled main) (#86)

* chore: engineering hygiene — version-sync, lint/type gate, supply-chain

Regenerated on current (settled) main; supersedes the stale #77 whose
reformat was generated on an old main and no longer applies.

- Version-sync (the real bug): openadapt_flow.__version__ was 0.1.0 while the
  released pyproject version is 0.19.0. Sync __version__ and add
  version_variables to [tool.semantic_release] so releases keep them in
  lockstep (the wheel job already asserts they match).
- Lint/type gate: add ruff, mypy, pytest-cov to [dev]; add [tool.ruff]
  (lint+format), [tool.mypy] (core package, ignore_missing_imports, a
  documented ignore_errors debt list re-derived against current main), and
  [tool.coverage]. Ship py.typed + wheel force-include (PEP 561).
- CI: add a `lint` job (ruff check + ruff format --check + mypy) as its own
  job; the required `test` gate and the #76 structure are untouched.
- Supply chain: SHA-pin the release.yml actions; add .github/dependabot.yml.
- Scaffolding (absent on main): CONTRIBUTING, SECURITY, CODE_OF_CONDUCT,
  CODEOWNERS, issue + PR templates.
- Import hygiene: ruff --fix import sorting + 3 dead-import removals so the
  lint gate is green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CKrVJJy5jWVCkXAqgUqtqZ

* style: reformat openadapt_flow and tests with ruff format

Mechanical `ruff format openadapt_flow tests` reflow only — no behavior
change. Isolated in its own commit so it is trivially revertable and keeps
the chore commit's config/infra diff legible. Regenerated fresh on current
main (the stale #77 reformat was generated on an old main).

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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