Repository navigation
test(sync): make the playback repair timeout test deterministic (real-clock ratchet red on main) - #25383
Merged
Git-on-my-level merged 1 commit intoNov 15, 2026
Conversation
Replace the new main test's 1 ms wall-clock wait with a Future result stub that raises TimeoutError, preserving the running single-flight reservation assertion. Failure-Class: none Co-Authored-By: Claude Fable 5.2 <[email protected]>
This was referenced Nov 15, 2026
Git-on-my-level
added a commit
that referenced
this pull request
Nov 15, 2026
#25374) The old integration canary hard-pins the previous carrier and participates in a four-service deployment. This extension adds an integration-only transport inside the existing production workflow: exact eligible source/digest, composition from the retained serving revision, removal of only the two 200/10 overrides to prove shipped 100/20 defaults, and staged same-run continuation with the saved inverse. Existing consumer/listen/pusher image-only routes stay Release-owned and precede integration. Captain ruling SCA-2283 `01a1de4c-ad87-7cbc-a06e-9c04c19f1580` explicitly delegates this run's post-wrap guard to Pipeline. Default `post_wrap_guard: internal` still refuses without a trusted adapter. Explicit `external` skips only that adapter, preserving 25%/five-minute hold, 100%/20-minute CPU/request watch, source/OCI/config/readiness/traffic proofs, CAS and failure/cancellation rollback. Unknown modes or external mode outside the integration-only scope refuse. The existing public input selects external mode with `service_images=integration-canary=<immutable backend digest>,post_wrap_guard=external`. The workflow binds that exact selection to the composite input and prepare flag; omitting it never selects external. No public trigger/input/job/runner/budget or credential/IAM change is introduced. External completion exports metadata-only `phase=external_guard_pending`, Pipeline ownership and actual receiving revision/UID/source/digest/config/generation/run binding with verified 100/20 settings and 200/10 inverse. It never marks wrap/recount/progress healthy. Pipeline's read-only guard owns subsequent proof and posts ROLLBACK; Release alone executes the inverse. Captain ruling `01a1de53-b889-73a6-9cad-177c8e123c1a` permits FreshGuard alone when the stock signal needs a new scan; Pipeline's 08:40 disposition selects that lane with the absent stock baseline stated, not fabricated. Arming requires a complete cursor circle after receiving/config verification and unchanged committer identities. Missing, unbound, expired or zero-denominator FreshGuard evidence is UNKNOWN. The four existing workflow artifacts remain the handoff; private environment/journal content is never uploaded. **Post-job recovery disposition:** captain ruling `01a1de67-42e8-78e9-8b54-ee9bb02c1561` resolves the handoff without new controller code. After the job exits, Release uses prod-operator to route 100% traffic to the saved pre-restoration named revision with verified 200/10 settings. Before dispatch, Release records that identity/settings and dry-runs the traffic return; it refreshes the packet if a newer 200/10 revision serves first. Within-run failure/cancellation still uses the private same-run controller journal, which must never be exported. A durable controller inverse remains a nonblocking follow-up, so the runbook's statement that no such interface exists still holds. Historical Luna successor-delta SHIP is recorded in SCA-2225 comment `01a1de64-2b19-73fa-958d-26b66e096742` for `468b26227f`. The subsequent test-only CI repair updates three existing workflow-contract files to preserve integration-only queue/development-smoke exclusions while retaining ordinary production checks. All 63 native tests in those files pass; production code is unchanged. Normal main integration now merges `6ed88eaceb5e4b8aff62e8d7a9e19410865c58c7` as `91529e9cede9fcf6eec71df5aab8d98c7480daa2`, with #25381 and #25383 ancestral. It is a clean merge with zero changes to the PR's 14 owned files compared with `952d8bbd41`; inherited main changes are not new controller decisions. The shared playback 0.001-second timeout is repaired by main's deterministic Future timeout simulation. Preserve the old failed CI receipts: `952d8bbd41` also hit CPU guards in unchanged input-retention and pusher-reference tests, so actual native regression and exact-successor CI are still required. No red-CI waiver, rerun or budget increase is claimed. Control-source integration does not repin the application: captain ruling `01a1de89-5ee9-70db-8e47-627a6dc2856a` keeps `afa75349` for the first 100/20 restoration after its 200/10 image acceptance; later carriers remain Release-owned. Final successor `91b687523abf8c2044b2a556f24c2caca3949384` adds only one test-setup repair after that merge: the retention test's shared fixture import is resolved at collection, matching the landed fixture/provider-model setup pattern. Its assertion/behavior AST is unchanged. The native test initially reproduced a 1.09-second cold-import CPU failure; after the change the retention file's 113 cases and shared fixture's 232 cases pass under the unchanged fast guard. The existing slow-clock guardrail command also passes all 11 cases; its original slow marker and CI tier are unchanged. Pusher-reference's 35 cases pass. Normal final push, with the supplied PR body, passes 58 manifest checks and 516 selected native tests. Fresh exact-head terminal CI and normal review-carry/admission remain required; these local receipts do not waive or manufacture green CI. The `91b68752` CI is preserved as terminal 39 SUCCESS / 25 SKIPPED / 2 FAILURE: pusher binding's dev case still spent 1.05 seconds in repeated pure-Python manifest parsing, and the aggregate correctly refused. Test-only successor `2dd6e8c28a903d90d71a87562fd4852883e286fa` reuses a module-scoped immutable manifest parsed with PyYAML's safe C loader (safe-loader fallback retained). Both dev/prod cases and their assertion AST remain unchanged. Local parsed documents are equal; measured parse CPU fell from 0.284s to 0.040s, and all 35 file tests pass under the unchanged one-second guard. No production, marker, allowlist or budget change; no blind rerun. Exact-successor CI remains the authority. True upload-to-durable-transcript latency stays **UNMEASURED** and is not a restoration blocker under captain ruling `01a1ddc7-ad39-75e0-a8de-ad7088463568`. No HTTP, CPU, commit or audio proxy replaces it. INV-DATA-1: customer identity/data-plane routing remains `based-hardware`; only Cloud Run controller scope and metadata proof change. Consumer/GKE/queue writers are excluded from the new profile. Native source eligibility, Firestore, protected production approval/concurrency and unchanged rollback windows remain. No author production read, deployment, source repin, scaling, privacy or provider-release activation. Verification: 273 focused native tests passed (122 controller, 49 canary workflow, 102 workflow contracts) via explicit BACKEND_UNIT_TEST_FILE_LIST and backend/test.sh, retaining the one-second fast-test CPU guard. Normal pre-push, actionlint, concurrency and CI-budget results accompany the published head. Same Luna reviewer checks the extension/successor delta only; this is not a third full review of merged #25345. Exact-head green CI and canonical admission are required before merge or execution. Current integration recovery: `2a54056b3bda6990c9c179059d0c4099fd357eac`, normal merge of maina0352a778445281a5d7ecbd45fc66fa0e5fa9105 over2dd6e8c28a903d90d71a87562fd4852883e286fa. Incorporates actual canonical shared Quality playback repair25386, not rerun-to-green. Sole conflict test_verify_pusher_config_references.py overlaps shared safe-YAML/intake fixtures; retain main canonical fixtures, resolvedfile matchesmain. All reviewed ownednon-testfiles unchanged.1729focusedtests/28isolatedfiles pass via canonical omi-heavy SHA2560f176f780fd976ad7ea7c75f845ea7e8f8213f4b45bf55e218283aae28195ea4 on approvedStudio, userdavid/Darwin, defaults/placement unchanged. No budget/timeout/marker/skip/assertion relaxation or CI rerun; earlier actual teardown failure remains recorded. Normal hooks/gates run; current-head terminalCI and normalReleaseadmission remain required. No third review or old-headSHIPcarry invented. Separate next-day selector/hook work is untouched. Existing Release/captain owns runtime pin/slot and100/20; no source-containingcarrier, activation or serving/savings inferred. Original intervention CLOSED10:18:30. Current source qualification packet: `2a54056b3bda6990c9c179059d0c4099fd357eac` has terminal CI **41 SUCCESS / 24 SKIPPED**, no failed or pending checks. An author byte comparison verifies all 11 files in the Luna-reviewed extension (including all seven non-test workflow/controller/documentation files) are identical to reviewed `468b26227fcb9e8290da9dcdcc51c591dae0d470`. The later main integration's sole conflict resolves to main's exact pusher-reference test fixture bytes. Historical failures remain recorded; this is actual successor CI, not a rerun waiver. Review-cap disposition: no third full controller review is requested. Historical Luna SHIP `01a1de64-2b19-73fa-958d-26b66e096742` is evidence for its named source, not a new independent verdict on this head. Bounded confirmation from the same reviewer of this exact source-identity/carry packet remains pending; ordinary Release admission/holds remain separate. No merge or activation is claimed. Runtime carrier/predecessor must be explicitly rebound by Release/captain to the actual live vector before 100/20; the inactive afa-bound guard and its UNKNOWN previous-zero proof cannot be silently reused. The intervention deadline passed without a qualified clean hour.
Git-on-my-level
added a commit
that referenced
this pull request
Nov 15, 2026
…#25373) The recovery hung-connect test must expire deterministically while preserving cancellation, second-target admission and socket cleanup. Playback uses the scoped Future.result timeout fix now also landed on main, with stronger retained checks for running/non-cancelled Futures and successful real completion callbacks. Remaining diff against merged main: - backend/tests/unit/test_live_recovery_matrix.py: drives expiry of the actual dial timeout context; asserts target admission, exact reservation accounting and socket cleanup. - backend/tests/unit/test_sync_playback_metadata.py: explicitly imports concurrent.futures.TimeoutError, documents/scopes the wait stub, preserves the production timeout argument, and retains running/non-cancelled and no-cooldown completion assertions. Normal integration from reviewed 65ec384 merges main abc63c9 (#25383) in commit 4830250. Playback was the only conflict and was resolved by preserving the entire reviewed file. Recovery is also byte-identical to 65ec; codec and backlog match main. The integration commit's full tree is identical to 65ec (c40afb6), preserving all reviewed source while adding the main ancestry. Validation uses the isolated task checkout's own Python 3.11 environment and existing M1 bin/omi-heavy with TERM/KILL bounds: - Canonical backend/test.sh over recovery and playback with the default 0.10/1.00 CPU guard. - Real-clock ratchet selected through its owning backend/scripts/run-slow-guardrails-ci.sh. - make preflight, explicit PR metadata validation, and normal hooks/typechecking/publication. Focused tests: 109 passed (103 recovery, 6 playback), with 3 existing slow recovery cases deselected. Owning real-clock ratchet: 11 passed, 3511 unrelated cases deselected. make preflight: 36 checks; explicit metadata validation: 4 checks. Normal publication hooks passed 1934 tests (103 recovery, 6 playback, 1825 lifecycle contracts), 36 preflight checks and backend typechecking with 0 errors. Exact commands and hook receipts are attached to SCA-2380. Immediately before push, main advanced to 6ed88ea. Its live-member notes changes touch none of the four relevant test files; a read-only merge-tree against that main is clean. The single tested integration remains based on abc63. Fresh current-main merge-ref CI is left to the existing root watch. The previous 65ec hosted CI was green; new-head hosted CI belongs to the existing root watch. No prior CI result substitutes for the new head. No new reviewer or watcher is requested. Prior integrations adopted main's landed codec and backlog repairs rather than stacking alternate fixtures/caches. Those two files are not part of this PR's authored diff. No authored production, .github, guard, allowlist, threshold, marker, skip or activation changes; no PR merge or deployment. ## Product invariants affected none
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.
One test added by #25352 hands production code a 0.001-second real-clock budget, which the slow-marked real-clock ratchet forbids; that guard has been red on main since #25352 merged. This makes the test's timeout deterministic. Test-only.
Failure-Class: none
What changed
tests/unit/test_sync_playback_metadata.py::test_single_flight_and_user_process_bounds_keep_running_timeout_reservedno longer setsOPEN_TIMEOUT_SECONDSto 0.001 s; it simulates the Future timeout deterministically and still asserts that a running repair keeps its single-flight, per-user and per-process reservations while the caller is told to poll. The ratchet and its allowlist are unchanged. No production code changes.Verification
tests/unit/test_real_clock_budget_ratchet.py,tests/unit/test_sync_playback_metadata.pyandtests/unit/test_llm_gateway_coverage_guardrails.pywith slow tests selected: 44 passed on this head (main b78ea01 plus this commit).The same commit is also carried by #25380; whichever merges first makes the other a no-op for this file.
Rollback: revert this commit.
Author model: GPT-6.1 Sol; integrated by Claude Fable 5.2.
🤖 Generated with Claude Code