Enforce 2-letter-then-2-digit shape on channel ids #16

Open
opened 2026-05-27 19:47:36 +00:00 by coilysiren · 0 comments
Owner

Problem

channels/src/otel_a2a_relay_channels/ids.py generates a 4-character channel id by drawing each position uniformly from the full dictatable alphabet (ABCDEFGHJKMPQRSTUVWXYZ456789), so ids end up in arbitrary letter/digit orders. Kai wants channel ids to share one shape with the Claude session tag in agentic-os scripts/agent-name.sh: two letters then two digits (e.g. AB45, HJ59). The letter-then-digit split keeps the spoken form predictable when channel ids get dictated across hosts.

Change

  • new_id(): draw 2 chars from the dictatable letter subset (ABCDEFGHJKMPQRSTUVWXYZ) then 2 chars from the dictatable digit subset (456789).
  • norm_id(): reject ids whose first two chars are not letters or whose last two chars are not digits.
  • Export ID_LETTERS, ID_DIGITS, ID_LETTER_LEN for tests.
  • Extend tests/test_ids.py with positional shape assertions and new rejection cases (ABCD, 4567, 45AB, A4B5).

Companion change for the agent-name tag and dictatable-id doc lands in agentic-os.

**Problem** `channels/src/otel_a2a_relay_channels/ids.py` generates a 4-character channel id by drawing each position uniformly from the full dictatable alphabet (`ABCDEFGHJKMPQRSTUVWXYZ456789`), so ids end up in arbitrary letter/digit orders. Kai wants channel ids to share one shape with the Claude session tag in [agentic-os](https://github.com/coilysiren/agentic-os) `scripts/agent-name.sh`: two letters then two digits (e.g. `AB45`, `HJ59`). The letter-then-digit split keeps the spoken form predictable when channel ids get dictated across hosts. **Change** - `new_id()`: draw 2 chars from the dictatable letter subset (`ABCDEFGHJKMPQRSTUVWXYZ`) then 2 chars from the dictatable digit subset (`456789`). - `norm_id()`: reject ids whose first two chars are not letters or whose last two chars are not digits. - Export `ID_LETTERS`, `ID_DIGITS`, `ID_LETTER_LEN` for tests. - Extend `tests/test_ids.py` with positional shape assertions and new rejection cases (`ABCD`, `4567`, `45AB`, `A4B5`). Companion change for the agent-name tag and dictatable-id doc lands in agentic-os.
coilysiren added
P4
and removed
P2
labels 2026-05-31 07:01:03 +00:00
Sign in to join this conversation.
No labels
P0
P1
P2
P3
P4
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
coilyco-flight-deck/otel-a2a-relay#16
No description provided.