Skip to content

[freeze][T1] Narrow pub mod wire to the minimal adapter surface #210

Description

@joeldsouzax

Tier 1 — violates CLAUDE.md rule 4 ("wire helpers must be pub(crate)"); freezes byte offsets as public API.

Evidence

  • lib.rs pub mod wire; exposes encode_frame, decode_frame, FrameHeader, FrameOffsets, EncodedFrame, DecodedFrame, WireError, DecodeError, PAYLOAD_ALIGN, HEADER_FIXED_SIZE, and all *_OFFSET consts.
  • A 2nd adapter only ever needs encode_frame/decode_frame + the error types (fjall uses exactly those).

Risk after freeze

Downstream code can hard-depend on GLOBAL_SEQ_OFFSET == 0, HEADER_FIXED_SIZE == 18, FrameHeader's field set — freezing the on-disk offsets as public commitments.

Action

Curate wire to a minimal public surface: encode_frame, decode_frame, EncodedFrame, DecodedFrame, FrameOffsets, WireError, DecodeError, PAYLOAD_ALIGN. Demote the *_OFFSET consts, HEADER_FIXED_SIZE, and FrameHeader internals to pub(crate). (Pairs with the T0 frame-version issue.)

From the freeze-readiness audit (store I7 + adapter C2).

Metadata

Metadata

Assignees

No one assigned

    Labels

    api-freezePre-1.0 API-freeze hardening (breaking-to-change-later)area: storenexus-store crate (codec/envelope/repo/subscription)

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions