aboutsummaryrefslogtreecommitdiff
path: root/.ai/scripts/tests/test_inbox_send.py
Commit message (Collapse)AuthorAgeFilesLines
* fix(inbox-send): clean error on an unreadable source, dedupe overlapping rootsCraig Jennings3 days1-0/+42
| | | | | | main caught ValueError and FileNotFoundError around the send, so an unreadable source raised a PermissionError as a raw traceback instead of the clean "inbox-send: <message>" every other failure produces. Widening the catch to OSError covers the unreadable source, the missing source, and any atomic-write failure alike. discover_projects appended without deduping, so a roots config naming both a parent directory and one of its children listed the same project at two indices. It now dedupes on the resolved path, first-seen order preserved.
* fix(inbox-send): write handoffs atomically so a failure leaves no phantomCraig Jennings3 days1-0/+72
| | | | | | | | inbox-send wrote straight to the destination path, and write_text truncates on open, so any mid-write failure left a zero-byte .org in another project's inbox. inbox-status counted that phantom as a pending handoff and blocked a turn in the receiving project over a file with no content and no sender. Both send paths now write to a temp sibling and os.replace it into place, so the inbox only ever sees a complete file. A caught failure removes the temp and re-raises, leaving no debris. encoding is pinned to utf-8 on the write and on the roots-config read, which closes the locale-dependent failure that first surfaced this. inbox-status also skips the .inbox-send-* temp, so the brief window before the rename can't read as pending either. The atomicity is only complete once the consumer ignores the in-flight file.
* fix(inbox-send): never overwrite on filename collisionCraig Jennings2026-07-021-0/+75
| | | | Two sends in the same minute whose text starts with the same phrase derived identical filenames, and the second silently replaced the first. A message was lost this way in the wild. An existing target now gets a -2/-3 stem suffix, extension preserved, on both the text and file paths. Four red-first tests reproduce the loss with a fixed timestamp so the same-minute case is deterministic.
* feat(inbox-send): resolve dot-stripped project namesCraig Jennings2026-06-281-0/+46
| | | | .emacs.d resolves as emacsd and .dotfiles as dotfiles, in both inbox-send and the launch trigger. An exact basename match still wins, and --list shows the stripped name. triggers.md documents the same resolution so the spoken name is consistent across both.
* fix(inbox-send): preserve dots in copied filenamesCraig Jennings2026-05-261-0/+28
| | | | | | send_file ran filenames through slugify(), which flattens dots to hyphens. That corrupts the engine.plugin.org plugin-namespace convention: triage-intake.personal-gmail.org arrived as triage-intake-personal-gmail.org, which breaks the engine's triage-intake.*.org glob and the routing that depends on the first dot. I added slugify_filename() for filename stems. It keeps dots, hyphens, underscores, and case, collapses only whitespace runs to hyphens, and truncates on a separator boundary. The prose --text path still uses slugify().
* chore(ai): sync scripts and workflows from claude-templatesCraig Jennings2026-05-151-0/+329
- todo-cleanup.el: :no-sync: tag now inherits down the outline tree - task-review.org: completion procedure scoped to top-level entries - cj-scan.py + cj-remove-block.py: helpers for cj-comment block handling - inbox-send.py: cross-project messaging via inbox directories