Skip to content

feat: consider 8-char token hash for production scale #27

Description

@byapparov

Context

PR #23 review noted that 6-char hex hash (16M space) has theoretical collision risk via birthday paradox at ~4K tokens per session.

Location: src/middleware/redactor.ts:11-13

Analysis

Current usage is per-session with typical vault sizes under 100 tokens. Collision probability at 100 tokens is ~0.03%. At 4K tokens it's ~50%.

Proposal

Increase to 8 chars (4B space) for safety margin. This is a breaking change for any downstream token format parsing.

Priority

Very Low — no practical risk at current usage levels.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions