Repository navigation
ci: unify deterministic checks behind manifest - #9458
Conversation
Make local preflight, pre-push, and CI resolve the same diff-scoped deterministic checks from .github/checks-manifest.yaml. Add drift guards and local enforcement for brand and deferred-work policies.\n\nVerified: python3 -m unittest discover -s .github/scripts -p 'test_*.py' (40 passed); actionlint on changed workflows; bash syntax checks; make preflight; adversarial purple, deferred-marker, workflow-drift, and lane-removal cases.
Update workflow boundary tests to follow the unified manifest instead of removed per-surface scanner declarations.\n\nVerified: BACKEND_UNIT_TEST_FILE_LIST=/tmp/omi-9448-backend-tests.txt bash test.sh (15 passed).
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
The desktop test-quality guardrail wiring test still asserted the old hardcoded 'run_step check_desktop_quality_if_needed' in scripts/pre-push. This PR moved that check to the manifest runner (desktop-test-quality in .github/checks-manifest.yaml), so the assertion must verify the manifest registration instead of the removed pre-push step. Verified: python3 desktop/macos/scripts/tests/test_check_desktop_test_quality.py (11 passed)
Monitor summaryFixed Desktop Swift CI failure on PR #9458. What changedThe desktop test-quality guardrail wiring test ( Verification
|
|
@cursor resolve conflicts |
|
Merge conflicts on PR #9458 are resolved and pushed. Conflicts resolved (4 files)
Main changes integrated into the manifest
Verification
Commit |
Keep manifest-owned deterministic checks instead of re-adding inline workflow and pre-push steps from main. Register lifecycle headers, version-prefixed filenames, and expanded async-blocker coverage in the manifest; exempt deployment-concurrency from drift guard; refresh the lifecycle baseline after the v3 memory package refactor. Verification: - python3 -m unittest discover -s .github/scripts -p 'test_*.py' — 57 passed - BACKEND_UNIT_TEST_FILE_LIST=tests/unit/test_workflow_contracts.py backend/test.sh — 15 passed - python3 .github/scripts/check_lifecycle_headers.py — OK Co-authored-by: David Zhang <[email protected]>
…l-open + CI manifest drift (bug sweep #7) (#9522) ## Summary Batch 7 of the macOS bug sweep — clearing the confirmed low-severity deferrals surfaced by the batch-6 second-pass hunt, each personally re-verified against the source. Three fixes, each low-risk with a regression test where a hermetic seam exists. This is likely the last substantive sweep PR: a fresh deep review of the previously-unswept surfaces (onboarding, settings, Sparkle/update, MCP OAuth, menu-bar/window lifecycle) turned up **no** confirmed user-affecting bugs, and the BYOK-vs-session-401 suspicion resolved to a **false alarm** (the Python backend returns 403, never 401, for BYOK failures) — so the findings are converging. ## Fixes ### 1. SD-card sync always showed 0 B/s `StorageSyncService.updateProgress` reassigned `lastProgressUpdate = now` on the line *before* computing `elapsed = now - lastProgressUpdate`, so `elapsed` was always 0 and `bytesPerSecond` always 0 — the SD-card sync UI never showed a real speed/ETA. Now computes the rate over the real elapsed interval using the bytes downloaded in that window (via a pure `bytesPerSecond(bytesDelta:interval:)` seam), tracking `lastProgressBytes` and resetting it with the rest of the progress state at sync start/stop. ### 2. Notification metadata grew unbounded `NotificationService.notificationMetadata` added one entry per delivered functional banner but only removed it in the `didReceive` delegate, which fires solely on user interaction. A banner the user never touches leaked its entry for the life of the process. Now tracks insertion order and FIFO-evicts past a 200-entry cap (pure generic `evictOldestMetadata`), with matching removal from the order list on the interaction/error paths. ### 3. Redis rate limiter failed open permanently after a link drop (Rust) `RedisService` cached a bare `MultiplexedConnection` and returned that clone forever with no reconnect path. Once the Redis link dropped, every command errored, and the rate limiter (fail-open by design) stopped enforcing limits entirely until restart. Now caches a `ConnectionManager` (the `connection-manager` feature was already enabled), which transparently reconnects after a transient failure. Command call sites unchanged. ## Root cause & durable guards - #1 read-after-write ordering on the interval timestamp → pure testable rate function + regression tests (real-rate / non-zero / zero-and-negative interval). - #2 a side-table whose only removal path depended on optional user action → bounded FIFO eviction + regression tests (evict-beyond-cap / no-eviction-under-cap / exact-to-cap). - #3 a permanently-cached connection with no invalidation → `ConnectionManager` auto-reconnect. No hermetic seam for live reconnection without a Redis server, so no unit test; verified with `cargo build` + `cargo test` (328 passed). ## Testing - `cargo test` (Backend-Rust) — 328 passed, 0 failed. - `python3 scripts/check_desktop_test_quality.py` — OK (debt decreased). - `python3 scripts/check-sources-root-layout.py` — OK. - `python3 scripts/check-e2e-flow-coverage.py --strict` — both changed Swift files covered. - `scripts/pr-preflight` — 13 checks pass. - No Swift toolchain in this environment; the new XCTest cases compile/run on macOS CI (`desktop-swift-ci.yml`). Opened as a **draft** for local verification before landing. ## Product invariants affected - none (no locked-invariant path globs touched). ## Deferred / tracked (not fixed here) - **BYOK→session-401 contract hardening (latent, not an active bug).** The WAL upload attaches BYOK keys under the session-invalidating `.default` policy, which violates the documented `AGENTS.md` "Session 401 vs BYOK/provider 401" contract. It is currently unreachable (the backend returns 403, never 401, for BYOK failures), so it is *not* an active bug. The contract-aligned fix (route the upload through `.providerCredentialBoundary`, mirroring `synthesizeSpeech`) changes real session-invalidation behavior and was deliberately kept out of this low-risk PR — tracked as defense-in-depth for a focused follow-up. - Remaining low/suspected batch-6 findings: `WALService.totalFrames` double-count on repeated failed writes; audio stop-path converter release ordering; `RealtimeOmniService.pendingAudio` uncap; `RewindIndexer` rebuild over-count; deferred-update install overwrite edge case. ## Also included: pre-existing CI unblock A separate commit registers `check_isinstance_return_ratchet.py` in `.github/checks-manifest.yaml`. That script is run by `repo-checks.yml` but was never added to the manifest when #9458 unified checks, so the manifest drift-guard fails on `main` and blocks every PR's `pr-preflight`/Hygiene. Pre-existing breakage, not caused by the batch-7 fixes; added here to unblock this (and every) PR. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01RAxLsaxtwVNDTWAZFfJp9q --- _Generated by [Claude Code](https://claude.ai/code/session_01RAxLsaxtwVNDTWAZFfJp9q)_ <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/9522?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a> <!-- End of auto-generated description by cubic. -->
`.github/workflows/repo-checks.yml` runs `check_isinstance_return_ratchet.py`, but BasedHardware#9458 ("unify deterministic checks behind manifest") never registered it in `.github/checks-manifest.yaml`, so the manifest drift-guard contract (`test_workflow_checks_are_registered_or_exempt`) fails on `main` — blocking every PR's `scripts/pr-preflight` and the Hygiene job. This is pre-existing main breakage, not introduced by the batch-7 fixes in this PR. It is a full-tree backend baseline ratchet invoked with no diff args, so it belongs in the `exempt` list alongside the other full-tree, not-diff-scoped checks. Verified `scripts/pr-preflight` now passes (13 checks). Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01RAxLsaxtwVNDTWAZFfJp9q


Summary
.github/checks-manifest.yamlthe single source of truth for deterministic diff-scoped checksmake preflight, pre-push/pr-preflight, and CI through the same stdlib runnerCloses #9448.
Failure-class closure
Root cause: check selection and invocation were independently owned by pre-push Bash, PR-preflight Python, and workflow YAML. The three copies had already diverged, leaving brand UI and deferred-work policies as CI-only feedback.
Recurrence evidence: backend isolation scanners, desktop ratchets, changelog checks, and PR contracts were each wired through different path filters and commands across those surfaces.
Durable guard: the manifest now owns commands, triggers, and required
local+cilanes.test_run_checks.pyrejects invalid manifests, missing lanes, unregistered workflow check scripts, and a CI lane that is unreachable fromrepo-checks.yml. Component suites, builds, OpenAPI generation, actionlint, and release/deploy checks remain explicitly outside the manifest.Verification
python3 -m unittest discover -s .github/scripts -p 'test_*.py'— 40 passedBACKEND_UNIT_TEST_FILE_LIST=/tmp/omi-9448-backend-tests.txt bash test.sh— 15 passedmake preflight— shared local manifest passed.github/scripts/run-pre-push.sh origin— full hook passed; manifest executed once, backend typecheck reported 0 errors, selected backend tests passed, OpenAPI snapshots were current, Swift debug build passed, and Rustcargo checkpassedactionlint -shellcheck ''on all changed workflows — passedbash -non changed shell entry points — passedbrand-uifailed before CIdeferred-work-markersfailed and named the linecilane — manifest validation failed--list— local/CI resolved plans matched the executed planProduct invariants affected
none