Skip to content

fix(OMN-17427): skip apt when PG16 tools present in CI - #3551

Merged
jonahgabriel merged 2 commits into
devfrom
jonah/omn-17427-pg16-provision-no-apt-stall
Oct 8, 2026
Merged

jonahgabriel merged 2 commits into
devfrom
jonah/omn-17427-pg16-provision-no-apt-stall

Conversation

@jonahgabriel

Copy link
Copy Markdown
Contributor

Ticket: OMN-17427

Summary

The Coverage Sweep Gate and CI Summary are red on omnimarket#3435, #3472 and #3512. The failure is not due to missing coverage or a moved baseline; the shards never ran pytest. The root cause is that the "Provision PostgreSQL 16 server tools for native migration proofs" step in the CI and nightly workflows runs an unbounded sudo apt-get update even though the runner image already ships PostgreSQL 16; when a mirror fetch stalls, the shard sits there until the 90-minute job timeout cancels it. This results in an ARTIFACT_MISSING failure for the coverage data file.

Cause

On the green dev shard (push run 37729507227 at dev 149d334, Tests Split 3/20), the same provision step took 5 seconds and logged "postgresql-16 is already the newest version (16.15-1.pgdg24.04+2)". This confirms the ubuntu-latest runner image already ships PG16. However, the previous workflow logic did not check for preinstalled binaries and unconditionally executed the apt round trip. On PR runs, this apt step stalled:

Change

In .github/workflows/ci.yml (jobs test and integration-guard) and .github/workflows/nightly-full-suite.yml (job shard), the provision step now checks for preinstalled PG16 initdb, pg_ctl and psql at version 16. It runs apt only when they are absent. When apt does run, it writes /etc/apt/apt.conf.d/80-ci-network-timeouts with Acquire::Retries 3 and 30-second http/https timeouts. The step has timeout-minutes: 10. The fail-closed checks after the step (three binaries executable, initdb reports 16, PATH export) are unchanged.

tests/ci/test_omn18693_native_postgres_ci_wiring.py now asserts the step timeout and the conditional apt for all three steps. contracts/OMN-17427.yaml gains AC18 and dod_evidence item dod-omn17427-ac18-pg16-provision-bounded bound to that test.

Evidence

On lab host h202:

  • The new test file tests/ci/test_omn18693_native_postgres_ci_wiring.py gives 3 failed against dev f61f904's workflows and passes on this branch.
  • tests/ci/test_omn18693_native_postgres_ci_wiring.py plus tests/ci/test_coverage_census_cutover_wiring.py: 12 passed.
  • bash -n passes on all three step scripts.
  • The preinstalled branch run against stub PG16 binaries exits 0 and prints "Using preinstalled PostgreSQL 16 server tools" without calling apt.
  • The dev run's Coverage Sweep Gate passed: "validation OK — 20 shard(s), scope=full".

Not the cause

On #3542, #3548 and #3550, the Coverage Sweep Gate refuses because Repo Evidence Dependency failed, so Detect Changes and every test shard were skipped. That is a per-PR evidence gap from repo-evidence / dod-verify, not this step.

The unbounded sudo apt-get update stalled on omnimarket#3435 (split 12)
and #3512 (split 16), causing the shard to hit the 90-minute job
timeout and be cancelled. Because the job was cancelled, pytest never
ran, no .coverage.N file was uploaded, and the Coverage Sweep Gate
failed closed with ARTIFACT_MISSING, which also reds CI Summary.

This change skips apt when the runner image already has PG16 initdb,
pg_ctl and psql at version 16 in .github/workflows/ci.yml and
.github/workflows/nightly-full-suite.yml. When apt does run, it uses
Acquire::Retries 3 and 30-second http/https timeouts, and the step has
timeout-minutes: 10. The fail-closed checks are unchanged. No coverage
threshold or baseline changed.
tests/ci/test_omn18693_native_postgres_ci_wiring.py now pins the step
timeout and the conditional apt in all three steps.
Adds requirement req-pg16-provision-bounded with acceptance AC18, one
tests evidence_requirement, and dod_evidence item
dod-omn17427-ac18-pg16-provision-bounded bound to AC18 in
contracts/OMN-17427.yaml.
The bound check runs uv run pytest
tests/ci/test_omn18693_native_postgres_ci_wiring.py -q, which fails at
the merge base (3 failed) and passes on this branch.
Purpose: repo-evidence dod-verify needs this pull request to bind
evidence of its own.
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

✅ Architectural Review — PASSED

Errors: 0
Warnings: 0

What this checks

Rule Description
ARCH-TOPIC-001 No hardcoded Kafka topic strings in handler code
ARCH-DI-001 No event_bus=None bypass
ARCH-DI-002 No direct Handler instantiation outside workflow_runner/adapters
ARCH-DI-003 No reinvented DI containers
ARCH-TOPIC-002 contract.yaml topics follow `onex.{cmd

No architectural violations found.

Static architectural lint — no model inference (OMN-14176).

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

✅ Hostile Reviewer — PASSED

Blocking findings (critical/error): 0
Total findings: 13
Models succeeded: qwen3-review,gpt-oss-review


Gate semantics

Verdict Meaning Blocks merge?
passed >=2 models succeeded, no critical/error findings No
blocked CRITICAL or ERROR findings found Yes
degraded Fewer than 2 models succeeded (infra unavailable/timeout) Yes (OMN-15110)

Powered by omniintelligence.review_pairing.cli_review — node-based adversarial review via HandlerLlmCliSubprocess (OMN-8524)

@jonahgabriel

Copy link
Copy Markdown
Contributor Author

Lab: host=h202 | lane=cause-market-coverage-0545 | head=c6afcb4a6872e5131e92f5f715e65a7856248744 | cmd=uv run pytest tests/ci/test_omn18693_native_postgres_ci_wiring.py tests/ci/test_coverage_census_cutover_wiring.py -q | 12 passed; the PG16 wiring test gives 3 failed against dev f61f904's workflows; bash -n clean on all three provision steps; the preinstalled-PG16 branch exits 0 against stub binaries without calling apt

@jonahgabriel
jonahgabriel enabled auto-merge (squash) October 8, 2026 06:03
@jonahgabriel
jonahgabriel merged commit 87d2a2d into dev Oct 8, 2026
124 checks passed
@jonahgabriel
jonahgabriel deleted the jonah/omn-17427-pg16-provision-no-apt-stall branch October 8, 2026 06:11
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