fix(ipc): foundation review remediation#24064
Closed
charlielye wants to merge 2 commits into
Closed
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
917aa13 to
66ff2af
Compare
1ccafb3 to
6a51c53
Compare
14b6dd9 to
993c25a
Compare
Addresses the full ipc-codegen/ipc-runtime review (68 findings): - runtime: NAPI lifecycle (close/join, TSFN leak, sync deadline), zero-length response deadlock, u64 timeout truncation, max-frame guards, crash cleanup, unified constants, UDS timeouts, new cpp/rust/ts test suites - codegen: schema validation (required error variant, name pairing, reserved words), unified server error wrapping, zig comptime handler injection, uniform --strip-method-prefix, skeleton/dead-code removal - wire fixes: rust Option<bytes>/[bytes;N] serde, ts u64 bigint bridging + bin32 guards, zig signed-int tolerance, cpp union ordering + PrimAlias so schema reflection of generated types round-trips aliases - tests: golden corpus extended (error variant pinned) with cpp/zig runners, error-path + boundary-value steps in every matrix combo, FFI compile checks
993c25a to
0ac3119
Compare
6a51c53 to
bb23b5d
Compare
Contributor
Author
|
Folded into the foundation PR #23610 (foundation + review fixes + JSONC schema format are now a single squashed commit). Superseding this PR; branch will be deleted. |
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.
Addresses the full ipc-codegen/ipc-runtime review (68 findings across wire correctness, runtime lifecycle, codegen policy, dead code, test rigor, and docs).
Runtime (ipc-runtime)
close()(poll thread joined, was detached/UAF), TSFN acquire leak on destroy (Node could never exit), TSFN release/call race, synccall()deadline (hung forever on dead server)IPC_OKlen 0 distinguished from errors in the C ABI and rust/zig bindingswait_for_data(0)poll semantics unified Linux/macOSCodegen (ipc-codegen)
*ErrorResponse {message}, count + misorder pairing guards, duplicate commands, reserved words, identifier collisions, >20-field check, resolvable string refs — with a unit test suite in test_cmdsErrorResponsevsEchoErrorResponsefallback divergence is gone); framing errors return decodable errors instead of empty bytes--strip-method-prefixgates all languages uniformly (callers updated in the dependent PRs);--skeletondeleted (broken in all 4 languages, no consumers); CLI value validationOption<bytes>/[bytes;N]serde attrs (encoded as int arrays before), TS u64 bigint bridging both directions + bin32 length guards, zig tolerance for non-negative int64 encodings, union ordering emitted in schema orderPrimAliasnominal wrapper so non-bin32 aliases survive schema reflection;get_*_schema_as_json()now reflects to the bare committable document; the reflection test asserts the schema→generated→reflected round trip is identity (was reflecting a hand-copy that masked drift)SERIALIZATION_FIELDS→IPC_CODEGEN_SERIALIZATION_FIELDS(moved down from the avm-binary PR; avoids colliding with bb's macro)try/catchkeyword macros under BB_NO_EXCEPTIONS scoped to the msgpack include only (was ill-formed once std headers followed)Tests
EchoErrorResponsegolden; new cpp and zig golden runners (corpus now byte-verified in all 4 languages)EchoBlobs(optional bytes + fixed byte arrays) andEchoFail; every client tests the error path, optional-absent, and u64 >2^32 over live IPC; cpp client checks survive NDEBUGtsc --noEmit); generated SyncApi exercised over SHM; FFI backends compile-checked (rust feature, zig stub link)Full suite: 36/36 test_cmds green (4×22 goldens, 16 UDS + 12 SHM matrix combos, reflection, ts_package, schema tests); wsdb package builds end-to-end against the new codegen.