Skip to content

fix(ci): keep schema checks out of the production writer queue (SCA-2225) - #25324

Merged
Git-on-my-level merged 7 commits into
mainfrom
sca-2225/schema-queue
Dec 1, 2026
Merged

Git-on-my-level merged 7 commits into
mainfrom
sca-2225/schema-queue

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

What changed and why

A push-triggered Firestore reconcile occupied the production schema queue for three hours ahead of the release owner's pinned dispatch (SCA-2225, run 43613610960). Production push and PR checks now validate declarations locally without GCP credentials or writer concurrency. Push summaries explicitly report pending production reconciliation, its source SHA, release-owner role and deadline; they do not certify readiness.

Confirmed production composite and field-exemption writers share the existing noncancelling firestore-schema-prod domain at job level. Automatic and manual development composites share firestore-schema-development. Exact source pins, typed confirmations, environment approvals, reconcile timeouts and READY checks are retained. The concurrency policy audits all three writer jobs and rejects additional unowned schema writers. Its shared invocation parser recognizes credential-free additive planning as read-only.

Dispatch reconciliation is cumulative: it uses that run's immutable main SHA, which may be newer than a SCHEMA_PENDING source. Both dispatched writers emit SCHEMA_SOURCE after checkout identity verification. The owner must separately prove the older pending source and dependent release source READY through the existing source-pinned readiness gate; a newer writer result cannot alone close an older receipt. No historical source input or alternate writer controls are introduced. The PR-check budget rationale now describes credential-free local validation rather than the removed cloud reader.

The CI inventory records the new local-validation job and explicitly labels manual-run frequency as a planning sentinel, not measured demand. It adds no dispatch schedule; per-dispatch schema operations are unchanged.

Goal-owner design approval: SCA-2225 comment 01a1db94-1dc9-7079-a220-85bb9689c7a3 (2026-11-14 19:41Z). This PR changes the existing workflow only. Normal full workflow/schema review and release admission remain required. It does not change index matching or qualify historic implicit terminal __name__ aliases.

Product invariants affected

  • INV-DATA-1: production-family project identity, data routing, index matching and resource identity are unchanged. The workflow only separates local checks from the existing schema writers; production schema mutations still require the protected production environment and existing schema identity.

How it was verified

  • Seven offline tests exercise the actual workflow's event predicates, credentials, pending receipts and shared writer groups. Real Git fixtures execute both dispatched identity/receipt steps after main advances, bind their receipts to the newer run SHA and refuse a stale identity. The pending contract explicitly requires separate source-pinned readiness proof. Deployment concurrency self-tests include split field locks, cancellation, workflow-level blocking, locked read-only checks and extra schema writers.
  • Seven existing main-push CI economy tests and actionlint pass.
  • Local generated-manifest validation succeeds without cloud access.
  • Normal pre-push passed on the published head: all 52 applicable manifest checks and the selected backend unit suite pass. Windows-only portability is skipped on macOS.
  • All 66 backend release-vector tests pass through backend/test.sh, including the updated production dispatch-only guard and retained pin/confirmation/readiness assertions.

No production mutation, merge, cancellation, approval or dispatch was performed. A later normally admitted run must prove that pending local checks do not block the pinned dispatch, schema writers never overlap, and all named indexes are observed READY. Existing release ownership and admission requirements remain in force.

Tests

.github/scripts/test_firestore_schema_queue.py covers waiting push/PR checks, two production dispatches, a field-exemption writer, shared development concurrency, immutable pins and confirmation/readiness preservation. Registered in the existing local/CI manifest. Concurrency regression fixtures extend the existing shared policy primitive.

UI evidence

UI-Evidence: none -- release workflow scheduling only.

Failure class (fixes)

Failure-Class: none

New guards

Incident: push reconcile 43613610960 held the production schema queue for three hours ahead of the pinned release dispatch. The remedy and lock audit extend the existing deployment concurrency primitive; the fixture check verifies event-to-writer routing rather than introducing another lock manager.

@Git-on-my-level
Git-on-my-level merged commit f21ba03 into main Dec 1, 2026
68 checks passed
@Git-on-my-level
Git-on-my-level deleted the sca-2225/schema-queue branch December 1, 2026 12:55
Nizarius added a commit that referenced this pull request Dec 1, 2026
…26914)

## What changed and why

Update `reviewed_scripts_tree` in the Listen evidence workflow from
`8f7869ce5f401d53040abdac398c2d810ca81f26` to
`abf7b2c6ebbe42a5e8655920e121fa0e66ecae22`. The stale pin fails the
Listen workflow contract test and stops staged evidence before Python
runs. The one-line patch from Release follows
[#26839](#26839) and tracks
SCA-2185.

I read the full delta between those trees and verified that it matches
[#25324](#25324). The
concurrency checker now validates non-cancelling, per-environment
Firestore writer job locks and keeps read-only jobs out of that queue.
The new schema queue tests cover lock sharing, writer authority and
source identity. The main-push CI test now expects no workflow-level
Firestore lock. All three files are outside the Listen evidence
execution path.

## Product invariants affected

- INV-DATA-1. The workflow requires the exact reviewed scripts tree
before running staged evidence code.

## Verification

- Immediately before pushing, fetched `main` at
`847d4c9b72691bde0425340b44179abd528d66ef` and confirmed its scripts
tree was `abf7b2c6ebbe42a5e8655920e121fa0e66ecae22`.
- On Apple M1 Max, the named
`test_evidence_uses_control_sha_and_exact_candidate_not_deploy_for_evidence`
failed on the old pin. All 41 tests in
`backend/tests/unit/test_listen_overlay_workflow.py` passed with the
re-pin.
- The deployment concurrency checker and self-test passed, along with
all 14 tests across `test_firestore_schema_queue.py` and
`test_main_push_ci_economy.py`.
- `actionlint .github/workflows/gcp_backend_listen_helm.yml` and `git
diff --check` passed.
- All 27 local preflight checks passed with the PR body, as did the PR
metadata checks.

## UI evidence

UI-Evidence: none -- workflow constant only

## Failure class

Failure-Class: none


<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/BasedHardware/omi/pull/26914?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/26914?returnTo=https%3A%2F%2Fgithub.com%2FBasedHardware%2Fomi%2Fpull%2F26914&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. -->
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