Repository navigation
Add RFC document for Options architecture refactoring plan - #1644
Merged
Merged
Conversation
Co-authored-by: iMacTia <2527520+iMacTia@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add planning document for detaching Options subclasses
Add RFC document for Options architecture refactoring plan
Oct 11, 2025
iMacTia
approved these changes
Nov 16, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Overview
This PR adds a comprehensive RFC/planning document at
docs/options-detach-plan.mdthat captures the plan to detach Options subclasses into explicit OOP while maintaining backward compatibility with the legacyFaraday::Options.What's in the Document
The RFC document provides maintainers with a complete roadmap for modernizing Faraday's Options architecture:
Summary
Faraday::Optionsunchanged for backward compatibilityFaraday::OptionsLike- A marker module for identifying options-like objectsFaraday::BaseOptions- An abstract superclass centralizing common behavior (.from,update,merge!,merge,deep_dup,to_hash,inspect)Code Examples
The document includes focused, working code examples:
MEMBERSandCOERCIONSconstantsIncremental Rollout Plan
A 7-phase implementation strategy:
Task List for GitHub Issues
The document includes a detailed task list with checkboxes that maintainers can use with GitHub's "Convert to issues" feature. Each task includes:
Purpose
This is a planning document only - no code changes are included. It serves as a reference for future implementation work and allows maintainers to:
Related
This RFC addresses the need to modernize the Options architecture while preserving backward compatibility, reducing code duplication, and improving maintainability of correctness-sensitive logic like nested coercion and deep merging.
Original prompt
Create a planning/RFC document that captures the plan to detach Options subclasses into explicit OOP while keeping the legacy Faraday::Options for backward compatibility. Add a new Markdown file at docs/options-detach-plan.md with the content below. This document should include: a summary, the main decisions, short focused code examples (OptionsLike, BaseOptions, ProxyOptions, and Utils.deep_merge! snippet), an incremental rollout plan, and a task list that maintainers can “Convert to issues” from the GitHub UI.
File: docs/options-detach-plan.md
RFC/Tracking: Detach Options subclasses into explicit OOP (BaseOptions + OptionsLike), keep legacy Options
Summary
Main decisions
Short code examples
OptionsLike and BaseOptions
ProxyOptions (detached)
Utils.deep_merge! change
Incremental rollout
This pull request was created as a result of the following prompt from Copilot chat.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.