Skip to content

Fix hypothesis routing and shell churn labels#114

Merged
douglasmonsky merged 1 commit into
mainfrom
fix/hypothesis-shell-churn-routing
Jul 8, 2026
Merged

Fix hypothesis routing and shell churn labels#114
douglasmonsky merged 1 commit into
mainfrom
fix/hypothesis-shell-churn-routing

Conversation

@douglasmonsky

Copy link
Copy Markdown
Owner

Summary

  • route exploratory low-output/context-pressure/repeated-read hypotheses to the correct usage families instead of falling back to broad effort or allowance signals
  • reuse the shared command normalizer for content-index command roots so shell wrappers, $PWCLI, poetry run, uv run, npx, and python -m index consistently
  • make shell-churn output less cloudy with quality, custom_command, and unclassified_shell families instead of overusing unknown
  • add regressions for the exact misrouted hypotheses and shell-churn label cases from the local experiment

Validation

  • PYTHONPATH=src .venv/bin/python -m pytest tests/reports/test_hypothesis_routing.py tests/store/test_content_index.py::test_command_root_and_label_uses_shared_safe_normalizer tests/store/test_content_index.py::test_shell_churn_display_labels_repair_legacy_unknown_command_rows tests/store/test_content_index.py::test_shell_churn_detects_repeated_command_families -q --tb=short
  • .venv/bin/python -m ruff check .
  • .venv/bin/python -m mypy
  • PYTHONPATH=src .venv/bin/python -m pytest tests/reports/test_hypothesis_routing.py tests/store/test_content_index.py tests/cli/test_mcp_integration.py -q --tb=short
  • PYTHONPATH=src .venv/bin/python -m pytest -q --tb=short
  • PYTHONPATH=src .venv/bin/python -m pytest --cov=codex_usage_tracker --cov-report=term-missing -q
  • .venv/bin/python -m compileall src
  • for file in src/codex_usage_tracker/plugin_data/dashboard/dashboard*.js; do node --check "$file"; done
  • .venv/bin/python scripts/check_release.py && git diff --check
  • rm -rf dist build src/codex_usage_tracker.egg-info src/codex_usage_tracking.egg-info && .venv/bin/python -m build && .venv/bin/python -m twine check dist/* && .venv/bin/python scripts/check_release.py --dist && git diff --check
  • real-data probe: families now route to token_waste, repeated_file_rediscovery, allowance_change; shell top families show unclassified_shell, quality, package, test, file_discovery instead of generic unknown_command

@douglasmonsky douglasmonsky merged commit 9ecc225 into main Jul 8, 2026
12 checks passed
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