Skip to content

refactor!: remove the derive feature and fallbacks - #75

Open
sephynox wants to merge 1 commit into
feat/audit-phase-7-4from
fix/audit-phase-8
Open

sephynox wants to merge 1 commit into
feat/audit-phase-7-4from
fix/audit-phase-8

Conversation

@sephynox

@sephynox sephynox commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Phase 2 made tightbeam-derive a required dependency, so the derive feature enabled nothing yet still gated code, and derived error and wire types kept hand-written fallbacks that only narrow builds compiled. Removing the feature leaves one implementation per type, and Beamable now checks tightbeam's own features instead of a copy in the derive crate.

Related Issues

None

Changes Made

  • The derive feature no longer exists
  • Error messages come from one #[error] declaration in every build
  • Beamable feature checks follow tightbeam's features directly
  • The server! service error names the pooled_mux alias

Testing

  • make test-all: passes
  • A crate deriving #[beam(confidential)] without aead fails with the feature message

Breaking Changes

  • Remove "derive" from tightbeam-rs feature lists. The derives are always available.
  • tightbeam-derive drops its aead, digest, signature, and compress features. Remove any direct enable.

Note

Medium Risk
Breaking change for downstream features = ["derive"] and tightbeam-derive feature flags; behavior is mostly compile-time/API surface with no auth or wire-format changes.

Overview
Removes the derive Cargo feature now that tightbeam-derive is always linked: Beamable, Flaggable, and Errorizable are unconditional, and the large #[cfg(not(feature = "derive"))] manual Message, error Display, and URN-spec fallbacks are deleted.

Beamable feature validation no longer uses cfg!(feature = …) inside tightbeam-derive (or mirrored derive-crate features). It emits __tb_if_aead / __tb_if_signature / __tb_if_digest / __tb_if_compress with an else { compile_error!(…) } branch so missing aead, signature, digest, or compress on tightbeam-rs fails at compile time with a clear message.

Feature wiring cleanup: builder, colony, instrument, and compress drop derive / tightbeam-derive/* deps; consumer crates and test_features.sh stop enabling "derive". The server! pooled-mux compile_error text now points at the pooled_mux build alias.

Reviewed by Cursor Bugbot for commit 4e3cbb0. Bugbot is set up for automated code reviews on this repo. Configure here.

@sephynox sephynox self-assigned this Sep 15, 2026
@sephynox
sephynox added this pull request to stack #55 September 15, 2026 01:50
@sephynox sephynox added the enhancement New feature or request label Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant