Skip to content

Conversation

@LivInAbsurdism
Copy link
Contributor

No description provided.

chrisdambrosio and others added 2 commits July 1, 2025 14:43
This adds pieces to send file data to a device. It uses a functional
core in `Jeff.Command.FileTransfer` to check each reply after a
FILETRANSFER attempt to determine next steps for continuing the data
transfer. The functional core allows for simpler testing
@LivInAbsurdism LivInAbsurdism requested a review from Copilot July 7, 2025 23:10
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds OSDP file transfer support by implementing file transfer command chunking, FTSTAT reply decoding, and a high-level file_transfer API with tests.

  • Introduce Jeff.Command.FileTransfer with command_set/2, adjust_from_reply/2, and private chunking logic
  • Add Jeff.Reply.FileTransferStatus decoder and integrate it into Jeff.Reply.decode/2
  • Provide Jeff.file_transfer/3|4 public API, progress callbacks, and end-to-end tests

Reviewed Changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/command/file_transfer_test.exs New tests for command_set/2 and adjust_from_reply/2
lib/jeff/reply/file_transfer_status.ex Define FileTransferStatus struct & decode/1 logic
lib/jeff/reply.ex Register FTSTAT decode branch in the main reply dispatcher
lib/jeff/command/file_transfer.ex Implement FileTransfer command struct, chunking, and adjust
lib/jeff/command.ex Hook up FILETRANSFER encode path in the command router
lib/jeff.ex Add `file_transfer/3
.mise.toml Pin Elixir/Erlang versions
Comments suppressed due to low confidence (2)

test/command/file_transfer_test.exs:1

  • [nitpick] Test module name doesn’t match its path; rename to Jeff.Command.FileTransferTest to align with test/command/file_transfer_test.exs.
defmodule Jeff.FileTransferTest do

lib/jeff/command/file_transfer.ex:74

  • Typo in doc: change 'may need to been adjusted' to 'may need to be adjusted' for correct grammar.
  next set of commands may need to be adjusted or prevented and this provides

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@LivInAbsurdism LivInAbsurdism changed the title WIP: OSDP File Transfers OSDP File Transfers Sep 15, 2025
@LivInAbsurdism LivInAbsurdism force-pushed the liv/filetransfers branch 2 times, most recently from 3f88514 to 9844455 Compare September 22, 2025 18:23
- Add file_transfer function with progress callback support
- Resolve conflicts with new mfg function from main
- Add ErrorCode alias for compilation
@LivInAbsurdism LivInAbsurdism force-pushed the liv/filetransfers branch 3 times, most recently from fb6fa97 to e8d7f76 Compare September 29, 2025 21:12
Signed-off-by: Liv Cella <47287116+LivInAbsurdism@users.noreply.github.com>
Copy link

@kybishop kybishop left a comment

Choose a reason for hiding this comment

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

I'm admittedly glossing over this a bit but the general architecture seems sound. It seems to me that we'd know very quickly if something is wrong with the implementation during test so I'm not too concerned about reviewing with a fine toothed comb.

Copy link
Member

@jjcarstens jjcarstens left a comment

Choose a reason for hiding this comment

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

Just some thoughts. Looks great!

@LivInAbsurdism LivInAbsurdism force-pushed the liv/filetransfers branch 2 times, most recently from 9408284 to 6d9d6fa Compare September 30, 2025 21:16
Copy link
Member

@jjcarstens jjcarstens left a comment

Choose a reason for hiding this comment

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

🎉

@LivInAbsurdism LivInAbsurdism merged commit 4a93d4d into main Sep 30, 2025
6 checks passed
@LivInAbsurdism LivInAbsurdism deleted the liv/filetransfers branch September 30, 2025 21:43
@jjcarstens jjcarstens mentioned this pull request Sep 30, 2025
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.

5 participants