refactor: structure cleanup, sets, and Zeitwerk-first specs - #1149
Merged
Merged
Conversation
Remove the orphaned ASYNC_FEED_REFRESH env prefix and unused StylesheetEntry, and enable TargetRubyVersion 4.0 plus Style/ItBlockParameter.
Require config/version during Boot.setup!, document collapsed dirs, make ConfigSnapshot.deep_dup the single owner, and drop redundant require_relatives.
Expose Auth.extract_token for Health, replace hand-rolled XOR with OpenSSL.secure_compare, and avoid array subtraction in DirectoryParams.
Convert allowlists and path keys to Set lookups, memoize supported strategies, and index cold-seed ranks for O(1) starter ranking.
Require app in spec_helper so specs rely on Zeitwerk instead of per-file require_relative chains.
gildesmarais
marked this pull request as ready for review
September 16, 2026 21:20
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.
What changed
ASYNC_FEED_REFRESH_flag prefix/docs and unusedStylesheetEntry; target RuboCop at Ruby 4.0 withStyle/ItBlockParameter.Html2rss::Web::VERSIONinBoot.setup!, document collapsed Zeitwerk dirs, and makeConfigSnapshot.deep_dupthe single deep-dup owner (LocalConfig delegates).Auth.extract_tokenfor Health; replace hand-rolled XOR withOpenSSL.secure_compareon feed-token and health-token paths; simplifyDirectoryParams.match?.Sets; O(1) cold-seed rank index; skipMarshal.dumpfor empty static cache params.spec/spec_helper.rband strip per-specrequire_relativechains.Why
Approved structure / cruft / Ruby 4 modernization pass for
html2rss-web: remove broken env-prefix validation, unify duplicated auth and cloning seams, and lean on CRuby 4Setplus Zeitwerk instead of manual requires.Risk
[]to digestempty(one-time miss).SUPPORTED_STRATEGIESis frozen at SourceResolver load time (fine for today’s static gem registry).Review map
app/web/security/auth.rb+app/web/api/v1/health.rb+app/web/security/feed_token.rb— shared Bearer extraction andOpenSSL.secure_compare.app/web/boot.rb+app/web/config/config_snapshot.rb+app/web/config/local_config.rb— VERSION load, deep_dup ownership, Zeitwerk require cleanup.app/web/feeds/source_resolver.rb+app/web/catalog/starters.rb+ telemetry/sanitizer Set swaps — perf micro-changes.spec/spec_helper.rb— central app boot; rest ofspec/is require deletion only..rubocop.yml+app/web/config/flags.rb+docs/README.md— Ruby 4 target and async-refresh cruft removal.Validation
make ready→ exit 0 (357 examples, 0 failures).review.gilfindings + security/perf/tests): readiness Yes; no Critical/Important findings.