Skip to content

refactor(examples)!: use typed HTTP plugin construction - #145

Merged
nick2781 merged 5 commits into
mainfrom
refactor/http-example-construction
Oct 22, 2026
Merged

nick2781 merged 5 commits into
mainfrom
refactor/http-example-construction

Conversation

@nick2781

@nick2781 nick2781 commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

The retained HTTP examples still used creation macros, and the server example reused the public HTTP service's type name, preventing compilation. Both examples now keep implementation classes in their cpp files, register owned sample interfaces through private factories, and export their plugin entry points explicitly.

The application examples remain disabled by default. The request bodies, endpoint and timeout defaults, callback dispatch, listener arguments and lifecycle behavior are preserved. When core tests have Boost and the HTTP/Net/Etcd Client API targets available, check-core now builds and runs the actual example shared libraries with controlled service implementations; explicit test opt-out remains supported. English and Chinese documentation covers the build conditions and migration.

Validation: final source 5b16d3ff030c4ab0444bb563ca0ca3c6b95cd14a incorporates the exact #144 merge candidate. Its complete tree 2275c7aa800d94f591e650fc16ebdf409fe7a503 is identical to the locally tested #143/#144/#145 combination: 133 policy checks; native check-core with 60 core cases / 2,885 assertions, all seven server plugin DSOs and factories, Kernel/Net/Bus/HTTP wire regressions and both actual HTTP example DSOs; clang-format 18; Nimbus with 135 HTML pages / 269 internal references and 24 affected bilingual HTML/Markdown outputs. The final merge also passes post-commit formatting. The initial expanded native build rejected mixed Homebrew/vcpkg Protobuf versions; matching Protobuf/protoc/Abseil package paths resolved the environment failure without changing source. No external etcd or production capacity acceptance is claimed. Protected source and cross-platform merge-candidate acceptance remain required.

BREAKING CHANGE: the server sample lookup type is http_server_sample_module; both example implementation classes are private. Rebuild example libraries and hosts together and load the plugin/use its sample interface instead of directly constructing an implementation. Installed public headers and public HTTP/etcd service APIs are unchanged.

nick2781 and others added 5 commits October 22, 2026 22:10
Hide HTTP sample implementations in their cpp files, register owned interfaces
through private factories and export plugin entries explicitly. Preserve the
disabled application-example selection and the existing request/listener flow.
Exercise real example libraries through core validation when their public
dependencies are available, with synchronized bilingual usage and migration notes.

BREAKING CHANGE: the HTTP server sample interface is now
http_server_sample_module, and both example implementation classes are private.
Rebuild the example libraries and host together and use typed plugin lookup
instead of constructing example implementations directly.
Co-locate each server role's headers and cpp files, and replace creation
macros with the existing module/plugin bases, private typed factories
and explicit dynamic-library entry points. All nine modules retain
disabled updates and existing business/lifecycle bodies. Build-only
forwarding preserves 28 legacy source include paths; public installed
headers are unchanged.

Seven enabled server libraries are covered. Simulate remains disabled
and is not claimed as natively accepted. English/Chinese directory and
architecture documentation describe the resulting layout and
verification boundary.

Validation on macOS with the arknet 0.2.3 release tree and Boost/TLS:
- All seven actual DSOs load, export both entry points and unload in
isolated test processes.
- Actual factory/assembly tests preserve interface keys, disabled
updates, duplicate rejection and reinstall; counted rejection tests
verify destruction, and a controlled Login module verifies the real
manager entry/exit path.
- Full `check-core` passes, including 59 core cases / 2,882 assertions
and the existing application, Bus, Net and newly accepted Kernel DSO
regressions.
- 130 policy tests, clang-format 18 and bilingual Nimbus checks pass:
135 pages and 265 internal references.

The DSO export probes run separately from hosts compiling the real
implementations, preventing duplicate static Protobuf descriptor
registration. These checks do not exercise full business initialization
or establish deployment capacity. Hosted cross-platform merge-candidate
checks remain required; the draft waits behind older admitted PRs.

BREAKING CHANGE: concrete server plugin/module inheritance layouts
change. Rebuild consumers and runtime libraries together; the 28 legacy
source header paths remain available.
@nick2781
nick2781 marked this pull request as ready for review October 22, 2026 16:19
@nick2781
nick2781 added this pull request to the merge queue Oct 22, 2026
Merged via the queue into main with commit 4fce760 Oct 22, 2026
12 checks passed
@nick2781
nick2781 deleted the refactor/http-example-construction branch October 22, 2026 17:03
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