Skip to content

SCA-2190: guard the privacy memo re-land with explicit admission and shadow config - #25359

Merged
Git-on-my-level merged 7 commits into
mainfrom
sca-2190/guarded-reland
Nov 16, 2026
Merged

Git-on-my-level merged 7 commits into
mainfrom
sca-2190/guarded-reland

Conversation

@Git-on-my-level

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

Copy link
Copy Markdown
Member

The original #25285 owner memo could enforce on first serve when existing configuration had shadow=0. This guarded SCA-2190 re-land restores its reviewed implementation while requiring a new explicit bpp_owner_memo_enforce admission lever, default 0. Comparison candidates remain available; old, absent, invalid or empty config cannot admit the new owner memo. A nonzero shadow percentage still suppresses owner enforcement even with admission enabled.

The comparison packet travels with this candidate: shadow=10, negative-cache=0, TTL60=0 and owner-enforce=0 for the four Cloud Run batch callers and the existing next-train worker chart. Other levers remain unchanged, including the worker's monthly-reader exception. Listen, pusher, desktop, jobs and other consumers keep default-off owner admission regardless of their existing shadow settings. This is source preparation only; no live mutation, worker image roll, migration, or enforcement GO.

Fresh transactional token/server-revision/generation certification, never caching denial decisions, dry-run no-mint, the prepare-wide 256 fence including redirect chains, and the fail-closed privacy kill switch are retained. Original exact-head review receipt: SCA-2291 at aa2fb59. Independent review requested for the new admission/config/telemetry delta, not a full third review of unchanged restored code.

Positive comparison evidence is now measurable by closed attempt/no_attempt/snapshots labels in privacy_owner_comparison_total. Both this and the existing decision-comparison counter are retained through the Cloud Run keep-lists, isolated sync-worker fold, and batch worker registry. No identifiers appear in metric labels.

The complete prerequisite, surface, expiry, rollback, economics and qualification packet is backend/docs/sca-2190-reland-packet.md. SCA-2190 remains open through serving and independent production verification.

Validation

  • Nov 16 bounded main merge at 39c263a6e66aab7c67b04c108c1fdc848e33c298 (main f6d69aefb5): preserve both privacy comparison counters plus main’s new WAL scrape series; capture-source guard, prepare-wide fence and default-off comparison/admission settings remain intact. Eleven affected files pass 557 tests through the Studio omi-heavy runner. Normal pre-push passes 47 preflight checks, type checking with zero errors, and 1,508 tests across 40 selected backend files. Exact-head CI is green: 42 successful checks, 24 skipped, zero failures or pending checks; GitHub reports MERGEABLE/CLEAN. Release admission and production gates remain separate.

  • Earlier conflict repair at commit 579fa67 (main 9136bb5): preserve main's capture-source conversation privacy guard in the decision-only path, union both comparison counters with the added finish/review-config scrape series, and regenerate the flag inventory. Added synthetic allow/deletion/prepare-budget regressions. Nine affected files pass 808 tests (including the updated 75-test projection suite); compose and generated read-lever manifest checks pass. Admission, comparison packet, 14-day qualification and separate production/enforcement gates remain unchanged. Normal pre-push passes all 47 preflight checks, backend type checking with zero errors, and 1508 tests across 40 selected backend files. No hook bypass. Successor CI is running; its result remains required for Release admission.

  • Bounded integration repair at 2e74612f73f517d62c4f19460c219d4f9c2cf12b: refresh the exact keep-list expectation for both comparison counters, eight exact lever-map hashes (four callers in source/composed manifests), and the unapplied six-value monthly proposal patch. No production code/config, monthly scope/epoch/TTL, or budget ceiling changes. The four focused files pass 345 tests, in separate processes.

  • Same-main receipts: on 65f46cce8306794cc7f2a5eff6cda7c285f4fe8b, the original three failing files pass 248 tests. CI's old merge base 9cc1565d383de4565b8bc492479b9d917731370b independently reproduces the exact flag count mismatch 289 != 291. That mismatch does not reproduce on the candidate or current main; the new push must acquire a fresh merge result and CI. No budget guard was relaxed. New-head CI remains required.

  • SCA-2365 ruling: correct only the stale prod runtime contract expectation without another review. Successor 0d70f0c199ff1baa93f553096511f86257f5406c changes that test and its explanatory comments only; the complete file passes 97 tests. All monthly-reader, non-Cloud-Run and other service pins remain asserted. Fresh successor CI must establish its own result.

  • Cost-owner disposition, Nov 15: this is source preparation/future savings only. No enforcement or comparison-configuration GO; shadow deployment is neither a prerequisite nor a co-change for SCA-2280: skip async receipts in the projection finish sweep #25314. Production HOLD remains through 10:18:30Z with existing privacy/release gates.

  • Python 3.11, backend/test.sh, one process per file: 640 passed across nine focused privacy, repair, projection, runtime-manifest and child-metric suites (552 in the eight-file pass, then 88 repair tests after installing local test dependencies).

  • New regressions warm actual owner candidates before testing image-before-config and malformed admission; all three transactional shapes emit positive owner_hit comparisons while admission stays off. Existing token rotation, revision/schema failure, kill-switch, dry-run no-mint and redirect-fence regressions remain.

  • Runtime source compose, generated read-lever manifest check, prod runtime validator, generated flag inventory and diff hygiene pass.

  • Initial preflight found generated flag-inventory drift; the generated document was refreshed. Final preflight passes 47 checks. The normal bounded pre-push gate passes backend type checking with zero errors and 715 tests across 12 selected files. CI remains the full-suite authority and must be green before release admission.

  • All tests are synthetic/hermetic. No production read or write by this change's author run.

