Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion libraries/asio/openspec/changes/genesis/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ records the size of each variant of each example (Asyncify's program is about 2.
Cobalt's `co_main` cannot be replaced from a header: `main` is a hidden friend that calls
`main_promise::run_main`, compiled in Cobalt's `src/main.cpp`, which owns an `io_context` and
calls Boost's `run`. webcpp compiles every Cobalt source but `main.cpp` (and, departure 3,
`io/ssl.cpp`) as `/webcpp//boost_cobalt` and defines `run_main` itself in
`io/ssl.cpp`) as `/webcpp//boost_cobalt` (since moved to the Cobalt library as
`/webcpp/cobalt//core`; the root name was removed on 2026-11-14) and defines `run_main` itself in
`src/cobalt_main.cpp`, with a `webcpp::asio::io_context` and its run family; under Asyncify it
ends the program with `std::exit` so that the `co_return` value is the exit status. It reads
`main_promise`'s members, which are Boost's implementation, so compiling it against the pinned
Expand Down
4 changes: 3 additions & 1 deletion libraries/asio/openspec/changes/genesis/proposal.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ own asynchronous model (promises, events) should reach C++ as ordinary Asio oper
that fail as values behind a transport point; the `ssl` names.
- Superproject changes the library needs: the propagated composite feature `webcpp-suspend`,
a test support that fails a test whose `main` did not finish (`webcpp::test::exit_status`),
`webcpp.variants`, `webcpp.size-table`, and `/webcpp//boost_cobalt`.
`webcpp.variants`, `webcpp.size-table`, and the compiled Cobalt core, first as
`/webcpp//boost_cobalt` and now `/webcpp/cobalt//core` of the independent Cobalt library
(the root name was removed on 2026-11-14).
- Beast builds on this foundation; the owner intends a later Trystero migration to Asio
and Beast. Combining the libraries remains supported through one OpenSSL provider.

Expand Down
27 changes: 16 additions & 11 deletions libraries/asio/openspec/changes/genesis/specs/asio/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ WebCPP namespaces and configuration. Its browser/P2/P3 support units MUST ship
under `src/`, be enumerated by `sources.json`, and be usable by B2 and independent
compiler/CMake consumers. Native upstream-equivalent types MUST forward to Boost.
Wasm implementation paths MUST not shadow installed Boost headers. Cobalt runner,
core and SSL sources MUST belong to the independent Cobalt library; old Asio names
remain compatibility aliases. Consumer builds MUST NOT run maintainer patch tools.
core and SSL sources MUST belong to the independent Cobalt library; Asio MUST NOT
declare a Cobalt target. Consumer builds MUST NOT run maintainer patch tools.

