Skip to content

fix(ci): strip leftover MEMORY_ENABLED_USERS from Cloud Run backend deploys - #11472

Merged
kodjima33 merged 3 commits into
mainfrom
fix/dev-retired-memory-env
Aug 13, 2026
Merged

kodjima33 merged 3 commits into
mainfrom
fix/dev-retired-memory-env

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Aug 13, 2026 •

Copy link
Copy Markdown
Member

Summary

Auto Deploy 31667490904 failed candidate verification on leftover MEMORY_ENABLED_USERS for backend, backend-sync, backend-sync-backfill, and backend-integration. Firestore readiness already passed. Cloud Run merges --update-env-vars, so #11447 retiring the per-user inventory left the live name in place.

This PR adds MEMORY_ENABLED_USERS to the existing --remove-env-vars lists used by both gcp_backend.yml and gcp_backend_auto_dev.yml (via deploy-backend-stack and sync-backfill-lifecycle). The full verifier-forbidden leftover set is now stripped:

  • MEMORY_ENABLED_USERS
  • MEMORY_CANONICAL_PROMOTION_CRON_ENABLED
  • MEMORY_CANONICAL_PROMOTION_CRON_INTERVAL_HOURS
  • MEMORY_CANONICAL_PROMOTION_FAST_TRACK_ENABLED

Still-declared memory env (MEMORY_MODE, MEMORY_V3_GET_ENABLED, MEMORY_TYPESENSE_COLLECTION, MEMORY_CANONICAL_MAINTENANCE_ENABLED) is not removed.

Validation

  • backend/.venv/bin/python -m pytest tests/unit/test_render_backend_runtime_env.py tests/unit/test_backend_runtime_env_validator.py -q — 99 passed
  • Test now fails if backend Cloud Run deploy YAML omits any name in RETIRED_CANONICAL_MEMORY_ENV
  • scripts/pr-preflight --pr-body-file and make preflight passed
  • Pre-push used PRE_PUSH_SKIP_BACKEND_TYPECHECK=1 and PRE_PUSH_SKIP_BACKEND_UNIT_TESTS=1:
    • local pyright reports two provider_request possibly-unbound errors in backend/routers/desktop_proactivity.py from already-merged fix: return structured output from direct proactivity lane #11471 on origin/main. This PR does not touch that file.
    • hook-selected test.sh files all passed assertions; failures were backend fast-unit CPU timing guards (> 0.12s) under a loaded pre-push suite.

Product invariants affected

none

Failure-Class: FC-runtime-binding-contract

Review in cubic

@Git-on-my-level Git-on-my-level added the no-changelog-needed Skip desktop changelog enforcement for internal-only changes label Aug 13, 2026

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 3 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@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: 63855913ee

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

@Git-on-my-level

Copy link
Copy Markdown
Member Author

CI red was Backend unit suite pyright on desktop_proactivity.py:397/404 (provider_request possibly unbound) from already-merged #11471 — same failure on main. Pushed a 4-line bind-before-log fix on this PR so the suite can go green. 19/19 test_desktop_proactivity.py passed locally.

Git-on-my-level added a commit that referenced this pull request Aug 13, 2026
…loys

The memory-maintenance-job is also a Cloud Run deploy that merges env
vars across revisions. Its rendered --remove-env-vars was missing
MEMORY_ENABLED_USERS, so the stale per-user binding survived on that
job after #11447. Add it to both dev and prod maintenance-job flags
and extend the test to cover that deployment path.

Addresses Codex review comment on #11472.
@Git-on-my-level
Git-on-my-level force-pushed the fix/dev-retired-memory-env branch from a58763a to 035dfe0 Compare August 13, 2026 08:28
Git-on-my-level and others added 3 commits August 13, 2026 20:09
…eploys

Cloud Run merges --update-env-vars, so retired MEMORY_ENABLED_USERS
survives candidate verification after #11447. Add it to the existing
--remove-env-vars lists for backend, backend-sync,
backend-sync-backfill, and backend-integration.

Failure-Class: FC-runtime-binding-contract
…loys

The memory-maintenance-job is also a Cloud Run deploy that merges env
vars across revisions. Its rendered --remove-env-vars was missing
MEMORY_ENABLED_USERS, so the stale per-user binding survived on that
job after #11447. Add it to both dev and prod maintenance-job flags
and extend the test to cover that deployment path.

Addresses Codex review comment on #11472.
The committed runtime_env.yaml (composed output) had MEMORY_ENABLED_USERS
added for the memory-maintenance-job but the declarative source _base.yaml
was not updated, breaking the backend-runtime-env-compose check.

Also run black on test_render_backend_runtime_env.py.
@Git-on-my-level
Git-on-my-level force-pushed the fix/dev-retired-memory-env branch from d7ee50f to 874c93b Compare August 13, 2026 13:11
@Git-on-my-level

Copy link
Copy Markdown
Member Author

Rebased onto latest origin/main to resolve merge conflicts (was CONFLICTING, now MERGEABLE).

  • The desktop_proactivity.py provider-request bind fix (originally added to work around a pyright failure from fix: return structured output from direct proactivity lane #11471 on the old base) is obsolete — upstream main now handles that binding natively. Dropped that commit during rebase.
  • Codex review thread on maintenance-job MEMORY_ENABLED_USERS cleanup was already addressed in a prior commit on this branch; thread remains resolved.
  • All CI checks pass on the rebased head.

@kodjima33
kodjima33 merged commit 96a87fb into main Aug 13, 2026
39 checks passed
@kodjima33
kodjima33 deleted the fix/dev-retired-memory-env branch August 13, 2026 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog-needed Skip desktop changelog enforcement for internal-only changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants