Document analysis general bugfixes#1431
Merged
drusepth merged 2 commits intotailwind-redesignfrom Apr 3, 2026
Merged
Conversation
- Fix SyllablesService mutating frozen string arguments and potential nil crash - Remove stale class-level memoization in ReadabilityService and FleschKincaidService that caused all documents after the first to get incorrect cached results - Add division-by-zero guards in readability formulas for empty documents - Fix sentiment controller crashing when emotion/sentiment scores are nil - Fix pos_percentage division by zero when word_count is 0 - Fix dominant_emotion/recessive_emotion returning inconsistent types (Hash vs Array) - Fix ContentService.adult_content? invalid parameter ordering - Fix DocumentMentionJob crashing on deleted pages (find -> find_by) - Fix numbers method referencing undefined 'text' instead of 'plaintext' - Scope document analyses index to current user instead of exposing all https://claude.ai/code/session_01Eq88e3zBUEgkaY56Y3vmLx
Fill out all empty test stubs with high-quality tests covering: - Document model: associations, status enum, archive, word count, analyze!, revisions - DocumentAnalysis model: associations, POS percentages, completion, sentiment - DocumentEntity model: emotions, matching, validations, uniqueness - DocumentConcept model: relevant scope, boundary conditions - DocumentCategory model: relevant scope, label parsing (parent/terminal) - DocumentRevision model: associations, soft delete, user delegation - DocumentAnalysisJob: queue name, enqueuing behavior - SyllablesService: counting, edge cases, overrides, case insensitivity - ReadabilityService: score categories, text generation, empty documents - ContentService: adult content detection - FleschKincaidService: grade level, reading ease, age minimum, clamping Also update fixtures with realistic data to support meaningful test assertions. https://claude.ai/code/session_01Eq88e3zBUEgkaY56Y3vmLx
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.
No description provided.