Skip to content

[AI-3318] Gate the startup-failure tests on loop signals, not a polled count - #1216

Merged
realtonyyoung merged 2 commits into
mainfrom
tonyyoung/ai-3318-app-startup-signal
Sep 29, 2026
Merged

realtonyyoung merged 2 commits into
mainfrom
tonyyoung/ai-3318-app-startup-signal

Conversation

@realtonyyoung

Copy link
Copy Markdown
Collaborator

AI-3318 (no GitHub issue)

What & why

Two AppStartupTests waited for DaemonClientService's loop to start and end by polling a counter against a 5-second wall-clock deadline, and on a loaded Windows runner the loop was not scheduled in time. ForeverRunClient now completes a start signal when its enumeration begins and an end signal when the last one finishes. The tests await those with a 30-second bound, and still assert no enumeration is live afterwards, so a loop that restarted after disposal would still fail.

Verification

AppStartupTests passes locally on macOS. The Windows scheduling delay was not reproduced.

🤖 Generated with Claude Code

…d count

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@linear-code

linear-code Bot commented Sep 29, 2026

Copy link
Copy Markdown

AI-3318

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Use loop signals to stabilize startup-failure tests

🧪 Tests 🐞 Bug fix 🕐 10-20 Minutes

Grey Divider

AI Description

• Replace counter polling with loop-start and loop-end signals in two startup-failure tests.
• Allow 30 seconds for slow runners while still asserting no enumeration remains live.
Diagram

graph TD
  T["Startup tests"] --> S["Service start"] --> R["Client loop"] --> A(["Started signal"]) --> D["Service disposal"] --> E(["Ended signal"]) --> Z["Zero live assertion"]
Loading
High-Level Assessment

Use the proposed signals: they express the loop lifecycle directly. Merely extending the polling deadline would retain timing-dependent checks and repeated polling.

Files changed (1) +20 / -15

Tests (1) +20 / -15
AppStartupTests.csWait for client-loop lifecycle signals instead of polling +20/-15

Wait for client-loop lifecycle signals instead of polling

• ForeverRunClient now signals when enumeration starts and when the last enumeration ends. Two disposal tests await those signals with a 30-second bound, then assert the live count is zero; the five-second polling helper is removed.

test/Capacitor.App.Tests.Unit/AppStartupTests.cs

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can add REVIEW.md to your repo root and Qodo follows it on every PR

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@realtonyyoung

Copy link
Copy Markdown
Collaborator Author

/agentic_review

@qodo-code-review

qodo-code-review Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

No code changes since the last review — review skipped

Qodo Logo

@realtonyyoung
realtonyyoung merged commit c3703dd into main Sep 29, 2026
8 checks passed
@realtonyyoung
realtonyyoung deleted the tonyyoung/ai-3318-app-startup-signal branch September 29, 2026 03:27
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