Skip to content

test(compose): eliminate runpy module-execution warning - #252

Draft
seonghobae wants to merge 2 commits into
fix/schema-evidence-close-warning-b84f0c9from
fix/compose-bootstrap-runpy-warning-b84f0c9
Draft

test(compose): eliminate runpy module-execution warning#252
seonghobae wants to merge 2 commits into
fix/schema-evidence-close-warning-b84f0c9from
fix/compose-bootstrap-runpy-warning-b84f0c9

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • isolate the python -m pg_llm_batch.compose_bootstrap regression from the already-imported test module
  • promote RuntimeWarning to an error around the runpy execution so the warning cannot silently return
  • change test harness behavior only; production source and canonical documentation are unchanged

Exact stack boundary

This branch was originally created explicitly from protected main@b84f0c94154043a3473939c01bb6471de5a129ae. It is now an explicit Draft child of #251 so the already-isolated warning repairs can be validated together behind dependency-root #233 without duplicating either predecessor change.

  • current base branch: fix/schema-evidence-close-warning-b84f0c9
  • exact base SHA: a2d5fea66a580f0538d07a7c1e3cae9ff18de102
  • exact head SHA: 99821587d289ffd0adfa010650514a95532717f5
  • compare from exact base to exact head: ahead 2 / behind 0
  • PR diff relative to the stack base remains only tests/test_compose_bootstrap.py

The stack merge commit is non-destructive and retains both histories. It does not alter #251, #233, protected main, production source, or canonical docs.

RED evidence

Exact-head CI run 32176653098 on the predecessor warning lane completed the non-integration suite on Python 3.14.7 but emitted one independent warning: test_module_execution_invokes_health_without_secret_in_argv triggered RuntimeWarning: 'pg_llm_batch.compose_bootstrap' found in sys.modules ... prior to execution. The test imports compose_bootstrap at module collection time and later calls runpy.run_module, so it did not model a clean python -m lookup.

Narrow GREEN candidate

Immediately before runpy.run_module, the test uses the pytest monkeypatch fixture to temporarily remove only pg_llm_batch.compose_bootstrap from sys.modules; pytest restores it after the test. The runpy call is wrapped in a RuntimeWarning-as-error boundary, making recurrence a deterministic failure rather than a warning-only signal. Production module behavior, secret handling, argv boundaries, health seams, and package exports are unchanged.

The pre-stack exact head 6e91e8cd50f287467307389055c977203ad22755 already proved the branch-local repair: Python 3.10/3.12/3.14 unit lanes and container/PostgreSQL smokes passed, and the Python 3.14.7 unit lane completed 1332 passed, 5 deselected with no compose/runpy RuntimeWarning. SAST Semgrep, Security Scan, and Release Acceptance were terminal-success. Its aggregate CI remained non-passing only because protected main still lacked #233 coverage and still emitted the separate schema-finalizer warnings now owned by #251.

That pre-stack evidence is causal context only and is not transferred as current-head gate evidence.

Fresh writer safety

Fresh targeted branch inventory still finds fix/compose-bootstrap-runpy-warning-b84f0c9 as the only branch with this warning-repair name. Fresh formal-review and inline-thread inventories are empty. The branch head, exact stack base, and contributor ancestry were refetched immediately before this metadata repair; no competing actor moved this branch.

Current exact-head validation

The genuinely new repository-local validation set for exact stacked head 99821587d289ffd0adfa010650514a95532717f5 is now terminal-success:

  • Security Scan 32199790867: success;
  • SAST Semgrep 32199790923: success;
  • Release Acceptance 32199790936: success; and
  • CI 32199791032: success.

CI independently checked out and verified exact 99821587d289ffd0adfa010650514a95532717f5. Python 3.10, 3.12, and 3.14 unit jobs all succeeded; PostgreSQL/container smokes succeeded; compile and Ruff succeeded; public-docstring coverage was exactly 100%; repository production statement/branch coverage was exactly 100.00% (3633 statements, 1006 branches, zero misses/partials); lock freshness succeeded; and uv build --no-sources produced both wheel and sdist. The Python 3.14.7 coverage run completed 1334 passed, 5 deselected with no warnings.

This exact head therefore proves that the compose/runpy warning is eliminated while preserving the predecessor #251 schema-finalizer repair and the #233 coverage root. Fresh formal-review and inline-thread inventories remain empty; absence of review is not approval.

Integration boundary

The required stack order is #233#251#252. #233 must merge first, then #251 must be retargeted/revalidated against protected main and integrated before this child can become merge-eligible. #233 itself remains blocked by current-head independent-review evidence owned by the read-only central .github control plane.

After the predecessors integrate, retarget this PR to the then-current protected main (or exact live predecessor while the stack is still active), prove the reconciled diff remains only the compose warning repair, and reacquire every exact-final-head quality/security/package/provenance/release/review gate. No pre-stack, predecessor, queued, infrastructure-failed, status-only, or author-only evidence transfers.

Refs #233, #250, #251.

@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: cffe1e87-0b5d-4d3e-b47a-b4c3e5b75593

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: medium Normal-priority or P2 work status: draft Draft pull request type: test Test coverage, fixtures, fuzzing, or validation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant