Add framework resource policies and descriptor streaming - #229
Merged
Conversation
VolkerChristian
marked this pull request as ready for review
August 5, 2026 17:45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR moves reusable transport, resource, and platform policy into SNode.C so applications can remain focused on protocol semantics and application policy.
openat()and explicit descriptor adoptionResponse::pipe(Source*)streaming with backpressure and error lifecycle handlingSO_PEERCREDorgetpeereid()Motivation
Applications currently duplicate queue accounting, descriptor streaming, parser admission limits, WebSocket resource limits, and platform-specific Unix credential queries. Centralizing these mechanics makes future applications canonical SNode.C applications without moving authorization, HTTP semantics, or trust decisions into the framework.
Compatibility and migration
This release intentionally starts a new SNode.C C++ API/ABI epoch. The existing release model derives
SOVERSIONfrom the project major version, so the project is now version2.0.0and all SNode.C shared libraries useSOVERSION 2. Applications, plugins, and libraries built against SNode.C 1.x must be rebuilt; 1.x and 2.0 C++ libraries must not be mixed in one process.Defaults preserve existing runtime behavior after rebuilding, without configuration changes. Existing source APIs remain available where compatible.
The installed public class layouts and
SocketConnectionvirtual interface changed.FileReader::open(...)failures may now returnnullptr, so callers must check the returned pointer before dereferencing or piping; later asynchronous streaming failures continue through the Source/Sink lifecycle. Full affected-area and before/after guidance is indocs/migration-2.0.md.The test-only
SocketWriterTestAccesshelper has been removed from the installed public header. Its tests now use a test subclass and the real EventLoop write path, without changing SocketWriter runtime behavior.openat()lookup is explicitly not presented as filesystem confinement, and peer credentials report verified facts only. No WebSocket sender tuning option was added because there is no concrete deployment requirement.Validation
cmake --build build-p0 --target all --parallel 24.so.2SocketWriterTestAccessctest --test-dir build-p0 --output-on-failure --parallel 24No AISuite, codex-backend, MQTTSuite, or external application files are changed. The P0 architecture and runtime policy implementations were not redesigned during finalization.