Skip to content

SCA-1606 Reconcile temporary app review visibility - #25123

Merged
Git-on-my-level merged 25 commits into
mainfrom
lane/sca-1606
Nov 15, 2026
Merged

Git-on-my-level merged 25 commits into
mainfrom
lane/sca-1606

Conversation

@Git-on-my-level

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

Copy link
Copy Markdown
Member

What changed and why

Adds a bounded review-visibility lifecycle: successful store submissions are reported by Codemagic, then an internal sweep reconciles App Store Connect and Google Play state and expires temporary hides after 14 days. The app-review read path and its parity behavior remain unchanged.

Current-main repair (2026-11-14)

  • Integrated current main at 3980a409cb9b with a normal merge. The GMP inventory now contains 326 consumers, preserving main’s batch-census and newer metric consumers alongside both app-review consumers.
  • Resolve Firestore through get_firestore_client() at each lifecycle access. Store read failures still run TTL cleanup and emit bounded omi_fallback_total telemetry for the ttl_only path.
  • Declared and explicitly kept all four app-review metrics in the backend-sync scrape while retaining main’s free-allowance metric family; both critical app-review alerts use the unmuted human Telegram paging tier. The sweep-silent rule remains paused until its first successful tick.
  • Added semantic-versus-build regressions: a semantic-only hide applies across builds, while clearing one build-qualified hide preserves another build.
  • After the current-main conflict resolution, the app-review lifecycle/boundary/storefront, monitoring/GMP, scrape, batch-census, and scheduler-reconcile suites passed: 444 passed, 2 skipped. Alert backtest lint passed with 3 pre-existing legacy-debt notices and no failures. The child rollout-brake suite passed 30 tests after parent integration. No store account, live scheduler, or production Firestore access was used.

Product invariants affected

  • INV-DATA-1

Line-Count-Exception: backend/utils/metrics.py | 1765 -> 1816 | add pre-zeroed app-review lifecycle alert and sweep metrics.

How it was verified

  • Focused lifecycle, monitoring/export, closed-reason, scheduler, and route-policy tests: 259 passed.
  • python3 app/scripts/mobile_store_promote_test.py: 32 passed.
  • python3 .github/scripts/check-release-process-guards.py: passed.
  • PYTHON=./.venv/bin/python bash test-preflight.sh from backend/: 17 passed, 9 optional environment warnings, 0 failed.
  • Pyright on changed backend modules: 0 errors, 33 dynamic SDK/response typing warnings.
  • After adding submission-token reasons to the paging rule, regenerated the canonical combined alert export and GMP inventory. The focused app-review, monitoring-GMP, and monitoring-provisioner suites pass: 116 passed.
  • On parent head 0f7b038d4c5b, hosted shards exposed the stale inventory and split/combined alert mismatch; both artifacts are regenerated on this follow-up. Two separate timing-guard files were rerun with the prescribed backend/test.sh runner through omi-heavy: 50 passed, with CPU-time warnings below the 1.0-second failure limit. The refreshed head still needs GitHub checks.
  • The full local backend/test.sh run reported timing/load failures in test_live_recovery_matrix.py, test_qualify_parakeet_route.py, and test_backend_test_runner.py. Each file passed its prescribed isolated rerun (103 passed/3 deselected, 34 passed, and 16 passed respectively); no reproducible failure remained.
  • No store accounts, production APIs, Firestore writes, deployments, credentials, or scheduler activation were used during validation.

Tests

Coverage includes held/draft Play releases remaining hidden until a completed rollout, clearing legacy iOS hides when ASC is live or terminal, adoption and expiry of pre-existing hides, build-qualified iOS version matching, tombstone persistence, bounded and rate-limited submission receipts, Codemagic hook failure handling and staging override, Play edit-conflict retry, workflow environment-group scope, and alert paging policy.

UI evidence

UI-Evidence: none -- backend and release automation only.

Failure class

Failure-Class: FC-metric-dropped-by-scrape-allowlist

