Skip to content

Jev rulings 10-18: kill owner flip/shadows/rescue/call-link/episode selector, graduate smart merge + wall-clock gap - #22209

Merged
Git-on-my-level merged 21 commits into
mainfrom
lane/jev-flag-rulings
Oct 18, 2026
Merged

Git-on-my-level merged 21 commits into
mainfrom
lane/jev-flag-rulings

Conversation

@Git-on-my-level

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

Copy link
Copy Markdown
Member

Summary

This PR implements David's 2026-10-18 rulings for the Jev experiments and the 10-14 flag-review batch. It removes retired paths and declarations, graduates the approved behavior, keeps the approved ops kill switches, and retires the JIT pipeline without deleting its stored data.

Jev rulings

  • Owner attribution: removed MEMORY_OWNER_JEV_FLIP_ENABLED / _PERCENT, the Jev owner flip and its private writer. Labels did not reach the bar; source attribution is retained at extraction time. Legacy stored attribution overrides remain readable.
  • Owner and relevance shadows: removed both shadow lanes, their daily cap controls, the shadow recorder/Firestore writer, and their metrics. No stored shadow data is migrated or deleted.
  • Relevance selection: removed the keep-all arm, enable switch, UID allowlist, and rescue path. Jev is selected only by CONVERSATION_RELEVANCE_JEV_PERCENT, now ops_kill with a 0% unset default. Existing host outcomes are listed below.
  • Smart merge: CONVERSATION_SMART_MERGE_MODE remains the ops_kill stop lever (merge by default; off stops new merges). The UID allowlist is removed. The legacy-first, proven-same-recording wall-clock rescue is now unconditional after a legacy skip; gap_path=legacy|wallclock and the metrics from the former on path remain. Shadow-only path logging/meters are removed.
  • Desktop/pendant call link: removed its flags, selector/writer, tests, metrics, docs, and runbook. No groups were migrated or deleted; readers retain support for legacy desktop_pendant_call records. All declared hosts were shadow, whose code path does not write. A read-only ro-prod count query could not run because Firestore has no collection-group index for capture_group.kind; no rows were read or changed.
  • Episode evidence: removed Jev/Luna selection and the now-single-choice deterministic selector. MEETING_NOTES_EPISODE_EVIDENCE_* is unchanged. Historical benchmark notes remain.
  • Screen task Jev: pinned only the screen-task caller to typesafe/jev-1.14; other Jev callers stay on their existing models. OCR text only is sent; no images. Registry note records David's privacy approval and the rollout plan: 5% for 3 hours, then 100%, watching gate failure/fail-open rate and extraction spend.

Flag-review batch

  • DEC-MTGCTX-001: removed MEETING_NOTES_SCREEN_FRAMES_CONTEXT_ENABLED; approved frames are attached to meeting notes whenever present and otherwise remain a no-op. The declared prod/dev values were enabled on Cloud Run backend and backend-sync, GKE backend-listen, and pusher; prod backend-sync-backfill and backend-integration were unset/off and now use eligible evidence.
  • DEC-MTGCTX-002: removed the server calendar-context read gate and made the read unconditional. Prod backend-sync-backfill and backend-integration were unset/off and now use stored eligible calendar context. Stable's client flag was absent/off; Beta could enable it unless the client kill row was set. Client behavior is now unconditional. The two PostHog rows (system_calendar_meeting_context and _kill) need separate dashboard cleanup; remote rows cannot be deleted by this code PR.
  • DEC-MTGCTX-003: removed the server OCR-context gate and made the read unconditional. Prod backend-sync-backfill and backend-integration were unset/off and now use eligible stored OCR context. Stable's client flag was absent/off; Beta could enable it unless killed. Client behavior is now unconditional. The on_device_meeting_identity and _kill PostHog rows need separate dashboard cleanup.
  • DEC-MTGCTX-004: deleted only SCREEN_FRAME_EGRESS_ENABLED; its dev/prod values were true on Cloud Run backend and unset elsewhere. Only that service provisions the signer; other hosts remain blocked by the unchanged bucket/signer checks at route entry, before judge_canonical. A host without either still sends nothing to the judge. The account consent default is unchanged.
  • DEC-FREE-001: kept FAIR_USE_ENABLED as an ops_kill; fair-use caps stay enabled.
  • DEC-FREE-002 / DEC-FREE-003: removed the unused free-tier-cohort-v1 exposure key and the dark FREE_TIER_MEMORY_SUPPRESSION flag/cohort path. No user's memory formation changes from those controls. The retired PostHog row cleanup is separate dashboard work.
  • DEC-MEM-001: deleted the belief-model path and response header. Prod had it off; dev had it on, so belief scoring/conflict checks stop in dev. Canonical memory reads/writes and source attribution remain.
  • DEC-MEM-002: removed the daily memory sweep, its switches, scheduler, and operator wiring. The job was dev-only; no prod job was deployed. Stored memory rows remain untouched.
  • DEC-MEM-003: made negative-feedback remediation unconditional for Stable and Beta; Stable was previously off/absent, while Beta was on unless killed. negative_feedback_remediation_kill remains the ops stop lever. The PostHog enable row needs separate dashboard cleanup.
  • DEC-FREE-006 (JIT): removed jit-processing-v1, jit-processing-kill-switch-v1, the two-UID allowlist, KNOWLEDGE_LEDGER_DRAIN_ENABLED, JIT route implementations/notifications/runtime, ledger drain, QA tooling, and scheduled daily-sweep wiring. The newer jit_first_open obligation worker and its first-open dispatch path from current main are removed too; funded backlog consent and demand-driven processing (feat: add demand-driven conversation processing #21905) remain. Six released JIT API paths remain as static 410 tombstones with deprecated route-policy entries; they perform no JIT work, and in-tree clients no longer call them. The same tombstone router is mounted on the deployed desktop backend, so released desktop builds receive 410 (including /v3/memories/{id}/use) rather than 404. The published app-client OpenAPI keeps those operations visible as deprecated 410s so the released request shapes remain protected by the compatibility gate. Eager memory extraction remains; prod was already off, so its extraction behavior is unchanged, and the dev rollout path is removed. No Firestore documents are deleted or migrated. Retained JIT history is in jit_trigger_feedback, jit_proactivity_events, jit_proactivity_daily_budgets, and jit_proactivity_candidate_turns; retained daily-sweep history is in daily_memory_sweep_receipts, daily_memory_sweep_sources, daily_memory_sweep_onboarding_sources, daily_memory_sweep_daily_summary_staged, daily_memory_sweep_onboarding_staged, and daily_memory_sweep_model_invocations. Knowledge-ledger history and migration state remain in place, including memory_ledger_reopens and memory_control/{knowledge_ledger_migration,knowledge_ledger_prompt_projection,knowledge_ledger_writer_transition_receipt}. The two retired PostHog row deletions are separate dashboard cleanup.
  • DEC-OPS-002 / DEC-OPS-003: from the 20 experiment entries on this branch base, retired 11, reclassified three operational knobs as config_switch, kept one Jev percentage as ops_kill, and left five real experiments. Registry rendering now reads deploy-action environment overlays in addition to runtime_env and chart values.
  • DEC-OPS-005: macOS now stops screen-activity sync for the session after an account-deletion 403 or a post-refresh 401, and logs the terminal response once.

The screen-task Jev move to typesafe/jev-1.14 is covered above; only OCR text is sent, no images.

Deleted workflow files: .github/workflows/gcp_daily_memory_sweep_job.yml, .github/workflows/gcp_daily_memory_sweep_job_auto_dev.yml, .github/workflows/jit_qa_cloud_run.yml, .github/workflows/jit_qa_manual_operator.yml, and .github/workflows/jit_qa_typesense_projection.yml.

Relevance rollout parity (ruling 5)

Effective Jev percentage before and after this PR; a host with an unset old percentage used the old enabled default if enabled, otherwise it was off. New unset default is 0%.

Environment Host Before After
prod Cloud Run backend 100% 100%
prod Cloud Run backend-sync 100% 100%
prod Cloud Run backend-sync-backfill 100% 100%
prod Cloud Run backend-integration 0% 0%
prod GKE backend-listen 100% 100%
prod GKE pusher 100% 100%
dev Cloud Run backend 0% 0%
dev Cloud Run backend-sync 0% 0%
dev Cloud Run backend-sync-backfill 0% 0%
dev Cloud Run backend-integration 0% 0%
dev GKE backend-listen 0% 0%
dev GKE pusher 0% 0%

Smart-merge host values (ruling 8)

Environment Host MODE before → after Wall-clock gap before → after
prod Cloud Run backend default merge → merge shadow → unconditional after a proven legacy skip
prod Cloud Run backend-sync default merge → merge shadow → unconditional after a proven legacy skip
prod Cloud Run backend-sync-backfill default merge → merge shadow → unconditional after a proven legacy skip
prod Cloud Run backend-integration default merge → merge shadow → unconditional after a proven legacy skip
prod GKE backend-listen default merge → merge shadow → unconditional after a proven legacy skip
prod GKE pusher default merge → merge shadow → unconditional after a proven legacy skip
dev Cloud Run backend default merge → merge shadow → unconditional after a proven legacy skip
dev Cloud Run backend-sync default merge → merge shadow → unconditional after a proven legacy skip
dev Cloud Run backend-sync-backfill default merge → merge shadow → unconditional after a proven legacy skip
dev Cloud Run backend-integration default merge → merge shadow → unconditional after a proven legacy skip
dev GKE backend-listen default merge → merge shadow → unconditional after a proven legacy skip
dev GKE pusher default merge → merge shadow → unconditional after a proven legacy skip

User-visible effects and rollback

  • The unconditional wall-clock rescue is estimated to produce approximately 800 additional conversation merges per day fleet-wide. A merge is irreversible for already-merged records. Revert this PR to restore the prior path; CONVERSATION_SMART_MERGE_MODE=off stops all new smart merges immediately.
  • Eligible calendar, screen-frame, and OCR context is now used on the two previously-off prod Cloud Run hosts above. Hosts without bucket or signer configuration still fail before the privacy judge.
  • Jev relevance stays at the same effective percentages on every Cloud Run and GKE prod/dev host shown above. Unset configuration now stays off.
  • Screen-task Jev rollout remains staged at 5% for 3 hours, then 100%; monitor gate failures, fail-open rate, and extraction spend. Other Jev callers and SCREEN_TASK_JEV_* controls are unchanged.
  • Reverting the PR restores the removed behavior and flags. The two remaining stop levers are CONVERSATION_SMART_MERGE_MODE=off for smart merge and negative_feedback_remediation_kill for negative-feedback remediation.

Validation

UI-Evidence: none -- retirement-only UI cleanup; no new layout or visual design, with changed behavior covered by component and platform tests.

  • Targeted backend, Flutter, macOS, Windows, web app/admin, and dev-harness suites passed; registry and runtime-env checks passed. The screen-frame route tests verify missing bucket or signer blocks the privacy judge.
  • Full backend Pyright typecheck passes with 0 errors (38,620 non-blocking warnings); the touched backend service/route tests pass under isolated backend/test.sh. App-client OpenAPI compatibility passes, its schema and generated Dart/TypeScript/Swift outputs are current, and 107 focused compatibility/generator/contract tests pass.
  • The base-aware local backend selector covered 1,949 paths. After updating stale assertions, all seven affected backend test modules passed in isolation (150 tests). ZCode reported three episode-evaluation call-phase duration failures on the prior CI head. A serial isolated comparison measured the corresponding calls at 0.02s on origin/main versus 0.30s, 0.27s, and 0.28s before the fix. The regression was a cold import of the SystemOne client solely to read its prompt identifier; moving that identifier to the already-loaded offline prompts module reduced the branch measurements to 0.01s, 0.02s, and 0.02s. All three files now pass backend/test.sh without allowlist entries or guard overrides. The deployed desktop backend now mounts the retired app-client tombstones and tests all JIT, temporary-frame, and memory-use compatibility routes for 410. Concurrent PostHog first reads now share one lazily constructed client; a concurrent regression test verifies this. Both backend apps no longer expose the obsolete X-Omi-Memory-As-Of CORS header.
  • Both nice -n 10 scripts/pr-preflight --pr-body-file ... and nice -n 10 env OMI_PR_BODY_FILE=... make preflight pass all 110 selected checks on the integrated source committed as ae8f7ba; no PRE_PUSH_SKIP_* variables were set. Earlier iterations found stale assertions tied to removed workflows, a route-policy gap for retained 410 compatibility endpoints, and three Swift formatting differences; those were corrected, and each affected check now passes. The updated Cloud Run forbidden-env test passes 2/2 in isolated backend/test.sh and verifies renderer outputs come from GITHUB_OUTPUT without stdout leakage.
  • CodeQL remains the only expected check exception. Parent triage on the PR confirms the 12 Python annotations on head 3f626848 are pre-existing main alerts shifted by line edits (X connector clear-text logging, runtime-env rendering at 418→456, and the ws-m-atom test regex); the seven JavaScript randomness annotations were likewise confirmed against main. The triage evidence is documented in PR comments. No further code changes are being made to chase these findings.
  • Focused Windows page-cache tests (2/2), web client-device tests (1/1), and Prettier checks pass. Ten isolated backend test files pass, including runtime-env rendering, memory tools, X sync, and the regex-bearing Typesense test.
  • The prior-head Dart timeout reproduced locally but passed on origin/main (78996697a5b). The timed-out future was the test waiting for native reconciliation to start: after retirement, unsupported history correctly selects additive Siri upserts, since a current-only fetch cannot authorize deleting absent native rows. The test now injects an empty, complete owner-history projection before asserting that a native reconcile that never returns cannot hold the provider load open. The complete Siri nonblocking test file passes (3/3).
  • No workflow skip variables are used. Fresh terminal GitHub CI for the integrated head is pending after the normal push.

Failure-Class: none

Product invariants affected

  • INV-CUTOVER-1
  • INV-AGENT-*
  • INV-AUTH-1
  • INV-CHAT-1
  • INV-DATA-1
  • INV-BETA-1
  • INV-MEM-3
  • INV-MEM-4
  • INV-MEM-1
  • INV-TASK-2

# Conflicts:
#	backend/database/jev_shadow.py
#	backend/deploy/runtime_env.yaml
#	backend/deploy/runtime_env/_base.yaml
#	backend/docs/feature-flag-registry.md
#	backend/tests/unit/test_conversation_notes_v2_beta_rollout.py
#	backend/tests/unit/test_jev_population_shadow.py
# Conflicts:
#	backend/scripts/run-emulator-proofs.sh
# Conflicts:
#	.github/failure-classes/FC-rollout-flag-absent-from-a-cohost-of-its-code-path.json
#	backend/deploy/runtime_env.yaml
#	backend/docs/feature-flag-registry.md
#	backend/route_policy_manifest.yaml
#	backend/tests/fast_unit_duration_allowlist.txt
# Conflicts:
#	backend/deploy/runtime_env.yaml
#	backend/deploy/runtime_env/_base.yaml
#	backend/docs/feature-flag-registry.md
# Conflicts:
#	backend/deploy/runtime_env.yaml
#	backend/deploy/runtime_env/_base.yaml
#	backend/deploy/runtime_env/dev.overlay.yaml
#	backend/deploy/runtime_env/prod.overlay.yaml
#	backend/docs/feature-flag-registry.md
#	backend/tests/unit/test_knowledge_ledger_drain_job.py
#	backend/utils/executors.py
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 18, 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-18T22:05:31.329979Z bd1bd85 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.

@mintlify

mintlify Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
omi 🟢 Ready View Preview Oct 18, 2026, 8:59 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@mintlify

mintlify Bot commented Oct 18, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
omi 🟡 Building – Oct 18, 2026, 6:34 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@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: d3b9750469

ℹ️ 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 +660 to +666
let refreshedHeaders = try await APIClient.shared.buildHeaders(
forceRefreshAuth: true, expectedAuthOwnerId: authorizationSnapshot?.ownerID)
if let authorizationSnapshot, !RuntimeOwnerIdentity.isAuthorizationCurrent(authorizationSnapshot) {
log("ScreenActivitySync: signed-in account changed during auth refresh; not retried")
return false
}
request.allHTTPHeaderFields = refreshedHeaders

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 Propagate refreshed auth to frame-request delivery

When the initial sync receives a 401 and the forced-refresh retry succeeds with a nonempty frameRequests response, this updates only request; the immutable headers dictionary still contains the rejected token and is subsequently passed to both claimFrameRequests and uploadAndPromoteFrameRequests. The sync can therefore return 200 while frame delivery immediately fails authentication and waits for a later sync tick; update the shared headers or pass refreshedHeaders to the downstream requests.

Useful? React with 👍 / 👎.

logError("ChatProvider: authoritative ledger prompt refresh failed closed", error: error)
await loadAIProfileIfNeeded()
}
await loadAIProfileIfNeeded()

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 Filter stale history rows before prompting

