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

Closed
opened 2026-05-27 19:47:36 +00:00 by coilysiren · 1 comment
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.
Author
Owner

Backlog burndown 2026-06-17: closing low-priority (P3/P4) to bring the open count to a manageable level. Nothing lost — reopen if this resurfaces. Batch tag: burndown-2026-06.

Backlog burndown 2026-06-17: closing low-priority (P3/P4) to bring the open count to a manageable level. Nothing lost — reopen if this resurfaces. Batch tag: `burndown-2026-06`.
coilysiren 2026-06-17 08:23:54 +00:00
Commenting is not possible because the repository is archived.
No description provided.