Operational notes and deviations

  • The hourly worker combines store reconciliation and TTL cleanup. Its scheduler declaration remains planned and PAUSED; it runs at minute 17 to avoid the rollout-watch and daily-train Play edit windows, and retries one edit-creation conflict.
  • Activation is gated on parent SCA-1606 Reconcile temporary app review visibility #25123 landing before child SCA-1619: preserve held Android hides and page on missing token #25131, then the child’s final repaired code being merged and deployed. Verify held/draft Android writes, expired-receipt renewal, missing-receipt reconciliation, token-error paging, and brake scheduler quiescence from child regressions and deployment receipts. Parent-only checks do not satisfy these gates; merge alone is not activation permission.
  • Only a Play production release with status == "completed" counts as live. Draft, in-progress, and held releases remain hidden. The 14-day lease is the staged-rollout backstop. When a lease expires, the hide stays off for that version until a new submission is recorded; its tombstone prevents reconciliation from re-hiding it.
  • The iOS reconciler adopts existing matching hides and clears them on live or terminal ASC state, including build-qualified entries such as 1.0.547+20 when ASC reports 1.0.547. The current poller does not query the separate macos document; its existing 1.0.80+501 entry remains a manual cleanup decision after checking store state. Unmatched legacy iOS entries also require a separate manual decision.
  • Before merge, create the Codemagic app_review_config environment group empty. It is referenced only by mobile-store-promote and mobile-daily-train; Codemagic rejects missing groups. The hook is best-effort after a successful store submission. Do not add the token until the scheduler is enabled and one successful sweep tick is confirmed.
  • The path-based invariant checker also selects INV-AUTH-1 and INV-BETA-1 because codemagic.yaml changed. Those desktop auth and beta contracts are untouched; only the two mobile workflow group bindings changed here, so the affected-invariant list above intentionally cites INV-DATA-1 alone.
  • After the stacked merge and under separate authorization, provision only the documented scoped store credentials and Secret Manager bindings to backend-runtime. The submission and sweep routes run on backend-sync; do not grant backend-listen access for them. Probe the narrowest ASC read role and verify on a staging app that the Play role can create/read/delete an uncommitted edit before production activation; a view-only Play role has not been verified to allow this.
  • The submission endpoint caches the token in-process for 60 seconds, compares UTF-8 bytes in constant time, returns the same 401 for missing or incorrect tokens, and limits requests to 10 per IP per minute. Receipts must be no more than 15 minutes old (five minutes future skew); repeated receipts do not extend an active lease. Rotate the Secret Manager value and Codemagic group together, wait 60 seconds or restart all instances, verify in staging, then revoke the old value.
  • The real paging rule covers unavailable store credentials, store API errors, unavailable submission tokens, and rejected submission tokens; routine repairs and live clears are success paths. Missing store credentials still allow TTL cleanup. The silent-sweep alert stays paused until its first successful tick.
  • The Play reader opens a temporary edit, reads only production, and deletes it without committing. Internal and alpha tracks are not queried.
  • No credential creation, production write, deployment, or scheduler activation is part of this PR. Merge alone cannot activate the paused scheduler.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-15T03:13:47.147353Z 27d6ab3 New commits
ℹ️ 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c3ac4d8d71

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +377 to +380
for release in releases:
raw_codes = release.get('versionCodes', []) if isinstance(release, dict) else []
if isinstance(raw_codes, list):
codes.update(str(code) for code in raw_codes)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Distinguish published Play releases from pending changes

When a production-track release is still awaiting review or publication, its version code must not be treated as proof that it is live. This reader collects codes from every release without checking its status or publication state, and reconcile_android_config immediately removes the corresponding hide. In particular, app/scripts/mobile_store_promote.py::submit_android commits production changes with changesNotSentForReview=True, explicitly holding them for manual submission. The next sweep can therefore undo the receipt's hide before review even starts. Only clear entries after establishing that the release is actually published.

Useful? React with 👍 / 👎.

Comment on lines +211 to +213
if repairs or clears:
result['hidden_versions'] = hidden
result['review_submission_entries'] = entries

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Persist metadata removal even when no hide changes

If an iOS entry expires before Apple reports a terminal state, TTL cleanup removes its hide and leaves an expired tombstone. On a subsequent REJECTED sweep, the reconciliation loop removes that tombstone locally, but neither repairs nor clears increments because the version is no longer hidden, so this guard discards the metadata change. If the same version later reenters review and its submission hook is missed, the retained tombstone prevents reconciliation from hiding it again. Persist changes to the entries independently of the hide counters; the Android reconciliation has the same metadata-only cleanup problem.

Useful? React with 👍 / 👎.

from google.auth.transport.requests import AuthorizedSession
from google.cloud import firestore

from database._client import db, run_transactional

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use the required call-time Firestore client accessor

This new service imports and uses the legacy db proxy for all lifecycle reads and transactions. backend/AGENTS.md explicitly prohibits using that proxy in new code and requires get_firestore_client() at call time, with injectable client parameters on converted helpers. Resolve the client at the service boundary and pass it through the persistence helpers rather than adding another dependency on the retired compatibility interface.

AGENTS.md reference: backend/AGENTS.md:L180-L180

Useful? React with 👍 / 👎.

Comment on lines +447 to +450
except StoreCredentialsUnavailable:
summary['store_errors'] += 1
report_lifecycle_alert(platform, 'credentials_unavailable', 'using TTL-only cleanup for this platform')
logger.warning('app_review_config store credentials unavailable platform=%s; TTL continues', platform)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Instrument TTL-only degradation with the shared fallback helper

When store credentials are unavailable, this branch continues in TTL-only mode but emits only lifecycle-specific metrics and logs. The equivalent store-API exception branch does the same. These are new degraded fallback paths, for which backend/AGENTS.md requires utils.observability.fallback.record_fallback; without it, the shared fallback telemetry misses both transitions. Record the degraded outcome in both branches while retaining the domain alerts.

AGENTS.md reference: backend/AGENTS.md:L322-L322

Useful? React with 👍 / 👎.

session: Any = None
try:
raw = json.loads(load_secret(SECRET_NAMES['play']))
from google.oauth2.service_account import Credentials

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Move the Play credentials import to module scope

backend/AGENTS.md requires all imports at module scope and explicitly forbids imports inside functions. The new Play reader introduces a function-local Credentials import despite the rest of its Google authentication dependencies already being imported at module scope. Move this import alongside those dependencies to comply with the backend's documented import convention.

AGENTS.md reference: backend/AGENTS.md:L166-L168

Useful? React with 👍 / 👎.

"type": "prometheus",
"uid": "prometheus"
},
"expr": "sum(increase(omi_app_review_config_alert_total[15m])) > bool 0",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Allow lifecycle metrics through the sync monitoring pipeline

For the scheduled backend-sync worker, these alerts cannot observe the events they are meant to report: backend/deploy/cloud_run_gmp_sync.yaml:55 drops the new omi_app_review_config_* families through its keep regex, and backend/charts/monitoring/prometheus-stackdriver-exporter/prod_sync_omi_cloud_run_metrics_exporter.yaml also omits them from its explicit import prefixes. The general Cloud Run exporter excludes sync namespaces, so it does not provide an alternate path. Consequently, store failures never reach this lifecycle alert, and enabling the dead-sweeper rule will not make successful sync ticks visible either. Add the new families to both stages of the sync monitoring pipeline.

Useful? React with 👍 / 👎.

Comment on lines +190 to +192
if active is not None:
if _append_hidden(hidden, version):
repairs += 1

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Take ownership of hides newly added during repair

If a submission initially matches a manual hide, its lifecycle entry correctly has owns_hidden_version=False. But if an operator subsequently removes that hide while the entry is active, this repair branch adds the version back without updating ownership. When the 14-day lease expires or Apple reaches a clear state, _remove_owned_hidden refuses to remove the newly created hide, leaving it permanent. The Android repair branch has the same behavior. When reconciliation actually inserts a missing hide, mark that entry as owned so the lifecycle can later remove the hide it created.

Useful? React with 👍 / 👎.

Comment on lines +19 to +20
Grant `roles/secretmanager.secretAccessor` on only these three secrets to
`[email protected]`. Do not put the ASC or Play

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Grant submission-token access to the public API identity

Following these activation instructions grants secret access only to the Cloud Run identity, but the Codemagic hook posts to https://api.omi.me, which is served by backend-listen according to backend/charts/backend-listen/prod_omi_backend_listen_values.yaml:327. That workload uses [email protected] (the same values file, line 40), not backend-runtime@.... Since the submission handler loads its expected token using ADC on every request, the documented setup leaves receipt requests returning 503 even after all activation steps are followed. Grant the submission-token secret to the backend-listen identity as well, or direct the hook to the service whose identity receives the grant.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 39541be3a6

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +183 to +184
if before_hidden:
clears += 1

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Count only hides actually removed during reconciliation

When a legacy/manual iOS hide matches a terminal store version, before_hidden is true even though there is no owned lifecycle entry to remove. Consequently, reconciliation preserves the hide but reports clears=1 on every sweep. I reproduced this across consecutive ticks with hidden_versions=['1.0.500'], no lifecycle entries, and READY_FOR_SALE. Since the sweep passes every nonzero clear count to report_lifecycle_alert, these intentionally preserved entries generate recurring false live_hide_cleared alerts. Increment the counter only when _remove_owned_hidden actually removes a hide.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6edba5729f

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +123 to +124
if any(_same_visible_version(item, version) for item in hidden):
return False

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Widen build-qualified hides for semantic-version submissions

If hidden_versions already contains 2.1.0+22 and build 2.1.0+23 is submitted, this comparison treats the existing build-specific hide as covering the whole semantic version and skips adding 2.1.0. However, mobile requests include the build number (app/lib/utils/platform/platform_manager.dart), and the serving reader compares both build numbers when present, so 2.1.0+23 remains visible. Reconciliation calls the same helper and cannot repair this state. Ensure that recording a semantic-version submission adds a hide covering all its builds rather than accepting a narrower build-qualified entry as sufficient.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ad4619ff33

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +231 to +232
monkeypatch.setattr(lifecycle.firestore, "transactional", lambda callback: callback)
transaction = Mock()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use the required strict Firestore transaction fixture

This test exercises document-reference reads and a transactional set, but replaces the transaction with an unconstrained Mock. It would continue passing if _update_config performed reads after writes, which Firestore rejects in production. backend/AGENTS.md explicitly requires StrictFirestore for this service-boundary test pattern; use that fixture so the persistence test enforces transaction ordering and stored-value constraints.

AGENTS.md reference: backend/AGENTS.md:L232-L232

Useful? React with 👍 / 👎.

Comment on lines +82 to +83
if not supplied or not hmac.compare_digest(supplied, expected.encode("utf-8")):
raise HTTPException(status_code=401, detail='invalid submission token')

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Emit the rejected-token event before returning 401

If Codemagic has an incorrect or out-of-sync submission token, this branch rejects every receipt without emitting a lifecycle alert. The hook deliberately logs failures and returns success, so submissions can stop creating hides without triggering the new paging rule, even though that rule explicitly selects submission_token_rejected. Record a bounded rejected-token reason here and add it to AppReviewConfigReason; otherwise the documented rejected-token activation check cannot pass.

Useful? React with 👍 / 👎.

Comment on lines +68 to +70
if [[ -n "$JOBS" ]]; then
read -r -a JOB_ARGS <<< "$JOBS"
fi

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Prefix selected scheduler job names with --jobs

When the workflow's new jobs input is populated, JOB_ARGS contains only bare job names, which both invocations append after --apply or --check. The reconciler's CLI help specifies --jobs JOBS [JOBS ...] (“Limit reconciliation to these declared job names”), and its parser in backend/scripts/scheduler_reconcile.py:303–316 accepts no positional arguments. Executing that parser with the workflow-style arguments rejects app-review-config-sweep-hourly as unrecognized and exits with status 2. Consequently, the documented planned-job deployment and subsequent scoped checks cannot run. Include --jobs in the argument array whenever a selection is supplied.

Useful? React with 👍 / 👎.

Comment on lines +155 to +156
for entry in reversed(entries)
if entry.get('platform') == platform and entry.get('version') == version and entry.get('state') == 'active'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Check the lease deadline before reusing an active entry

If a fresh submission arrives after the previous lease's deadline but before the hourly sweep marks it expired, this lookup still selects the old entry because its persisted state remains active. The receipt is then accepted with the already-expired deadline instead of receiving a new 14-day lease. The next sweep removes its hide and leaves a tombstone, preventing iOS reconciliation from restoring the hide during the new review. This also occurs after a sweeper outage. Only preserve the previous deadline for an active lease whose expires_at is still in the future; treat an elapsed lease as expired when processing the fresh receipt.

Useful? React with 👍 / 👎.

@Git-on-my-level

Git-on-my-level commented Nov 15, 2026 •

Copy link
Copy Markdown
Member Author

Shard 1/8 at 26bf873 hit the fast-unit CPU guard in test_record_seal_latency.py (95 passed; two calls at 1.06s and 1.02s against the 1.00s ceiling). The aggregate reports no separate failure. The exact parent-tree file passed its prescribed isolated bash test.sh rerun: 58 passed, with both flagged cases at 0.40s. Retried the completed failed CI jobs without changing product code or timing limits.

@Git-on-my-level
Git-on-my-level merged commit bc7e791 into main Nov 15, 2026
71 of 73 checks passed
@Git-on-my-level
Git-on-my-level deleted the lane/sca-1606 branch November 15, 2026 06:40
Git-on-my-level added a commit that referenced this pull request Nov 15, 2026
UI-Evidence: none -- backend lifecycle, monitoring, release operator
docs; no UI changed.

## Summary

- Held Android manual promotions write production releases as `draft`;
the sweep only clears a hide after a genuinely completed rollout. Fresh
receipts renew an expired lease, and first-sight reconciliation repairs
missing receipts without reviving expired tombstones.
- Page on missing and rejected submission tokens after three lifecycle
failures within three hours; the reasons reach the real alert rule and
generated export.
- Close the remaining lifecycle, Play edit contention, metrics
inventory, route-policy, rollout-brake, and operator-runbook gaps from
the independent audit. The brake authenticates the scheduler pause read
with the existing read-only identity and fails closed on missing or
denied access.

