Skip to content

Commit 4646593

Browse files
committed
Document async feature admission policy
1 parent e7b65bb commit 4646593

7 files changed

Lines changed: 62 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@
5353
to remain inert Cargo features.
5454
- Updated the v0.5 roadmap to reflect the reserved async-feature admission bar
5555
instead of promising Tokio wrappers before dependency review.
56+
- Added `docs/ASYNC.md` to define the admission requirements for any future
57+
async/Tokio API while the `tokio` feature remains inert.
5658
- Updated security documentation for streaming wrapper buffer cleanup behavior.
5759
- Updated release evidence documentation for stream fuzzing and reserved SIMD
5860
feature-bundle checks.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,8 @@ Security commitments:
255255
boundary.
256256
- [docs/UNSAFE.md](docs/UNSAFE.md) inventories every current unsafe site and
257257
its safety invariants.
258+
- [docs/ASYNC.md](docs/ASYNC.md) defines the admission bar for any future
259+
async/Tokio API while the `tokio` feature remains inert.
258260
- `runtime::backend_report()` exposes the active backend, detected candidate,
259261
SIMD feature status, and scalar-only security posture for audit logging.
260262
- `runtime::require_backend_policy()` lets deployments assert scalar execution,

docs/ASYNC.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Async Admission Policy
2+
3+
`base64-ng` does not currently provide async streaming wrappers. The `tokio`
4+
feature is intentionally inert and dependency-free until an async API is
5+
admitted through the same evidence-driven process used for SIMD and other
6+
security-sensitive surfaces.
7+
8+
This keeps the published crate small and avoids adding a runtime dependency
9+
before the API, cancellation behavior, and security tradeoffs are documented.
10+
11+
## Current Status
12+
13+
- The `stream` feature provides `std::io` streaming wrappers.
14+
- The `tokio` feature is reserved and currently expands to an empty feature set.
15+
- `scripts/check_reserved_features.sh` verifies that `tokio` remains inert and
16+
dependency-free until admission.
17+
- No async traits, Tokio types, or async runtime dependencies are exported by
18+
the crate today.
19+
20+
## Admission Requirements
21+
22+
Before the `tokio` feature may add a dependency or public API, the change must
23+
include:
24+
25+
- A written dependency review covering the Tokio version, transitive
26+
dependency graph, licenses, advisories, and why `std` is insufficient.
27+
- `tokio` must stay optional and must not become a default feature.
28+
- The non-async `stream` API must remain available without Tokio.
29+
- Cancellation behavior must be specified for partially buffered plaintext,
30+
encoded output, pending decode input, and terminal padding states.
31+
- Drop behavior must clear internal staging buffers with the same best-effort
32+
retention-reduction posture as the current `std::io` wrappers.
33+
- Chunk-boundary tests must cover reads and writes split at every Base64
34+
quantum boundary.
35+
- Adjacent framed payload tests must prove decoder readers do not consume bytes
36+
beyond terminal padding.
37+
- Fuzz coverage must include fragmented async-like chunk schedules before any
38+
performance claim is made.
39+
- Release evidence must include `cargo deny check`, `cargo audit`, and
40+
`cargo license --json` output with the async feature enabled.
41+
42+
## Non-Goals
43+
44+
- Async wrappers are not a reason to weaken strict Base64 validation.
45+
- Async wrappers must not enable SIMD dispatch or unsafe code by default.
46+
- Async wrappers must not become the primary API; caller-owned buffers and
47+
scalar strict semantics remain the reference behavior.
48+
49+
## Release Rule
50+
51+
Do not advertise async or Tokio support in release notes until the feature
52+
exports a tested public API and the dependency/admission evidence is present.

docs/PLAN.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ Any dependency addition must answer:
8383
5. `tokio`
8484
- Reserved feature for future async wrappers.
8585
- Inert and dependency-free until the async API is admitted.
86+
- Admission requirements documented in `docs/ASYNC.md`.
8687

8788
### API Policy
8889

docs/RELEASE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ The release gate covers:
3232
- feature-mode tests
3333
- Miri no-default-features tests when nightly Miri is installed
3434
- docs
35+
- packaged async admission policy while the `tokio` feature remains inert
3536
- installed cross-target `no_std` checks
3637
- reserved SIMD feature-bundle compile checks for AVX2, AVX-512 VBMI, and NEON
3738
when the corresponding Rust targets are installed

docs/RELEASE_EVIDENCE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ The release gate runs:
4747
- `cargo deny check`
4848
- `cargo audit`
4949
- `cargo license --json`
50+
- async admission documentation packaged while the `tokio` feature remains
51+
inert and dependency-free
5052
- Miri when nightly Miri is installed
5153
- fuzz target compile check when `cargo-fuzz` is installed
5254
- isolated fuzz and performance harness dependency checks

scripts/validate-release-metadata.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ test -s deny.toml
5656
test -s README.md
5757
test -s CONTRIBUTING.md
5858
test -s SECURITY.md
59+
test -s docs/ASYNC.md
5960
test -s docs/BENCHMARKS.md
6061
test -s docs/CONSTANT_TIME.md
6162
test -s docs/MIGRATION.md
@@ -121,6 +122,7 @@ for required_package_file in \
121122
"README.md" \
122123
"rust-toolchain.toml" \
123124
"SECURITY.md" \
125+
"docs/ASYNC.md" \
124126
"docs/BENCHMARKS.md" \
125127
"docs/CONSTANT_TIME.md" \
126128
"docs/MIGRATION.md" \

0 commit comments

Comments
 (0)