Skip to content

fix(backend): default MEMORY_MODE=write so memory intake is on - #11584

Merged
Git-on-my-level merged 1 commit into
mainfrom
fix/memory-intake-default-on
Aug 14, 2026
Merged

Git-on-my-level merged 1 commit into
mainfrom
fix/memory-intake-default-on

Conversation

@Git-on-my-level

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

Copy link
Copy Markdown
Member

Summary

After #11447, MEMORY_MODE=off is a fleet write pause (503 Memory writes are globally paused). Source still pinned off as a Gate 3 dark-deploy leftover, so every auto-deploy re-pauses intake.

Pin default-on intake as MEMORY_MODE=write for every UID (no allowlist). ST→LT read + maintenance cron stay a separate Gate 3 cutover.

Failure-Class

Failure-Class: none

Test plan

  • validate-backend-runtime-env.py --env dev and --env prod
  • focused runtime-env validator + render tests
  • Dev auto-deploy after merge: serving MEMORY_MODE=write
  • POST /v3/memories is not Memory writes are globally paused
  • No production live flip in this change; prod source is write for the next approved prod deploy

Review in cubic

Post-unification, off pauses all writes. Keep that as an explicit
kill switch, not the deploy default.

Failure-Class: none

@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.

1 issue found across 9 files

Confidence score: 5/5

  • In backend/tests/unit/test_backend_runtime_env_validator.py, asserting errors == [] against the live deploy/runtime_env.yaml prod section makes the test depend on manifest content drift instead of validator behavior, which can cause flaky or misleading failures as config changes; decouple it by using a fixed fixture or mocking the prod input and asserting specific validation outcomes.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="backend/tests/unit/test_backend_runtime_env_validator.py">

<violation number="1" location="backend/tests/unit/test_backend_runtime_env_validator.py:1949">
P3: The new test asserts `errors == []` against the real `deploy/runtime_env.yaml` prod section, so its pass/fail is coupled to whatever the current prod manifest happens to contain rather than to the validator's decision logic. Every other contract test in this file (e.g. `test_memory_maintenance_job_contract_rejects_read_mode_without_job_cron`) builds a controlled scenario via `tmp_path` and `write_yaml`. When prod legitimately moves to `read` at the Gate 3 cutover, this test fails for a correct validator, and right now it does not actually isolate the behavior its name claims ("allows write without job cron") — it only smoke-tests current prod state. Build a tmp_path scenario instead.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

assert any('requires memory-maintenance-job' in message for message in messages)


def test_memory_maintenance_job_contract_allows_write_without_job_cron():

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3: The new test asserts errors == [] against the real deploy/runtime_env.yaml prod section, so its pass/fail is coupled to whatever the current prod manifest happens to contain rather than to the validator's decision logic. Every other contract test in this file (e.g. test_memory_maintenance_job_contract_rejects_read_mode_without_job_cron) builds a controlled scenario via tmp_path and write_yaml. When prod legitimately moves to read at the Gate 3 cutover, this test fails for a correct validator, and right now it does not actually isolate the behavior its name claims ("allows write without job cron") — it only smoke-tests current prod state. Build a tmp_path scenario instead.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At backend/tests/unit/test_backend_runtime_env_validator.py, line 1949:

<comment>The new test asserts `errors == []` against the real `deploy/runtime_env.yaml` prod section, so its pass/fail is coupled to whatever the current prod manifest happens to contain rather than to the validator's decision logic. Every other contract test in this file (e.g. `test_memory_maintenance_job_contract_rejects_read_mode_without_job_cron`) builds a controlled scenario via `tmp_path` and `write_yaml`. When prod legitimately moves to `read` at the Gate 3 cutover, this test fails for a correct validator, and right now it does not actually isolate the behavior its name claims ("allows write without job cron") — it only smoke-tests current prod state. Build a tmp_path scenario instead.</comment>

<file context>
@@ -1946,6 +1946,15 @@ def test_memory_maintenance_job_contract_rejects_read_mode_without_job_cron(tmp_
     assert any('requires memory-maintenance-job' in message for message in messages)
 
 
+def test_memory_maintenance_job_contract_allows_write_without_job_cron():
+    validator = load_validator()
+    errors = validator._validate_memory_maintenance_job_contract(
</file context>

@Git-on-my-level
Git-on-my-level merged commit ce7a1ef into main Aug 14, 2026
40 checks passed
@Git-on-my-level
Git-on-my-level deleted the fix/memory-intake-default-on branch August 14, 2026 18:27
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