Skip to content

packaging: remove repository-only namespaces from the wheel - #171

Merged
rickisba merged 1 commit into
mainfrom
codex/implement-packaging-changes-for-issue-#170
Jul 31, 2026
Merged

rickisba merged 1 commit into
mainfrom
codex/implement-packaging-changes-for-issue-#170

Conversation

@rickisba

Copy link
Copy Markdown
Collaborator

Motivation

  • Implement Phase 1A packaging boundary to remove repository-only namespaces from the installed wheel while preserving the existing transitional runtime package layout and source-checkout workflows.
  • Ensure the wheel no longer supplies documentation, dev, script, log, or test namespaces as installed packages to conform with the package-architecture RFC.
  • Keep data and all current runtime packages unchanged and explicitly installed pending focused migrations and a separate package-data audit.

Description

  • Removed the repository-only configured packages from pyproject.toml; the exact configured package names removed are doc, doc.blog, doc.integrations, env, env.config, env.docker, env.docker.cu130, env.docker.cu130.scripts, log, log.scheduler, scripts, test, and test.kdn and the explicit packages list was updated to preserve only transitional runtime packages.
  • Updated governance and wheel tests in test/test_repository_governance.py and test/test_wheel_install.py to (a) exclude repository-only prefixes via the named constant REPOSITORY_ONLY_PACKAGE_PREFIXES, (b) assert repository-only names and descendants are not present in the setuptools packages configuration, and (c) assert forbidden top-level namespaces are absent from built wheels (with CPython test stdlib collision handled explicitly).
  • Documented the interim Phase 1A wheel boundary in doc/architecture/package-architecture-rfc.md and doc/package_migration_phase_a.md and clarified that data remains installed pending a separate consumer/package-data audit.
  • Files changed: pyproject.toml, test/test_repository_governance.py, test/test_wheel_install.py, doc/architecture/package-architecture-rfc.md, and doc/package_migration_phase_a.md.
  • The interim exact top-level wheel package set is UI, cacheroute, cacheroute_compat, client, core, data, instance, kdn_server, model, proxy, scheduler, store, and util, and the forbidden top-level namespaces are doc, env, log, scripts, and test.
  • No runtime behavior, service code, CLI semantics, UI assets, wire protocols, routing/cache behavior, or data files were changed.

Testing

  • Installed the project editable with python3 -m pip install -e . --no-build-isolation --no-deps and ran byte-compilation with python3 -m compileall on the listed packages successfully.
  • Pytest summary of executed checks: test/test_repository_governance.py passed (7 tests), test/test_namespace_layout.py ran with 4 passed and 1 environment-limited failure (collection/import blocked due to missing declared dependency aiohttp), test/test_wheel_install.py (non-network) produced 3 passed and 1 deselected, and test/kdn passed (256 tests); several test collections were blocked because the validation host could not fetch declared runtime dependencies (aiohttp, fastapi) from the package index.
  • Built a wheel with python3 -m pip wheel . --no-deps --no-build-isolation -w dist producing cacheroute-0.1.9-py3-none-any.whl (512,026 bytes), and an independent wheel-member audit confirmed the exact allowed top-level packages, absence of repository-only namespaces, presence of required runtime package-data (UI assets, instance dashboard assets, model config, proxy metrics), and exclusion of generated TTFT logs.
  • Installed the built wheel into an isolated venv and verified dependency-light imports resolved from the installed wheel with module paths inside the venv (examples: cacheroute, cacheroute.compat, cacheroute.observability, cacheroute_compat).
  • Network-dependent wheel tests (CACHEROUTE_RUN_NETWORK_TESTS=1) and python3 -m build --no-isolation were NOT RUN / blocked due to package-index access and the missing build module in the validation environment; these must be executed in CI or an environment with network access before merge.

Closes #170
Refs #159
Refs #157


Codex Task

@rickisba
rickisba merged commit d838547 into main Jul 31, 2026
@rickisba
rickisba deleted the codex/implement-packaging-changes-for-issue-#170 branch July 31, 2026 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Phase 1A: remove repository-only namespaces from the CacheRoute wheel

1 participant