<commit_before>class HomePageConstraint
  def initialize(filter)
    @filter = filter
  end

  def matches?(request)
    return @filter == 'finish_installation' if SiteSetting.has_login_hint?

    provider = Discourse.current_user_provider.new(request.env)
    homepage = provider.current_user ? SiteSetting.homepage : SiteSetting.anonymous_homepage
    homepage == @filter<commit_msg>FIX: Suppress error when acccess is invalid.<commit_after>class HomePageConstraint
  def initialize(filter)
    @filter = filter
  end

  def matches?(request)
    return @filter == 'finish_installation' if SiteSetting.has_login_hint?

    provider = Discourse.current_user_provider.new(request.env)
    homepage = provider.current_user ? SiteSetting.homepage : SiteSetting.anonymous_homepage
    homepage == @filter
  rescue Discourse::InvalidAccess
    false
{'fraction_non_alphanumeric': 0.08047337278106509, 'fraction_numerical': 0.0, 'mean_word_length': 4.916083916083916, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1652201', 'n_tokens_mistral': 241, 'n_tokens_neox': 239, 'n_words': 52}