test(desktop): isolate Rewind owner snapshot authority - #12192
Conversation
Reproduce the revoked process-wide owner state, then establish and restore the test owner through RuntimeOwnerAuthorityTestFixture so suite order cannot turn authenticated capture into anonymous capture. Verification: RewindCaptureExclusionGenerationTests 9/9 passed; deterministic contamination recovery passed 50/50 runs; the repaired test passed inside two 5,769-test process runs (each full run retained one unrelated baseline failure). Failure-Class: FC-hand-listed-test-isolation-membership
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Thanks @aryanorastar — verified end to end against the current authorization implementation; this is a clean fix for the #12039 flake signature. What I checked in
Test-only change, no production behavior touched — leaving for human maintainer review before merge. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
kodjima33
left a comment
There was a problem hiding this comment.
Test-isolation fix, low risk (test-file only, zero prod code touched), verified real and not already fixed. Bug-fix fast-lane heuristic scores 2/5 (below the 3/5 owner-override bar) and title doesn't match fix(desktop)/fix(macos)/fix(windows), so holding at approve rather than owner-override merge.
|
@undivisible this one is ready for a merge press — approved by @kodjima33, all checks green, no conflicts. It just needs someone to click, since the bug-fix fast lane scored it 2/5 (below the 3/5 owner-override bar) and held at approve. On the title: Two others in the same neighbourhood while you're here, both green with zero conflicts:
#12288 is the one I'd take first: it's six lines, it's a break on #12259 is worth a glance as a pair with this one — same root cause ( No rush on any of them. |
"merge my shit like a good boy" ahh guy ok i will also idc if you kinda name shit a bit different its obvious that you can write test its all good |
i was trying to reach you on discord wanna learn a lot from you my id is astar6969 @undivisible |
What changed and why
Addresses the Rewind/auth occurrence reported in #12039. The regression test changed
auth_userIddirectly even though runtime owner authorization is process-wide and deliberately revokes out-of-band owner changes. That made the result depend on which owner-bound suite ran first and produced the observedanonymousversusauth-leading-…failure.The test now recreates that revoked-authority state deliberately, then establishes and restores its owner through
RuntimeOwnerAuthorityTestFixture. This follows the same serialized transition boundary as production and automatically places the suite in the runner's derived owner-isolation cluster.Product invariants affected
none
How it was verified
xcrun swift test --package-path desktop/macos/Desktop --filter 'RewindCaptureExclusionGenerationTests'— 9/9 passed.--skip-build— 50/50 passed.This is test-harness isolation only; there is no user-facing path or physical-device behavior to exercise.
Tests
RewindCaptureExclusionGenerationTests.testOwnerSnapshotStaysCurrentWhenAuthLeadsUnresolvedRewindDatabasenow starts from the exact revoked authority that previously arrived nondeterministically, then proves the auth-leading owner remains current whileRewindDatabase.currentUserIdis unresolved.Failure class (fixes)
Failure-Class: FC-hand-listed-test-isolation-membership