Skip to content

Count authorized requests as activity for the daemon's idle exit - #100

Merged
its-janghoon merged 1 commit into
developfrom
feature/idle-counts-requests
Oct 14, 2026
Merged

its-janghoon merged 1 commit into
developfrom
feature/idle-counts-requests

Conversation

@its-janghoon

Copy link
Copy Markdown
Member

Count authorized requests as activity for the daemon's idle exit

Attachments alone decided when the shared daemon leaves, so the Rust apps (Shape, Canvas, Query, Recall), which call the API through redrob-engine-client without attaching, saw the daemon they started exit ten minutes later -- possibly under a request still being answered. Both authorization middlewares now mark an authorized request as activity: not idle while one is in flight, and the idle clock restarts when it ends. Status polls (/api/health, /api/clients) do not count, since the launcher's engine card asks every few seconds.

Live-checked with the dev entrypoint at --idle-exit 1: a /provider call at 45 s kept the daemon up at 75 s; gone at 120 s. Daemon tests cover the accounting and the status-path rule.

Attachments alone decided when the shared daemon leaves, so the Rust apps (Shape, Canvas, Query, Recall), which call the API through redrob-engine-client without attaching, saw the daemon they started exit ten minutes later -- possibly under a request still being answered. Both authorization middlewares now mark an authorized request as activity: not idle while one is in flight, and the idle clock restarts when it ends. Status polls (/api/health, /api/clients) do not count, since the launcher's engine card asks every few seconds.

Live-checked with the dev entrypoint at --idle-exit 1: a /provider call at 45 s kept the daemon up at 75 s; gone at 120 s. Daemon tests cover the accounting and the status-path rule.
@its-janghoon
its-janghoon merged commit d482be6 into develop Oct 14, 2026
26 of 28 checks passed
@its-janghoon
its-janghoon deleted the feature/idle-counts-requests branch October 14, 2026 12:22
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