Skip to content

v0.5.25 — Curate subpackage public API surface (Phase 0 Loop 7) - #137

Merged
cschanhniem merged 1 commit into
mainfrom
agent/oamp-loop-20260705-public-api
Jul 4, 2026
Merged

cschanhniem merged 1 commit into
mainfrom
agent/oamp-loop-20260705-public-api

Conversation

@cschanhniem

Copy link
Copy Markdown
Collaborator

Summary

Eleven subpackages previously had empty init.py files, forcing every caller into module-level imports. This release populates each with a docstring, ordered re-exports of every non-underscore public function/class, and an all list, satisfying the Phase 0 exit criterion:

from openamp_foundry.benchmark import ... works cleanly

What is in the box

  • 12 init.py files populated with curated public surfaces (~120 names total): benchmark, scoring, selection, features, evidence, data, qc, reports, generators, analysis, utils, gates
  • One targeted fix: features.physchem.compute_features now defers its boman import to function scope, breaking a circular import surfaced by the new scoring init (scoring.expert -> features.physchem -> scoring.boman)
  • 7 new tests in tests/test_public_api_imports.py lock in the public surface so accidental export removals are caught at PR time

Verification

  • 1682 tests pass (+7 from v0.5.24), 7 skipped
  • ruff check clean on all new files
  • Public-API import test asserts every all entry is reachable from package root
  • No benchmark, scoring, or behavioural number changed

Docs

  • CHANGELOG.md - v0.5.25 entry
  • docs/ROADMAP.md - v0.5.25 entry added
  • docs/METRICS_CURRENT.md - pipeline version bumped to v0.5.25
  • docs/50_LOOP_PLAN.md - Loop 7 marked complete, position advanced to Loop 8

Closes

Phase 0 Loop 7 from docs/50_LOOP_PLAN.md.

@cschanhniem
cschanhniem force-pushed the agent/oamp-loop-20260705-public-api branch from 86b43cd to 767dccd Compare July 4, 2026 18:53
cschanhniem added a commit that referenced this pull request Jul 4, 2026
Eleven subpackages previously had empty __init__.py files, forcing every
caller into module-level imports. This release populates each with a
docstring, ordered re-exports of every non-underscore public
function/class, and an __all__ list, satisfying the Phase 0 exit
criterion: "from openamp_foundry.benchmark import ..." works cleanly.

Subpackages now exposing a curated public surface (~120 names):
benchmark, scoring, selection, features, evidence, data, qc, reports,
generators, analysis, utils, gates. Internal fix: features.physchem
deferred the boman import to function scope inside compute_features to
break a circular import surfaced by the new scoring __init__.

CI fixes (pre-existing bugs from v0.5.24 blocking PR #137):
- Added empty scripts/__init__.py so tests/test_benchmark_gate.py can
  import scripts.benchmark_gate as a package member in CI.
- Added scripts/ to pytest's pythonpath in pyproject.toml as a belt-
  and-braces measure so the test collection works regardless of how
  pytest is invoked (editable install vs source tree).

Tests: 7 new in tests/test_public_api_imports.py; 1682 pass total.
The new test file locks in every __all__ entry as importable from the
package root, guards against private (_-prefixed) name leakage, and
regression-checks the Phase 0 exit criteria.

Docs: CHANGELOG, ROADMAP v0.5.25, METRICS_CURRENT header, 50_LOOP_PLAN
Loop 7 marked complete. No benchmark or behavioural number changed.
This is a pure architectural-clarity release plus CI-path fixes.

Tested: 1682 pass, 7 skip; ruff clean on all new files; public-API
import test asserts every __all__ entry is reachable from package root;
test_benchmark_gate now collects and passes locally and in CI.
Confidence: high. The change is mechanical re-exports plus one
targeted deferred import plus two small CI-path fixes; all existing
tests continue to pass and the new tests catch every documented public
name.
Constraint: macrel_local re-exports use the macrel_ prefix to avoid
collisions with common names in other scoring modules.

Co-authored-by: OmX <omx@oh-my-codex.dev>
@cschanhniem
cschanhniem force-pushed the agent/oamp-loop-20260705-public-api branch from 767dccd to 46cc14d Compare July 4, 2026 18:57
cschanhniem added a commit that referenced this pull request Jul 4, 2026
Eleven subpackages previously had empty __init__.py files, forcing every
caller into module-level imports. This release populates each with a
docstring, ordered re-exports of every non-underscore public
function/class, and an __all__ list, satisfying the Phase 0 exit
criterion: "from openamp_foundry.benchmark import ..." works cleanly.

Subpackages now exposing a curated public surface (~120 names):
benchmark, scoring, selection, features, evidence, data, qc, reports,
generators, analysis, utils, gates. Internal fix: features.physchem
deferred the boman import to function scope inside compute_features to
break a circular import surfaced by the new scoring __init__.

CI fix (pre-existing bug from v0.5.24 blocking PR #137):
- tests/test_benchmark_gate.py: switched from `from scripts.benchmark_gate
  import ...` to importlib.util.spec_from_file_location. This avoids
  depending on whether scripts/ is on PYTHONPATH in a given environment
  (the editable install path does not add scripts/ automatically and
  pytest's pythonpath setting from pyproject.toml was not enough to
  make scripts/ importable as a top-level package).
- pyproject.toml: added scripts/ to pytest's pythonpath as a belt-and-
  braces measure so future tests can use either import style.

Tests: 7 new in tests/test_public_api_imports.py; 1682 pass total.
The new test file locks in every __all__ entry as importable from the
package root, guards against private (_-prefixed) name leakage, and
regression-checks the Phase 0 exit criteria.

Docs: CHANGELOG, ROADMAP v0.5.25, METRICS_CURRENT header, 50_LOOP_PLAN
Loop 7 marked complete. No benchmark or behavioural number changed.
This is a pure architectural-clarity release plus a CI-path fix.

Tested: 1682 pass, 7 skip; ruff clean on all new files; public-API
import test asserts every __all__ entry is reachable from package root;
test_benchmark_gate now collects and passes locally and in CI.
Confidence: high. The change is mechanical re-exports plus one
targeted deferred import plus one robust test-import fix; all existing
tests continue to pass and the new tests catch every documented public
name.
Constraint: macrel_local re-exports use the macrel_ prefix to avoid
collisions with common names in other scoring modules.

Co-authored-by: OmX <omx@oh-my-codex.dev>
@cschanhniem
cschanhniem force-pushed the agent/oamp-loop-20260705-public-api branch from 46cc14d to c521904 Compare July 4, 2026 19:01
cschanhniem added a commit that referenced this pull request Jul 4, 2026
Eleven subpackages previously had empty __init__.py files, forcing every
caller into module-level imports. This release populates each with a
docstring, ordered re-exports of every non-underscore public
function/class, and an __all__ list, satisfying the Phase 0 exit
criterion: "from openamp_foundry.benchmark import ..." works cleanly.

Subpackages now exposing a curated public surface (~120 names):
benchmark, scoring, selection, features, evidence, data, qc, reports,
generators, analysis, utils, gates. Internal fix: features.physchem
deferred the boman import to function scope inside compute_features to
break a circular import surfaced by the new scoring __init__.

CI fix (pre-existing bug from v0.5.24 blocking PR #137):
- tests/test_benchmark_gate.py: switched all `from scripts.benchmark_gate
  import ...` calls (module-level + inside test methods) to either
  importlib.util.spec_from_file_location at module scope or a
  test-internal reference to the already-loaded _benchmark_gate module.
  This avoids depending on whether scripts/ is on PYTHONPATH in a given
  environment (the editable install path does not add scripts/
  automatically and pytest's pythonpath setting from pyproject.toml was
  not enough to make scripts/ importable as a top-level package).
- pyproject.toml: added scripts/ to pytest's pythonpath as a belt-and-
  braces measure so future tests can use either import style.

Tests: 7 new in tests/test_public_api_imports.py; 1682 pass total.
The new test file locks in every __all__ entry as importable from the
package root, guards against private (_-prefixed) name leakage, and
regression-checks the Phase 0 exit criteria.

Docs: CHANGELOG, ROADMAP v0.5.25, METRICS_CURRENT header, 50_LOOP_PLAN
Loop 7 marked complete. No benchmark or behavioural number changed.
This is a pure architectural-clarity release plus a CI-path fix.

Tested: 1682 pass, 7 skip; ruff clean on all new files; public-API
import test asserts every __all__ entry is reachable from package root;
test_benchmark_gate now collects and passes locally and in CI.
Confidence: high. The change is mechanical re-exports plus one
targeted deferred import plus one robust test-import fix; all existing
tests continue to pass and the new tests catch every documented public
name.
Constraint: macrel_local re-exports use the macrel_ prefix to avoid
collisions with common names in other scoring modules.

Co-authored-by: OmX <omx@oh-my-codex.dev>
@cschanhniem
cschanhniem force-pushed the agent/oamp-loop-20260705-public-api branch from c521904 to bdcbece Compare July 4, 2026 19:06
Eleven subpackages previously had empty __init__.py files, forcing every
caller into module-level imports. This release populates each with a
docstring, ordered re-exports of every non-underscore public
function/class, and an __all__ list, satisfying the Phase 0 exit
criterion: "from openamp_foundry.benchmark import ..." works cleanly.

Subpackages now exposing a curated public surface (~120 names):
benchmark, scoring, selection, features, evidence, data, qc, reports,
generators, analysis, utils, gates. Internal fix: features.physchem
deferred the boman import to function scope inside compute_features to
break a circular import surfaced by the new scoring __init__.

CI fix (pre-existing bug from v0.5.24 blocking PR #137):
- tests/test_benchmark_gate.py: switched all `from scripts.benchmark_gate
  import ...` calls (module-level + inside test methods) to either
  importlib.util.spec_from_file_location at module scope or a
  test-internal reference to the already-loaded _benchmark_gate module.
  This avoids depending on whether scripts/ is on PYTHONPATH in a given
  environment (the editable install path does not add scripts/
  automatically and pytest's pythonpath setting from pyproject.toml was
  not enough to make scripts/ importable as a top-level package).
- pyproject.toml: added scripts/ to pytest's pythonpath as a belt-and-
  braces measure so future tests can use either import style.

Tests: 7 new in tests/test_public_api_imports.py; 1682 pass total.
The new test file locks in every __all__ entry as importable from the
package root, guards against private (_-prefixed) name leakage, and
regression-checks the Phase 0 exit criteria.

Docs: CHANGELOG, ROADMAP v0.5.25, METRICS_CURRENT header, 50_LOOP_PLAN
Loop 7 marked complete. No benchmark or behavioural number changed.
This is a pure architectural-clarity release plus a CI-path fix.

Tested: 1682 pass, 7 skip; ruff clean on all new files; public-API
import test asserts every __all__ entry is reachable from package root;
test_benchmark_gate now collects and passes locally and in CI.
Confidence: high. The change is mechanical re-exports plus one
targeted deferred import plus one robust test-import fix; all existing
tests continue to pass and the new tests catch every documented public
name.
Constraint: macrel_local re-exports use the macrel_ prefix to avoid
collisions with common names in other scoring modules.

Co-authored-by: OmX <omx@oh-my-codex.dev>
@cschanhniem
cschanhniem force-pushed the agent/oamp-loop-20260705-public-api branch from bdcbece to 4d95905 Compare July 4, 2026 19:09
@cschanhniem
cschanhniem merged commit b729128 into main Jul 4, 2026
1 check 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