Repository navigation
Conversation
both were already failing on main:
- rubocop: missing spaces inside the array brackets in backup_code.rb
- brakeman: bin/brakeman runs --ensure-latest, so 8.1.0 coming out
failed every PR. bumped to 8.1.0, which raised two new warnings:
- a weak XSS on the email typo banner. it was already escaped, but
switching to an _html translation key lets rails do the escaping
and drops the manual html_escape + html_safe
- rails 8.0 EOL on 2026-11-07. ignored with a note — the 8.1
upgrade needs its own PR before then
CI doesn't run rspec, so these piled up unnoticed. no app code changes. - sidebar_spec reopened Components::Base to stub `self.include` and the helper macros as no-ops, so it could load without rails. that leaked into the whole process: every phlex component loaded after it lost its includes. ~30 unrelated specs failed only in a full run. it now loads rails_helper like everything else. - persona_verification factory: the record-bearing traits built a persona record with a different inquiry_id (and identity), tripping persona_record_matches_inquiry. persona_inquiry_id now follows the record. - persona_lifecycle_spec: identity's create-time before_commit leaves the in-memory record dirty, and the stubbed current_identity carried it into with_lock. reload it, as prod does per request. - step_up_spec predates require_pending_step_up — open the step-up page first, as the real flow does. - identity_spec predates the india persona rollout flag. - authorized_applications_spec counted the app name, which also appears in the revoke confirmation. count cards instead. - persona_verification_spec expected approve! to send the approved mail; callers send it, so assert it doesn't (a double mail otherwise). - manual_verification_call_spec read the never-cleared enqueued_jobs list, picking up mail jobs from earlier examples.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
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.
why
bundle exec rspecon main: 657 examples, 74 failures. CI only runs brakeman and rubocop, never rspec, so nobody saw them pile up. many of the failing examples are persona/verification specs, so that code had very little real coverage.after this: 658 examples, 0 failures, stable across random-order runs. no app code changes, only specs and factories.
what was wrong
sidebar_spec.rbreopenedComponents::Baseand stubbedself.includeand the helper macros as no-ops so it could load without rails. that leaked into the whole process: every phlex component loaded afterwards lost its includes. these specs failed only in a full run and passed on their own.persona_verificationfactory's:pending/:approved/:rejected/:fatal_rejectiontraits built a persona record with a different inquiry id (and identity), which failspersona_record_matches_inquiry.persona_inquiry_idnow follows the record.persona_lifecycle_spec: the identity's create-timebefore_commitleaves the in-memory record dirty, and the stubbedcurrent_identitycarried that intowith_lock. the identity is now reloaded, as prod does on every request.step_up_specwas written beforerequire_pending_step_up. it now opens the step-up page first, like the real flow.identity_specpredates the india persona flag;authorized_applications_speccounted the app name, which also appears in the revoke confirmation;persona_verification_specexpectedapprove!to send the approved mail, but callers send it;manual_verification_call_specread the never-clearedenqueued_jobslist.found along the way, not changed here
Identity#copy_legal_name_if_needednever persists anything. it's abefore_committhat runs after the INSERT, so the legal names it copies only ever exist in memory. code that reads them falls back to first/last name, so nothing visibly breaks. making it actually save (before_create) would change signup data, so that's a separate decision.ci.yml. happy to add it in a follow-up once this lands.also in this PR
4003fb9 is the CI-fix commit from #342/#343 (lint offense, brakeman 8.1.0 bump, email typo
_htmlkey), cherry-picked because main's lint and scan_ruby are red. whichever merges first, the others rebase over it.