Skip to content

refactor: consolidate truncate_chars between zeph-core and zeph-common #1967

@bug-ops

Description

@bug-ops

Context

PR #1966 (structural code organization) introduced zeph-common crate with truncate_to_bytes. However, truncate_chars/truncate_to_chars remains duplicated between zeph-core::text and zeph-common::text.

Found by: impl-critic (IMP-01)

Problem

  • zeph-core::text::truncate_chars and zeph-common::text::truncate_to_chars implement the same logic
  • zeph-core does not depend on zeph-common (Layer 2 vs Layer 0), so the consolidation requires either:
    • Adding zeph-common as a dependency of zeph-core, or
    • Moving truncate_chars to zeph-common and re-exporting from zeph-core

Acceptance criteria

  • Single implementation of char-based truncation
  • No code duplication between crates
  • Layered architecture preserved (Layer 0 → Layer 2 dependency direction)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions