Skip to content

[codex] Fix CLI imports for non-editable installs#148

Merged
justinjoy merged 1 commit into
mainfrom
codex/fix-cli-pip-install
Jun 26, 2026
Merged

[codex] Fix CLI imports for non-editable installs#148
justinjoy merged 1 commit into
mainfrom
codex/fix-cli-pip-install

Conversation

@justinjoy

Copy link
Copy Markdown
Contributor

Summary

Fixes the normal pip install CLI failure where factlog.cli imported modules from the repository-level tools/ directory that is not included in installed package output.

Changes

  • Move CLI runtime modules into the installable factlog/ package: config, common, literal_types, and compile_facts.
  • Update factlog.cli to import package modules and recompile accepted facts via python -m factlog.compile_facts.
  • Keep existing tools/*.py direct import/execution paths working through compatibility wrappers.
  • Add a non-editable pip install regression test that runs both python -m factlog doctor and the factlog doctor console script outside the source tree.

Root Cause

Editable installs kept the source-tree tools/ directory importable, masking that regular installs only package factlog/. As a result, installed CLI startup failed before reaching command logic with ModuleNotFoundError: No module named 'factlog_config'.\n\n## Validation\n\n- bash tests/test_pip_install_cli.sh\n- bash tests/test_active_kb_config.sh\n- bash tests/test_amend.sh\n- bash tests/test_review.sh\n- bash tests/test_eject_cmd.sh\n- FACTLOG_ROOT=examples/sample-kb bash tests/golden.sh\n- python3 -m compileall -q factlog tools\n\nCloses #143

@justinjoy justinjoy force-pushed the codex/fix-cli-pip-install branch from 1c5ecb1 to 09c9434 Compare June 26, 2026 10:54
@justinjoy justinjoy marked this pull request as ready for review June 26, 2026 10:56
@justinjoy justinjoy merged commit 5e4f583 into main Jun 26, 2026
3 checks passed
@justinjoy justinjoy deleted the codex/fix-cli-pip-install branch June 26, 2026 10:57
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.

일반 pip 설치 후 factlog CLI가 factlog_config를 찾지 못합니다

1 participant