Skip to content

test: realign two main-side pins broken by merge races - #14083

Closed
iamwhatever wants to merge 1 commit into
mainfrom
fix/main-red-protected-pin-spawn-probe
Closed

iamwhatever wants to merge 1 commit into
mainfrom
fix/main-red-protected-pin-spawn-probe

Conversation

@iamwhatever

Copy link
Copy Markdown
Contributor

Summary

Two tests are red on main (be067a3503) and on every PR branched from it: Backend Tests (3.12, 6), (3.12, 8), Backend Tests (Windows) (6), and Coverage Gate as the cascade. Both are merge races: each pair of PRs was green alone, and each merged against a base without the other. Both fixes are test-side; no product code was wrong.

Test Broken by Why Fix
test_sandbox_protected_name_holds.py::TestLeafOnlyPopulationIsRecorded::test_leaf_only_count_has_not_grown (3 tiers) #13935 (pin) + #13281 (auth-store-staging) + #13685 (credential_redaction.json) The pin was measured before two real new protected names landed Pin moved to measured count, reason recorded
test_spawn_approval_channel_delivery_2381.py::...::test_it_registers_no_wait_so_the_window_is_never_spent #13799 (test) + #13609 (arm-at-prepare) #13799's head 19fca6422c never contained #13609, which reserves the window at arm time, before the send, by design Probe counts the actual decider wait instead of the reservation

1. Protected-name leaf-only pin (security pin, not weakened)

Diffing the leaf-only set at #13935's merge 2a4457f9f2 against be067a3503, inside the pytest env: only additions, no removals, exactly six per tier:

each under the three data-home roots the launcher emits. Neither has a stand-in-masked ancestor, so neither can be held by an enclosing mask without restructuring the data home. EXPECTED becomes standard 241 / cc 248 / strict 249, with the reason in the comment. The hold-regression tests in the same file are unchanged and pass.

Note: #12684 (open feature PR) also edits this pin to include its own additions; whichever lands second rebases the number.

2. Spawn-approval silent-send probe (stale after an intended change)

The test's probe read key in TelegramApprovalDecider._REGISTRY during the send as "a wait was registered". Since #13609, arm(..., detached=True) reserves the future and claims ownership before the send on purpose (so a press in that gap is not lost and the end-of-turn sweep leaves it alone). The #13799 fall-through itself is correct: retire() releases everything.

The probe now wraps TelegramApprovalDecider.__call__ and asserts it is never awaited, plus asserts the key is gone from _REGISTRY, _NONCES and _AWAITED after the fall-through. Mutation check: replacing if not posted: with if False: in transport_dispatch.deliver_spawn_approval fails the test.

Testing

Two tests fail on main because each pair of PRs was green alone and
merged against a base that lacked the other.

test_sandbox_protected_name_holds: the leaf-only ratchet was measured
before two new protected names reached main: the auth-store staging
directory and the credential-redaction owner switch. Each is protected
under all three data-home roots the launcher emits, so every tier grows
by exactly six (standard 235->241, cc 242->248, strict 243->249). Neither
name has a stand-in-masked ancestor that could hold it, so the pin moves
to the measured count with the reason in the comment. No protected name
was removed and no hold regressed.

test_spawn_approval_channel_delivery_2381: the silent-send test read any
registry entry during the send as "a wait". The window is claimed at arm
time, before the send, by design, so that entry is the claim, not a wait.
The probe now counts the decider being awaited, and also asserts the
claim is fully released (registry, nonce and ownership) after the
fall-through. Disabling the fall-through still fails the test.
@iamwhatever
iamwhatever requested review from a team and pepmach September 26, 2026 02:08
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Sep 26, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor Author

Superseded by #14056, which landed the same two fixes (pin 241/248/249 with the same two names; spawn probe counts the decider wait). Both files pass on main 64/64.

@iamwhatever
iamwhatever deleted the fix/main-red-protected-pin-spawn-probe branch September 26, 2026 02:19
@github-actions github-actions Bot removed the readiness: checking Automated validation is still running label Sep 26, 2026
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