Skip to content

ci: unify deterministic checks behind manifest - #9458

Merged
Git-on-my-level merged 4 commits into
mainfrom
codex/issue-9448-unified-check-manifest
Jul 12, 2026
Merged

Git-on-my-level merged 4 commits into
mainfrom
codex/issue-9448-unified-check-manifest

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Jul 11, 2026 •

Copy link
Copy Markdown
Member

Summary

  • make .github/checks-manifest.yaml the single source of truth for deterministic diff-scoped checks
  • route make preflight, pre-push/pr-preflight, and CI through the same stdlib runner
  • add bidirectional workflow drift guards and enforce new deferred-work marker ownership locally

Closes #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 + ci lanes. test_run_checks.py rejects invalid manifests, missing lanes, unregistered workflow check scripts, and a CI lane that is unreachable from repo-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 passed
  • BACKEND_UNIT_TEST_FILE_LIST=/tmp/omi-9448-backend-tests.txt bash test.sh — 15 passed
  • make 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 Rust cargo check passed
  • actionlint -shellcheck '' on all changed workflows — passed
  • bash -n on changed shell entry points — passed
  • adversarial local purple fixture — brand-ui failed before CI
  • adversarial untracked deferred marker — deferred-work-markers failed and named the line
  • adversarial unregistered workflow check — drift guard failed and named the script
  • adversarial missing ci lane — manifest validation failed
  • --list — local/CI resolved plans matched the executed plan

Product invariants affected

none

Review in cubic

CI added 2 commits July 11, 2026 02:29
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).
@mintlify

mintlify Bot commented Jul 11, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
omi 🟢 Ready View Preview Jul 11, 2026, 6:46 AM

💡 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)
@Git-on-my-level Git-on-my-level added the no-changelog-needed Skip desktop changelog enforcement for internal-only changes label Jul 11, 2026
@Git-on-my-level

Copy link
Copy Markdown
Member Author

Monitor summary

Fixed Desktop Swift CI failure on PR #9458.

What changed

The desktop test-quality guardrail wiring test (test_component_suite_and_pre_push_run_the_guard) still asserted the old hardcoded run_step check_desktop_quality_if_needed call in scripts/pre-push. This PR moved that check to the manifest runner (desktop-test-quality in .github/checks-manifest.yaml), so the test was updated to assert manifest registration instead of the removed pre-push step.

Verification

  • python3 desktop/macos/scripts/tests/test_check_desktop_test_quality.py — 11 passed
  • python3 desktop/macos/scripts/check_desktop_test_quality.py — OK
  • python3 -m unittest discover -s .github/scripts -p 'test_*.py' — 40 passed
  • CI Desktop Swift Build & Tests — pass (previously failing)

@Git-on-my-level

Copy link
Copy Markdown
Member Author

@cursor resolve conflicts

@cursor

cursor Bot commented Jul 12, 2026 •

Copy link
Copy Markdown

Merge conflicts on PR #9458 are resolved and pushed.

Conflicts resolved (4 files)

  1. .github/workflows/backend-checks.yml — Kept the manifest-owned approach; removed inline async/import/module/workflow-contract steps that main re-added.
  2. .github/workflows/repo-checks.yml — Kept manifest routing; retained only the unit test steps for lifecycle headers and version-prefixed filenames (not duplicate check invocations).
  3. scripts/pre-push — Kept manifest-owned checks; dropped the re-added per-check bash functions from main.
  4. backend/tests/unit/test_workflow_contracts.py — Merged both sides: manifest assertions plus main’s agent-proxy/async-blocker wiring expectations.

Main changes integrated into the manifest

  • backend-async-blockers: added backend/agent-proxy, backend/dependencies.py, and unmanaged_thread_offload
  • lifecycle-headers and version-prefixed-filenames: new manifest entries (replacing inline repo-checks steps)
  • check-deployment-concurrency.py: added to manifest exempt list (full-tree policy check)
  • .github/lifecycle-header-baseline.txt: updated paths after the v3 memory package refactor (v3/compatibility.py, v3/limited_rollout_config.py)

Verification

  • python3 -m unittest discover -s .github/scripts -p 'test_*.py' — 57 passed
  • backend/tests/unit/test_workflow_contracts.py — 15 passed
  • check_lifecycle_headers.py — OK

Commit aaa8ad946 is on codex/issue-9448-unified-check-manifest. PR #9458 should show as mergeable once GitHub finishes recomputing.

Open in Web Open in Cursor 

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]>
@Git-on-my-level
Git-on-my-level merged commit f703329 into main Jul 12, 2026
11 checks passed
@Git-on-my-level
Git-on-my-level deleted the codex/issue-9448-unified-check-manifest branch July 12, 2026 02:20
eulicesl added a commit that referenced this pull request Jul 12, 2026
…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. -->
eulicesl pushed a commit to eulicesl/omi-fork that referenced this pull request Jul 12, 2026
`.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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog-needed Skip desktop changelog enforcement for internal-only changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unified check manifest: one source of truth for deterministic checks across pre-push, pr-preflight, and CI

2 participants