Skip to content

Flag rulings b19: product and speaker flags - #22831

Merged
Git-on-my-level merged 8 commits into
mainfrom
lane/fr-b19-product
Oct 20, 2026
Merged

Git-on-my-level merged 8 commits into
mainfrom
lane/fr-b19-product

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

PRD-001 — kill (DEC-PRD-001)

Remove EXP-002 enrollment router/config/telemetry tag and both registry rows, plus its now-orphaned paired PostHog reader and dedicated executor. Remove desktop enrollment, memory_v1 UI/prompt/runtime branches, postcard landing state, experiment telemetry and e2e flow; withdraw the historical pre-registration. Keep the shared experiment utilities for EXP-001. On current main, pi-mono already passes prompts through without consulting the memory variant; remove its unused variant constant and obsolete arm-routing tests as well.

Released-client compatibility: v0.12.508 (fa2de758b9f26ce3c4d0e32af400b4066087838b) throws on HTTP 404, catches enrollment failures, clears the assignment and resolves control with no error UI. The resolved guard prevents another request for that launch/owner; assignments are not persisted locally. Both coordinator revisions since introduction retain the same catch/control/resolved guard. An isolated Swift harness compiled the released coordinator and request handler with a 404 transport fixture and passed these assertions. No compatibility stub is needed.

PostHog verification (2026-10-20): authenticated against the existing configured MCP connection and confirmed active project 302298 (Omi). feature-flag-get-definition-by-key returned found: false for both exp-002-desktop-identity-v1 and exp-002-desktop-identity-kill-v1; that lookup includes archived flags. There is no existing flag to disable/archive, and the server's fail-closed enrollment gate already denies missing rollout flags. No remote mutation was needed. Card correction: these expected registry rows do not correspond to existing flags in the verified project. Recheck before parent deployment if flags are recreated. The enrollment router is mounted only by backend/desktop_backend.py: parent rollout must include the separate desktop-backend release, which regular backend service deployments do not update. No live serving identity was queried. Card correction: released clients resolve once per launch/owner. PostHog off applies to the next enrollment; it cannot revoke an already-running memory_v1 assignment without a relaunch or owner change. Rollback: revert this PR; leave the absent rollout flag absent to prevent future treatment enrollment.

PRD-002 — kill_after_readout (DEC-PRD-002)

Registry only: review by 2026-10-30; confirmatory readout ~10-28 (314 closed windows); kill PR per DEC-PRD-002 unless the 95% CI shows positive lift. Leave email behavior, scheduler, job, env and retention roster unchanged. The current registry schema rejected this decided value, so extend its allowed decisions and test that it requires an experiment with an undecided terminal state. Rollback: revert the registry/schema edits.

PRD-003 — ops_kill, on by default (DEC-PRD-003)

Unset/blank and all values except false/off/0 enable pinned near-miss suggestions and voice candidate ranking. Classify as ops_kill, remove review_by and document that automatic labeling thresholds are unchanged. Rollback: set PINNED_SPEAKER_PRIOR_ENABLED=false on processing hosts and redeploy, or revert. Parent deployment should watch suggestion-event volume and speaker-tag prompt answers for 24 hours.

PRD-004 — graduate (DEC-PRD-004)

Make trusted span placement unconditional, including dev; remove the consumer flag, legacy alignment/cache-refusal/embedding paths, declarations from base/overlays/charts, and classification. Regenerate runtime env and registry docs. Migrate OFF/advisory tests to the graduated behavior while retaining timing, coverage, ambiguity, cache, deadline and historical PCM-comparison guards. Historical comparison modules pin the retired consumer on locally, without a production compatibility wrapper. Rollback: revert; there is no consumer env stop after graduation.

PRD-005 — kill (DEC-PRD-005)

Delete the measurement-only anchor shadow, its bounded counters/log fields, config reader, registry/classification entries, extra provenance read and obsolete shadow tests. Keep exact task identity, refresh preservation, delivery and reminders unchanged. Rollback: revert.

Validation

  • Released v0.12.508 404/control harness passed.
  • Registry checker/unit tests and dev/prod runtime env validators passed.
  • Targeted backend tests: 1311 passed across 22 files, run serially and file-isolated through BACKEND_UNIT_TEST_FILE_LIST at nice -n 10. Three pre-existing optional cross-service fixture cases skip; no new skips or bypass variables.
  • CI exposed stale enrollment-route inventory and two graduated-path fixtures (a historical reader import and unmeasured sync cache). Updated those tests without weakening assertions; all four affected files passed (134 tests, serial/file-isolated).
  • Desktop agent logic harness passed (686 Swift tests, agent runtime/tool surfaces, exact pi-mono-extension package tests); real ChatMessagesView live-edge capture test passed. make preflight and scripts/pr-preflight --pr-body-file both passed all 67 checks. GitHub CI is tracked on this PR.
  • The unchanged pipe-abort extension test hit its 10 ms pending-map assertion once during a push attempt; an unchanged full rerun passed (878 runtime tests + 137 extension tests, zero skips). No assertion or gate was bypassed.
  • No GCP tier used; no deployment or remote flag changes. PostHog reads were limited to project identity and the two exact flag definitions; no customer-event queries.

