Implement stable SegmentedSequence - #443
Merged
Merged
Conversation
helly25
force-pushed
the
feature/segmented-sequence
branch
from
September 10, 2026 21:24
85f942f to
853a483
Compare
helly25
force-pushed
the
feature/segmented-sequence
branch
from
September 22, 2026 22:08
45d6fcb to
70beb7c
Compare
This was referenced Sep 22, 2026
helly25
force-pushed
the
feature/segmented-sequence
branch
from
September 23, 2026 11:40
09ed57d to
bbc5112
Compare
helly25
marked this pull request as ready for review
September 23, 2026 18:13
helly25
force-pushed
the
feature/segmented-sequence
branch
from
September 23, 2026 20:01
d20d0e6 to
9c83fc3
Compare
This was referenced Sep 23, 2026
This branch was successfully deployed
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.
Implement
SegmentedSequenceas a standalone C++23 container on currentmain, with only theshared BlockSource foundation and reproducible benchmark tooling it needs. This removes the former
dependency on the Arena and string-interning stack so the container can be reviewed and merged
independently.
The implementation now establishes valid array storage on every source/reuse path, exposes the
promised C++23 range surface, rolls failed growth back structurally, and records the actual build
context behind new benchmark evidence.
AG;DR
main, carries the relevantSTYLE_CPP.mdguidance andSegmentedSequence design from Define production string interning architecture #438, and carries Add reproducible benchmark JSON artifacts #439's benchmark-artifact work. The additive
category integrity rule formerly stacked in Add reproducible benchmark JSON artifacts #439 is now supplied by merged prerequisite Allow additive coverage categories on main #534.
mbo/memory/block_source.h, its tests, and a focused build target from the old Arenaparent because SegmentedSequence directly consumes that storage contract. The Arena itself is in
follow-up Implement raw byte Arena and validate layouts #532.
T[]storage/provenance by restartingstd::byte[]lifetime on every freshor recycled block, without laundering a non-live
T; individual elements begin lifetime onlythrough
construct_at.Tto complete cv-unqualified non-array object types with non-throwing destruction andcaps
max_size()by options, iteratordifference_type, and byte representation.noexceptforat,front,back,pop_back, andpop_back_value, with compile-time and runtime exception-policy coverage.std::from_range_t, andappend_rangeingestion for sized, single-pass,move-only, self-aliased, default-source, and source-supplied cases. Mutable/const iterator
interoperability is checked against the standard concepts.
tests state the vector-like caveat that a throwing constructor fed an aliased rvalue may still
leave the source element moved from even though structure rolls back.
lifetime/destruction; allocation and construction rollback; capacity bounds; iterator behavior;
and requirement-policy failures. BlockSource assertions follow current Optional matcher style.
clang-tidy while satisfying the rest of the C++23 ownership, special-member, const-correctness,
named-parameter, and cast checks.
noexcept(false)destructor in the negative element-conceptfixture so GCC and Clang agree that the test type is not nothrow-destructible.
source-specific runtime exhaustion, custom PMR copy behavior, and the absence of a real constexpr
storage path. Deferred pooling, hybrid growth, compaction, and policy experiments are explicit.
__cplusplus, requested dialect, standard library, Apple SDK/deployment context, and parsed Bazelrelease. Explicit Bazel overrides cannot contradict the running executable.
dedicated regression test.
memorycoverage category for the BlockSource foundation without changing anyexisting category baseline.
Validation performed locally on the reviewed tree:
bazel test //mbo/memory:block_source_test //mbo/container:segmented_sequence_test //mbo/container:segmented_sequence_require_exceptions_testbazel test --//mbo/config:require_throws=true //mbo/container:segmented_sequence_require_exceptions_testpython3 -m unittest tools/benchmark_artifact_test.pycoverage: 3/3 passed
and exception-policy test translation units passed; the full compiler/sanitizer matrix remains
CI-owned
35913147129passed coverage integrity, coverage, clang-tidy,GCC 15, Clang 22, ASan, every BCR cell, and aggregate
doneafter retrying a transient macOSrestored-cache cleanup race
The committed baseline preserves all existing authoritative Linux measurements and adds only the
new locally measured memory row; CI remains authoritative for platform stability.
Portability: the branch targets the repository's GCC 15 / Clang 22 C++23 baseline. The committed
historical measurement artifact remains immutable evidence from its recorded C++20 source revision
and toolchain.