For users who previously loaded the beta History/All view, syncServerMemories has additively retained rejected or superseded rows in SQLite, and ordinary current-page refreshes do not prune rows absent from the server projection. Ending this method after the unfiltered getLocalMemories read removes the authoritative ledger snapshot that previously replaced those cached rows, so formatMemoriesSection now sends them to the model as current user facts on every chat turn. Filter the local read to current eligible rows or migrate/prune retired history rows before constructing prompt context.

Useful? React with 👍 / 👎.

Comment on lines 884 to 885
db_client = getattr(db_client_module, 'db', None)
budget = list_read_budget_for_request(request, route='memories-ledger-history')

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 Avoid eager ledger-history scans on every tab load

For every non-device-scoped mobile memory load, the client calls this route before the user opens History and follows up to ten returned cursors. Removing the rollout fast path means an account with thousands of current canonical rows but no history now scans 501 Firestore documents per request—up to roughly 5,010 reads merely to prove the projection empty. This is the fleet-wide scan the deleted guard explicitly avoided; defer history loading until that view is selected or provide an indexed, inexpensive history query.

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: 8a9edccf12

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

)
else:
result = self._canonical_write(uid, memory_db.model_dump(mode="python"), source_surface=consumer)
result = self._canonical_write(uid, memory_db.model_dump(mode="python"), source_surface=consumer)

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 Reset retained ledger writer modes before removing their writer

For any account previously cut over to WriterMode.ledger, this now sends manual creates through _canonical_write, whose non-ledger payload is classified as the compatibility writer and rejected by require_writer_admitted; batch creates fail the same way. Those persisted writer modes are explicitly retained, while this change also removes the ledger drain/daily sweep and leaves extract_memories skipping every non-compatibility mode, so affected accounts receive 503s for manual creates and silently stop forming memories from conversations. Migrate these control rows back to compatibility or preserve a user-authorized write path before retiring the ledger writers.

Useful? React with 👍 / 👎.

Comment on lines 934 to 935
export async function deleteLocalConversation(id: string): Promise<void> {
await deleteJitConversationKeyframe(id)
cachedStmt(get(), 'DELETE FROM local_conversation WHERE id = ?').run(id)

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 Preserve cleanup for legacy JIT keyframes

On upgraded Windows installs that still contain jit_keyframe_pin or cleanup-outbox rows, deleting a conversation now removes only local_conversation; this change also removes the launch retry worker. The associated Rewind JPEG and database row can therefore survive an explicit deletion for the full configured retention period, while previously failed cleanup entries are never retried. Keep the retirement-only enqueue/drain path until legacy pins and outboxes have been exhausted.

Useful? React with 👍 / 👎.

Comment on lines 162 to 163
app.include_router(desktop_experiments.router)
app.include_router(jit_ledger_snapshot.router)
app.include_router(jit_rollout.router)
app.include_router(desktop_realtime.router)

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 Register retirement shims on the desktop backend

Released macOS builds send JIT authority requests to rustBackendURL, which is served by this separate desktop-backend app. Removing the active JIT and memory-use routers here without registering retired_app_client_contracts.router means those released clients receive an unversioned 404, while only main.py serves the intended authenticated 410 retirement boundary. Register the retirement router in _build_app as well.

AGENTS.md reference: backend/AGENTS.md:L219-L223

Useful? React with 👍 / 👎.

x_omi_jit_max_output_tokens: str | None = None,
x_omi_jit_max_input_tokens: str | None = None,
x_omi_jit_max_spend_micro_usd: str | None = None,
) -> JSONResponse | StreamingResponse:

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 Reject legacy JIT headers before paid chat

When an older macOS runtime has a JIT relay context, it still attaches the X-Omi-Jit-* budget headers to desktop chat requests. Removing this ingress check makes those requests enter the ordinary managed/gateway chat path instead of receiving 410, so the first retired proactive provider attempt can incur spend before the old client's post-response receipt guard notices that the JIT receipt is missing. Keep a terminal 410 check for these headers while those clients remain released.

AGENTS.md reference: backend/AGENTS.md:L219-L223

Useful? React with 👍 / 👎.

@Git-on-my-level

Copy link
Copy Markdown
Member Author

CodeQL triage (parent session): the 7 js/insecure-randomness annotations on desktop/windows/.../useMemories.ts (56, 103, 144, 176, 193) and pages/Conversations.tsx (197, 368) are pre-existing alerts on main, shifted by line deletions above them. main has the same rule open at useMemories.ts 74/150/198/230/258/270 and Conversations.tsx 197/368. This PR adds no Math.random use; it removes one (the retired memory-use idempotency key). CodeQL's own check summary warns that alerts not introduced by the PR may show up when the change is too large. No new security alert is introduced.

🤖 Generated with Claude Code

@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: dec6ec806f

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

def retired_memory_use(
memory_id: str,
request: Request,
uid: str = Depends(get_current_user_uid),

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 Preserve the rate limit on retired memory-use requests

When a released client or another authenticated caller repeatedly posts to this retired endpoint, the new dependency performs authentication only, although route_policy_manifest.yaml still declares the memories:modify fail-closed wrapper and the replaced handler enforced it. Because this 410 boundary remains externally reachable, this change allows an authenticated user to generate unbounded auth and request-processing load; retain with_rate_limit(get_current_user_uid, "memories:modify") on the retirement shim.

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

Useful? React with 👍 / 👎.

# Conflicts:
#	backend/docs/feature-flag-registry.md
#	backend/routers/conversations.py
#	backend/tests/fast_unit_duration_allowlist.txt
#	backend/utils/conversations/process_conversation.py
#	backend/utils/conversations/processing_trigger.py
# Conflicts:
#	desktop/macos/Desktop/Sources/ScreenActivitySyncService.swift
@Git-on-my-level

Copy link
Copy Markdown
Member Author

CodeQL triage, head 3f62684 (parent session): the 12 Python annotations are pre-existing main alerts with the same rule, shifted by line changes. py/clear-text-logging-sensitive-data is open on main at backend/utils/x_connector.py 296/528/551/567/602/644/645/651 (PR shows 295/517/540/556/591/633/634/640 after 11 deleted lines) and at render_backend_runtime_env.py 418 (PR: 456 after +38 lines above). py/redos is open on main at test_ws_m_atom_keyword_index.py:330. No new alert is introduced.

🤖 Generated with Claude Code

@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: bd1bd85955

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

request_id: str,
request: Request,
account_generation: int | None = None,
uid: str = Depends(get_current_user_uid),

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 Preserve the limit on retired frame-image requests

When a released client or authenticated caller repeatedly requests this retired image endpoint, every request now performs authentication without the frame_requests:read limiter enforced by the replaced handler and still declared in route_policy_manifest.yaml. This makes the externally reachable 410 boundary an unbounded auth/request-processing path; retain with_rate_limit(get_current_user_uid, "frame_requests:read") on the tombstone.

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

Useful? React with 👍 / 👎.

if not output_path:
raise RuntimeError('GITHUB_OUTPUT must be set to render workflow outputs')
with Path(output_path).open('a', encoding='utf-8') as output_file:
output_file.write(value)
@@ -293,7 +292,7 @@
emit_auth_refresh_succeeded(telemetry_context)
return token_resp['access_token']
except Exception as e:
logger.warning(f'x_connector: token refresh failed for uid={uid}: {e}')
logger.warning('x_connector: token refresh failed for uid=%s (error_type=%s)', uid, type(e).__name__)
@@ -525,7 +514,9 @@
new_posts = tweets + bookmarks
source = 'oauth'
except Exception as e:
logger.warning(f'x_connector: official API sync failed for uid={uid}, falling back: {e}')
logger.warning(
'x_connector: official API sync failed for uid=%s, falling back (error_type=%s)', uid, type(e).__name__
@@ -548,7 +539,7 @@
# deployment, not a fetch error: skip the fallback instead of
# burning retries per user on a guaranteed failure.
await run_blocking(db_executor, users_db.set_integration, uid, INTEGRATION_KEY, {'syncing': False})
logger.info(f'x_connector: RapidAPI fallback skipped for uid={uid}: RAPID_API_KEY not configured')
logger.info('x_connector: RapidAPI fallback skipped for uid=%s: credentials are not configured', uid)
@@ -564,7 +555,7 @@
]
source = 'rapidapi'
except Exception as e:
logger.error(f'x_connector: RapidAPI fallback failed for uid={uid}: {e}')
logger.error('x_connector: RapidAPI fallback failed for uid=%s (error_type=%s)', uid, type(e).__name__)
'x_connector: failed to index x_posts chunk[%s:%s] for uid=%s (error_type=%s)',
i,
i + 100,
uid,
logger.warning(f'x_connector: failed to clear syncing after Flex deferral for uid={uid}: {cleanup_error}')
logger.warning(
'x_connector: failed to clear syncing after Flex deferral for uid=%s (error_type=%s)',
uid,
logger.warning(f'x_connector: failed to clear syncing after sync failure for uid={uid}: {cleanup_error}')
logger.warning(
'x_connector: failed to clear syncing after sync failure for uid=%s (error_type=%s)',
uid,
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.

2 participants