Conversation
|
Claude finished @twmb's task in 4m 40s —— View job
Commits LGTM Review Clean implementation that overrides the benthos file output to add OS-specific path validation. Registration pattern, field name constants, config parsing, mutex usage, and test structure all follow project conventions. One minor pattern violation found.
|
|
Claude finished @twmb's task in 1m 40s —— View job
Commits LGTM Review Reviewed 4 files: new file output override with OS-specific path validation (
|
Override the benthos file output with a connect-local implementation that rejects characters causing silent data loss: colons on macOS (HFS+/APFS maps ':' to '/'), and <, >, :, ", |, ?, * plus control characters on Windows. NUL bytes are rejected on all platforms. Fixes #1005. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
| handle, ok := file.(io.WriteCloser) | ||
| if !ok { | ||
| _ = file.Close() | ||
| return errors.New("opening file for writing") | ||
| } | ||
|
|
There was a problem hiding this comment.
Bug: If w.handle.Close() returns an error here, w.handle is not set to nil. Every subsequent Write call with a different path will re-attempt closing the same broken handle, fail with the same error, and never be able to open a new file — the output gets permanently stuck.
Note that Close() at line 272 already handles this correctly by always setting w.handle = nil regardless of the close error. Apply the same pattern here: set w.handle = nil before (or unconditionally after) the close error check.
|
Commits Review
|
Override the benthos file output with a connect-local implementation that rejects characters causing silent data loss: colons on macOS (HFS+/APFS maps ':' to '/'), and <, >, :, ", |, ?, * plus control characters on Windows. NUL bytes are rejected on all platforms.
Fixes #1005.