Skip to content

ci-flake: pin parakeet helm contract to the ratified floor-8 policy - #23472

Merged
Git-on-my-level merged 1 commit into
mainfrom
agent/m1-studio-zcode-glm-5-3/3873dde81590
Oct 24, 2026
Merged

Git-on-my-level merged 1 commit into
mainfrom
agent/m1-studio-zcode-glm-5-3/3873dde81590

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Oct 24, 2026 •

Copy link
Copy Markdown
Member

What

backend/tests/unit/test_parakeet_helm_contract.py still pinned the retired dark floor-3 policy and now fails every full CI selection with assert 8 == 3. This PR re-pins its expectations to the ratified prod contract. Test-only change; no chart, values, workflow or runtime file is touched.

Root cause (triage: not a flake, not a real regression — a stale contract left behind by an intentional policy change)

d63c537 ("fix(parakeet): compare floor retry refusals against weekly 12-pod baseline", 2026-10-24) deliberately activated workload-only floor-8 scaling in backend/charts/parakeet/prod_omi_parakeet_values.yaml:

  • autoscaling.workloadOnly: false → true
  • autoscaling.minReplicas: 3 → 8
  • scale-up policy 1 pod / 60s → 4 pods / 15s with selectPolicy: Max

That same commit updated every contract that encodes the policy — backend/charts/incluster-guards/files/guard.py (drift guard now allows minReplicas in (5, 8) without the latency metric), backend/tests/unit/test_incluster_guards.py, and backend/tests/unit/test_audio_fleet_helm.py (now asserts minReplicas == 8, the new scale-up behavior, and no latency metric) — but missed test_parakeet_helm_contract.py. The ratifying PR stayed green because backend-unit-tests.yml runs changed-file selection on PRs (run-unit-ci.sh --changed-files), and that selection did not include this file; main pushes run --all, which exposed it.

Occurrences of the exact signature (all after d63c537 landed, all with the same five failures — deterministic file-content assertions, no timing/ordering/shared state involved):

  • main 4b4e35fd — run 40063148564, job 120780759412 (5 failed, 12 passed in the file)
  • main c10d3ca6 — run 40061077340, job 120774506059
  • PR lane/w1-projection-publication-1024 — run 40066874798, job 120791877648
  • the dispatched example: PR feat(sync): measure eligible new-row overlap for gate 3 #23437 / run 40065443584, job 120798600993

Fix

Smallest durable change: update the five stale expectations in test_parakeet_helm_contract.py to the deployed policy, exactly mirroring how d63c537 itself updated the sibling tests:

  • test_prod_parakeet_autoscaling_and_zone_spread_contract: minReplicas == 8
  • test_demand_scaler_renders_requests_and_queue_ages_without_raw_tail_or_gpu: minReplicas == 8 (targets unchanged — demand defaults are untouched)
  • test_workload_only_hpa_omits_mixed_latency_and_preserves_capacity_controls: prod workloadOnly is True and (8, 12); still asserts the workload-only render omits the latency metric and preserves the capacity controls
  • test_rendered_prod_deployment_contains_stream_admission_settings: minReplicas == 8, metrics drop the parakeet_request_latency_p99 entry, scale-up behavior is {0s, Max, 4 pods/15s}

No test is skipped, xfailed or deleted; the contract still fully pins the live policy, so an accidental de-activation or drift fails loudly again. No .github/ changes were needed for this flake's step.

Verification (local, nice -n 19, macOS arm64, helm v4.2.3)

$ backend/.venv/bin/python -m pytest -q backend/tests/unit/test_parakeet_helm_contract.py \
    backend/tests/unit/test_audio_fleet_helm.py backend/tests/unit/test_incluster_guards.py \
    backend/tests/unit/test_monitoring_adapter_hpa_contract.py
279 passed in 4.87s

Rendered the prod HPA directly to ground each expectation before editing (helm template prod-omi-parakeet ... --show-only templates/hpa.yaml → minReplicas 8 / maxReplicas 12, scale-up {0s, Max, [4 pods/15s]}, metrics [active_requests 2, gpu 35] with no latency metric; demand-enabled render keeps the three Pods targets). scripts/select_backend_unit_tests.py on the changed file selects exactly tests/unit/test_parakeet_helm_contract.py. Formatting: black --line-length 120 --skip-string-normalization --check clean.

Failure-Class: none

View guided diff Turn on auto-fix

d63c537 ratified workload-only floor-8 scaling in the prod values
(minReplicas 8, selectPolicy Max 4 pods/15s, latency metric omitted)
and updated the rollback drift guard and test_audio_fleet_helm, but
test_parakeet_helm_contract still pinned the retired dark floor-3
policy. The ratifying PR stayed green because the changed-file selector
did not select this file; every --all run on main since (40061077340,
40063148564, 40066874798) failed its five assertions. Re-pin the
expectations to the deployed contract exactly as the sibling tests were
updated; no test is skipped, xfailed or deleted.

Failure-Class: none
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-24T06:37:37.555119Z 781681f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Git-on-my-level
Git-on-my-level merged commit 5bee115 into main Oct 24, 2026
62 checks passed
@Git-on-my-level
Git-on-my-level deleted the agent/m1-studio-zcode-glm-5-3/3873dde81590 branch October 24, 2026 06:46
Git-on-my-level added a commit that referenced this pull request Oct 24, 2026
Remove the unpublished duplicate repair before integrating the now-green main baseline.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Git-on-my-level added a commit that referenced this pull request Oct 24, 2026
Git-on-my-level added a commit that referenced this pull request Oct 24, 2026
Remove the unpublished duplicate repair before integrating the now-green main baseline.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Git-on-my-level added a commit that referenced this pull request Oct 24, 2026
Git-on-my-level added a commit that referenced this pull request Oct 24, 2026
Remove the unpublished duplicate repair before integrating the now-green main baseline.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Git-on-my-level added a commit that referenced this pull request Oct 24, 2026
Git-on-my-level added a commit that referenced this pull request Oct 24, 2026
)

* fix(episodes): every LLM transcript labels voices densely, never raw diarization ids

A live episode's "So far" bullets read "Speaker 379 mentions..." because the
legacy live-moment renderer wrote the raw per-conversation diarization counter
into the prompt ("Speaker 379: ...") and the summarizer copied the label
verbatim into user-visible notes (#23381). The finished-notes v2 path already
renders cluster keys, so it never had the problem.

Add utils/speaker_display.SpeakerLabeler and route every LLM-facing or
user-facing transcript renderer through it: the owner renders as "You" or the
owner's name (live moments now resolve the account's display name), named
people keep their names, and every unnamed voice gets a dense per-transcript
"Speaker A/B/..." label in first-appearance order, keyed by
(speaker_id_scope, speaker_id) so merged multi-source transcripts stay
distinct. Raw diarization ids no longer reach any prompt or payload:

- live moments: incremental.speaker_label/_legacy_moment (+ moment rules now
  forbid copying voice markers or placeholder headings like "New moment")
- TranscriptSegment.segments_as_string (titles, memories, summaries, chat)
- transcript_for_llm action-item speaker labels
- shared-chat bounded transcripts, smart-merge question excerpts, retrieval
  chunks and MCP match snippets, review quotes
- conversation analytics and populate_speaker_names (MCP/integration/webhook
  payloads)

Bump smart-merge QUESTION_VERSION: cached adjacent-merge answers were keyed to
the old raw-id excerpts.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(backend): guard every LLM formatter against raw speaker-id labels

Two guards so "Speaker 379" cannot come back:

- unit: run each LLM-facing formatter with the incident's raw ids (378/379,
  across scopes) and assert the digits never survive a render; covers
  segments_as_string, live and v2 moment renderers, cluster transcripts,
  smart-merge lines, shared-chat bounded transcripts, MCP snippets, retrieval
  chunks, action-item labels, populate_speaker_names and analytics.
