Skip to content

Document analysis general bugfixes#1431

Merged
drusepth merged 2 commits intotailwind-redesignfrom
claude/audit-document-analysis-gJPFq
Apr 3, 2026
Merged

Document analysis general bugfixes#1431
drusepth merged 2 commits intotailwind-redesignfrom
claude/audit-document-analysis-gJPFq

Conversation

@drusepth
Copy link
Copy Markdown
Member

@drusepth drusepth commented Mar 9, 2026

No description provided.

claude added 2 commits March 8, 2026 03:51
- 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
@drusepth drusepth self-assigned this Mar 9, 2026
@drusepth drusepth merged commit 32dd01d into tailwind-redesign Apr 3, 2026
@drusepth drusepth deleted the claude/audit-document-analysis-gJPFq branch April 3, 2026 01:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants