Repository navigation
Description
Problem
The invitation registration lifecycle test can read last_used_by before its best-effort asynchronous attribution update commits. An HTTP registration success does not guarantee completion of that separate update, so the immediate assertion can fail despite the synchronous use reservation succeeding.
Evidence
- Baseline c136458 and F0 head f5da60d contain identical registration product code and test code.
- Feature run 47330900463, job 145033962819 (Social OFF / WebAuthn ON), failed only
Integration_P2_AdminRegistrationInvitation_GateLifecycle:used_count == 1passed, whilelast_used_by IS NOT NULLwasfat AdminRegistrationInvitationHttpTest.cc:319. RegistrationInvitationService.h:79documents best-effort attribution. Its implementation performs asynchronous user lookup and attribution UPDATE; SessionController sends the success response without awaiting completion.- The same test already observes asynchronous audit writes with a two-second steady-clock window and 25 ms read intervals.
- The failure establishes the observed state, not that attribution subsequently succeeded. The original failed artifact remains evidence.
Suggested fix
Observe only this owned invitation's attribution using the existing read query. Poll for at most the existing two-second observation window, only while the row has two columns, use count is exactly one, and attribution is false. Retain every original assertion and add a two-column guard before indexing. Reject malformed/missing rows, SQL failures and incorrect counts without observation retries.
Acceptance criteria
- Change only the local observation block; registration/revocation requests are never retried.
- All original count, attribution, authorization, audit and concurrency assertions remain intact.
- Permanent attribution failure still fails at the final assertion; no global timeout increase or product behavior change.
- Removing the local replacement reconstructs the entire baseline test byte-for-byte.
- Independent review and fresh-head complete CI, including the failing feature combination and full test binary, pass.
Out of scope / follow-ups
No registration transaction/latency contract, best-effort product policy, other test fixtures, coverage thresholds or CI timeout changes. This bounded test-only fix is the independently reviewed R3 amendment to F0 #445 under the v1.8.0 plan #417.
Activity
ci: validate isolated v1.8.0 development branches