Skip to content

Phase 3: type annotations + wizard/ui tests#18

Merged
elfensky merged 2 commits into
developfrom
desloppify/phase3-types-tests
Jul 10, 2026
Merged

Phase 3: type annotations + wizard/ui tests#18
elfensky merged 2 commits into
developfrom
desloppify/phase3-types-tests

Conversation

@elfensky

Copy link
Copy Markdown
Owner

Phase 3 of the desloppify code-health roadmap. Three commits, all low-risk, full suite green.

#12 — annotate the public surface (64b7350)

Extended plain, honest type hints from the five high-fan-in seams to the rest of the public functions in common, select, staleness, promote, classify — and the two largest engine modules (wrangle, overrides) so the type_safety dimension improves holistically. Hints are dict / list / tuple / X | None / argparse.Namespace — no typing gymnastics — which also clears the "loose type annotation" smells. No behavior change.

Banked improvement: a blind, context-isolated re-review of type_safety (scored from code evidence only, no target/score anchoring) moved the dimension 62.0 → 82.0. It also filed 3 honest follow-up defects (bare container returns hide real shape in docstrings; the engine-dispatch protocol is untyped; ui.py/wizard.py interactive layer is largely unannotated) — candidates for a later pass, not blockers.

#13 — test the pure wizard/ui helpers (4e16f50)

wizard.py and ui.py were the last untested production files. Added tests/test_wizard.py covering the pure helpers where a regression can actually ship: _task_hint (the pending-work menu markers), _engines (cloud-engine-usable-iff-key-in-env + hints), and the proposal pending/to_stamp split — extracted from snapshot() into a pure _proposal_counts() so it's testable without a live library. The rich-interactive shells (menus, prompts, live dashboard) are left untested by design. Wired into ci.yml.

Net score movement (local desloppify, strict)

82.3 → 83.9 — objective rose (Test health 55.5% → 72.4% from the new tests + the Phase-2 wrangle split), and type_safety re-review added the rest.

🤖 Generated with Claude Code

elfensky and others added 2 commits July 10, 2026 17:58
Extend the type hints from the five high-fan-in seams to the rest of the
public functions in common, select, staleness, promote, classify — plus the
two largest engine modules (wrangle, overrides) so type_safety improves
holistically, not just in the modules the issue named. Plain honest hints
(dict / list / tuple / X | None / argparse.Namespace), no typing gymnastics;
this also clears the 'loose type annotation' smells. No behavior change; full
suite green.

Refs #12.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…tion helpers

wizard.py and ui.py were the last untested production files. Test only the pure
helpers where a regression can actually ship: _task_hint (the pending-work menu
markers), _engines (cloud-engine-usable-iff-key-in-env + hints), and the
proposal pending/to_stamp split — extracted from snapshot() into a pure
_proposal_counts() so it's testable without a live library. The rich-interactive
shells (menus, prompts, live dashboard) are left untested by design.

Closes #13.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@elfensky
elfensky merged commit ab65c80 into develop Jul 10, 2026
2 checks passed
@elfensky
elfensky deleted the desloppify/phase3-types-tests branch July 10, 2026 16:11
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