- static: check_speaker_label_interpolation.py rejects any new interpolated
  "Speaker {speaker_id}" (f-string, .format, %, concatenation) outside the
  sanctioned SpeakerLabeler; registered in checks-manifest with a self-test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(backend): pre-load utils.speaker_display for isolated models load

models.transcript_segment imports SpeakerLabeler at module scope, and
test_action_item_date_validation stubs utils as a package with an empty
__path__, so the isolated models.conversation load failed at collection
with ModuleNotFoundError on this branch. Load the real stdlib-only
module before the models load, mirroring utils.model_text, and snapshot
it for restore.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(parakeet): align Helm contracts with floor-8 rollout

Update stale rollout expectations and exercise both workload-only and rollback metric policies without changing runtime configuration.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(backend): defer Helm contract repair to main #23472

Remove the unpublished duplicate repair before integrating the now-green main baseline.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Git-on-my-level added a commit that referenced this pull request Oct 24, 2026
Git-on-my-level added a commit that referenced this pull request Oct 24, 2026
…its Home row (#23418)

* fix(episodes): fold synced fragments under the live episode on Home

Offline-sync (WAL) conversations finalize with SYNC_UPDATE on the sync
lane, which never ran the episodes finalize hook, so they could never
become episode members; and Home folded only still-in-progress members,
so completed members stayed separate rows. The sync lane now schedules
the shared after-finalization hook, a never-attached sync conversation
joins the live episode covering its span as a parallel capture (never
closing, opening or reopening an episode; discarded rows never join),
and Home folds every live-episode member under its row until the
episode closes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(backend): stub utils.episodes package in sync router fast-path loader

utils/sync/pipeline.py now imports utils.episodes.finalize at module
scope to schedule the post-finalization episodes hook. The fast-path
loader in test_sync_cloud_tasks stubs utils as a MagicMock that is not
a package, so importing utils.episodes.finalize raised
AttributeError: __spec__ at collection and failed every test in
test_sync_cloud_tasks and test_legacy_dark_router (which shares the
loader). Stub the whole episodes package from disk like observability,
matching the treatment test_sync_v2 already gives it on this branch.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(parakeet): align Helm contracts with floor-8 rollout

Update stale rollout expectations and exercise both workload-only and rollback metric policies without changing runtime configuration.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(backend): defer Helm contract repair to main #23472

Remove the unpublished duplicate repair before integrating the now-green main baseline.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* perf(test): avoid counter subprocesses in isolated worker polling

Keep the active worker count in the parent shell and update it with the existing PID arrays. Every 20ms polling iteration previously forked twice for command substitution merely to count workers. File isolation, status handoff, crash detection and timing budgets remain intact.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* perf(test): wait for tracked worker completions without busy polling

A feature shard still exceeded the unchanged 720-second wall guard at 762s after counter-fork removal. Bash 5.1+ can wait for any tracked child; retain the atomic status-file and liveness reaper, with polling on older Bash. This removes the remaining periodic jobs/sleep subprocesses from Linux CI while preserving per-file isolation and failure detection.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(backend): synchronize heartbeat drain readiness explicitly

The drain test assumed a 50ms sleep meant renewal had begun; a loaded runner returned the response before the heartbeat reached renewal. Wait for an asyncio.Event set at the blocked renewal entry. Keep the renewal-reached, cancellation and sub-5-second drain assertions unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(backend): type defensive retrieval and duration boundaries accurately

Retain None and non-string input guards without strict typecheck errors. Keep the public tool schema unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* perf(test): avoid unused plugins in isolated pytest workers

A full feature shard still spent 638s in isolated pytest sessions and exceeded the unchanged 720s step budget. Keep core xdist and asyncio, skip the unused loop-on-failure plugin, and load pytest-httpserver only in files referencing its fixture. Preserve unified/batched plugin behavior and explicitly test both isolated and unified plugin states.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(backend): retain nullable query narrowing before text validation

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(backend): initialize Wrapped router dependencies in the class fixture

Keep all four error-sanitization assertions and the unchanged CPU limit. Measure the status behavior in the call phase rather than charging its cold dependency import to one test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(backend): normalize result text explicitly and load pure test dependencies normally

Keep the input guards and output contract, remove production file-loader fallbacks added for the isolated test, and register the real pure modules in that fixture so dataclass annotations resolve correctly.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(backend): load real result-bound helpers in the product-info fixture

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(backend): initialize isolated payment router in fixture setup

Preserve fresh per-test isolation and every proration/402/no-write assertion. Keep endpoint calls under the unchanged one-second CPU guard without charging cold router imports and mock construction to the call phase.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Git-on-my-level added a commit that referenced this pull request Oct 24, 2026
…l recordings (#23412)

* fix(backend): stop projecting ledger-bound capture receipts as partial recordings

The committed-capture proof latches coverage='incomplete' when its run
ledger evicts runs (32 runs x 30s) or transcript notes overflow 512 —
both accounting bounds, not observed loss. Observed loss (missing claims,
conflicts) fails the snapshot to None before any envelope exists, so any
live capture past ~16 continuous minutes served capture_coverage=
'incomplete' and the app showed a 'Partial recording' chip with zero
missing audio.

The public projection now downgrades a ledger-bound 'incomplete'
(committed proof, complete lifetime, zero conflicts) to 'mapped' and the
envelope-overflow stub to 'unknown', at projection time so already-stored
rows are repaired too. Sync receipts keep 'incomplete' meaning decoded
frames short of the claimed count: real missing audio.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(backend): unblock date-validation test load and refresh windows TS client

models.conversation imports evidence_field/ledger_bound_incomplete from
utils.capture_evidence at module scope; test_action_item_date_validation
stubs utils as a package with an empty __path__, so the isolated
models.conversation load failed at collection with ModuleNotFoundError.
Load the real stdlib-only modules before the models load, mirroring
utils.model_text.

The desktop/windows omiApi.generated.ts output was also stale against
the committed app-client spec (lifetime/proof on CaptureEvidenceMetadata);
regenerate it so the TS generator and knowledge-ledger contract checks
see all four client artifacts in sync.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(parakeet): align Helm contracts with floor-8 rollout

Update stale rollout expectations and exercise both workload-only and rollback metric policies without changing runtime configuration.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(backend): defer Helm contract repair to main #23472

Remove the unpublished duplicate repair before integrating the now-green main baseline.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* perf(test): avoid counter subprocesses in isolated worker polling

Keep the active worker count in the parent shell and update it with the existing PID arrays. Every 20ms polling iteration previously forked twice for command substitution merely to count workers. File isolation, status handoff, crash detection and timing budgets remain intact.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* perf(test): wait for tracked worker completions without busy polling

A feature shard still exceeded the unchanged 720-second wall guard at 762s after counter-fork removal. Bash 5.1+ can wait for any tracked child; retain the atomic status-file and liveness reaper, with polling on older Bash. This removes the remaining periodic jobs/sleep subprocesses from Linux CI while preserving per-file isolation and failure detection.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(backend): apply validated shared CI repairs on current main

Keep accurate types, canonical imports and scoped real-module fixtures while retaining main notes fixes and all runtime/test limits. Carry the shared isolated-worker startup optimization.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(backend): synchronize heartbeat drain readiness explicitly

The drain test assumed a 50ms sleep meant renewal had begun; a loaded runner returned the response before the heartbeat reached renewal. Wait for an asyncio.Event set at the blocked renewal entry. Keep the renewal-reached, cancellation and sub-5-second drain assertions unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(backend): initialize isolated payment router in fixture setup

Preserve fresh per-test isolation and every proration/402/no-write assertion. Keep endpoint calls under the unchanged one-second CPU guard without charging cold router imports and mock construction to the call phase.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(backend): keep overflow capture receipts incomplete so real sync loss stays visible

bounded_envelope can replace an oversize sync receipt that is short of frames
with the overflow stub, so projecting that stub away hid real loss. Only the
live committed proof's evicted-ledger shape is downgraded now.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
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