[PR #935] [MERGED] retire_tickets: coalesce pending_through per semaphore and guard completed_ monotonicity #973

Closed
opened 2026-11-26 20:19:40 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/935
Author: @narekshaghoyandev
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @QemmHD

Base: main ← Head: ubiq-retire-tickets-dedup-wait


📝 Commits (1)

  • 9392bbd retire_tickets: coalesce pending_through per semaphore and guard completed_ monotonicity

📊 Changes

2 files changed (+31 additions, -3 deletions)

View changed files

📝 runtime/src/retire_tickets.h (+13 -3)
📝 runtime/test/retire_tickets_test.cpp (+18 -0)

📄 Description

Summary

  • Coalesce RetireTickets::pending_through(ticket) in runtime/src/retire_tickets.h so multiple pending submissions on the same timeline semaphore collapse to a single (semaphore, max_value) entry instead of passing duplicate VkSemaphore handles to vkWaitSemaphores in wait_retire_ticket().
  • Guard completed_ in RetireTickets::completed() so a non-monotonic ticket can never move the completed retirement prefix backward.
  • Expand runtime/test/retire_tickets_test.cpp with regression checks for per-semaphore coalescing, idle queue exclusion, cutoff filtering, and monotonic completed_.

Verification

  • g++ -std=c++20 -Wall -Wextra -Werror -pedantic -fsanitize=address,undefined -O1 -g runtime/test/retire_tickets_test.cpp -o /tmp/retire_tickets_test && /tmp/retire_tickets_test — pass.
  • Negative control against main: fails with exit code 5 before the patch and passes cleanly after.
  • python3 -I scripts/check_no_game_data.py runtime/src/retire_tickets.h runtime/test/retire_tickets_test.cpp — clean.

Claimed in the coordination issue as: RT-RETIRE-TICKETS-DEDUP-WAIT
AI-assisted: yes (Gemini)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/935 **Author:** [@narekshaghoyandev](https://github.com/narekshaghoyandev) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/24/2026 **Merged by:** [@QemmHD](https://github.com/QemmHD) **Base:** `main` ← **Head:** `ubiq-retire-tickets-dedup-wait` --- ### 📝 Commits (1) - [`9392bbd`](https://github.com/ubiquitarianism/leonida/commit/9392bbd9e03b88fd4746f51e2fb1e7cd7b0e5b86) retire_tickets: coalesce pending_through per semaphore and guard completed_ monotonicity ### 📊 Changes **2 files changed** (+31 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `runtime/src/retire_tickets.h` (+13 -3) 📝 `runtime/test/retire_tickets_test.cpp` (+18 -0) </details> ### 📄 Description ## Summary - Coalesce `RetireTickets::pending_through(ticket)` in `runtime/src/retire_tickets.h` so multiple pending submissions on the same timeline semaphore collapse to a single `(semaphore, max_value)` entry instead of passing duplicate `VkSemaphore` handles to `vkWaitSemaphores` in `wait_retire_ticket()`. - Guard `completed_` in `RetireTickets::completed()` so a non-monotonic ticket can never move the completed retirement prefix backward. - Expand `runtime/test/retire_tickets_test.cpp` with regression checks for per-semaphore coalescing, idle queue exclusion, cutoff filtering, and monotonic `completed_`. ## Verification - `g++ -std=c++20 -Wall -Wextra -Werror -pedantic -fsanitize=address,undefined -O1 -g runtime/test/retire_tickets_test.cpp -o /tmp/retire_tickets_test && /tmp/retire_tickets_test` — pass. - Negative control against `main`: fails with exit code 5 before the patch and passes cleanly after. - `python3 -I scripts/check_no_game_data.py runtime/src/retire_tickets.h runtime/test/retire_tickets_test.cpp` — clean. Claimed in the coordination issue as: RT-RETIRE-TICKETS-DEDUP-WAIT AI-assisted: yes (Gemini) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:19:40 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#973
No description provided.