Skip to content

fix: implement missing cmd_tasks; add import-integrity guards and release alerting#262

Merged
abrichr merged 1 commit into
mainfrom
test/import-integrity
Jun 13, 2026
Merged

fix: implement missing cmd_tasks; add import-integrity guards and release alerting#262
abrichr merged 1 commit into
mainfrom
test/import-integrity

Conversation

@abrichr

@abrichr abrichr commented Jun 12, 2026

Copy link
Copy Markdown
Member

Summary

Ecosystem rollout of the #999-class guards (companions: OpenAdaptAI/openadapt-ml#64 which caught 8 latent bugs, OpenAdaptAI/OpenAdapt#1002 which caught 3).

  • tests/test_import_integrity.py: dependency-free AST checks that every internal from x import y (including inside function bodies) resolves, and that kwargs passed to internal functions exist in their signatures. Runs in ~1.6s.
  • Live bug found and fixed: oa evals tasks — a registered, documented subcommand — imported cmd_tasks from benchmarks/cli.py, which never existed. The command has always crashed with ImportError. Implemented it using WAAMockAdapter.list_tasks() (works locally, supports --domain, no VM needed). Verified: lists 20 mock tasks end to end.
  • release.yml: files (or appends to) a GitHub issue on release-workflow failure.

Only one phantom in 175K LOC — this repo is in much better shape than its siblings, consistent with being the actively-maintained one.

Verification

  • Integrity tests pass after the fix (and fail before it)
  • python -m openadapt_evals.cli.main evals tasks runs end to end
  • Full quick suite: 1,613 passed; the 2 failures in test_trl_robustness.py are pre-existing on main (reproduced with changes stashed) and unrelated
  • ruff clean; workflow YAML validated

🤖 Generated with Claude Code

…ease alerting

Ecosystem rollout of the #999 guards (see openadapt-ml#64,
OpenAdapt#1002):

- tests/test_import_integrity.py: AST-based phantom-import and
  phantom-kwarg detection across the whole package, including imports
  inside function bodies
- The new guard immediately found one live bug: `oa evals tasks` (a
  registered, documented subcommand) imported cmd_tasks from
  benchmarks/cli.py, which never existed - the command has always
  crashed with ImportError. Implemented cmd_tasks using the mock
  adapter (lists 154-task WAA catalog locally, supports --domain,
  no VM required)
- release.yml: file/append a GitHub issue when the release workflow
  fails, so PyPI cannot silently go stale (openadapt-ml's releases
  failed silently Mar-Jun 2026)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@abrichr abrichr force-pushed the test/import-integrity branch from daebca1 to 2a24d17 Compare June 13, 2026 00:08
@abrichr abrichr merged commit 7c05b76 into main Jun 13, 2026
1 check passed
@abrichr abrichr deleted the test/import-integrity branch June 13, 2026 00:17
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