Strip console warnings before classifying infra failures#2569
Merged
hiroshinishio merged 1 commit intomainfrom Apr 21, 2026
Merged
Strip console warnings before classifying infra failures#2569hiroshinishio merged 1 commit intomainfrom
hiroshinishio merged 1 commit intomainfrom
Conversation
detect_infra_failure was substring-matching "AccessDeniedException" in app-level console.warn output (SSM fetch fallback), routing real Jest test failures down the CI-retry path. Call strip_jest_noise first so app warnings can no longer false-positive the classifier. Regression test loads the real CircleCI log from Foxquilt PR 714 that triggered the bug and asserts it now classifies as None. Also documents the python -m pytest invocation and ignores .claude/scheduled_tasks.lock.
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.
Summary
detect_infra_failurewas substring-matchingAccessDeniedExceptionin app-levelconsole.warnoutput (SSM fetch fallback), sending PRs with real Jest failures down the infra-retry branch. Three empty-commit retries later, GA gave up without ever invoking the LLM fix path.strip_jest_noisefirst soconsole.warn/console.logblocks (including the orphaned AWS stack traces and closing braces) are removed before pattern scanning. The classifier's single responsibility — match infra patterns in cleaned log — is preserved.None.Notes
CLAUDE.md: documented that.envand.venvare already sourced before Claude starts, plus thepython -m pytest ...invocation (so top-level imports likefrom constants.models ...resolve withoutPYTHONPATH)..gitignore:.claude/scheduled_tasks.lock.Social Media Post (GitAuto)
Infrastructure-failure classifier no longer trips on app-level console warnings
Social Media Post (Wes)
Spent the morning on a classifier that confidently called a code bug "infra" because the app logged an AccessDenied warning during test setup. Three empty-commit retries later, nothing fixed. Strip the console blocks before scanning and the same log classifies correctly. One responsibility per function, clean input in.