Skip to content

[codex] Fix server package import regression#11

Draft
kristoffersodersten wants to merge 2 commits into
mainfrom
codex/test-gap-detection-package-imports
Draft

[codex] Fix server package import regression#11
kristoffersodersten wants to merge 2 commits into
mainfrom
codex/test-gap-detection-package-imports

Conversation

@kristoffersodersten
Copy link
Copy Markdown
Owner

What changed

  • fixed server.ollama_client to resolve runtime profile helpers through the server package path
  • added a regression test that imports server modules as a package and verifies balanced-profile defaults still apply

Why

Recent import/package work added server package markers, but OllamaClient still performed a top-level runtime_profiles import inside its default config path. That failure was swallowed, so package imports silently fell back to generic defaults instead of the selected runtime profile.

Impact

  • package-based Python imports now preserve runtime-profile model selection
  • future import regressions in this path are covered by a focused server test

Validation

  • python3 -m unittest discover -s tests/server -p 'test_package_imports.py'
  • pnpm lint
  • pnpm test

kristoffersodersten and others added 2 commits March 31, 2026 19:37
- Added __init__.py files to all server subdirectories (intent, model, operations, runtime, task) to enable proper Python package imports
- Fixed import statements in server modules (ollama_client, nano_server, runtime_profiles) to use absolute imports
- Updated eslint.config.js to support .mjs files with Node.js globals for scripts
- All TypeScript builds successfully, ESLint passes (0 errors), and all tests pass (28/28)
- Python modules now import correctly without ModuleNotFoundError

Co-Authored-By: Claude Opus 4.6 <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