Repository navigation
fix(tests): repair two guards left red on main by the summaries changes - #25372
Merged
Git-on-my-level merged 1 commit intoNov 15, 2026
Merged
Conversation
…budgets on an injected clock Two slow-suite guards went red on main with BasedHardware#25340 and BasedHardware#25368, which the pull requests' own path-selected CI did not run: - the direct-provider inventory did not list utils/llm/summary_embeddings.py (AsyncOpenAI, the non-gateway branch of the composer's single bounded embedding request); - two context-budget tests handed production code a real-clock budget under 0.5 s. The inventory entry states its gateway policy. Both tests now let the caller's whole budget elapse on an injected clock while the provider call is still running, and assert the caller returned before the provider finished. No production code changes. Failure-Class: none Co-Authored-By: Claude Fable 5.2 <[email protected]>
Git-on-my-level
added a commit
that referenced
this pull request
Nov 15, 2026
Brings in the upstream guard repair (#25372) that unblocks this PR's backend unit run, plus the episode default-context and pusher codec work. Resolves the feature-flag registry conflict by keeping both sides: main's new EPISODE_COMPOSER_DEFAULT_CONTEXT_ENABLED row plus this branch's cancel_flow_parity row. No source file this PR touches was changed on main, so the approved render/copy packet and the SCA-2364 stable-presenter lifecycle fix are unaffected.
This was referenced Nov 15, 2026
Git-on-my-level
added a commit
that referenced
this pull request
Nov 15, 2026
Follow-up retries fetch a projection policy even when the part is already ready or quarantined and immediately returns. Return before that unused fetch, removing one transaction/job read on the ordinary pinned-policy path. Unfinished parts retain policy resolution and refusal before side effects; the surrounding persisted-receipt and completion transactions are unchanged. This is a small additional cut for the Firestore intervention. It must not delay #25314 or the admitted recovery-default restoration. Savings are not booked before production measurement. ## Validation - Head `813961ee1bd7e4de9925addc170e5bd04d30da91` normally merges main `41d6ab74e7b7c6a69695bfdb47c0cea9f87f40a0`, including shared guard repair #25372. The change-specific file blobs are unchanged from the preceding head. - Canonical focused fast lane: 70 passed (45 follow-up and25 gateway tests); all11 clock-ratchet cases are marked slow and exercised by the separate slow lane. Existing1s CPU ceiling unchanged. - Canonical `scripts/run-slow-guardrails-ci.sh`: 2,051 passed, 1,471 deselected. This is the repository's distinct slow guardrail recipe. - Normal successor pre-push gate passed. GitHub CI remains the full required authority and is pending. - Refreshed independent Luna source review: SHIP for exact successor813961ee1bd7e4de9925addc170e5bd04d30da91 against41d6ab74. No actionable defects in the two scoped files. No CI or serving approval is inferred from a source verdict. ## Product invariants affected none Failure-Class: none ## Batch pipeline tuning No capacity, concurrency, cadence, retry interval, state, retention, allowance or policy values change. The existing ready/quarantined no-op guard moves ahead of an unused policy fetch. No new state or queue is introduced. ## Rollback Revert this commit through the normal source/release path. No migration, flag or production change is included.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two slow-suite guards are red on main since #25340 and #25368 merged. This repairs both with test and inventory changes only; no production code changes.
Failure-Class: none
What was wrong
test_llm_gateway_coverage_guardrails.py::test_direct_provider_usage_stays_inside_approved_boundariesreportsDirectUse(utils/llm/summary_embeddings.py, AsyncOpenAI): the file added by feat(episodes): summaries use the owner's context, scale with length and wait for the full transcript #25340 was not in the direct-provider inventory.test_real_clock_budget_ratchet.py::test_no_new_tiny_real_clock_budgetsrejects two tests that setCOMPOSER_CONTEXT_TIMEOUT_SECONDSto 0.1 s (feat(episodes): summaries use the owner's context, scale with length and wait for the full transcript #25340) and 0.04 s (feat(episodes): default account context for episode summaries (people, calendar, prior discussions, open actions) #25368), real-clock budgets under the 0.5 s limit.Both guards are marked slow and are selected by path, so the two pull requests' own CI did not run them; other pull requests (#25314, #25131) inherited the failures.
The repair
utils/llm/summary_embeddings.pyis registered with its policy stated beside the entry. It is the composer's single bounded embedding request for owner-memory retrieval. It enforces the generated-compute budget and resolves the BYOK key before any IO, and routes through the LLM gateway whenever gateway feature mode is on, which is the production setting on backend, backend-sync and backend-sync-backfill (OMI_LLM_GATEWAY_FEATURE_MODE=gateway, read from the serving specs). The direct client is the non-gateway branch only: same provider, key custody and model asclients.pyOpenAIEmbeddings, with SDK retries off and the caller's absolute deadline. It lives outsideclients.pyso the notes routing digest and paid checkpoints stay unchanged. Both branches are exercised with the real SDK intest_episode_summary_provider_bounds.py. No gateway, BYOK or quota path is bypassed.composer_context_budget, so the caller's whole budget elapses deterministically while the provider call is still running. They still assert the properties the originals covered: the caller returns at the deadline and not when the non-cooperative provider finishes, partial context is discarded, completed sections survive, late results are never published, and the timeout fallback is recorded once. The ratchet and its allowlist are unchanged.Verification
Both guards, the ratchet's stale-entry checks, the provider-bounds tests and the two edited test files: 89 passed locally with slow tests selected (
-m "slow or not slow"). No tuning value, flag, state or schema changes.Rollback: revert this commit; main returns to the two red guards.
Author: Claude Fable 5.2.
🤖 Generated with Claude Code