Repository navigation
feat: v2.16.0 — C ABI & CLI Rebuild (§Phase 15 milestone 60) - #55
Merged
Merged
Conversation
SoundMatt
force-pushed
the
feat/v2.16.0-c-abi-cli-rebuild
branch
2 times, most recently
from
July 29, 2026 03:02
a431012 to
051b8f4
Compare
Rebuilds capi.h/capi_impl.hpp from scratch against the server+endpoint request model established through v2.15.0, per the Satellite Package Disposition table's REPLACE entry for this pair. rcp_zone_t/rcp_command_t/ rcp_response_t/rcp_priority_t are discarded outright; addressing moves to a caller-chosen rcp_stream_key_t + rcp_byte_bus_id_t, rcp_acf_info_t mirrors rcp::acf::AcfMessageInfo one-for-one, and an rcp_ctrl_h now binds one caller-supplied rcp_request_fn_t callback (a C-linkage RequestFn, the same client-side send-equivalent call shape rcp/record.hpp's and rcp/observe.hpp's own RequestFn standardize on) rather than wrapping rcp::legacy_mock::Controller directly — so the callback can be backed by rcp::mock::Server::dispatch, rcp::udp::Client::request, or real hardware without this header depending on any of them. The registry becomes a fixed 16-entry table (no heap allocation, closing a gap the old std::unordered_map-backed registry left in its own "no heap" claim), and rcp_response_t gains a caller-supplied payload_cap so a response payload is actually written into caller-owned memory instead of the old stub's unconditional payload=nullptr. cli.hpp (and cli/main.cpp, unchanged) is adapted in place: version/ capabilities/status carry forward unchanged in shape; send's protocol- flags form moves from --zone/--type to --server/--endpoint/--op[/--evt-op], dispatching against rcp::mock::Server instead of legacy_mock's Zone-keyed Registry. capabilities_json()'s transports/features are refreshed to the v2.13.0/v2.14.0 transports and v2.3.0/v2.4.0/v2.7.0 endpoint set. adapt.hpp's Adapt() now takes a RequestFn instead of a shared_ptr<Controller>, the same "primitives, not a wrapped chokepoint" choice every ADAPTed Phase 14/15 header already made. zone_to_relay_id/ zone_from_relay_id's PascalCase-zone scheme is replaced by endpoint_id_to_relay_id/relay_id_to_endpoint_id, encoding a (stream_key, byte_bus_id) pair into relay::Message.id; message_to_request/response_to_message replace message_to_command/ status_to_message, mapping op/evt_op via meta instead of the removed CommandType/Priority pair. subscribe() now reports std::errc::function_not_supported unconditionally — the same call every ADAPTed application bridge made at v2.15.0 for the removed Status push model, which has no analog in the target specification's request/response shape. rcp.hpp and rcp/legacy_mock.hpp are untouched: rcp/config.hpp is the one remaining pre-replacement dependent, and its own rebind is not part of this milestone's scope. Grepping the tree for consumers of the pre-v2.16.0 capi_impl.hpp/cli.hpp/adapt.hpp APIs beyond their own tests found none, so no legacy-shim split file was needed anywhere in this change. tests/test_capi.cpp, tests/test_cli.cpp, and tests/test_relay.cpp are rewritten in place under their existing REQ-CAPI-*/REQ-CLI-*/REQ-RELAY-* prefixes (REQ-CAPI-009 new, for the payload_cap-overrun rejection), traced in .fusa-reqs.json. version.hpp/CMakeLists.txt bumped to 2.16.0; README.md and ROADMAP.md updated with a Done note. Verified locally: full build + ctest (60/60 passing) on GCC and Clang, cpp-FuSa check/lint/analyze/trace, and manual smoke-testing of the CLI binary. The RELAY conform --strict gate only exercises version/ capabilities/status (never send), which are unaffected in shape. Signed-off-by: Matt <47545907+SoundMatt@users.noreply.github.com>
SoundMatt
force-pushed
the
feat/v2.16.0-c-abi-cli-rebuild
branch
from
July 29, 2026 03:10
051b8f4 to
052b5c5
Compare
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
Implements ROADMAP.md milestone 60, "C ABI & CLI Rebuild (v2.16.0)" — the final milestone of Phase 15, closing out the TC18 protocol replacement's client-facing surfaces.
capi.h/capi_impl.hpp— REPLACE. From-scratch RTOS/bare-metal C ABI against the server+endpoint request model (rcp_stream_key_t+rcp_byte_bus_id_t,rcp_acf_info_tmirroringrcp::acf::AcfMessageInfo).rcp_ctrl_hnow binds a caller-suppliedrcp_request_fn_tC function pointer — the C-linkage analog ofrcp/record.hpp's/rcp/observe.hpp'sRequestFn— so it can be backed byrcp::mock::Server::dispatch,rcp::udp::Client::request, or real hardware without depending on either. Registry storage is a fixed 16-entry table (genuinely no heap allocation);rcp_response_tgains a caller-suppliedpayload_capso responses are actually written into caller memory (newREQ-CAPI-009covers the overrun-rejection case).cli.hpp(+cli/main.cpp, unchanged) — ADAPT.version/capabilities/statusunchanged in shape.send's protocol-flags form moves from--zone <name> --type <cmdtype>to--server <stream_key> --endpoint <byte_bus_id> --op read|write [--evt-op <0-7>], dispatching againstrcp::mock::Server(v2.12.0) instead oflegacy_mock's Zone-keyed registry.capabilities_json()'stransports/featuresrefreshed to the v2.13.0/v2.14.0 transports and v2.3.0/v2.4.0/v2.7.0 endpoint set.adapt.hpp— ADAPT.Adapt()now takes aRequestFninstead ofshared_ptr<Controller>.zone_to_relay_id/zone_from_relay_idreplaced byendpoint_id_to_relay_id/relay_id_to_endpoint_id, encoding(stream_key, byte_bus_id)intorelay::Message.id.subscribe()now reportsfunction_not_supportedunconditionally (no analog in the target spec's request/response shape, matching every ADAPTed Phase 14/15 header).relay/relay.hppitself is unchanged.rcp.hpp/rcp/legacy_mock.hppare untouched —rcp/config.hppis the one remaining pre-replacement dependent, and its own rebind is out of this milestone's scope. Grepped the tree for consumers of the pre-v2.16.0capi_impl.hpp/cli.hpp/adapt.hppAPIs beyond their own tests: none found, so no legacy-shim split was needed.tests/test_capi.cpp,tests/test_cli.cpp, andtests/test_relay.cppare rewritten in place under their existingREQ-CAPI-*/REQ-CLI-*/REQ-RELAY-*prefixes, traced in.fusa-reqs.json.version.hpp/CMakeLists.txtbumped to 2.16.0. README.md and ROADMAP.md updated with a "Done (v2.16.0)" note.Test plan
cmake --build build --parallel+ctest --test-dir build -j1— 60/60 passing, GCC 16 and Clang (Debug + Release)cpp-rcpCLI binary (version,capabilities,send --server ... --endpoint ... --op ...)cpfusa check/lint/analyze/trace --gaps— no new errors, only baseline-consistent warnings/infosrelay conform --strictonly exercisesversion/capabilities/status(neversend), which are unaffected in shape