Skip to content

v0.15.0: sync pushes user attachments verbatim - #28

Merged
pretyflaco merged 1 commit into
pretyflaco:mainfrom
k9ert:kn/attachments
Aug 15, 2026
Merged

v0.15.0: sync pushes user attachments verbatim#28
pretyflaco merged 1 commit into
pretyflaco:mainfrom
k9ert:kn/attachments

Conversation

@k9ert

@k9ert k9ert commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Why

Files a user drops next to a meeting — slides, agendas, screenshots — have nowhere to go today. _collect_files() is allowlist-based and renames by suffix, so putting them where sync looks would:

  • rename slides.pdf to transcript.pdf (or force the real transcript to keep its raw name), and
  • silently drop every .png, .jpg, .pptx, .docx and video — most of what people actually attach.

This is the upstream half of vezir's attachment-folder workflow: vezir stores attachments in the session directory it already hands to millet sync, so with this change nothing more is needed on that side to get them into the team repo.

What

  • _collect_attachments() collects <session>/attachments/* as attachments/<name>, bypassing both PUSH_SUFFIXES and the descriptive-rename map — attachment names are the user's and survive verbatim.
  • sync_session()'s copy loop now does dest.parent.mkdir(parents=True, exist_ok=True) so the subdirectory prefix works. git add needed no change.
  • Guards: symlinks skipped (the collected pairs are copied into a git clone — a link could point anywhere on the host), dotfiles and nested dirs skipped, MAX_ATTACHMENTS (50) and MAX_ATTACHMENTS_BYTES (100 MB) caps.
  • Sessions with no attachments/ dir collect exactly what they did before.

Tests

6 new tests in tests/test_sync_core.py: verbatim names / allowlist bypass, symlink+dotfile+subdir skipping, unchanged behavior without the dir, both caps, and an end-to-end sync_session push asserting attachments/slides.pdf arrives intact and no transcript.pdf appears.

tests/test_sync_core.py 33 passed. Full suite 405 passed; the 3 test_transcribe.py failures are pre-existing on main in this environment (torch/whisperx version mismatch), unrelated to this change.

🤖 Generated with Claude Code

session/attachments/* -> meeting folder attachments/, names intact,
bypassing PUSH_SUFFIXES and the suffix-keyed rename map (slides.pdf
became transcript.pdf; images/office/video were dropped). Copy loop
mkdirs dest.parent. Symlinks, dotfiles, subdirs skipped; count and
byte caps. Upstream half of vezir's attachment workflow.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

@pretyflaco pretyflaco left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved — squash-merging.

Clean design: _collect_attachments() bypasses the rename map instead of hacking suffixes into the allowlist, is_symlink() checked before is_file(), count+byte caps, version bumped in both pyproject.toml and __init__.py. Tests cover it.

One scope note (no change requested): "nothing more needed on vezir" is true for the sync→git leg only — the scribe folder, pre-upload prompt, upload, and TUI display from #16 are still open.

Thanks k9ert, great contribution.

@pretyflaco
pretyflaco merged commit 377ab7c into pretyflaco:main Aug 15, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants