Skip to content

Fix file URI and CLI input boundary handling - #177

Merged
id774 merged 1 commit into
masterfrom
claude/file-uri-cli-boundary-consistency-w6mzwh
Sep 9, 2026
Merged

Fix file URI and CLI input boundary handling#177
id774 merged 1 commit into
masterfrom
claude/file-uri-cli-boundary-consistency-w6mzwh

Conversation

@id774

@id774 id774 commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • StoreFile now hands PublishAmazonS3 the actual saved path as an absolute, percent-encoded file: URI, instead of concatenating a possibly-relative path onto file:// (which could be misread as carrying an authority, and could not represent a path containing a space or other URI-reserved character).
  • PublishAmazonS3 now decodes the URI path back to a local filesystem path before uploading, undoing the percent-encoding StoreFile applies.
  • The feedparser subcommand now converts the URL validation failure Automatic::Http.uri already applies into the CLI's ordinary failure path (stderr diagnostic, exit 1), instead of letting it surface as an unprocessed exception with a backtrace.
  • plugins/filter/join.rb's comment describing FeedMaker.create_pipeline's nil-link behavior no longer describes a code path this plugin doesn't call; it now just documents why this item's link is nil.
  • The Gemfile comment for the Supported (external) plugin group no longer claims their specs exercise the external service directly rather than a double, which does not match how those specs are actually written.

Compatibility

  • Recipe format, plugin interface, configuration keys/defaults, and pipeline shape are unchanged.
  • No dependency was added, removed, or had its version constraint changed.
  • Ruby support (>= 3.3.0) and the CI matrix (3.3 / 3.4 / 4.0) are unchanged.
  • No unexpected internal exception is blanket-rescued: an internal ArgumentError raised from inside FeedParser.get_url (after URL validation passes) still propagates unconverted.

Version History

  • The CLI correction is covered by the existing v26.09 "Harden the framework's execution boundary" bullet in doc/VERSIONS, which already describes fixing CLI contract drift; no new bullet was added for it.
  • The StoreFile/PublishAmazonS3 handoff fix is recorded as one new v26.09 bullet: "Preserve local file paths when StoreFile hands file URIs to PublishAmazonS3."
  • No release item was added for the comment-only corrections in plugins/filter/join.rb or Gemfile, or for the doc/PLUGINS.md clarifications.

Validation

  • Targeted specs (spec/plugins/store/file_spec.rb, spec/plugins/publish/amazon_s3_spec.rb, spec/lib/automatic/cli_spec.rb): 45 examples, 0 failures.
  • Full default suite (bundle exec rake spec): 423 examples, 0 failures (network spec not enabled).
  • gem build automatic.gemspec: succeeded (version 26.09).
  • require 'automatic': loads successfully.
  • bin/automatic --version: exit 0.
  • bin/automatic --help: exit 0.
  • Manually verified feedparser against file:///etc/passwd, https:/feed, and http://[: each exits 1 with a one-line automatic: diagnostic on stderr and empty stdout.
  • GitHub Actions Ruby 3.3 / 3.4 / 4.0: pending on this PR; will confirm once CI runs.

🤖 Generated with Claude Code

https://claude.ai/code/session_017Zn5VetozA4NmGEUGLGik1


Generated by Claude Code

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Zn5VetozA4NmGEUGLGik1
@id774
id774 merged commit abc3647 into master Sep 9, 2026
8 checks passed
@id774
id774 deleted the claude/file-uri-cli-boundary-consistency-w6mzwh branch September 9, 2026 13:25
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