Repository navigation
feat(backend): qualify the full post-SQL jobstore operator - #25613
Git-on-my-level wants to merge 2 commits into
Conversation
Bind catalog, full working source, CLI imports and fixed fixture proof to one closed publication profile. Preserve the legacy readiness identity and migrate mandatory control regressions.
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Import the isolated catalog, bind all nine migration checksums and name missing general CLI proof explicitly. Address review panel F1-F3.
#25630) ## Summary Run retained jobstore-copy retirement from the existing Cloud Run backend-integration Serving supervisor. Migration 0010 stores target-bound cursors in Postgres; page mutations and locked version/cursor compare-and-set advancement commit together. One table/source runs per bounded round-robin tick after critical maintenance, with a kill switch, shared normal pool, and counts-only retirement/rotation telemetry. Prepare the production target/context on the retirement host and every source deletion executor: Cloud Run backend, backend-sync, backend-sync-backfill and backend-integration; GKE backend-listen uses its own backend-listen-runtime DB principal. The GPU batch-pipeline-worker target uses batch-pipeline-worker, but that process runs Pump, not Serving. Staging retains its own post-render bindings without duplicate env names. The co-host env-diff guard documents the production erasure bindings as listen-only: pusher mounts no deletion routes or jobstore purge caller. The production-mirror doc contains the exact caller/deploy inventory and CLI fallback. ## Activation and rollback Copy and recovery-hint activation remain **off by default**: JOBSTORE_PRODUCTION_MIRROR=off and BATCH_JOBSTORE_MODE=firestore. Retirement defaults on only with a complete PG target and valid data-plane context; it remains independent of copy kills. Mode-off cohort exclusion can retire all retained copies during rotation. Primary backfill requires the production mirror configuration. Missing migration 0010 skips safely with a metric; no boot migration occurs. Release must apply/verify the schema and runtime DML grants separately, verify actual executor identities/routing and mode-off erasure, measure a complete rotation/lag and fleet connection budget, then approve mirror and hint policy cohorts. In particular, verify the backend-listen-runtime SQL user/grants. No production data/API access, GCP tier, IAM change, gcloud write, deploy or merge was performed. Rollback retirement with JOBSTORE_RETIREMENT_ENABLED=off; retain JOBSTORE_PG_* and synchronous erasure until copies retire. The fallback reconcile-page CLI keeps private checkpoints. The parked operator track and PRs #25613/#25215 are unchanged. ## Budgets and state exits Initial JOBSTORE_RETIREMENT_MAX_ROWS=10, MAX_PRIMARY_READS=20, MAX_STATEMENTS=500, PAGE_SECONDS=3, INTERVAL_SECONDS=20; total tick budget is 10 seconds. Before: no in-serving rotation or durable PG cursor. After: one bounded table/source per supervised leader tick, with normal-pool warmup outside the page budget and inside the total allowance. Maximum page time is 3 seconds, well below the 60-second advisory maintenance lease. Two normal sessions plus the existing reserved erasure session remain the per-process ceiling; the erasure connector retains its existing setup behavior. The new cursor's terminal path is end-of-pass reset to NULL plus passes/version increments and rotation_completed_at in the page transaction. Errors roll back page and checkpoint. A failed table rotates out so it cannot starve other tables. Rows are retired only after a fresh authoritative absence/cohort exclusion, never by a clock/lease TTL. Rotation lag is current time minus cursor last-pass completion (creation before first pass), computed from bounded cursor-row observations without copy-table scans. ## Product invariants affected INV-MEM-4: canonical memory admission/promotion authority is unchanged; the bounded copy and retirement worker never writes Firestore documents or promotes canonical memory. Firestore remains the sole job writer/claimant and privacy authority; no customer-facing wire contract changes. ## Verification All tests and type checks run through /Users/dazheng/workspace/omi/bin/omi-heavy with GOOGLE_APPLICATION_CREDENTIALS and CLOUDSDK_* unset. Local Postgres uses a disposable Unix-socket test cluster and a synthetic primary. - Focused pytest selection: **355 passed**, including **7 real-Postgres tests** covering atomic page/cursor rollback, two overlapping leaders, CAS refusal, budget rollback and migration idempotency/rollback. - Unit: cursor scope/CAS/regression, same-transaction callback and SQL accounting, target/context/kill/backfill gates, one-table fairness, schema-missing no-op, warm/total budgets, supervisor-only leader scheduling, private-registry metrics and rotation lag. - Regression: copy-pool ceilings, production copy/cohort, CLI, admission, staging fence, source env/flag budgets, query shapes and deployment rendering. - backend/scripts/pre-deploy-check.sh: 632 tests passed plus source-only deploy validations. - Feature registry, deployment secret boundary and cross-service deploy contract passed (34 passed, 3 skipped in that source-contract suite). Full Pyright: **0 errors** across 2317 files (existing warning output retained). The seven-file Firestore guard set passed, including **608 query-shape tests**; worker runtime **56 passed** and co-host env diff **92 passed**. **scripts/pr-preflight --pr-body-file passed all 52 checks** before push. Representative exact commands (all wrapped in omi-heavy; paths from the task worktree): ```bash backend/.venv/bin/python -m pytest -q backend/tests/unit/test_jobstore_retirement_cursor.py backend/tests/unit/test_jobstore_retirement.py backend/tests/unit/test_jobstore_retirement_deploy.py backend/tests/unit/test_jobstore_connection_deadline.py backend/tests/unit/test_jobstore_reconcile.py backend/tests/unit/test_jobstore_reconcile_operator.py backend/tests/unit/test_jobstore_copy_connections.py backend/tests/unit/test_jobstore_production_copy.py backend/tests/unit/test_jobstore_migrations.py backend/tests/unit/test_jobstore_production_mirror_admission.py backend/tests/unit/test_staging_fence.py backend/tests/unit/test_runtime_env_sources.py backend/tests/unit/test_batch_stage_env_ratchet.py backend/tests/unit/test_flag_budget.py backend/tests/unit/test_jobstore_index_selection.py backend/tests/unit/test_batch_pipeline_recovery_metrics.py backend/tests/integration/test_jobstore_retirement_postgres.py backend/tests/integration/test_jobstore_migrations_postgres.py backend/.venv/bin/python -m pytest -q backend/tests/unit/test_batch_pipeline_runtime.py backend/.venv/bin/python -m pytest -q backend/tests/unit/test_verify_pusher_cohost_env_diff.py backend/.venv/bin/python -m pyright -p backend/pyrightconfig.json --pythonpath backend/.venv/bin/python --outputjson # From backend/ with its .venv/bin first on PATH: bash scripts/pre-deploy-check.sh # From repository root, using this body file: scripts/pr-preflight --pr-body-file <body-file> ``` Failure-Class: none This is a new maintenance/configuration capability, with no incident failure class claimed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/25630?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="View guided diff" src="https://www.cubic.dev/buttons/review-in-cubic-light.svg"></picture></a> <a href="https://www.cubic.dev/action/auto-fix/pr/BasedHardware/omi/25630?returnTo=https%3A%2F%2Fgithub.com%2FBasedHardware%2Fomi%2Fpull%2F25630&source=description" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"><img alt="Turn on auto-fix" src="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"></picture></a> <!-- End of auto-generated description by cubic. -->
|
On hold: the Postgres port this operator profile serves was paused on 2026-11-19 by David's ruling (the destination is now a native queue; Multica SCA-1959). Do not merge. The branch and its worktree are kept as they are; this PR is reopened for review only if the pause is lifted. |
|
Closing as part of a stale-PR cleanup David asked for on 2026-11-26 (Shipping lead agent): it is a draft with no activity for days. Nothing is lost: the branch stays, and anyone can reopen this PR if the work is still wanted. If it still matters, reopen it and refresh it against main. |
|
Hey @Git-on-my-level 👋 Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request. After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:
Before your next PR, please skim:
If this was declined for direction or taste, maintainers should cite an invariant ID or open a proposed one — ask if that citation is missing. Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out. Thank you for being part of the Omi community! |
What changed and why
The readiness-only operator cannot qualify the full post-SQL general copier. Add a closed qualification profile for runtime source c282436, with complete working-source verification, schema-eight catalog/rights checks, immutable fixture identity and the actual general CLI import smoke. The default entry point remains hold and the candidate contract remains unpublishable until actual image, asset and native evidence is supplied.
Product invariants affected
none
How it was verified
The mandatory operator control suite passed all 83 tests through omi-heavy using this worktree's Python 3.11 environment. The separately packaged catalog fixture suite passed 36 cases with zero skips, using an explicit scratch TMPDIR and named-ref source repository on macOS; this is local adapted evidence. Offline build/export controls passed 24 model tests, including same-layer changed-config rejection and explicit daemon-not-found tag admission. Full image build, native AMD64 qualification, CPU-capped source timing, registry operations and production execution remain pending. No GCP tier was used.
The source and fixture pins are new evidence requirements; earlier readiness/native receipts do not carry forward. No workflow, access grant, database migration, cohort or Firestore authority change is included.
Tests
backend/scripts/jobstore_operator/tests/test_general_copy_profile.pyrejects old source/profile/count/suite identities, missing full-source/CLI proof and the closed candidate contract. Publication and registry outcome fixtures exercise the new profile through the existing guards. Native identity tests retain classic/containerd full-config/platform/layer identity and cleanup refusals. Legacy metadata readiness keeps its original independent source identity. Repository tests also import the isolated catalog, compile the nested refusal child and verify all nine migration hashes. Missing CLI proof produces a named refusal.UI evidence
UI-Evidence: none -- operator qualification controls only
Failure class (fixes)
Failure-Class: none