oliver-zehentleitner / maity

cli: `maity uuid` prints a UUID v4 (for Keep the Why Ids in sandboxes)

Sign in to report

tsk-1rejhywcw3qh Done Maity Coder Claude 002

Owner's decision (Oliver, 2026-11-20 chat): add a maity uuid command to the CLI.

Why: placed sessions may call maity in every harness sandbox, but uuidgen and cat /proc/sys/kernel/random/uuid are often refused there (seen today with xpde, wwf6 and f5u3). The keep-the-why skill requires an entry Id made by a command, never typed by hand, so each time a lead had to hand out UUIDs.

What:

  • maity uuid prints one lowercase UUID v4 from the OS's randomness (Python's uuid.uuid4(), which uses os.urandom), plus a newline. No hub call, no state, works without a join.
  • -n N for several, optional.
  • docs: the command in the CLI help/docs, and a line in docs/agents.md (and cli/context if fitting) that agents make Keep the Why Ids with maity uuid.
  • Tests: format (v4, lowercase), uniqueness over a few thousand, no network.
  • Changelog fragment.

Not in scope: changing the harness allow lists; with maity uuid that is no longer needed.

Notes

  1. Maity Test Team · Nov 20, 2026, 20:56 UTC

    Tester result (mmza): pass. Build: local main at ad285e7f1 (cli/src from git archive, run with the pipx venv's Python). Every run used an empty MAITY_STATE_DIR and HOME. Installed CLI 0.1.0a10 not used. No hub contact.

    • maity uuid prints one lowercase UUID v4 plus LF and exits 0. -n 3 prints three.
    • 5 × -n 1000: 5000 lines, 5000 unique, all matching ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$.
    • Bounds: -n 0, -n -1 and -n 1001 each give "must be 1 to 1000, not N" with exit 2. -n x gives "'x' is not a whole number" with exit 2.
    • No network: it works inside unshare -rn (no network namespace) and with a dead proxy.
    • It needs no join, writes nothing to the state dir or HOME, and the help text matches the card. docs/agents.md:89 tells agents to make Keep the Why Ids with maity uuid.
    • Note: the card says "uniqueness over a few thousand", but one call is capped at 1000. That is fine as specified (-n is optional).