Skip to content

refactor(hash): remove platform header dependencies - #158

Merged
nick2781 merged 21 commits into
mainfrom
refactor/hash-header-dependencies
Oct 26, 2026
Merged

nick2781 merged 21 commits into
mainfrom
refactor/hash-header-dependencies

Conversation

@nick2781

@nick2781 nick2781 commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Make <ark/hash/murmur_hash.hpp> usable with the C++20 standard library alone by removing platform/macro headers and replacing legacy constant macros with unsigned literals. The consistent-hash consumer now includes its own formatting dependency explicitly. Hash values and public signatures are unchanged from the preceding portability fix.

A permanent isolated-header target compiles all seven methods without framework or third-party include paths and runs through check-core. English/Chinese guides distinguish header independence from the existing ark::core package dependencies.

Local Debug and AddressSanitizer + UndefinedBehaviorSanitizer acceptance passed for the unchanged Hash implementation (62 core cases /69,857 assertions; leak detection disabled). The combination at 5893a0c2beaaf3a0b70acd8107775534fd8cbb94 also passed check-core, the independent header check and clang-format 18. It includes the preceding Net shutdown test repair; actual Net DSO and stronger peer/listener checks passed separately and in the complete local combination. Fresh documentation/CI policy checks and the protected cross-platform candidate remain required. No compile-time performance claim.

The current head 892ccba includes preceding queue candidate 62a656b. Native implementation, tests and CMake inputs are byte-identical to the previously tested local revision 5893a0c; only the already validated documentation lockfile can differ. Fresh documentation and CI policy checks passed at the current head. Final cross-platform acceptance remains subject to its own protected merge candidate.

nick2781 and others added 12 commits October 26, 2026 09:25
Replace Consul creation macros with typed bases, a private owning factory and explicit DLL entry points. Preserve interface registration, disabled updates and request behavior, and add construction/lifecycle checks with bilingual migration guidance.

BREAKING CHANGE: Consul implementation and plugin class layouts change. Rebuild Consul and its consumers together; all existing public types and logical header paths remain available.
Read hash blocks and write digest bytes without alignment or aliasing assumptions. Use C++20 rotations and provide explicit legacy MSVC methods for persisted-key migration.

BREAKING CHANGE: default MurmurHash3 now uses canonical little-endian blocks and output. Old MSVC IDs, shard mappings and persisted keys require an explicit migration or the matching legacy MSVC method.
Bumps [fast-uri](https://github.com/fastify/fast-uri) from 3.1.8 to 3.1.9.
- [Release notes](https://github.com/fastify/fast-uri/releases)
- [Commits](fastify/fast-uri@v3.1.8...v3.1.9)

---
updated-dependencies:
- dependency-name: fast-uri
  dependency-version: 3.1.9
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
# Conflicts:
#	docs/reference/utility.md
#	docs/reference/utility_CN.md
#	src/core/hash/murmur_hash.hpp
#	tests/core/README.md
#	tests/core/README_CN.md
Base automatically changed from refactor/consul-construction to main October 26, 2026 04:17
dependabot Bot and others added 2 commits October 26, 2026 04:18
Update the documentation build's transitive fast-uri dependency from
3.1.8 to 3.1.9. Runtime dependencies and C++ code are unchanged. Local
npm install, Nimbus (137 pages /275 references), 155 CI policy tests and
actual bilingual HTML/Markdown outputs passed.

The current head 40795f8 includes
preceding queue candidate e40124f.
Native implementation, tests and CMake inputs are byte-identical to the
previously tested local revision
94009f4; only the already validated
documentation lockfile can differ. Fresh documentation and CI policy
checks passed at the current head. Final cross-platform acceptance
remains subject to its own protected merge candidate.

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: nick <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@nick2781
nick2781 marked this pull request as ready for review October 26, 2026 04:21
nick2781 and others added 5 commits October 26, 2026 13:01
Check a successful live-listener negative control, retain the exercised TCP peer across manager shutdown, and require a remote EOF or reset before stopping that peer. Check listener closure using an exact refused new connection instead of global immediate port rebinding.

Keep existing endpoint ownership, manager state, main-thread callbacks and pending HTTP cancellation assertions. The original macOS CI bind conflict holder was not reproduced locally; no production shutdown or reuse-address behavior changes.
Use a private io_context, async_connect and the existing five-second deadline. Cancel and close the probe socket on expiry, return typed timed_out rather than operation_aborted, and drain connect and timer callbacks before returning.

Keep all live-listener, retained-peer and owner-state assertions and the existing test timeout. Production shutdown remains unchanged.
Update the documentation build's transitive fast-uri dependency from
3.1.8 to 3.1.9. Also correct the native Net DSO shutdown regression,
whose final same-port rebind aborted on macOS with `Address already in
use` after shutdown. The particular address holder was not reproduced or
identified; this change does not attribute the failure to TIME_WAIT or
SO_REUSEADDR.

The regression now keeps its actual message-sending client alive across
manager shutdown and requires remote EOF/reset, expired endpoint
ownership, stopped/repeated-stop state and exactly `connection_refused`
on a new listener probe. The same probe must first connect to the real
live listener. Its asynchronous five-second deadline drains cancellation
callbacks and reports `timed_out` distinctly. Existing HTTP
future/cancellation and manager-thread callback assertions remain;
production code, socket options and existing test/supervisor deadlines
are unchanged.

Local validation: actual Net/Bus/Utility DSO regression passed; a
live-listener fault control correctly failed the closed-listener
assertion; a bound-only socket control verified bounded typed timeout
handling. clang-format 18, 155 CI contracts and Nimbus checks (137 pages
/275 references) passed at `7364fa1431977dd64aeda310e27c386d1bb25b64`,
whose complete source tree matches the independently validated
native-fix revision. Original CI results remain preserved. A fresh
source run and complete protected cross-platform candidate are required
before merging.

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: nick <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@nick2781
nick2781 added this pull request to the merge queue Oct 26, 2026
Merged via the queue into main with commit 0ed2458 Oct 26, 2026
6 checks passed
@nick2781
nick2781 deleted the refactor/hash-header-dependencies branch October 26, 2026 06:25
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