#### Scenario: A header is the only include of its translation unit
- **WHEN** each of `asio.hpp`, `asio/config.hpp`, `asio/io_context.hpp`, `asio/steady_timer.hpp`, `asio/system_timer.hpp` and `asio/basic_waitable_timer.hpp` is compiled alone with `-std=c++20` and Boost 1.92's headers
Expand Down Expand Up @@ -635,16 +635,21 @@ A program that runs a self-posting handler for one second on a `webcpp::asio::io
- **WHEN** `asio_turn_limit` runs with `io_context_options{.max_handlers_per_turn = 250}` and 5,000 self-posts
- **THEN** it prints `max_handlers_per_turn: 250` and `handlers run: 5000`

### Requirement: Cobalt: Forwarding compatibility targets
### Requirement: Cobalt: Targets owned by Cobalt alone

`/webcpp/asio//cobalt` and `cobalt_ssl`, and the root `boost_cobalt` and
`boost_cobalt_io_ssl` names, MUST forward to independently owned Cobalt targets.
Cobalt SHALL preserve the browser default of 100 handlers and independently test
its runner and task helper. Native core/runner MUST remain upstream; the corrected
SSL wrapper is the owner-approved exception specified by Cobalt's genesis.
Asio and the superproject's root MUST NOT declare a Cobalt target or an alias to one
(the owner's decision of 2026-11-14); a program names `/webcpp/cobalt//cobalt`, `core`,
`io_ssl` or `cobalt_ssl`. Cobalt SHALL preserve the browser default of 100 handlers
and independently test its runner and task helper. Native core/runner MUST remain
upstream; the corrected SSL wrapper is the owner-approved exception specified by
Cobalt's genesis.

#### Scenario: Mixed aliases
- **WHEN** an application links old and canonical Cobalt targets together
#### Scenario: A removed Cobalt name
- **WHEN** a program names `/webcpp/asio//cobalt`, `/webcpp/asio//cobalt_ssl`, `/webcpp//boost_cobalt` or `/webcpp//boost_cobalt_io_ssl`
- **THEN** b2 stops because it finds no such target

#### Scenario: Core and runner together
- **WHEN** an application links `/webcpp/cobalt//cobalt` and `/webcpp/cobalt//core` together
- **THEN** one matching core, selected runner and optional TLS provider are linked

#### Scenario: Plain Asio
Expand Down Expand Up @@ -798,7 +803,7 @@ Reverse resolution (`resolve(endpoint, ec)`, `async_resolve(endpoint, ...)`) SHA
- **THEN** its compile fails with the instruction to use the browser settings adapter

#### Scenario: Cobalt's optional SSL wrapper
- **WHEN** a program names `/webcpp/asio//cobalt_ssl` on native or WASIp3
- **WHEN** a program names `/webcpp/cobalt//cobalt_ssl` on native or WASIp3
- **THEN** the shipped corrected Cobalt SSL wrapper and source-built OpenSSL are linked, and TLS state, encrypted transfers, cancellation and shutdown are covered by real-peer tests

### Requirement: Release: The rulebook, index, documentation and gates
Expand Down
27 changes: 15 additions & 12 deletions libraries/cobalt/openspec/changes/genesis/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,20 @@ The canonical Cobalt build depends on `/webcpp/asio//asio`; TLS additionally con
existing Asio trust helper and the one superproject OpenSSL/CA provider. Asio's core, browser
bridge and TLS targets never depend on any Cobalt target.

Existing `/webcpp/asio//cobalt` and `cobalt_ssl` become thin forwarding aliases. The low-level
`/webcpp//boost_cobalt` and `boost_cobalt_io_ssl` names remain compatible aliases to the new
owner. Root project registration resolves the names once; aliases must not recursively load
one another's build files. An Asio-only build must work when Cobalt is unselected and must
not compile Cobalt or resolve OpenSSL. A graph witness checks actual source/object lists,
including old and new target names in the same program.
Each Cobalt target has one name. On 2026-11-14 the owner decided that the build system names
Cobalt only under `/webcpp/cobalt`: the earlier forwarding aliases `/webcpp/asio//cobalt` and
`cobalt_ssl`, and the root `/webcpp//boost_cobalt` and `boost_cobalt_io_ssl`, are removed, and a
tool test checks that b2 no longer finds any of the four. Rejected: keeping them as compatibility
aliases, which gave every target two names before any release had published the old ones.
An Asio-only build must work when Cobalt is unselected and must not compile Cobalt or resolve
OpenSSL. A graph witness checks actual source/object lists, including core and runner targets in
the same program.

Cobalt owns native originals, Wasm adaptations, runner and corrected SSL source.
Asio owns its shipped reactor and SDK adapters. Shared OpenSSL, CA and WIT providers
have one owner. Historical patch inputs under `upstream/` are maintainer provenance,
not a consumer step. Plain Asio must build without Cobalt or TLS, and old/new aliases
must resolve one core, one selected runner and at most one optional SSL provider.
not a consumer step. Plain Asio must build without Cobalt or TLS, and core, runner and
SSL targets together must resolve one core, one selected runner and at most one optional SSL provider.

### D3. Preserve the established scheduling contract

Expand Down Expand Up @@ -305,8 +307,8 @@ discover Cobalt without duplicated reference pages or Cobalt files installed by

- Private Boost promise members and SDK descriptor APIs can change. Checked version/hash
manifests, negative mismatch tests and exact-source upgrade review prevent silent drift.
- Forwarding aliases can form build-loading cycles or duplicate objects. Asio-only and
mixed old/new target graph and link witnesses gate extraction.
- Combined core, runner and SSL targets can duplicate objects. Asio-only and combined
target graph and link witnesses gate extraction; a removed name stops b2 by name.
- An upstream example may fail even natively or depend on a service that changed. Record
the unchanged failure, reproduce it, and label any deterministic counterpart separately.
- Browser timers and scheduler load vary. Functional bounds and repeated measurements are
Expand All @@ -323,8 +325,9 @@ discover Cobalt without duplicated reference pages or Cobalt files installed by
2. Build the independent tree and import it as one initial commit when repository creation
is authorized. Preserve upstream notices; do not carry unrelated source history.
3. Move Cobalt-specific code/patches/tests/docs, split mixed fixtures without duplicating
provider ownership, and redirect the compatibility names. Do not delete old definitions
until all old/new entry-point checks pass against the same candidate.
provider ownership, and move every consumer to the Cobalt names. Remove the old names
(the owner's decision of 2026-11-14) only together with their last consumer, in one
candidate whose entry-point checks pass.
4. Populate operation and application matrices through fresh public-target builds/runs,
execute browser pages, produce Release measurements, then build/lint/render documentation.
5. Coordinate Asio and organization specification ownership references, submodule/installation
Expand Down
6 changes: 4 additions & 2 deletions libraries/cobalt/openspec/changes/genesis/proposal.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ need an independent library contract before extraction or broader support can be
native SSL wrapper is an explicit type-identity exception.
- Extract target-specific runners, shipped implementation sources, source inventories and
Cobalt-owned tests/examples from Asio and the superproject. Keep dependency direction
Cobalt -> Asio, with no Asio core dependency on Cobalt. Retain the old
`/webcpp/asio//cobalt` and `cobalt_ssl` names as compatibility aliases.
Cobalt -> Asio, with no Asio core dependency on Cobalt. Each Cobalt target has one
name, under `/webcpp/cobalt`: the old `/webcpp/asio//cobalt` and `cobalt_ssl` and the
root `/webcpp//boost_cobalt` and `boost_cobalt_io_ssl` names are removed, not
forwarded (the owner's decision of 2026-11-14).
- Define an explicit feature and application matrix by target, actual runtime, exception
mode, thread profile and, on Emscripten, JSPI or Asyncify. Every cell has evidence or a
named limitation: supported/tested, SDK/runtime blocked, not applicable, or implementation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,13 @@ preserving supported coroutine operations, completion tokens, executor/cancellat
associations and the `co_main` signature. Native core and plain I/O types MUST be
actual Boost types; Wasm MUST select shipped adaptations through configuration.
The corrected SSL wrapper SHALL be the explicitly documented native identity exception.
Both `co_main` and custom-main consumers MUST be supported. The old Asio/root Cobalt
B2 targets MUST remain forwarding aliases without duplicate implementation.
Both `co_main` and custom-main consumers MUST be supported. Each Cobalt B2 target
SHALL have one name, under `/webcpp/cobalt`; Asio and the superproject's root MUST NOT
declare an alias to a Cobalt target.

#### Scenario: A removed Cobalt name
- **WHEN** a program names `/webcpp/asio//cobalt`, `/webcpp/asio//cobalt_ssl`, `/webcpp//boost_cobalt` or `/webcpp//boost_cobalt_io_ssl`
- **THEN** b2 stops because it finds no such target, and `/webcpp/cobalt//cobalt` builds

#### Scenario: Existing coroutine algorithm
- **WHEN** an existing supported Boost.Cobalt program changes its includes and namespace to WebCPP
Expand Down
4 changes: 2 additions & 2 deletions libraries/cobalt/openspec/changes/genesis/tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ items do not certify the later source migration.

## 2. Independent ownership and compatibility

- [ ] 2.1 Add failing public-target/Asio-only/mixed-alias build witnesses, then establish the independent library skeleton, configuration and metadata; verify Asio-only consumers do not resolve Cobalt or OpenSSL. (plan: 2.1)
- [ ] 2.1 Add failing public-target/Asio-only/core-and-runner build witnesses, then establish the independent library skeleton, configuration and metadata; verify Asio-only consumers do not resolve Cobalt or OpenSSL. (plan: 2.1)
- [ ] 2.2 Transfer the runner and Cobalt shipped source inventories and maintainer provenance with matching consumer/archive settings; verify exact source provenance, hash/version refusals and one definition per support unit. (plan: 2.2)
- [ ] 2.3 Forward the four legacy target names and migrate Cobalt-owned tests/examples while splitting mixed fixtures; verify old/new/custom-main consumers and combined Asio/Beast/Cobalt links have no graph cycle, duplicate runner or provider. (plan: 2.3)
- [ ] 2.3 Remove the four legacy target names (owner's decision of 2026-11-14) and migrate Cobalt-owned tests/examples while splitting mixed fixtures; verify b2 finds none of the old names, and that co_main/custom-main consumers and combined Asio/Beast/Cobalt links have no graph cycle, duplicate runner or provider. (plan: 2.3)

## 3. Core behavior and capabilities

Expand Down