Skip to content

jit-qa: the operator workflow must supply the candidate envelope the sweep code requires - #14402

Merged
Git-on-my-level merged 1 commit into
mainfrom
fix/jit-qa-operator-candidate-envelope
Sep 17, 2026
Merged

Git-on-my-level merged 1 commit into
mainfrom
fix/jit-qa-operator-candidate-envelope

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Sep 17, 2026 •

Copy link
Copy Markdown
Member

Summary

#14393 raised the QA sweep candidate envelope to 3, in both backend/utils/memory/daily_memory_sweep.py (QA_SWEEP_MAX_MODEL_CANDIDATES = 3) and backend/scripts/jit_qa_sweep_operator.py. .github/workflows/jit_qa_manual_operator.yml still hardcoded 1, in two places: the job env block (line 497) and the --update-env-vars string that stamps the Cloud Run job before execution (line 547).

validate_qa_sweep_environment compares the running job's environment against the code constant and refuses to proceed on any mismatch, so every sweep-verify dispatch failed before doing any work:

File "/app/utils/memory/daily_memory_sweep.py", line 600, in validate_qa_sweep_environment
    raise ValueError(f"QA sweep requires {name}={expected!r}")
ValueError: QA sweep requires MEMORY_DAILY_MEMORY_SWEEP_MAX_MODEL_CANDIDATES='3'

Observed on execution daily-memory-sweep-qa-job-8kqzc against the QA plane deployed at 0694d6b103.

This is the fail-closed validator working as designed — it caught a real environment/code divergence rather than running with the wrong envelope. The fix is to move the two stale literals.

Follow-up worth doing separately

backend/scripts/check_workflow_contracts.py passed on #14393, so nothing pins this workflow's sweep env to the code constants. Every one of these values (MODEL_NAME, MAX_MODEL_COST_USD, COHORT_FLAG, and the candidate count) is duplicated between the validator's required dict and the workflow, and only the candidate count happened to diverge this time. A contract check that derives the workflow's expected sweep env from the code constants would make this class impossible.

Failure-Class: FC-config-target-identified-by-count-not-identity

Evidence

Two-line change, values only:

-          MEMORY_DAILY_MEMORY_SWEEP_MAX_MODEL_CANDIDATES: "1"
+          MEMORY_DAILY_MEMORY_SWEEP_MAX_MODEL_CANDIDATES: "3"
-...MEMORY_DAILY_MEMORY_SWEEP_MAX_MODEL_CANDIDATES=1,...
+...MEMORY_DAILY_MEMORY_SWEEP_MAX_MODEL_CANDIDATES=3,...

Layer measured: the failing execution's own traceback names the required value, and both literals now match QA_SWEEP_MAX_MODEL_CANDIDATES = 3 in daily_memory_sweep.py:204 and jit_qa_sweep_operator.py:41. Verification that the sweep then runs is the next sweep-verify dispatch, which cannot happen until this merges.

🤖 Generated with Claude Code

Review in cubic

…ope the code requires

#14393 raised QA_SWEEP_MAX_MODEL_CANDIDATES to 3 in both
backend/utils/memory/daily_memory_sweep.py and
backend/scripts/jit_qa_sweep_operator.py, but jit_qa_manual_operator.yml still
hardcoded 1 in two places: the job env block and the --update-env-vars string.

validate_qa_sweep_environment compares the running job's env against the code
constant, so every sweep-verify dispatch now fails before doing any work:

  ValueError: QA sweep requires MEMORY_DAILY_MEMORY_SWEEP_MAX_MODEL_CANDIDATES='3'

Observed on execution daily-memory-sweep-qa-job-8kqzc at the deployed SHA
0694d6b. check_workflow_contracts.py passed, so nothing pins this workflow's
env to the code constants — that gap is worth closing separately.

Co-Authored-By: Claude Opus 5 <[email protected]>
@Git-on-my-level
Git-on-my-level merged commit eafcf0e into main Sep 17, 2026
42 checks passed
@Git-on-my-level
Git-on-my-level deleted the fix/jit-qa-operator-candidate-envelope branch September 17, 2026 20:45
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