Skip to content

fix: preserve third-party source licensing - #279

Merged
tisonkun merged 16 commits into
mainfrom
codex/audit-third-party-provenance
Sep 4, 2026
Merged

fix: preserve third-party source licensing#279
tisonkun merged 16 commits into
mainfrom
codex/audit-third-party-provenance

Conversation

@tisonkun

@tisonkun tisonkun commented Sep 4, 2026

Copy link
Copy Markdown
Member

Summary

  • restore upstream license and copyright treatment for third-party-derived Tokio, parking, and Fastpool source files instead of applying the standard ASF header indiscriminately
  • document exact local-to-upstream file mappings, selected license options, and non-code design acknowledgements in LICENSE
  • add stable upstream source permalinks directly to each derived or adapted source and test file for developer reference
  • consolidate provenance in LICENSE and remove the separate HISTORY.md
  • make the upstream terms explicit in extensively modified derivatives that retain ASF headers
  • explain the substantial Asyncband changes to Tokio-derived OnceCell, ValueCell, and semaphore files without obscuring their source lineage
  • isolate the Pollster-derived polling loop and futures-lite-derived parker cache in a private blocking executor file, leaving the public module as ASF-authored API and documentation
  • rewrite the Barrier, bounded and unbounded MPSC, channel error, and OnceMap documentation around Asyncband's observable contracts and examples
  • rewrite the Broadcast public documentation, receive errors, cancellation contract, and every doctest example around its current fan-out and per-receiver backlog behavior
  • exclude only the source files intentionally carrying upstream treatment from the ASF header check

Design Notes

This applies the ASF third-party source policy per file rather than treating every attribution as a uniform co-existing header:

  • mutex and rwlock remain Tokio-derived and carry Tokio's MIT copyright/license notice plus a project-specific modification note. Their source and documentation overlap is still substantial enough that this PR does not reclassify them as reimplementations.
  • the Fastpool-derived pool implementation and tests restore Fastpool's original Apache-2.0 header and Copyright 2025 FastLabs Developers, then note that the incorporated code was modified for use in Asyncband. This also avoids relying on sole authorship to cover Fastpool contributions.
  • blocking/executor.rs contains the polling loop adapted from Pollster and the thread-local Parker/Waker reuse strategy adapted from futures-lite; blocking/parker.rs contains the parking-derived state machine. Both private implementation files carry upstream treatment instead of an ASF header. blocking/mod.rs now contains only Asyncband's public documentation, FutureExt contract, and thin delegation, so its ASF header has an unambiguous scope.
  • oneshot and AtomicWaker retain their ASF headers because their current files contain extensive Asyncband modifications, but continue to identify the incorporated upstream work and its selected Apache-2.0 terms. This is intentionally visible file by file.
  • OnceCell, ValueCell, and the public and internal semaphore files retain ASF headers for substantial Asyncband modifications while preserving Tokio's copyright and MIT terms for incorporated portions. OnceCell no longer closes its semaphore and supports removal and reinitialization through the reusable ValueCell abstraction. The semaphore has no close state or reserved status bits, uses queue-owned WaitList nodes instead of Tokio's intrusive future-owned waiters, supports queue-head permit debt for exact reductions, and has Asyncband-specific cancellation and batched-waking machinery.
  • Barrier's zero-participant behavior, MPSC capacity/disconnection/cancellation contracts, unbounded memory risk, and OnceMap's clone cost are now stated in Asyncband's own documentation structure and exercised by compact end-to-end examples. LICENSE records the MPSC API/design influence while distinguishing it from Asyncband's std-backed storage and asynchronous coordination.
  • Broadcast retains its ASF header: its versioned shared backlog, arena-managed receiver cursors, reclamation rules, allocation policy, and WakerSet-based receive lifecycle are project-specific, while its public prose, error descriptions, cancellation explanation, and examples have been rewritten around those current contracts.
  • each affected file carries direct commit-pinned links to the exact upstream source paths, while LICENSE remains the self-contained compliance record.
  • LICENSE distinguishes incorporated source from API/design provenance and now contains the implementation relationships previously recorded in HISTORY.md.

Validation

  • cargo x check
  • cargo x test
  • Clippy, rustfmt, typos, Hawkeye, and rustdoc checks from cargo x lint
  • cargo package -p asyncband --allow-dirty --list

Taplo 0.10.0 panics locally while initializing the macOS system proxy configuration, before formatting any file; licenserc.toml was checked against the repository's two-space Taplo configuration and CI will run the formatter independently.

Comment thread CHANGELOG.md Outdated
@tisonkun
tisonkun enabled auto-merge (squash) September 4, 2026 06:56
@tisonkun
tisonkun merged commit 5c34751 into main Sep 4, 2026
10 checks passed
@tisonkun
tisonkun deleted the codex/audit-third-party-provenance branch September 4, 2026 06:58
@tisonkun

tisonkun commented Sep 4, 2026

Copy link
Copy Markdown
Member Author

Broadcast retains its ASF header: its versioned shared backlog, arena-managed receiver cursors, reclamation rules, allocation policy, and WakerSet-based receive lifecycle are project-specific, while its public prose, error descriptions, cancellation explanation, and examples have been rewritten around those current contracts.

We may reimplement many of S/MPS/MC channels later and there would no longer exist these lineages.

@tisonkun tisonkun mentioned this pull request Sep 4, 2026
33 tasks
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