Failure-Class: none

Product invariants

  • INV-AUTH-1: removing enrollment also removes its owner-scoped request/reset; the shared auth authority is unchanged.
  • INV-CHAT-1: the shared provider, journal and turn projection remain authoritative; only experiment prompt context is deleted.
  • INV-CHAT-2: every transcript now keeps the standard live-edge initial placement; remove the experimental postcard exception.
  • INV-NAV-1: remove the experiment parameter from the single shell without removing any product destination.
  • INV-MEM-4: memory promotion authority and task identity/preservation remain unchanged by removing shadow measurement.
  • INV-TASK-2: automatic capture still proposes tasks through existing authority; no new task writer is introduced.

Control transcript evidence (synthetic fixture messages in the real ChatMessagesView; no customer content):

Control transcript at the live edge

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T11:43:04.199853Z bb059aa 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: bb059aadba

ℹ️ 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 thread config/feature-flags.yaml
- {"key":"proactivity_v2","kind":"posthog","lifecycle":"rollout","surfaces":["backend","llm-gateway"],"summary":"Server v2 proactivity admission; absent or unknown denies","fail":"closed","aliases":[],"owner":"dazheng","created":"2026-10-03","review_by":"2026-11-03","terminal":"undecided","decision":"pending","posthog":{"row":"expected","role":"enable"}}
- {"key":"MENTOR_PIPELINE","kind":"env","lifecycle":"config_switch","surfaces":["backend"],"summary":"Per-user cohort mentor dispatch; only cohort is valid — flag false/error or any other value dispatches nothing (legacy lane deleted)","fail":"closed","aliases":[],"owner":"dazheng","created":"2026-10-03","terminal":"keep","decision":"keep"}
- {"key":"LIVE_SPEAKER_SPAN_RESOLUTION","aliases":[],"kind":"env","lifecycle":"rollout","surfaces":["backend"],"summary":"Resolve live and mixed conversation voices only from validated capture spans or trusted sync/v2 placement; default off","fail":"closed","owner":"dazheng","created":"2026-10-03","review_by":"2026-11-02","terminal":"undecided","decision":"pending","notes":"Independent consumer gate; on in prod Cloud Run backend/backend-sync/backend-sync-backfill/backend-integration and GKE listen+pusher (rollout step 3) after storage qualified 2026-10-04; v1 caches remain readable and capture-sourced entries have distinct window keys"}
- {"key":"LIVE_CAPTURE_WINDOW_RETENTION","aliases":[],"kind":"env","lifecycle":"rollout","surfaces":["backend"],"summary":"Retain up to 512 observed capture anchors and 16384 accepted-send spans for delayed live finals; default off","fail":"closed","owner":"dazheng","created":"2026-10-04","review_by":"2026-11-03","terminal":"undecided","decision":"pending","notes":"Bookkeeping only; no gap fill or timestamp extrapolation. Default off in all deployments. New clocks/maps snapshot the limits."}

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 Tombstone the retired flag names

Add LIVE_SPEAKER_SPAN_RESOLUTION, ACTION_ITEM_IDENTITY_ANCHOR_SHADOW_ENABLED, and both exp-002-desktop-identity-* keys to the registry's retired: section instead of only deleting their active rows. Without tombstones, a future change can register these obsolete names as active again and pass check_feature_flag_registry.py; the checker only emits retired name reintroduced/redeclared when the key remains in that section, and backend/docs/feature-flag-registry.md explicitly requires retired PostHog names to be recorded there.

Useful? React with 👍 / 👎.

@Git-on-my-level
Git-on-my-level merged commit 11f9737 into main Oct 20, 2026
60 checks passed
@Git-on-my-level
Git-on-my-level deleted the lane/fr-b19-product branch October 20, 2026 13:52
Git-on-my-level added a commit that referenced this pull request Oct 20, 2026
…e, not every flag (#22924)

## Summary
Prod Pusher promotion run 39433983369 (main `11f97372`) failed with
`qualification evidence contract does not match the current promotion
contract`. The selected dev qualification, run 39423577397, ran on
`506592ee`. Between those two commits only one contract input changed:
flag ruling #22831 (`11f97372`) removed `LIVE_SPEAKER_SPAN_RESOLUTION`
from
`backend/deploy/runtime_env{.yaml,/_base.yaml,/dev.overlay.yaml,/prod.overlay.yaml}`.
Those four files were hashed byte-for-byte into `contract_sha256`. As a
result, any flag ruling for any service invalidated every dev
qualification, and prod Pusher could promote only if it was dispatched
before the next flag PR merged. Main receives several flag PRs a day,
and dev Pusher was red from about 14:30 to 17:15 UTC on 10-20, so prod
Pusher has not deployed since before #22839.

What changed:
- The contract now hashes the promotion scripts and workflows (unchanged
list), plus, from the composed `runtime_env.yaml`, only
`environments.{dev,prod}.gke.pusher`, the shared backend ConfigMap
`gke.config_map` (the prod job writes it before Helm and the Pusher pod
envFroms it), and the per-environment project and region scalars. A real
Pusher env change still invalidates the evidence; another service's flag
ruling no longer does. The prod workflow already re-validates the prod
runtime env at the checked-out main before it publishes, and the Pusher
image source closure is still diffed separately.
- `pusher_release_receipt.py` (the dev writer) imports
`contract_fingerprint` from `verify_pusher_promotion_evidence.py` (the
prod checker). Before this change each file kept its own copy of the
file list.
- The prod selection step runs `pip install pyyaml` before the verifier,
because the projection parses YAML.
- The mismatch error now says what to do: select a dev run from the
current main.

## Review
Grok review: no blockers. Both should-fixes are addressed in `f145eeb5`:
`gke.config_map` is now hashed, and the tests assert
`contract_fingerprint()` itself, including a ConfigMap-change case. For
the nit, only an immutable digest is cached now. Residual risks Grok
noted, unchanged from before this PR: GitHub-var values for `source:
environment` keys were never hashed, and `pip install pyyaml` is
unpinned (a parser change fails closed on hash mismatch).

## Lane / contract
Lane pusher-d0b (10-20 swarm P5 Part A); owner sign-offs for edits to
other lanes' files: none

## Product invariants affected
- INV-DATA-1: path match only
(`.github/workflows/gcp_backend_pusher.yml`). The only workflow edit is
a `pip install pyyaml` line in the prod selection step.
This change does not alter the Firebase/Firestore project or serving
endpoints.

## Verification
- `backend/test.sh` with `BACKEND_UNIT_TEST_FILE_LIST` =
`test_verify_pusher_promotion_evidence.py`,
`test_pusher_auto_deploy_paths.py`,
`test_pusher_deployment_control_workflow.py`: 63 passed, including the
fast-unit CPU guard. Layer: unit.
- New tests:
-
`test_dev_qualification_recorder_output_satisfies_the_prod_promotion_contract`:
the qualification JSON from `record_qualification`, which the dev
workflow writes, passes the prod `validate()` with no errors.
- Unrelated listen or Cloud Run flag flips leave the projection
unchanged.
  - A dev or prod Pusher env flip changes the projection.
  - The real manifest yields a dev/prod Pusher projection.
- Both scripts' CLIs import cleanly when invoked by path, as the
workflows do.
- Not run: a live dev qualification or prod promotion. Merging this
changes contract files, so the dev auto-deploy runs again on the merge
SHA, and that run is the one to promote.

## Rollback
Revert this PR. The old byte-for-byte contract comes back, and dev
evidence recorded under the new fingerprint will then fail prod until
dev re-qualifies.

Failure-Class: FC-promotion-gate-admits-on-recency-not-lineage

🤖 Generated with [Claude Code](https://claude.com/claude-code)
kriegcloud pushed a commit to kriegcloud/omi that referenced this pull request Oct 20, 2026
…e, not every flag

Prod Pusher promotion 39433983369 (main 11f9737) failed with "qualification
evidence contract does not match the current promotion contract". The dev
qualification 39423577397 ran on 506592e; between the two, flag ruling BasedHardware#22831
edited backend/deploy/runtime_env{.yaml,/_base,/dev,/prod overlay}, which were
hashed byte-for-byte into contract_sha256. Every flag ruling for any service
therefore invalidated every dev qualification, and prod Pusher could promote
only if dispatched before the next flag PR landed on main.

The contract now hashes the promotion scripts and workflows as before, plus
only environments.{dev,prod}.gke.pusher and the per-environment project/region
scalars from the composed runtime_env.yaml. The receipt writer imports the
verifier's contract_fingerprint so the two cannot drift apart. The prod
selection step installs PyYAML before running the verifier.

Tests: the recorder's qualification output passes the prod verifier; an
unrelated listen/Cloud Run flag change keeps the projection; a dev or prod
Pusher env change breaks it.

Failure-Class: FC-promotion-gate-admits-on-recency-not-lineage

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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