Commit 82649a7
feat(send-file): bounded ACK wait, progress, throughput · docs rewrite
Fixes the "send-file hangs ~120s then EOFs" report originally filed in
BUG-updater-version-skew.md. Two distinct things ship here:
1. cmdSendFile reliability (M0 of the reliable-file-transfer proposal):
- --timeout flag (default 90s) bounds the ACK wait. Was unbounded
before, hitting SO_KEEPALIVE around 120s with an opaque EOF.
On expiry we close the conn (unblocks the read goroutine), then
surface a clear hint pointing at pilotctl ping <peer>.
- Progress line on stderr via startWaitProgress, gated on TTY +
not --json so agents don't see control chars.
- Result JSON now carries elapsed_ms and throughput_mbps.
- Receiver "ERR …" ACK already errored; tightened the hint.
- parseFlags split for --timeout: positional args come from `pos`.
2. Docs:
- BUG-updater-version-skew.md rewritten end-to-end. The RSS-stale
mechanism the original claimed is wrong (updater hits the GitHub
API directly per updater.go:247); the real cause is that
pilot-updater ships but is never started (no launchd/systemd unit,
not embedded in daemon). Also documents the missing pilot-gateway
binary in v1.11.0 (confirmed by `tar tzf`).
- PROPOSAL-reliable-file-transfer.md is the new home for the
real fix — TypeFileStream wire type, INIT/CHUNK/ACK/DONE/ABORT/RESUME
state machine, sliding-window backpressure, end-to-end SHA-256,
resume protocol, backward-compat fallback to TypeFile. Six
milestones; M0 ships in this commit.
No wire-format change. No new deps. Full pilotctl suite green.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 57e1905 commit 82649a7
3 files changed
Lines changed: 459 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1176 | 1176 | | |
1177 | 1177 | | |
1178 | 1178 | | |
1179 | | - | |
| 1179 | + | |
1180 | 1180 | | |
1181 | | - | |
1182 | | - | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
1183 | 1204 | | |
1184 | 1205 | | |
1185 | 1206 | | |
| |||
3642 | 3663 | | |
3643 | 3664 | | |
3644 | 3665 | | |
| 3666 | + | |
| 3667 | + | |
| 3668 | + | |
| 3669 | + | |
| 3670 | + | |
| 3671 | + | |
| 3672 | + | |
| 3673 | + | |
| 3674 | + | |
| 3675 | + | |
| 3676 | + | |
| 3677 | + | |
| 3678 | + | |
| 3679 | + | |
| 3680 | + | |
| 3681 | + | |
| 3682 | + | |
| 3683 | + | |
| 3684 | + | |
| 3685 | + | |
| 3686 | + | |
| 3687 | + | |
3645 | 3688 | | |
3646 | | - | |
3647 | | - | |
| 3689 | + | |
| 3690 | + | |
| 3691 | + | |
3648 | 3692 | | |
3649 | 3693 | | |
| 3694 | + | |
| 3695 | + | |
| 3696 | + | |
| 3697 | + | |
| 3698 | + | |
| 3699 | + | |
| 3700 | + | |
3650 | 3701 | | |
3651 | 3702 | | |
3652 | 3703 | | |
3653 | | - | |
| 3704 | + | |
3654 | 3705 | | |
3655 | 3706 | | |
3656 | 3707 | | |
3657 | 3708 | | |
3658 | 3709 | | |
3659 | 3710 | | |
3660 | | - | |
3661 | 3711 | | |
3662 | 3712 | | |
3663 | | - | |
| 3713 | + | |
3664 | 3714 | | |
3665 | 3715 | | |
3666 | 3716 | | |
| |||
3677 | 3727 | | |
3678 | 3728 | | |
3679 | 3729 | | |
3680 | | - | |
| 3730 | + | |
| 3731 | + | |
3681 | 3732 | | |
3682 | 3733 | | |
3683 | 3734 | | |
| |||
3693 | 3744 | | |
3694 | 3745 | | |
3695 | 3746 | | |
| 3747 | + | |
| 3748 | + | |
| 3749 | + | |
3696 | 3750 | | |
| 3751 | + | |
3697 | 3752 | | |
3698 | 3753 | | |
3699 | 3754 | | |
3700 | | - | |
3701 | | - | |
3702 | | - | |
3703 | | - | |
3704 | | - | |
3705 | | - | |
3706 | | - | |
3707 | | - | |
3708 | | - | |
| 3755 | + | |
| 3756 | + | |
| 3757 | + | |
| 3758 | + | |
| 3759 | + | |
| 3760 | + | |
| 3761 | + | |
| 3762 | + | |
| 3763 | + | |
| 3764 | + | |
| 3765 | + | |
| 3766 | + | |
| 3767 | + | |
| 3768 | + | |
| 3769 | + | |
| 3770 | + | |
| 3771 | + | |
| 3772 | + | |
| 3773 | + | |
| 3774 | + | |
| 3775 | + | |
| 3776 | + | |
| 3777 | + | |
| 3778 | + | |
| 3779 | + | |
| 3780 | + | |
| 3781 | + | |
| 3782 | + | |
| 3783 | + | |
| 3784 | + | |
| 3785 | + | |
| 3786 | + | |
| 3787 | + | |
| 3788 | + | |
| 3789 | + | |
| 3790 | + | |
| 3791 | + | |
| 3792 | + | |
| 3793 | + | |
| 3794 | + | |
| 3795 | + | |
| 3796 | + | |
| 3797 | + | |
| 3798 | + | |
3709 | 3799 | | |
3710 | 3800 | | |
3711 | 3801 | | |
3712 | | - | |
3713 | | - | |
3714 | | - | |
| 3802 | + | |
| 3803 | + | |
| 3804 | + | |
| 3805 | + | |
| 3806 | + | |
3715 | 3807 | | |
3716 | 3808 | | |
3717 | 3809 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
0 commit comments