Ramp and rollback

Default-off admission is intentional under cost-lead source-preparation GO (2026-11-15 04:24Z). Release owns canonical admission after SCA-2225 parser/protected-environment correction and installed source binding. It must verify effective shadow >0 on every one of the four batch callers before serving this candidate, even with the new defense-in-depth code gate.

Preserve the checked-in runbook's at least 14 days of all-plane shadow, zero unexplained mismatches, positive owner_hit comparisons on all three shapes, no shadow errors/scrape gaps, writer-matrix/privacy proofs, and explicit cost-lead GO. The earlier one-day staging proposal and a clean first hour do not shorten that longer qualification requirement. The six-hour push can deliver comparison-only preparation and review, not qualification or booked savings. Cost lead owns acceptance; a newer explicit window ruling must be recorded before changing this requirement.

Partial-value source expiry is 2026-11-17 UTC; renew its dated metadata through review before then to continue the required window. Expiry is not an automatic live reset and must not enable enforcement. Keep owner-enforce=0 throughout. A later separately reviewed config may enable it only after qualification and cost-lead GO; neither clearing shadow nor the arrival of this image grants that GO.

Rollback: Release keeps owner-enforce=0 and uses ops_kill_switches/privacy_decision_cache.disabled=true (30-second fail-closed poll), restores prior source/image, or restores the recorded per-surface comparison settings while retaining owner-enforce=0 and TTL60=0. No data migration is involved. Worker chart uptake belongs to its existing next train; this PR does not request a worker roll.

Tuning disclosure

OWNER_ID_CAP is restored at initial 256, preserving the existing per-walk and prepare-wide distinct-conversation bound. No worker/process capacity is retuned. New comparison shapes are bounded telemetry states and exit with each check; they do not create a durable pipeline state.

Why isn't this a shared primitive instead? The admission fence is inside the shared batch-privacy entry and inner memo path, covering every consumer rather than adding service-specific rollout checks. Regression incident: #25285 and its #25338 revert after shadow=0 first-serve admission was identified.

Product invariants affected

  • INV-MEM-4

Failure-Class: FC-rollout-flag-absent-from-a-cohost-of-its-code-path

Related to SCA-2190. This source preparation does not complete the production outcome.

Restore the reviewed implementation with a default-off enforcement admission fence and coupled comparison configuration. Preserve certification and prepare-wide bounds.

Failure-Class: FC-rollout-flag-absent-from-a-cohost-of-its-code-path
Preserve exact telemetry and monthly configuration guards for the approved comparison packet. The pending monthly patch remains unapplied.

Failure-Class: none
@Git-on-my-level
Git-on-my-level merged commit a03a86f into main Nov 16, 2026
74 checks passed
@Git-on-my-level
Git-on-my-level deleted the sca-2190/guarded-reland branch November 16, 2026 08:51
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