# ADR: rename the Python platform package

- Status: accepted for V1
- Date: 2026-08-03

## Context and decision

The repository package `platform` collided with Python's standard-library
module of the same name. Flask could load the standard module first, after
which `platform.runtime` failed because the loaded module was not a package.
The outcome depended on import order and working directory.

The local package is renamed to `bridge_platform`, all internal imports use the
new namespace, and no compatibility shim named `platform` is retained. Apache
continues to load the unchanged root `wsgi.py` with the repository root on its
configured Python path.

## Alternatives

Additional `sys.path` manipulation and clearing `sys.modules` were rejected as
order-dependent. A permanent compatibility package was rejected because it
would preserve the collision. Generic names such as `core`, `app` and `system`
were rejected as ambiguous.

## Impact and rollback

Scripts, apps, tests, documentation and migration tooling must import
`bridge_platform`. A static regression test prevents the old namespace from
returning. Logical rollback is deployment of the previous complete release;
mixing old code with the renamed tree is unsupported. The change does not
rename database objects, persistent storage or WordPress identifiers.