## R1 decision

Use the write-side fix. When `changesNotSentForReview` is enabled, an
omitted Android release status defaults to `draft`; otherwise it remains
`completed`. A held draft cannot be mistaken for a live rollout by the
sweep, while a genuinely completed rollout remains the approval signal.
This avoids exposing a staged fraction before review.

## Audit coverage

- Android reconciliation creates a 14-day hide on first sight of a
non-completed production code, repairs active hides without extending a
same-build lease, and preserves expired tombstones. A fresh
authenticated receipt for a replacement build receives a new full lease,
and completing an older build cannot clear a same-version replacement
build's hide while it remains pending.
- The parent lifecycle uses a call-time Firestore resolver, a valid
module-scope `Credentials` import, TTL-only cleanup on store failure,
and semantic/build-aware hide matching. Credential, store, and
submission-token failures page through the wired alert path.
- Sweep and promotion paths retry Play edit conflicts with bounded
exponential backoff. Failed validation, track reads, updates, or commits
abandon the uncommitted Play edit so retries are not blocked; committed
edits are never deleted. The rollout brake verifies both manually
disabled/drained GitHub writers and the paused scheduler; its
fresh-runner path uses the existing `google_play` service-account
credentials and the API-supported `cloud-scheduler` OAuth scope, with
read-only access enforced by IAM. Missing or denied
`cloudscheduler.jobs.get` access fails before a Play edit.
- Declared the wired submission limiter as `fail_open` in the route
manifest. Added the sweep counter and `outcome` label to the metric
contract.
- Regenerated the combined alert export and GMP inventory after
resolving parent/child generated-file conflicts. The inventory reports
`combined_equals_split: true` and retains all 326 query consumers.
- Expanded parent and child runbooks with the freeze, credential/deploy
order, pre-activation probes, first-tick snapshot and checks, deadman
verification, receipt authentication, rotation, and rollback. Activation
requires parent #25123 first and the final repaired child code merged
and deployed; the scheduler remains planned and paused until separately
authorized.

## Branch and merge order

Parent PR #25123 merged to `main` at `bc7e79190a84` (2026-11-15 06:40Z).
This PR targets `main`, currently based on `18a774e84662`; child head
`05e5df7b4c79` includes a normal merge of that current base. The child
retains its lifecycle and operational changes, including the `d1c77ea6`
hermetic Play SDK test fix. The prior `origin/lane/sca-1606` event
failed before tests because the parent branch had been deleted; that
stale-base event is resolved by the current `main` integration. The
alternative branch `lane/sca-1619-studio` remains untouched.

## Product invariants affected

- `INV-AUTH-1`, `INV-DATA-1`, and `INV-BETA-1` are inherited from
stacked PR #25123. This follow-up does not change session ownership,
production-family data-plane authority, or beta identity.

## Verification

- Parent #25123 passed its normal bounded pre-push gate at
`8e767d02812d169e90e1ab75a5e2c07a5ba2f2c5`; the targeted
lifecycle/alert/GMP suite passed 116 tests. The previously
timing-sensitive shard-6 scope passed a 50-test local rerun.
- On the merged review head, the targeted lifecycle, brake, boundary,
route-policy, scheduler, monitoring telemetry, and strict-transaction
suites passed 251 tests. `backend/.venv/bin/python
app/scripts/mobile_store_promote_test.py` passed 37 tests,
`backend/.venv/bin/python app/scripts/mobile_daily_train_test.py` passed
105 tests, and `backend/.venv/bin/python
.github/scripts/check-release-process-guards.py` passed. `git diff
--check` passed.
- The brake tests use fake GitHub/Scheduler responses and fail closed on
denied scheduler reads. No live scheduler/IAM/store read or additional
grant was made. API routes run on `backend-sync` under
`backend-runtime`; this stack does not request `backend-listen` access.
- New-head GitHub required checks and current-head author approval must
be refreshed after publication. Keep SCA-1619 blocked until the required
checks and approval gate pass; do not retarget or bypass the gate.
- No production writes, credential creation, scheduler operations, PR
merge, deployment, or activation were performed.
Failure-Class: new
Line-Count-Exception: backend/utils/metrics.py | 1765 -> 1817 | the
integrated stack carries the app-review lifecycle metrics and their
reason labels without splitting the existing metric module
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