Skip to content

fix(ci) + test(observability): bundle CI/QG fixes with PR #774 drain - #846

Merged
lusoris merged 2 commits into
masterfrom
chore/bundle-ci-fixes-and-774
Jun 8, 2026
Merged

lusoris merged 2 commits into
masterfrom
chore/bundle-ci-fixes-and-774

Conversation

@lusoris

@lusoris lusoris commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Bundles 2 CI fixes (from #845 tip reds) with PR #774's Go observability coverage tests. Avoids 2 CI cycles.

CI Fixes

PR #774 — Go observability coverage 89.1% → 91.3%

branch-coverage fill-ins for pkg/observability: SIGTERM signal-delivery path, OTEL sampler ratio assignment, SetControllerSources half-nil cases, Prometheus registry isolation, and OTel attribute key schema lock (ADR-0782).

Test plan

  • Python smoke: _ugc_tight_interval_width([]) → 3.0, _ugc_tight_interval_width([single_row]) → 3.0, multi-row → in [1.5, 3.5] — all PASS
  • pre-commit hooks: all passed (SKIP=semgrep-local per task authorization)
  • No conflict markers: git grep '^<<<<<<' and git grep '^>>>>>>' both clean

Deep-dive deliverables (ADR-0108)

  • Research digest: no digest needed: drain bundle
  • Decision matrix: no alternatives: only-one-way fix
  • AGENTS.md invariant note: no rebase-sensitive invariants
  • Reproducer / smoke-test command: python -c "import statistics; statistics.quantiles([1.0], n=4)" → StatisticsError (confirms the bug); after fix, _ugc_tight_interval_width([row]) → 3.0
  • changelog.d fragment: no changelog fragment needed: CI fix + test coverage (observability fragment already included from test(observability): branch-coverage fill-ins for pkg/observability (89.1% → 91.3%) #774 cherry-pick)
  • docs/rebase-notes.md: no rebase impact: internal guard extension + test-only coverage add

state.md touch

  • state.md: no state delta: CI fix + test coverage round

lusoris and others added 2 commits June 8, 2026 03:43
statistics.quantiles() requires at least 2 data points and raises
StatisticsError when called with a 1-element list. The existing guard
(`if not rows`) only covered the empty-list case; a single-element
corpus passed through and crashed. Extend the guard to `if len(rows) < 2`
so both zero-row and one-row inputs return the 3.0 fallback.

Exposed by test_single_row_falls_back in
ai/tests/test_calibrate_phase_f_recipes_unit.py (shipped in #845).
The production bug predated #845 (present at f21d9bc).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Raise statement coverage from 89.1 % to 91.3 % by targeting the
specific uncovered branches identified via `go test -coverprofile`:

- WaitForShutdown SIGTERM signal-delivery path (was only context-cancel
  path tested).
- InitOTel with OTEL_TRACES_SAMPLER_ARG in [0.0, 1.0]: covers the
  `sampleRatio = parsed` assignment branch (0.0, 0.5, 1.0 boundary
  cases).
- SetControllerSources half-nil cases: q=non-nil+r=nil registers only
  queue gauges; q=nil+r=non-nil registers only the node gauge.
- Prometheus registry isolation: two independent Metrics instances on
  separate registries do not bleed counter increments into each other
  (ADR-1014 isolation property).
- OTel attribute key strings locked to ADR-0782 schema values to catch
  any accidental rename before it reaches OTLP consumers.

ADR-0108 deliverables:
- no digest needed: trivial (pure test coverage fill-in)
- no alternatives: only-one-way fix (add the missing test branches)
- AGENTS.md: invariant notes added for SIGTERM test, half-nil cases,
  and attr-key schema lock
- changelog.d/added/observability-coverage-gaps.md
- docs/rebase-notes.md: no rebase impact (test + doc only)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@lusoris
lusoris merged commit 7952a03 into master Jun 8, 2026
56 of 60 checks passed
@lusoris
lusoris deleted the chore/bundle-ci-fixes-and-774 branch June 8, 2026 01:44
lusoris added a commit that referenced this pull request Jun 8, 2026
…ts + ffmpeg patch style (#847)

* chore(changelog): backfill 30 missing fragments for PRs #806–#846

Adds one-line changelog.d fragments for 30 merged PRs in the #806–#846
range that shipped without a fragment. PRs #805, #807, and #825 were
already covered by existing ADR-numbered fragments (1090, 1093, 1099);
PRs #836, #839, and #840 were covered by topic-named fragments
(go-rust-ci-red-bundle, cuda-done-path-double-unref-ort-coverage,
0840-pic-pool-odr-cuda-gpumask-cov-floor).

All 30 new files verified by scripts/release/concat-changelog-fragments.sh
with no new warnings (pre-existing chore/perf/refactor/ section warnings
are unrelated to this change).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore(coverage): ratchet ort_backend.c floor back to 83% (PR #844 error-injection completed)

PR #840 lowered the ort_backend.c per-file coverage floor from 83 to 79
because the ADR-0922 target was above the structural ceiling: ORT error
paths are unreachable without error injection.  PR #844 added 8 ORT
error-injection tests, bringing measured coverage to 84%.  The floor is
now safely ratcheted back to 83 (1 pp slack against 84% measured).

Also updates the T-COVERAGE-ORT-FLOOR-OVERSHOOT-2026-06-08 row in
docs/state.md to reflect the completed two-step fix (PR #840 temporary
reset + PR #844 error-injection + this ratchet).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore(ci): raise pytest timeouts for coverage-gpu/mcp-smoke/dnn (avoid silent hangs)

coverage-gpu: add --timeout=300 --timeout-method=signal to CUDA and SYCL pytest
calls (previously bare; GPU kernel init can stall silently within 12-min budget).
mcp-smoke: add --timeout=60 --timeout-method=signal to socket-opening tests
(previously bare; 12-min job budget gives no per-test guard).
dnn: add --timeout=60 --timeout-method=signal (non-critical hygiene).
Also install pytest-timeout in the dnn, mcp-smoke, and coverage-gpu venvs.
coverage job --timeout=180 already correct (PR #840 precedent, unchanged).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore(ffmpeg-patches): align 0010 include path to <libvmaf/libvmaf_cuda.h> (matches SYCL/HIP/Metal pattern)

Patch 0010 used bare `libvmaf_cuda.h` in both the configure pkg_config
probe lines and the C #include guard in vf_libvmaf.c.  Every other
backend patch (0003 SYCL, 0011 HIP, 0012/0013 Metal) uses the
subdirectory-prefixed form `libvmaf/<name>.h`, which is the installed
path under the include prefix that pkg-config and compilers actually
see.  The bare form works today only because the CUDA header happens
to be installed both ways on the current dev machine; it would silently
break on a stricter sysroot (e.g. the container build, a cross-compile
host) where only `libvmaf/libvmaf_cuda.h` is present.

Three occurrences updated (no functional change, style-consistency fix):
  configure: -enabled libvmaf   ... libvmaf_cuda.h  →  libvmaf/libvmaf_cuda.h
  configure: +enabled libvmaf_cuda ... libvmaf_cuda.h  →  libvmaf/libvmaf_cuda.h
  configure: +enabled libvmaf   ... libvmaf_cuda.h  →  libvmaf/libvmaf_cuda.h
  vf_libvmaf.c: #include <libvmaf_cuda.h>  →  #include <libvmaf/libvmaf_cuda.h>

Series-replay verification (git am --3way against pristine n8.1) is
deferred; patch 0010 is not standalone-applicable — it builds on 0001-0009.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Lusoris <lusoris@pm.me>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@lusoris lusoris added this to the 1.0.0 — First release milestone Sep 4, 2026
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