Skip to content

Add bounded application notifications for retained callbacks - #5

Merged
renerocksai merged 1 commit into
mainfrom
feat/application-notifications
Sep 7, 2026
Merged

Add bounded application notifications for retained callbacks#5
renerocksai merged 1 commit into
mainfrom
feat/application-notifications

Conversation

@renerocksai

@renerocksai renerocksai commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

A producer can wake a retained HTTP callback without retaining an application worker. Context.notification() returns a generation-checked handle. waitNotification(?u64) releases the callback until a signal or optional timer arrives. The callback resumes with .notified or .timer.

Each connection reserves one atomic signal cell at startup. Signals coalesce and return notified, coalesced, or stale. Signals survive callbacks and pending output. A pending signal takes precedence over the optional notification timer. Ordinary timer waits keep their existing behavior.

Request generations never wrap. Terminal results and connection close invalidate handles. Producers must stop and join before server or cluster deinitialization. Application queues synchronize their own data; notifications only indicate available work. The owner scans waits during its existing poll cycle, with up to 10 ms plus scheduling delays. This change adds no OS wake primitive or std.Io provider.

All native gates passed on 886b728bec79c36ca1ec69345b609a725617a9ea, using exact Zig 0.16.0. Runtime suites used ReleaseSafe binaries.

Native platform Debug and ReleaseSafe, each Existing transport cases Continuation groups
Linux x64, kernel 6.17.0-1022-azure 114 passed, 2 platform skips 84 passed 18 passed
macOS ARM64, Darwin 25.6.0 112 passed, 4 platform skips 84 passed 16 passed, 2 unsupported shard skips
Windows Server 2025 x64, build 26100.33296 127 passed, 4 platform skips 80 passed 18 passed

Linux/macOS native evidence and Windows native evidence include complete logs and receipts. The duplicate pull-request native run also passed.

Deterministic tests cover concurrent coalescing, stale generations, retirement, terminal invalidation, pending callbacks, timers, and frozen output. Wire cases cover 32 waiting requests with one worker, pipeline ordering, timeout precedence, disconnect, deadline, shutdown, and reuse. Linux and Windows also passed three-owner notification tests. macOS currently supports one owner, so its two three-owner tests remain explicit skips.

Windows also passed nine existing shard groups and the 30,000-response correctness smoke gate. Four existing POSIX suspension cases remain excluded on Windows. These results provide native correctness evidence, not performance or physical Windows deployment qualification.

Local macOS Debug/ReleaseSafe verification and targeted wire gates also passed. The whitepaper generation check passed. All owned local test processes exited before host reservation release. Downloaded native packets were inspected and hashed; the Windows source receipt matches all 29 local input files.

The PR is ready for review and remains unmerged.

@renerocksai
renerocksai merged commit 27bab3d into main Sep 7, 2026
5 checks passed
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