{"$schema":"https://json.schemastore.org/sarif-2.1.0.json","version":"2.1.0","runs":[{"tool":{"driver":{"name":"codehealth","informationUri":"https://codehealth.canine.dev","rules":[{"id":"D1","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D1"},{"id":"D2","name":"Cognitive Complexity","shortDescription":{"text":"Cognitive Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D2"},{"id":"D3","name":"God Classes","shortDescription":{"text":"God Classes"},"helpUri":"https://codehealth.canine.dev/dimensions/D3"},{"id":"D4","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/D4"},{"id":"D6","name":"Cohesion (LCOM4)","shortDescription":{"text":"Cohesion (LCOM4)"},"helpUri":"https://codehealth.canine.dev/dimensions/D6"},{"id":"D11","name":"Test Reliability","shortDescription":{"text":"Test Reliability"},"helpUri":"https://codehealth.canine.dev/dimensions/D11"},{"id":"D12","name":"Dependency Hygiene","shortDescription":{"text":"Dependency Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/D12"},{"id":"D13","name":"Secret Scanning","shortDescription":{"text":"Secret Scanning"},"helpUri":"https://codehealth.canine.dev/dimensions/D13","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D14","name":"License Compliance","shortDescription":{"text":"License Compliance"},"helpUri":"https://codehealth.canine.dev/dimensions/D14"},{"id":"D15","name":"Churn \u00D7 Complexity Hotspots","shortDescription":{"text":"Churn \u00D7 Complexity Hotspots"},"helpUri":"https://codehealth.canine.dev/dimensions/D15"},{"id":"D16","name":"Bus Factor","shortDescription":{"text":"Bus Factor"},"helpUri":"https://codehealth.canine.dev/dimensions/D16"},{"id":"D17","name":"Explicit Debt","shortDescription":{"text":"Explicit Debt"},"helpUri":"https://codehealth.canine.dev/dimensions/D17"},{"id":"D19","name":"Documentation Quality","shortDescription":{"text":"Documentation Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D19"},{"id":"D27","name":"Navigability","shortDescription":{"text":"Navigability"},"helpUri":"https://codehealth.canine.dev/dimensions/D27"},{"id":"D28","name":"Secrets (history)","shortDescription":{"text":"Secrets (history)"},"helpUri":"https://codehealth.canine.dev/dimensions/D28","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D29","name":"Static Analysis (SAST)","shortDescription":{"text":"Static Analysis (SAST)"},"helpUri":"https://codehealth.canine.dev/dimensions/D29","relationships":[{"target":{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-94","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-77","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"],"owasp":"A05:2025"}},{"id":"D30","name":"Dependency Vulnerabilities","shortDescription":{"text":"Dependency Vulnerabilities"},"helpUri":"https://codehealth.canine.dev/dimensions/D30","relationships":[{"target":{"id":"CWE-1395","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-937","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1395","CWE-937"],"owasp":"A03:2025"}},{"id":"D34","name":"Knowledge Freshness","shortDescription":{"text":"Knowledge Freshness"},"helpUri":"https://codehealth.canine.dev/dimensions/D34"},{"id":"D35","name":"Change Coupling","shortDescription":{"text":"Change Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D35"},{"id":"D36","name":"Supply-chain Provenance \u0026 Signing","shortDescription":{"text":"Supply-chain Provenance \u0026 Signing"},"helpUri":"https://codehealth.canine.dev/dimensions/D36","relationships":[{"target":{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-494","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1357","CWE-494"],"owasp":"A03:2025"}},{"id":"D43","name":"Malicious Dependencies","shortDescription":{"text":"Malicious Dependencies"},"helpUri":"https://codehealth.canine.dev/dimensions/D43","relationships":[{"target":{"id":"CWE-506","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-506"],"owasp":"A08:2025"}},{"id":"D44","name":"Platform End-of-Life","shortDescription":{"text":"Platform End-of-Life"},"helpUri":"https://codehealth.canine.dev/dimensions/D44"},{"id":"AX10","name":"Code composition","shortDescription":{"text":"Code composition"},"helpUri":"https://codehealth.canine.dev/dimensions/AX10"},{"id":"AX3","name":"Project dependency cycles","shortDescription":{"text":"Project dependency cycles"},"helpUri":"https://codehealth.canine.dev/dimensions/AX3"},{"id":"AX4","name":"Dependency direction","shortDescription":{"text":"Dependency direction"},"helpUri":"https://codehealth.canine.dev/dimensions/AX4"},{"id":"AX6","name":"Interface segregation","shortDescription":{"text":"Interface segregation"},"helpUri":"https://codehealth.canine.dev/dimensions/AX6"},{"id":"AXB1","name":"Runtime evidence locked \u2014 no reproducible boot","shortDescription":{"text":"Runtime evidence locked \u2014 no reproducible boot"},"helpUri":"https://codehealth.canine.dev/dimensions/AXB1"},{"id":"AXB2","name":"Runtime readiness","shortDescription":{"text":"Runtime readiness"},"helpUri":"https://codehealth.canine.dev/dimensions/AXB2"},{"id":"ED5","name":"Idempotency","shortDescription":{"text":"Idempotency"},"helpUri":"https://codehealth.canine.dev/dimensions/ED5"},{"id":"M1","name":"Documentation (README)","shortDescription":{"text":"Documentation (README)"},"helpUri":"https://codehealth.canine.dev/dimensions/M1"},{"id":"M2","name":"Architecture documentation","shortDescription":{"text":"Architecture documentation"},"helpUri":"https://codehealth.canine.dev/dimensions/M2"},{"id":"M3","name":"Folder \u0026 project structure","shortDescription":{"text":"Folder \u0026 project structure"},"helpUri":"https://codehealth.canine.dev/dimensions/M3"},{"id":"P1","name":"CI/CD gates","shortDescription":{"text":"CI/CD gates"},"helpUri":"https://codehealth.canine.dev/dimensions/P1"},{"id":"P10","name":"Library API \u0026 versioning","shortDescription":{"text":"Library API \u0026 versioning"},"helpUri":"https://codehealth.canine.dev/dimensions/P10"},{"id":"P12","name":"CI test-gate honesty","shortDescription":{"text":"CI test-gate honesty"},"helpUri":"https://codehealth.canine.dev/dimensions/P12"},{"id":"P2","name":"Observability","shortDescription":{"text":"Observability"},"helpUri":"https://codehealth.canine.dev/dimensions/P2"},{"id":"P3","name":"Security \u0026 performance tooling","shortDescription":{"text":"Security \u0026 performance tooling"},"helpUri":"https://codehealth.canine.dev/dimensions/P3"},{"id":"P4","name":"Deployment \u0026 Rollback","shortDescription":{"text":"Deployment \u0026 Rollback"},"helpUri":"https://codehealth.canine.dev/dimensions/P4"},{"id":"P6","name":"Release Hygiene","shortDescription":{"text":"Release Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/P6"},{"id":"PF3","name":"Async \u0026 latency hygiene","shortDescription":{"text":"Async \u0026 latency hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/PF3"},{"id":"X1","name":"Async correctness","shortDescription":{"text":"Async correctness"},"helpUri":"https://codehealth.canine.dev/dimensions/X1"},{"id":"X10","name":"Duplicated predicate","shortDescription":{"text":"Duplicated predicate"},"helpUri":"https://codehealth.canine.dev/dimensions/X10"},{"id":"X12","name":"Unreachable branch","shortDescription":{"text":"Unreachable branch"},"helpUri":"https://codehealth.canine.dev/dimensions/X12"},{"id":"X13","name":"Undrained process stream","shortDescription":{"text":"Undrained process stream"},"helpUri":"https://codehealth.canine.dev/dimensions/X13"},{"id":"X14","name":"Bypassable address classification","shortDescription":{"text":"Bypassable address classification"},"helpUri":"https://codehealth.canine.dev/dimensions/X14"},{"id":"X15","name":"Unvalidated length from an untrusted reader","shortDescription":{"text":"Unvalidated length from an untrusted reader"},"helpUri":"https://codehealth.canine.dev/dimensions/X15"},{"id":"X17","name":"Uncapped recursion over a caller-supplied document","shortDescription":{"text":"Uncapped recursion over a caller-supplied document"},"helpUri":"https://codehealth.canine.dev/dimensions/X17"},{"id":"X19","name":"Unrestored process-global state","shortDescription":{"text":"Unrestored process-global state"},"helpUri":"https://codehealth.canine.dev/dimensions/X19"},{"id":"X20","name":"Mistyped argument guard","shortDescription":{"text":"Mistyped argument guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X20"},{"id":"X21","name":"Side-effecting pattern guard","shortDescription":{"text":"Side-effecting pattern guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X21"},{"id":"X22","name":"Contradicted release guard","shortDescription":{"text":"Contradicted release guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X22"},{"id":"X23","name":"Unguarded diagnostic materialisation","shortDescription":{"text":"Unguarded diagnostic materialisation"},"helpUri":"https://codehealth.canine.dev/dimensions/X23"},{"id":"X24","name":"Document value interpolated into markup unescaped","shortDescription":{"text":"Document value interpolated into markup unescaped"},"helpUri":"https://codehealth.canine.dev/dimensions/X24"},{"id":"X25","name":"Inert configuration knob","shortDescription":{"text":"Inert configuration knob"},"helpUri":"https://codehealth.canine.dev/dimensions/X25"},{"id":"X26","name":"Unsynchronised callback handoff","shortDescription":{"text":"Unsynchronised callback handoff"},"helpUri":"https://codehealth.canine.dev/dimensions/X26"},{"id":"X27","name":"Collection changed while being enumerated","shortDescription":{"text":"Collection changed while being enumerated"},"helpUri":"https://codehealth.canine.dev/dimensions/X27"},{"id":"X28","name":"Index access outside its own emptiness guard","shortDescription":{"text":"Index access outside its own emptiness guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X28"},{"id":"X3","name":"Exception handling","shortDescription":{"text":"Exception handling"},"helpUri":"https://codehealth.canine.dev/dimensions/X3"},{"id":"X30","name":"Support guard that admits what it rejects","shortDescription":{"text":"Support guard that admits what it rejects"},"helpUri":"https://codehealth.canine.dev/dimensions/X30"},{"id":"X32","name":"Type resolved by simple name across every loaded assembly","shortDescription":{"text":"Type resolved by simple name across every loaded assembly"},"helpUri":"https://codehealth.canine.dev/dimensions/X32"},{"id":"X4","name":"Structured logging","shortDescription":{"text":"Structured logging"},"helpUri":"https://codehealth.canine.dev/dimensions/X4"},{"id":"X6","name":"Hand-rolled structured-format parsing","shortDescription":{"text":"Hand-rolled structured-format parsing"},"helpUri":"https://codehealth.canine.dev/dimensions/X6"},{"id":"X7","name":"Silent fallback defaults","shortDescription":{"text":"Silent fallback defaults"},"helpUri":"https://codehealth.canine.dev/dimensions/X7"},{"id":"X9","name":"Subsumed condition operand","shortDescription":{"text":"Subsumed condition operand"},"helpUri":"https://codehealth.canine.dev/dimensions/X9"}]}},"results":[{"ruleId":"D1","level":"warning","message":{"text":"page_scan.scan_page_headings (cyclomatic 120): page_scan.scan_page_headings has cyclomatic complexity 120 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/heading_detection/page_scan.py"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"e04293597d9e265e7a7b167543b6b6cf1e315af2afe73e7b3726aab36ff511ba"}},{"ruleId":"D1","level":"warning","message":{"text":"join_rules.should_join_line_to_block (cyclomatic 119): join_rules.should_join_line_to_block has cyclomatic complexity 119 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/blocks/join_rules.py"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"63c305d2311ff820726e85fdfac219d8db9d00ef7cbc16590fcec1d97f81bf86"}},{"ruleId":"D1","level":"warning","message":{"text":"content_stream._tokenize_show_operators (cyclomatic 105): content_stream._tokenize_show_operators has cyclomatic complexity 105 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/content_stream.py"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d785eb92b27e92d75bc4ea57705ee609f48b3246247ae96b493711aac225d09"}},{"ruleId":"D1","level":"warning","message":{"text":"cmap_parse._parse_tounicode_cmap (cyclomatic 81): cmap_parse._parse_tounicode_cmap has cyclomatic complexity 81 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/cmap_parse.py"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"12e25e99b1e0b52878c77e73a39c8719fefa9ecf9315dae9b154f98a9fbe5ca1"}},{"ruleId":"D1","level":"warning","message":{"text":"style_detectors.detect_heading_with_body (cyclomatic 80): style_detectors.detect_heading_with_body has cyclomatic complexity 80 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/heading_detection/style_detectors.py"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e6f04402251cbc69336540ce77cadc970be74933d2820fe4a8ba111f09ac28a"}},{"ruleId":"D1","level":"warning","message":{"text":"style_detectors.detect_font_heading (cyclomatic 77): style_detectors.detect_font_heading has cyclomatic complexity 77 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/heading_detection/style_detectors.py"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd1dfdf57903b7eb6813c76defc3c2e4c9f1fcd3f13cefb0775671e80f5a8789"}},{"ruleId":"D1","level":"warning","message":{"text":"gutters._score_gutter_gap (cyclomatic 72): gutters._score_gutter_gap has cyclomatic complexity 72 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/columns/gutters.py"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"285c74bfa00119d6b2dc93bd360bb0f8df2bb08c9822bb4c049bc38b2a77e533"}},{"ruleId":"D1","level":"warning","message":{"text":"font_unicode._font_unicode_map (cyclomatic 70): font_unicode._font_unicode_map has cyclomatic complexity 70 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/font_unicode.py"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc643c5b0729766f56733379ba3fd34ca814032e1eaa45b0d51e22ffc9e55b17"}},{"ruleId":"D1","level":"warning","message":{"text":"text_normalize._apply_bidi_reordering (cyclomatic 67): text_normalize._apply_bidi_reordering has cyclomatic complexity 67 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/text_normalize.py"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f28404dff19f82dfa1e716c090e973f8906d9aa6de834407457deaa15c59a8e"}},{"ruleId":"D1","level":"warning","message":{"text":"header_footer.detect_header_footer (cyclomatic 64): header_footer.detect_header_footer has cyclomatic complexity 64 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/classification/header_footer.py"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ac80b418494ee5d84945f79c5a1282cc1ad8f77d926f4ec29169e7c1fa51638"}},{"ruleId":"D1","level":"warning","message":{"text":"PageIndexClient.__init__ (cyclomatic 59): PageIndexClient.__init__ has cyclomatic complexity 59 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/client.py"},"region":{"startLine":562}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cdf5bb66020d34474698ae691d312bc10f754197d016cd4c923251a3ed787ec"}},{"ruleId":"D1","level":"warning","message":{"text":"selection.should_reject_heading (cyclomatic 54): selection.should_reject_heading has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/outline_assembly/selection.py"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f030b1ad2d89fe697f28f5d9ab87ac97f7db429d7d993590fd2d38fc9aafc0d"}},{"ruleId":"D1","level":"warning","message":{"text":"caption_regions.extend_caption_region (cyclomatic 52): caption_regions.extend_caption_region has cyclomatic complexity 52 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/labels/caption_regions.py"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"02ebb2f961fb391929d77dbc9ebda309bfe70ddeef0eca77e4b94a844e61564d"}},{"ruleId":"D1","level":"warning","message":{"text":"page_scan.filter_page_candidates (cyclomatic 47): page_scan.filter_page_candidates has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/heading_detection/page_scan.py"},"region":{"startLine":296}}}],"partialFingerprints":{"codehealthFindingId/v1":"91ff336dbc454233b1367a6d352521b8d7fc9dfef80ae92fa165dfb3a4864744"}},{"ruleId":"D1","level":"warning","message":{"text":"cliques.detect_body_headings (cyclomatic 46): cliques.detect_body_headings has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/outline_assembly/cliques.py"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"310fdf540afc4f2d72611de79089e8c0b6fa02f0542ed32c8582a8bb51646a2a"}},{"ruleId":"D1","level":"warning","message":{"text":"style_context.compare_heading_depth (cyclomatic 45): style_context.compare_heading_depth has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/outline_assembly/style_context.py"},"region":{"startLine":308}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8c0116a8399628df8a2c1196ed03345cccbfe1a7804ecff3af5028574ce2dd7"}},{"ruleId":"D1","level":"warning","message":{"text":"PageIndexClient.chat (cyclomatic 42): PageIndexClient.chat has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (PageIndexClient.chat) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/client.py"},"region":{"startLine":1275}}}],"partialFingerprints":{"codehealthFindingId/v1":"128f10a655cf2e0b01f10a41033718cdd87ace1df79bdcb6a56bb79c8ab0574b"}},{"ruleId":"D1","level":"warning","message":{"text":"PageIndexClient.chat (cyclomatic 42): PageIndexClient.chat has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (PageIndexClient.chat) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/client.py"},"region":{"startLine":1296}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c65b67e9738a6ec590d36591a5dda488aaf2c514f861d5186d8f075884c72e8"}},{"ruleId":"D1","level":"warning","message":{"text":"scoring.score_title_candidate (cyclomatic 42): scoring.score_title_candidate has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/title/scoring.py"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"502c573ad18539254638086c96c908b2de9eb5b60260b191efff4c3f47572ec5"}},{"ruleId":"D1","level":"warning","message":{"text":"splitting.recursive_split (cyclomatic 41): splitting.recursive_split has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/columns/splitting.py"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"af1b96e4f2aeca22878f2a2be2602fe3f87e925737fec347b75f0887e646dc29"}},{"ruleId":"D1","level":"warning","message":{"text":"detectors.is_acceptable_heading (cyclomatic 39): detectors.is_acceptable_heading has cyclomatic complexity 39 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/heading_detection/detectors.py"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"859a147e917dc783d5921a2c676e685f008e3ed0cbc3c29a059fe0341a257f00"}},{"ruleId":"D1","level":"warning","message":{"text":"PageNeighborMap.__init__ (cyclomatic 39): PageNeighborMap.__init__ has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/heading_detection/neighbors.py"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec92d9b46f26d0497cb932baaac7d9b54b5a7b7e98bc1d5b46fca999b54284e2"}},{"ruleId":"D1","level":"warning","message":{"text":"api._page_index_flash (cyclomatic 38): api._page_index_flash has cyclomatic complexity 38 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/api.py"},"region":{"startLine":237}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d719a0cffd0dafe1ea39142c64d51461e41d9d92eb0ecec85a092eda92e1a52"}},{"ruleId":"D1","level":"warning","message":{"text":"merge_rules.should_merge_lines (cyclomatic 38): merge_rules.should_merge_lines has cyclomatic complexity 38 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/clustering/merge_rules.py"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"87948ca03f15624493b179721f6e9995bccdaff715a858a72d41c06dd8b1b373"}},{"ruleId":"D1","level":"warning","message":{"text":"main.extract_toc (cyclomatic 38): main.extract_toc has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/main.py"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"f92264db6070baf9b9114841e903d990fae85f9c9023ea88d2cb700b7d0a9210"}},{"ruleId":"D1","level":"warning","message":{"text":"merge._merge_text_items (cyclomatic 38): merge._merge_text_items has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/merge.py"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"db0ce3f5c8eb3954eb4e819b63ec0c52871a5af9539058a4b42470858a77dd90"}},{"ruleId":"D1","level":"warning","message":{"text":"toc_boilerplate.detect_toc_range (cyclomatic 36): toc_boilerplate.detect_toc_range has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/classification/toc_boilerplate.py"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"a966a17b1126bacbd37845d579b5f196c36db195ff9d0425986f4be221ffbb2a"}},{"ruleId":"D1","level":"warning","message":{"text":"local_chat._openai_agent (cyclomatic 36): local_chat._openai_agent has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/local_chat.py"},"region":{"startLine":883}}}],"partialFingerprints":{"codehealthFindingId/v1":"62fbd41edc1938abe910af8795d7b07f029bec4b9022da29a16ca29fb019d76e"}},{"ruleId":"D1","level":"warning","message":{"text":"detect.detect_title (cyclomatic 35): detect.detect_title has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/title/detect.py"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"c57c4814caee73c88152c44b8f9d17956a1fd81b788d4df574c821a502a629e1"}},{"ruleId":"D1","level":"warning","message":{"text":"unicode_apply._apply_font_unicode (cyclomatic 33): unicode_apply._apply_font_unicode has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/unicode_apply.py"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"849a640652e3be12e99a9c61e5f36f47e54496ba34339e758452da4eccd6d992"}},{"ruleId":"D1","level":"warning","message":{"text":"body_text.is_body_paragraph (cyclomatic 32): body_text.is_body_paragraph has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/classification/body_text.py"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d77c8e90fe5fa9d471802d1022852160d678ddd81948cf0d88555b6c11802dd"}},{"ruleId":"D1","level":"warning","message":{"text":"selection.extract_sub_headings (cyclomatic 31): selection.extract_sub_headings has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/outline_assembly/selection.py"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"69d24c12ee195fa8b8c383a3a3e2f2c8fdd814da411a5cafd103a102a5a5374f"}},{"ruleId":"D1","level":"warning","message":{"text":"agent_tools._browse_documents (cyclomatic 28): agent_tools._browse_documents has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/agent_tools.py"},"region":{"startLine":729}}}],"partialFingerprints":{"codehealthFindingId/v1":"995ea377e4aca596cce506b90f40367e71514e45c64cd318c7f5929e2507563a"}},{"ruleId":"D1","level":"warning","message":{"text":"detectors.detect_labeled_heading (cyclomatic 28): detectors.detect_labeled_heading has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/heading_detection/detectors.py"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"8947ea5c09dcd4c9cdf72ab8387b12a784472a50553c92cd3d81f0d2be059d33"}},{"ruleId":"D1","level":"warning","message":{"text":"agent_tools._get_page_content (cyclomatic 27): agent_tools._get_page_content has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/agent_tools.py"},"region":{"startLine":1012}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d1d1c9aae49dcde2c545682c6cfab48dfb8e8a6b68c35b4e50edd436b1ee036"}},{"ruleId":"D1","level":"warning","message":{"text":"font_unicode._type1_builtin_encoding (cyclomatic 27): font_unicode._type1_builtin_encoding has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/font_unicode.py"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ce2c52b54fe986beeac9c1dfb1c8fd01fcb637f746ea21c0ec0ac8d2517104d"}},{"ruleId":"D1","level":"warning","message":{"text":"PageIndexClient.get_citations (cyclomatic 26): PageIndexClient.get_citations has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/client.py"},"region":{"startLine":2749}}}],"partialFingerprints":{"codehealthFindingId/v1":"c316582476315d598303ee8fc5464d233ce7750041215850a8f2d428f17435c0"}},{"ruleId":"D1","level":"warning","message":{"text":"header_footer.find_cross_page_match (cyclomatic 26): header_footer.find_cross_page_match has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/classification/header_footer.py"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2cde61337090059d5583086af4ed44d335283d9c50e0f8dfd325eb3f06dee65"}},{"ruleId":"D1","level":"warning","message":{"text":"toc_boilerplate.mark_toc_and_boilerplate (cyclomatic 26): toc_boilerplate.mark_toc_and_boilerplate has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/classification/toc_boilerplate.py"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fd94c91f53ff7e1a6f49a4769955ea9845cf9eb810b51184af576368747b9c5"}},{"ruleId":"D1","level":"warning","message":{"text":"font_unicode._simple_font_to_unicode (cyclomatic 26): font_unicode._simple_font_to_unicode has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/font_unicode.py"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"06103a2d95c9a74f219f88905d3ddb750176277d835958dabc97a11c255d2d7e"}},{"ruleId":"D1","level":"warning","message":{"text":"tree_optimize.optimize (cyclomatic 26): tree_optimize.optimize has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/tree_optimize.py"},"region":{"startLine":925}}}],"partialFingerprints":{"codehealthFindingId/v1":"a379064a22dcb27fd331e9c9bbe38a5d02be0674e00c399c5204484b81827e16"}},{"ruleId":"D1","level":"warning","message":{"text":"detectors.detect_numbered_heading (cyclomatic 25): detectors.detect_numbered_heading has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/heading_detection/detectors.py"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3a3f398ee6f4a803e7dae929991c94e4cd84026a2058bbaf1ec1470e85f1697"}},{"ruleId":"D1","level":"warning","message":{"text":"code_walk._walk_codes (cyclomatic 25): code_walk._walk_codes has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/code_walk.py"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"69e441ed3bf0f9048629dd479ae4151102714843c7f51222968ffbbba0884d13"}},{"ruleId":"D1","level":"warning","message":{"text":"unicode_apply._synthesize_dropped_glyphs (cyclomatic 24): unicode_apply._synthesize_dropped_glyphs has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/unicode_apply.py"},"region":{"startLine":363}}}],"partialFingerprints":{"codehealthFindingId/v1":"44bc5915c4cb9ea997df76b06b0afe0e9709cc2bf62f56ab72ec5ab9158902ec"}},{"ruleId":"D1","level":"warning","message":{"text":"LocalAPI.submit_document (cyclomatic 23): LocalAPI.submit_document has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/local_api.py"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa6066b82ae80aac90f6e8d477b3bc1257f61c1179ec0ba888e590f2e3ff4266"}},{"ruleId":"D1","level":"warning","message":{"text":"local_chat.run_messages (cyclomatic 23): local_chat.run_messages has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/local_chat.py"},"region":{"startLine":2379}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ca20e9f55eb7aa34055a8b3d0dff5d3eeb8b0e39f9b3ba78270d3491d968ae5"}},{"ruleId":"D1","level":"warning","message":{"text":"candidates.make_numbered_candidate (cyclomatic 22): candidates.make_numbered_candidate has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/heading_detection/candidates.py"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"2820d2532cb9c6ff95601e4d1d58d58b96499befaf76581adb9bde83cd03f96b"}},{"ruleId":"D1","level":"warning","message":{"text":"embedded_toc.merge_bookmark_skeleton (cyclomatic 21): embedded_toc.merge_bookmark_skeleton has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/embedded_toc.py"},"region":{"startLine":354}}}],"partialFingerprints":{"codehealthFindingId/v1":"2854c1f8fcad29608eb4a27febc3629ed83e02dfabcc28570c53bbc4eac60494"}},{"ruleId":"D1","level":"warning","message":{"text":"text_checks.has_substantive_content (cyclomatic 21): text_checks.has_substantive_content has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/heading_detection/text_checks.py"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"f854f85a4f2648db0bcfbc24f8d1dfac77b51843717cadba15d6d471c130cc83"}},{"ruleId":"D1","level":"warning","message":{"text":"line_numbers.strip_line_numbers (cyclomatic 21): line_numbers.strip_line_numbers has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/phases/line_numbers.py"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3756c0acda6cc58ee249d87104072fd37934cde5d7116e75f1aa3d93ee3e78a"}},{"ruleId":"D1","level":"warning","message":{"text":"local_chat._cloud_chunk_events (cyclomatic 21): local_chat._cloud_chunk_events has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/local_chat.py"},"region":{"startLine":1640}}}],"partialFingerprints":{"codehealthFindingId/v1":"c61983e32668c105d638db6aac08c05e92ff16aba58da64deb866cf29edfc3fa"}},{"ruleId":"D1","level":"warning","message":{"text":"detectors.passes_neighbor_check (cyclomatic 20): detectors.passes_neighbor_check has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/heading_detection/detectors.py"},"region":{"startLine":400}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b4371c96bcbc1caf960224dbb3914c356080f68eb5cee2e187b2a2bfe01e0e5"}},{"ruleId":"D1","level":"warning","message":{"text":"assembly.build_heading_from_block (cyclomatic 20): assembly.build_heading_from_block has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/outline_assembly/assembly.py"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cde21fff837df7355e13039175f8166463539e19a419d45f6ba9226459f086c"}},{"ruleId":"D1","level":"warning","message":{"text":"char_extract._extract_raw_chars (cyclomatic 20): char_extract._extract_raw_chars has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/char_extract.py"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c815a639716bbc7f5443622ed71ba0224d6eed26b70aa61c13e44294f49bfcc"}},{"ruleId":"D1","level":"warning","message":{"text":"aggregates.compute_page_stats (cyclomatic 20): aggregates.compute_page_stats has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/stats/aggregates.py"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1ce110aafeb136478d4d78177134bae18b20d94e295ed10a051ac4e7972f8a9"}},{"ruleId":"D1","level":"warning","message":{"text":"LineTokenizer.add_line (cyclomatic 20): LineTokenizer.add_line has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/tokens/tokenizer.py"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e9b9dec264ce1272e3cb6886312a39302fb3e027ab71b6d49b80c1e75d2d1d9"}},{"ruleId":"D1","level":"warning","message":{"text":"local_chat._weave (cyclomatic 20): local_chat._weave has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/local_chat.py"},"region":{"startLine":1571}}}],"partialFingerprints":{"codehealthFindingId/v1":"29e2d9280e34c9056b9654fe23567dfb375276611d2e33626fb9ab70b8a439cc"}},{"ruleId":"D1","level":"warning","message":{"text":"header_footer.has_adjacent_page_numbers (cyclomatic 19): header_footer.has_adjacent_page_numbers has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/classification/header_footer.py"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b7bbdae0336702e062eff9deedb641daf6d696e6170ed539298a28a6c0ecb37"}},{"ruleId":"D1","level":"warning","message":{"text":"build.cluster_lines (cyclomatic 19): build.cluster_lines has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/clustering/build.py"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"55061cfe570cbf197f51d71a776ef446f11fa68bd5d1947dd52145511bd7eeb7"}},{"ruleId":"D1","level":"warning","message":{"text":"filtering.is_heading_candidate (cyclomatic 19): filtering.is_heading_candidate has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/outline/filtering.py"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"48ecf7fae6a6b5acac2202ec8981242d1cb82926ac4156972e6fcf56a8c86b19"}},{"ruleId":"D1","level":"warning","message":{"text":"code_walk._resource_dict_xrefs (cyclomatic 19): code_walk._resource_dict_xrefs has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/code_walk.py"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"1743ebbc58fb1ea52f41a83f3154497c2665c9b99695e75305acebe6b5173b44"}},{"ruleId":"D1","level":"warning","message":{"text":"local_chat._seen_box_events (cyclomatic 19): local_chat._seen_box_events has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/local_chat.py"},"region":{"startLine":2339}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b92db35f6057cdd1622b22d63549f5bff9e6faaa3c88d4f4944768e2d698743"}},{"ruleId":"D1","level":"warning","message":{"text":"utils.leaf_own_text (cyclomatic 19): utils.leaf_own_text has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/utils.py"},"region":{"startLine":1243}}}],"partialFingerprints":{"codehealthFindingId/v1":"10f3a15dd4754198bc0a2ba6a248143a67076b14a0b74bbf52ff1f542a548b18"}},{"ruleId":"D1","level":"warning","message":{"text":"client._resolve_index_slot (cyclomatic 18): client._resolve_index_slot has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/client.py"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f6923854b832ee9a0e59f72cf98b1a30d8a015e6b79a923968fe05313a66e44"}},{"ruleId":"D1","level":"warning","message":{"text":"detectors.detect_chapter_appendix (cyclomatic 18): detectors.detect_chapter_appendix has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/heading_detection/detectors.py"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"77790301e350652095a1f1b4a30e3368b1eeeab7513b7d188489bcefe3eb56a6"}},{"ruleId":"D1","level":"warning","message":{"text":"font_unicode._font_widths (cyclomatic 18): font_unicode._font_widths has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/font_unicode.py"},"region":{"startLine":405}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccf7389d23eb1ef113122749760849870aa3b348870db56a97bbf42ac5ade32f"}},{"ruleId":"D1","level":"warning","message":{"text":"local_chat._chat_events_agen (cyclomatic 18): local_chat._chat_events_agen has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/local_chat.py"},"region":{"startLine":1507}}}],"partialFingerprints":{"codehealthFindingId/v1":"547f8151b8f06e75598ec927082a65b65b473aa588f60b3fcbf86ec3ae3a9909"}},{"ruleId":"D1","level":"warning","message":{"text":"agent_tools._get_document (cyclomatic 17): agent_tools._get_document has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/agent_tools.py"},"region":{"startLine":843}}}],"partialFingerprints":{"codehealthFindingId/v1":"cda66e44d6eff9d1d0b71f1ded76769077b1910993cf21c95437e04119eb3788"}},{"ruleId":"D1","level":"warning","message":{"text":"detectors.is_bibliography_entry (cyclomatic 17): detectors.is_bibliography_entry has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/heading_detection/detectors.py"},"region":{"startLine":459}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbdd8c95b3c994cf15c089c49c195b69bcbe721d227f17bc149060a67f09404e"}},{"ruleId":"D1","level":"warning","message":{"text":"numbering._detect_numbering (cyclomatic 17): numbering._detect_numbering has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/model/numbering.py"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"c92e444503ca5a99351192bea68f0d1661e8a7a706ae05e46752276e41a1faea"}},{"ruleId":"D1","level":"warning","message":{"text":"style_context.is_compatible_with_context (cyclomatic 17): style_context.is_compatible_with_context has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/outline_assembly/style_context.py"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca5ca38afce9b55c61f32e3d55978fc41c0c203c2847eba567114f7ac6650f4e"}},{"ruleId":"D1","level":"warning","message":{"text":"tries.aho_corasick_match (cyclomatic 17): tries.aho_corasick_match has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/tokens/tries.py"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d6f341e64cee50714da18c401554ce53d326772f11077d73204c4aed32402b5"}},{"ruleId":"D1","level":"warning","message":{"text":"local_chat._split_chat_messages (cyclomatic 17): local_chat._split_chat_messages has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/local_chat.py"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c123560c4c23f20ba248f14ec561bdd95b2aac8269855ec0341f6908f27e2e6"}},{"ruleId":"D1","level":"warning","message":{"text":"utils.chosen_effort (cyclomatic 17): utils.chosen_effort has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/utils.py"},"region":{"startLine":1431}}}],"partialFingerprints":{"codehealthFindingId/v1":"859ac4c38a74ef5eb907a0e512ebf3223aee6b5fd0eb719ea0d2c06f2fa2d5d7"}},{"ruleId":"D1","level":"warning","message":{"text":"api.page_index_flash (cyclomatic 16): api.page_index_flash has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/api.py"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb8caf7f61891c7b7a8f7f57fd08cc824406ad2e21fd0dde11fc47878363f351"}},{"ruleId":"D1","level":"warning","message":{"text":"page_scan.find_section_openers (cyclomatic 16): page_scan.find_section_openers has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/heading_detection/page_scan.py"},"region":{"startLine":425}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd121a0c58bdfe55b2ffce60249f8d7580d4120af47e4cceae63a9fe55d36fce"}},{"ruleId":"D1","level":"warning","message":{"text":"assembly.continue_numbering (cyclomatic 16): assembly.continue_numbering has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/outline_assembly/assembly.py"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a8cab911157699b262c92cadfc9d79f20ee657487d1a09065bbd3df12d2cce2"}},{"ruleId":"D1","level":"warning","message":{"text":"cliques.find_keyword_clique (cyclomatic 16): cliques.find_keyword_clique has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/outline_assembly/cliques.py"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"8857a7de48ad72ef0962cd4e20e879253003dffc960cb8bea28aa1451aae8b82"}},{"ruleId":"D1","level":"warning","message":{"text":"line_numbers.validate_line_number_cluster (cyclomatic 16): line_numbers.validate_line_number_cluster has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/phases/line_numbers.py"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"40eb63e5814904c562b3a94e0ea2b870350f87b6579b7bce4287d6258259b1a6"}},{"ruleId":"D1","level":"warning","message":{"text":"SummaryScheduler.finish (cyclomatic 16): SummaryScheduler.finish has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/utils.py"},"region":{"startLine":1808}}}],"partialFingerprints":{"codehealthFindingId/v1":"db8e80e09afb0221045dc4d1566eb917e35325fde132f8a5c0f0e73b9e907174"}},{"ruleId":"D2","level":"warning","message":{"text":"content_stream._tokenize_show_operators (cognitive 276): content_stream._tokenize_show_operators has cognitive complexity 276 (threshold 15). Drivers by points: if/else 53 (185 pts), loops 13 (50 pts), boolean chains 22, ternaries 3 (15 pts), error handling 1 (4 pts) (nesting depth added 184). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/content_stream.py"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"721e66842e4d7a9b2d9d1d4d484eef7dc8e5f6df4d26de5b09b74cfe0bf0dd6f"}},{"ruleId":"D2","level":"warning","message":{"text":"page_scan.scan_page_headings (cognitive 220): page_scan.scan_page_headings has cognitive complexity 220 (threshold 15). Drivers by points: if/else 51 (131 pts), boolean chains 54, ternaries 13 (34 pts), loops 1 (nesting depth added 101). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/heading_detection/page_scan.py"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"58213626ad0600461d632914bd2f92370d704bd19cf7dc4a2e0ae3bf1fb56f6e"}},{"ruleId":"D2","level":"warning","message":{"text":"cmap_parse._parse_tounicode_cmap (cognitive 184): cmap_parse._parse_tounicode_cmap has cognitive complexity 184 (threshold 15). Drivers by points: if/else 31 (107 pts), loops 14 (47 pts), boolean chains 23, error handling 1 (4 pts), ternaries 1 (3 pts) (nesting depth added 114). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/cmap_parse.py"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ee1cecfced663637cecc4e48fb887a90b88b8f55ce36711479f03555aff3336"}},{"ruleId":"D2","level":"warning","message":{"text":"header_footer.detect_header_footer (cognitive 161): header_footer.detect_header_footer has cognitive complexity 161 (threshold 15). Drivers by points: if/else 37 (115 pts), loops 12 (24 pts), boolean chains 11, ternaries 3 (11 pts) (nesting depth added 98). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/classification/header_footer.py"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"59dd961e40b4858d96d6a0dafbaba57571890f4b69b8567c1a166f717efa75b2"}},{"ruleId":"D2","level":"warning","message":{"text":"font_unicode._font_unicode_map (cognitive 139): font_unicode._font_unicode_map has cognitive complexity 139 (threshold 15). Drivers by points: if/else 42 (93 pts), loops 5 (15 pts), ternaries 6 (14 pts), boolean chains 10, error handling 3 (7 pts) (nesting depth added 73). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/font_unicode.py"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"514131ff790d267e7665d2a2e3307c47a0846770c104f2b85b46b64bc62eac40"}},{"ruleId":"D2","level":"warning","message":{"text":"join_rules.should_join_line_to_block (cognitive 126): join_rules.should_join_line_to_block has cognitive complexity 126 (threshold 15). Drivers by points: boolean chains 76, if/else 27 (40 pts), ternaries 5 (10 pts) (nesting depth added 18). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/blocks/join_rules.py"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"917a4e25a7823c27ba61462e5be79d57fa3375ac880cc63ede852888f5646d83"}},{"ruleId":"D2","level":"warning","message":{"text":"style_detectors.detect_heading_with_body (cognitive 117): style_detectors.detect_heading_with_body has cognitive complexity 117 (threshold 15). Drivers by points: if/else 37 (70 pts), boolean chains 32, loops 5 (10 pts), ternaries 4 (5 pts) (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/heading_detection/style_detectors.py"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"db4dbe05ff25ec8c2c333a286ad004cb81a5cda53a87a255a0bb0e58529e9433"}},{"ruleId":"D2","level":"warning","message":{"text":"text_normalize._apply_bidi_reordering (cognitive 114): text_normalize._apply_bidi_reordering has cognitive complexity 114 (threshold 15). Drivers by points: if/else 30 (66 pts), loops 18 (28 pts), ternaries 6 (14 pts), boolean chains 6 (nesting depth added 54). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/text_normalize.py"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"2abbdcc526544a2a535e915e7197561be3c93b130c8ab8f1d83521c47e235b36"}},{"ruleId":"D2","level":"warning","message":{"text":"gutters._score_gutter_gap (cognitive 108): gutters._score_gutter_gap has cognitive complexity 108 (threshold 15). Drivers by points: if/else 39 (76 pts), boolean chains 27, ternaries 1 (3 pts), loops 2 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/columns/gutters.py"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c53ab1aab6fe0baaa04bf2e172b0d11c52af92eb1b3fe9dcc27c0315968a01f"}},{"ruleId":"D2","level":"warning","message":{"text":"cliques.detect_body_headings (cognitive 105): cliques.detect_body_headings has cognitive complexity 105 (threshold 15). Drivers by points: if/else 22 (66 pts), boolean chains 14, ternaries 4 (13 pts), loops 5 (12 pts) (nesting depth added 60). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/outline_assembly/cliques.py"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec36733ea62300b7a0914c01575a5bf3e9eb63f67fff04e39a390d51af839c5e"}},{"ruleId":"D2","level":"warning","message":{"text":"selection.should_reject_heading (cognitive 99): selection.should_reject_heading has cognitive complexity 99 (threshold 15). Drivers by points: if/else 26 (57 pts), boolean chains 20, ternaries 5 (15 pts), loops 3 (7 pts) (nesting depth added 45). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/outline_assembly/selection.py"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"33a34f0abf80459b72ac60f792a05889e0ccb28cda8ed62de04c7d3a5928eefb"}},{"ruleId":"D2","level":"warning","message":{"text":"PageIndexClient.__init__ (cognitive 98): PageIndexClient.__init__ has cognitive complexity 98 (threshold 15). Drivers by points: if/else 32 (56 pts), boolean chains 23, ternaries 6 (16 pts), loops 2 (3 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/client.py"},"region":{"startLine":562}}}],"partialFingerprints":{"codehealthFindingId/v1":"55546262bc44aa1b0cf2dc97c181caf09f7206ce47d0d670182fd1a0fb80e9d5"}},{"ruleId":"D2","level":"warning","message":{"text":"PageNeighborMap.__init__ (cognitive 93): PageNeighborMap.__init__ has cognitive complexity 93 (threshold 15). Drivers by points: if/else 16 (58 pts), boolean chains 14, loops 5 (11 pts), ternaries 4 (10 pts) (nesting depth added 54). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/heading_detection/neighbors.py"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc9d5f5fcd8f3fb217c219432a68961ee72d346a9cbcbcd40a9118ec86777c2c"}},{"ruleId":"D2","level":"warning","message":{"text":"caption_regions.extend_caption_region (cognitive 91): caption_regions.extend_caption_region has cognitive complexity 91 (threshold 15). Drivers by points: if/else 20 (39 pts), ternaries 9 (23 pts), boolean chains 19, loops 5 (10 pts) (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/labels/caption_regions.py"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"632397969fa8c3f58de256eaf6f96ab1567807c7f3312e8a23fcec1e811fe3dc"}},{"ruleId":"D2","level":"warning","message":{"text":"unicode_apply._apply_font_unicode (cognitive 83): unicode_apply._apply_font_unicode has cognitive complexity 83 (threshold 15). Drivers by points: if/else 20 (52 pts), loops 10 (29 pts), boolean chains 2 (nesting depth added 51). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/unicode_apply.py"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1e7092de3a20985e706154138556a1ab8c7bacb7bdce0433230109c80f5544a"}},{"ruleId":"D2","level":"warning","message":{"text":"merge._merge_text_items (cognitive 81): merge._merge_text_items has cognitive complexity 81 (threshold 15). Drivers by points: if/else 29 (69 pts), boolean chains 11, loops 1 (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/merge.py"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bef19aa4ca215b1a833c1344a3c314468bb8df0198fed4895509c54dc2c39f8"}},{"ruleId":"D2","level":"warning","message":{"text":"detect.detect_title (cognitive 81): detect.detect_title has cognitive complexity 81 (threshold 15). Drivers by points: if/else 13 (50 pts), boolean chains 17, loops 4 (14 pts) (nesting depth added 47). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/title/detect.py"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4ed49b49c62010d3c890cb8956d15a8359b98bcc23960975833d5850d667d79"}},{"ruleId":"D2","level":"warning","message":{"text":"style_detectors.detect_font_heading (cognitive 78): style_detectors.detect_font_heading has cognitive complexity 78 (threshold 15). Drivers by points: boolean chains 54, if/else 16, ternaries 7 (8 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/heading_detection/style_detectors.py"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"1958b965db025e30aa16ff62fb09ee81e9bf488f7754124bdf2cd92c2d5aad5e"}},{"ruleId":"D2","level":"warning","message":{"text":"page_scan.filter_page_candidates (cognitive 76): page_scan.filter_page_candidates has cognitive complexity 76 (threshold 15). Drivers by points: if/else 23 (54 pts), boolean chains 13, loops 4 (5 pts), ternaries 2 (4 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/heading_detection/page_scan.py"},"region":{"startLine":296}}}],"partialFingerprints":{"codehealthFindingId/v1":"aabc6e6c93ff6c0d07aa554259c20bc61b676377dd3d835e568bcedca5222775"}},{"ruleId":"D2","level":"warning","message":{"text":"splitting.recursive_split (cognitive 69): splitting.recursive_split has cognitive complexity 69 (threshold 15). Drivers by points: if/else 19 (40 pts), loops 8 (14 pts), ternaries 3 (9 pts), boolean chains 6 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/columns/splitting.py"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"142bf3061270481b58b8b06771be676d245149eadc4f72dd20395bcd957ca512"}},{"ruleId":"D2","level":"warning","message":{"text":"scoring.score_title_candidate (cognitive 69): scoring.score_title_candidate has cognitive complexity 69 (threshold 15). Drivers by points: if/else 16 (38 pts), boolean chains 14, loops 7 (12 pts), ternaries 5 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/title/scoring.py"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"59e35a1fed56440e1e69afe90a7616401abb99a0ba4616eb1894224928f463f5"}},{"ruleId":"D2","level":"warning","message":{"text":"toc_boilerplate.detect_toc_range (cognitive 67): toc_boilerplate.detect_toc_range has cognitive complexity 67 (threshold 15). Drivers by points: if/else 19 (46 pts), boolean chains 14, ternaries 3 (4 pts), loops 2 (3 pts) (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/classification/toc_boilerplate.py"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"68098cf7966d1257fcf0a78360285e61f5a7d3d8bad0af5eee44cd6f70cc2307"}},{"ruleId":"D2","level":"warning","message":{"text":"PageIndexClient.chat (cognitive 66): PageIndexClient.chat has cognitive complexity 66 (threshold 15). Drivers by points: if/else 25 (41 pts), boolean chains 12, ternaries 4 (12 pts), error handling 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (PageIndexClient.chat) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/client.py"},"region":{"startLine":1275}}}],"partialFingerprints":{"codehealthFindingId/v1":"3810e4120a270371da69529e3974b068521bf8b125ac7f9449f0cd977f84fda3"}},{"ruleId":"D2","level":"warning","message":{"text":"PageIndexClient.chat (cognitive 66): PageIndexClient.chat has cognitive complexity 66 (threshold 15). Drivers by points: if/else 25 (41 pts), boolean chains 12, ternaries 4 (12 pts), error handling 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (PageIndexClient.chat) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/client.py"},"region":{"startLine":1296}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bf1ce9c11f1595763ebb949e270adfc73bcdf2251ef3c96d5c328f0c468bddc"}},{"ruleId":"D2","level":"warning","message":{"text":"main.extract_toc (cognitive 65): main.extract_toc has cognitive complexity 65 (threshold 15). Drivers by points: if/else 16 (33 pts), loops 13 (21 pts), boolean chains 8, ternaries 2 (3 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/main.py"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"6100f048daac60aaf14fd8121f3cbba2de57d102d411db6693febbfd4f7373d1"}},{"ruleId":"D2","level":"warning","message":{"text":"font_unicode._simple_font_to_unicode (cognitive 63): font_unicode._simple_font_to_unicode has cognitive complexity 63 (threshold 15). Drivers by points: if/else 16 (46 pts), ternaries 3 (13 pts), boolean chains 2, loops 2 (nesting depth added 40). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/font_unicode.py"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"079af70ad9a9451edefc37470d1bebdf8b78a44d401c409b5408473199bb9aaf"}},{"ruleId":"D2","level":"warning","message":{"text":"toc_boilerplate.mark_toc_and_boilerplate (cognitive 58): toc_boilerplate.mark_toc_and_boilerplate has cognitive complexity 58 (threshold 15). Drivers by points: if/else 13 (40 pts), loops 4 (10 pts), boolean chains 8 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/classification/toc_boilerplate.py"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"962becb3f17b59402cd5c00310dea3cb200d938c0d560074ac607ca010df9f91"}},{"ruleId":"D2","level":"warning","message":{"text":"style_context.compare_heading_depth (cognitive 56): style_context.compare_heading_depth has cognitive complexity 56 (threshold 15). Drivers by points: boolean chains 19, ternaries 9 (19 pts), if/else 16 (18 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/outline_assembly/style_context.py"},"region":{"startLine":308}}}],"partialFingerprints":{"codehealthFindingId/v1":"f12a75dcf76afeadeb32d9ffca80eef4dd5f7e79acd691c25463bdbb8c4cdb38"}},{"ruleId":"D2","level":"warning","message":{"text":"selection.extract_sub_headings (cognitive 55): selection.extract_sub_headings has cognitive complexity 55 (threshold 15). Drivers by points: if/else 15 (37 pts), boolean chains 8, loops 3 (5 pts), ternaries 3 (5 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/outline_assembly/selection.py"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"89265e463dc3bb89e83d4af6ec5af1774e994172ce4cc763595afcd191c2639d"}},{"ruleId":"D2","level":"warning","message":{"text":"local_chat._openai_agent (cognitive 55): local_chat._openai_agent has cognitive complexity 55 (threshold 15). Drivers by points: if/else 17 (35 pts), boolean chains 14, error handling 2 (3 pts), ternaries 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/local_chat.py"},"region":{"startLine":883}}}],"partialFingerprints":{"codehealthFindingId/v1":"2611c6255da369eecc63c619d0e43dc5ffb8e002b1df74386e92a25f886072cf"}},{"ruleId":"D2","level":"warning","message":{"text":"code_walk._walk_codes (cognitive 53): code_walk._walk_codes has cognitive complexity 53 (threshold 15). Drivers by points: if/else 16 (40 pts), loops 3 (6 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/code_walk.py"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6b304bb0390e586b7ba90033980c6fc765b58777440cd6375ac27450e84e275"}},{"ruleId":"D2","level":"warning","message":{"text":"font_unicode._type1_builtin_encoding (cognitive 52): font_unicode._type1_builtin_encoding has cognitive complexity 52 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 6 (13 pts), ternaries 4 (9 pts), boolean chains 4, error handling 1 (3 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/font_unicode.py"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"6667e50d523476072ebeffc290e1bfaf1e50bd1bfd83ef3b0c611cc5e379258b"}},{"ruleId":"D2","level":"warning","message":{"text":"header_footer.find_cross_page_match (cognitive 51): header_footer.find_cross_page_match has cognitive complexity 51 (threshold 15). Drivers by points: if/else 12 (35 pts), boolean chains 10, loops 3 (6 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/classification/header_footer.py"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4c20b40672a33c5928d388275296bc90e39734160acb33a8fe28b6b36c62022"}},{"ruleId":"D2","level":"warning","message":{"text":"PageIndexClient.get_citations (cognitive 47): PageIndexClient.get_citations has cognitive complexity 47 (threshold 15). Drivers by points: if/else 14 (28 pts), boolean chains 6, loops 3 (5 pts), error handling 1 (4 pts), ternaries 2 (4 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/client.py"},"region":{"startLine":2749}}}],"partialFingerprints":{"codehealthFindingId/v1":"c19abbc076d59b292a34157e5d73a2a2043eacc9aff3c79bb3cbb6f02f8567b0"}},{"ruleId":"D2","level":"warning","message":{"text":"detectors.detect_numbered_heading (cognitive 45): detectors.detect_numbered_heading has cognitive complexity 45 (threshold 15). Drivers by points: if/else 13 (34 pts), boolean chains 10, loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/heading_detection/detectors.py"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6b1f888a5564854854d9823357bed6036170d8c8c25e72d13d708ede8981cdd"}},{"ruleId":"D2","level":"warning","message":{"text":"merge_rules.should_merge_lines (cognitive 43): merge_rules.should_merge_lines has cognitive complexity 43 (threshold 15). Drivers by points: if/else 18 (21 pts), boolean chains 18, ternaries 3 (4 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/clustering/merge_rules.py"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3b578b13f82291e847048811b03699723cdeb872352bdc66c0b850fcea270b0"}},{"ruleId":"D2","level":"warning","message":{"text":"embedded_toc.merge_bookmark_skeleton (cognitive 42): embedded_toc.merge_bookmark_skeleton has cognitive complexity 42 (threshold 15). Drivers by points: if/else 11 (26 pts), loops 4 (9 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/embedded_toc.py"},"region":{"startLine":354}}}],"partialFingerprints":{"codehealthFindingId/v1":"b58318179fff0cb0185bdcb1dd4e7bf774a1045df3a3dc0abf3c0072f5b6ba67"}},{"ruleId":"D2","level":"warning","message":{"text":"build.cluster_lines (cognitive 39): build.cluster_lines has cognitive complexity 39 (threshold 15). Drivers by points: loops 5 (16 pts), if/else 8 (15 pts), ternaries 3 (5 pts), boolean chains 3 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/clustering/build.py"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdb396d55163527fc17b84da33853f1d13371dc6ed42fdfe4f11e97f573a75f2"}},{"ruleId":"D2","level":"warning","message":{"text":"detectors.is_acceptable_heading (cognitive 38): detectors.is_acceptable_heading has cognitive complexity 38 (threshold 15). Drivers by points: boolean chains 20, if/else 11, ternaries 7. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/heading_detection/detectors.py"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"25a50edcd46a431f2b07dde12063723982e520ee831fe5277c1587884ce15a18"}},{"ruleId":"D2","level":"warning","message":{"text":"selection.min_font_distance (cognitive 38): selection.min_font_distance has cognitive complexity 38 (threshold 15). Drivers by points: if/else 7 (28 pts), loops 4 (10 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/outline_assembly/selection.py"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"154b36d36c7b365f5e46534892a472acaf0ff01a7a1843d2a5985edf12411e29"}},{"ruleId":"D2","level":"warning","message":{"text":"local_chat._weave (cognitive 38): local_chat._weave has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (23 pts), ternaries 3 (10 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/local_chat.py"},"region":{"startLine":1571}}}],"partialFingerprints":{"codehealthFindingId/v1":"1244bcdb64a2c08f6568733b5a311020c57a3651789576ee6e1e5ec5e344e8b8"}},{"ruleId":"D2","level":"warning","message":{"text":"api._page_index_flash (cognitive 37): api._page_index_flash has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 18, if/else 13, ternaries 3 (6 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/api.py"},"region":{"startLine":237}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c7ac524716a8d09012d0122163bb7bf83c322b141bc1a39a13965803e02ddb1"}},{"ruleId":"D2","level":"warning","message":{"text":"client._resolve_index_slot (cognitive 36): client._resolve_index_slot has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (35 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/client.py"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6b30e8e49001574e594b5bd24745294859c324ca9f2b2246cd0eabdf2baeaba"}},{"ruleId":"D2","level":"warning","message":{"text":"page_scan.find_section_openers (cognitive 36): page_scan.find_section_openers has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (29 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/heading_detection/page_scan.py"},"region":{"startLine":425}}}],"partialFingerprints":{"codehealthFindingId/v1":"a38a50c3199d60ea38fb0d9470d414700883940bea2dd5cbc136cb4040865eb4"}},{"ruleId":"D2","level":"warning","message":{"text":"text_checks.has_substantive_content (cognitive 36): text_checks.has_substantive_content has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (17 pts), ternaries 5 (15 pts), boolean chains 3, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/heading_detection/text_checks.py"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"10afcd3b32e35501c0fc9108cb7a37f79b9781ab6763b341d446b5508e73b55b"}},{"ruleId":"D2","level":"warning","message":{"text":"char_extract._extract_raw_chars (cognitive 36): char_extract._extract_raw_chars has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (27 pts), boolean chains 4, ternaries 2 (4 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/char_extract.py"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"a104a860edccfed307fef8eba9b1ba3b170dafc646fbc92997f46b7653580046"}},{"ruleId":"D2","level":"warning","message":{"text":"body_text.is_body_paragraph (cognitive 35): body_text.is_body_paragraph has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 16, if/else 12 (15 pts), loops 1 (2 pts), ternaries 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/classification/body_text.py"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5a165c904afe0e6cf9d2cac3f88ea6c496c9063fb2b98ed011340be04932a4c"}},{"ruleId":"D2","level":"warning","message":{"text":"detectors.detect_labeled_heading (cognitive 35): detectors.detect_labeled_heading has cognitive complexity 35 (threshold 15). Drivers by points: if/else 15 (22 pts), boolean chains 12, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/heading_detection/detectors.py"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"68b8da1d9868d4ac0456f67894787d4fa95f6fa6e215a91479d574ff7a192a84"}},{"ruleId":"D2","level":"warning","message":{"text":"assembly.build_heading_from_block (cognitive 35): assembly.build_heading_from_block has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (22 pts), boolean chains 5, loops 1 (4 pts), error handling 1 (3 pts), ternaries 1 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/outline_assembly/assembly.py"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"075abd2b52737eb4e8932404ebc2dd3af770dbc955adf0c441a0d3104323cbc0"}},{"ruleId":"D2","level":"warning","message":{"text":"line_numbers.strip_line_numbers (cognitive 35): line_numbers.strip_line_numbers has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 4 (5 pts), boolean chains 4, ternaries 2 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/phases/line_numbers.py"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"1879cafadd279189df7a2fea235939b747a9159059ca8cc783359a71e1488944"}},{"ruleId":"D2","level":"warning","message":{"text":"agent_tools._get_page_content (cognitive 34): agent_tools._get_page_content has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 7, ternaries 3 (6 pts), error handling 1, loops 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/agent_tools.py"},"region":{"startLine":1012}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a9e06766c2a0ce468e7648453cab41dbba5784aecab505402d9b664256a2d52"}},{"ruleId":"D2","level":"warning","message":{"text":"candidates.make_numbered_candidate (cognitive 34): candidates.make_numbered_candidate has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (26 pts), boolean chains 8 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/heading_detection/candidates.py"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4195c277b6609215cd5e743ba6330cf31632f47cce36f354e03fc26f7998966"}},{"ruleId":"D2","level":"warning","message":{"text":"style_context._apply_heading_to_state (cognitive 34): style_context._apply_heading_to_state has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (26 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/outline_assembly/style_context.py"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"a12349fc3963d49acfaf401c90323765b645012c82d98e3a281ae06a637f4cc4"}},{"ruleId":"D2","level":"warning","message":{"text":"local_chat._chat_events_agen (cognitive 34): local_chat._chat_events_agen has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (22 pts), error handling 2 (5 pts), ternaries 1 (4 pts), boolean chains 2, loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/local_chat.py"},"region":{"startLine":1507}}}],"partialFingerprints":{"codehealthFindingId/v1":"aedef769495f0db62ac491472f7bb0696adcfdcbc22943722121716e802b0ebd"}},{"ruleId":"D2","level":"warning","message":{"text":"local_chat._cloud_chunk_events (cognitive 34): local_chat._cloud_chunk_events has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 7, error handling 1 (4 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/local_chat.py"},"region":{"startLine":1640}}}],"partialFingerprints":{"codehealthFindingId/v1":"2dec7abfd296f03c4b3c23fc12cc6e7edc6a99dc856814aabc21feccbfaa685d"}},{"ruleId":"D2","level":"warning","message":{"text":"build.cluster_lines_into_blocks (cognitive 33): build.cluster_lines_into_blocks has cognitive complexity 33 (threshold 15). Drivers by points: if/else 5 (12 pts), error handling 2 (8 pts), loops 5 (8 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/blocks/build.py"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"77d6b192db68f70c9327c78c7f912d05e0fa687c3c801bb4edb78e390aef7423"}},{"ruleId":"D2","level":"warning","message":{"text":"font_unicode._font_widths (cognitive 33): font_unicode._font_widths has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 6 (11 pts), loops 3 (10 pts), if/else 6 (9 pts), boolean chains 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/font_unicode.py"},"region":{"startLine":405}}}],"partialFingerprints":{"codehealthFindingId/v1":"38ecf5d902d6ba7d33d1b6ab5114fba93f182e31e132a9bf3dd3834b0b73312e"}},{"ruleId":"D2","level":"warning","message":{"text":"aggregates.compute_page_stats (cognitive 33): aggregates.compute_page_stats has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 5 (7 pts), ternaries 4 (6 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/stats/aggregates.py"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"e59c62ffbf83aed84b963579434643656e3caff6c0878ff0bc3619e41c09056c"}},{"ruleId":"D2","level":"warning","message":{"text":"CaptionedRegion.__init__ (cognitive 31): CaptionedRegion.__init__ has cognitive complexity 31 (threshold 15). Drivers by points: loops 4 (15 pts), if/else 6 (11 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/labels/caption_regions.py"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"86140ef0cd4539cc5391db65e7353222430cb5c1d06f4865d58a70f9c9aac9c8"}},{"ruleId":"D2","level":"warning","message":{"text":"code_walk._resource_dict_xrefs (cognitive 31): code_walk._resource_dict_xrefs has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 4 (5 pts), ternaries 1 (2 pts), boolean chains 1, error handling 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/code_walk.py"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"46cc33c49af164e823f045aee07751e2c6c4a21d732004a98cae2d9ce29cb375"}},{"ruleId":"D2","level":"warning","message":{"text":"LineTokenizer.add_line (cognitive 31): LineTokenizer.add_line has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 9, loops 2 (3 pts), ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/tokens/tokenizer.py"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b5c6ffd66b235ceeb54f958807efcc0b61f659e0e6d0e05583512856242951d"}},{"ruleId":"D2","level":"warning","message":{"text":"local_chat._seen_box_events (cognitive 31): local_chat._seen_box_events has cognitive complexity 31 (threshold 15). Drivers by points: if/else 6 (18 pts), boolean chains 6, loops 2 (4 pts), ternaries 1 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/local_chat.py"},"region":{"startLine":2339}}}],"partialFingerprints":{"codehealthFindingId/v1":"e18d8c8ee26c5b5178e67edef229a82fc8a3b5b5770fa796053436ac8e180ff6"}},{"ruleId":"D2","level":"warning","message":{"text":"page_index_md.tree_thinning_for_index (cognitive 31): page_index_md.tree_thinning_for_index has cognitive complexity 31 (threshold 15). Drivers by points: if/else 6 (21 pts), loops 4 (9 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/page_index_md.py"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5473ed75c713c584a1f74d6bb6cf25a0962df0a5cd87aaab3547f718efaf2cf"}},{"ruleId":"D2","level":"warning","message":{"text":"agent_tools._browse_documents (cognitive 30): agent_tools._browse_documents has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 7, ternaries 5 (6 pts), error handling 1, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/agent_tools.py"},"region":{"startLine":729}}}],"partialFingerprints":{"codehealthFindingId/v1":"06b7888bc2cfbc9aa959d0e2fedb85a480c65234c56175ba9ff1c4a40cd06081"}},{"ruleId":"D2","level":"warning","message":{"text":"selection.find_parent_heading (cognitive 30): selection.find_parent_heading has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (21 pts), boolean chains 4, ternaries 1 (4 pts), loops 1 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/outline_assembly/selection.py"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"958eb2c158db62ba68b4ed1e49aabcf7aaac8b6f9d0903d5c52d084ec599502b"}},{"ruleId":"D2","level":"warning","message":{"text":"unicode_apply._synthesize_dropped_glyphs (cognitive 30): unicode_apply._synthesize_dropped_glyphs has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 3 (7 pts), boolean chains 6, loops 3 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/unicode_apply.py"},"region":{"startLine":363}}}],"partialFingerprints":{"codehealthFindingId/v1":"512dbdbcb23b50fb883fe0d752593b2c7bfa9c0d2d0ba27987c1b84ec90d135d"}},{"ruleId":"D2","level":"warning","message":{"text":"page_index_classic.process_none_page_numbers (cognitive 30): page_index_classic.process_none_page_numbers has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 4 (10 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/page_index_classic.py"},"region":{"startLine":817}}}],"partialFingerprints":{"codehealthFindingId/v1":"95f84feb6d11cbf4ffdc655d82c85ea71f79f066ce73077fbd5456370cdb52eb"}},{"ruleId":"D2","level":"warning","message":{"text":"tree_optimize.optimize (cognitive 30): tree_optimize.optimize has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (14 pts), ternaries 9 (11 pts), boolean chains 4, loops 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/tree_optimize.py"},"region":{"startLine":925}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d4a621c04ac3d97091175605176d64fed942d254478e44a4be311b9acf95e14"}},{"ruleId":"D2","level":"warning","message":{"text":"OutlineState.__init__ (cognitive 29): OutlineState.__init__ has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 4 (7 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/outline_assembly/style_context.py"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdc7d9ce741f83bd0397d0fbe629874bc0cc1733a4172b15f3dc91b68c9f303c"}},{"ruleId":"D2","level":"warning","message":{"text":"cliques.find_keyword_clique (cognitive 27): cliques.find_keyword_clique has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 3, boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/outline_assembly/cliques.py"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bda0674a57e0303456a8f662394b8a1d159bc85d20e62d99c69e75b30f5631f"}},{"ruleId":"D2","level":"warning","message":{"text":"client._resolve_chat_slot (cognitive 26): client._resolve_chat_slot has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (21 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/client.py"},"region":{"startLine":297}}}],"partialFingerprints":{"codehealthFindingId/v1":"27fc19cbf916336c3130d7c5c9d2dea19698bf321922baa556a726aa8cb6ffe8"}},{"ruleId":"D2","level":"warning","message":{"text":"char_extract._finalize_chars (cognitive 26): char_extract._finalize_chars has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 3 (9 pts), boolean chains 2, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/char_extract.py"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"d45621d436430ff427c4a3ce72197f8f6a9e57573faf2ce77251ebcc4201596f"}},{"ruleId":"D2","level":"warning","message":{"text":"LocalAPI.submit_document (cognitive 26): LocalAPI.submit_document has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (15 pts), error handling 6 (7 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/local_api.py"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"c134dace12b84f6d5af6d7ed502aa977a235316a5fc4a41908a6cdc941a845c1"}},{"ruleId":"D2","level":"warning","message":{"text":"tries.aho_corasick_match (cognitive 25): tries.aho_corasick_match has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 5, ternaries 2 (4 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/tokens/tries.py"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"051e0de61a879622b32fdac6a97b8f98eb9c0f3392a9b429d4e31f73d2815096"}},{"ruleId":"D2","level":"warning","message":{"text":"local_chat._split_chat_messages (cognitive 25): local_chat._split_chat_messages has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 2 (7 pts), boolean chains 4, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/local_chat.py"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"9042ccb0bc072243a2f953280779d92822b37036d7e7bb129201dbed1f2dec3b"}},{"ruleId":"D2","level":"warning","message":{"text":"header_footer.bounded_edit_distance (cognitive 24): header_footer.bounded_edit_distance has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 3 (4 pts), ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/classification/header_footer.py"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"5dcaba3434c7380195f2ff9b3fb42a1d1b2e46595c410ca258633ff81be81494"}},{"ruleId":"D2","level":"warning","message":{"text":"assembly.assemble_outline (cognitive 24): assembly.assemble_outline has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 3 (5 pts), ternaries 2 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/outline_assembly/assembly.py"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"79051198bfe1172f8e7773244308636fb51d1fa62a9b3ee6a48eefc32179d7bf"}},{"ruleId":"D2","level":"warning","message":{"text":"detectors.detect_chapter_appendix (cognitive 23): detectors.detect_chapter_appendix has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 6, ternaries 3 (6 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/heading_detection/detectors.py"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"562da4c468a0d42c9b2977968c6ec78cccc61207357e626cba9ec29627430cd6"}},{"ruleId":"D2","level":"warning","message":{"text":"style_context.is_compatible_with_context (cognitive 23): style_context.is_compatible_with_context has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 6, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/outline_assembly/style_context.py"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"89bda0508d9e985ed5c9a65422078c1047712ccad00f5d1583da409f788a6646"}},{"ruleId":"D2","level":"warning","message":{"text":"local_chat.run_messages (cognitive 23): local_chat.run_messages has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6, error handling 3, ternaries 3, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/local_chat.py"},"region":{"startLine":2379}}}],"partialFingerprints":{"codehealthFindingId/v1":"353564b9ed7dee65d2ecc7138114785f59eaeca8be8210f6738b9be0bdf878c4"}},{"ruleId":"D2","level":"warning","message":{"text":"agent_tools._tool_specs (cognitive 22): agent_tools._tool_specs has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 6 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/agent_tools.py"},"region":{"startLine":1608}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1cfdbf9b6a9b95c3c07627e44ca4debd70c7ff893ac0c5b845d0368030ddf5d"}},{"ruleId":"D2","level":"warning","message":{"text":"agent_tools._annotation_for (cognitive 21): agent_tools._annotation_for has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 4 (7 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/agent_tools.py"},"region":{"startLine":1339}}}],"partialFingerprints":{"codehealthFindingId/v1":"194bab2645216f628ed466d39f73aa324eecf38c76a4d44399959a4068f6da35"}},{"ruleId":"D2","level":"warning","message":{"text":"detectors.is_bibliography_entry (cognitive 21): detectors.is_bibliography_entry has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/heading_detection/detectors.py"},"region":{"startLine":459}}}],"partialFingerprints":{"codehealthFindingId/v1":"94734d96301c4d2a6a25f4fbcc756de47026edebc50470adf3d9613e4ad18836"}},{"ruleId":"D2","level":"warning","message":{"text":"page_index_classic.verify_toc (cognitive 21): page_index_classic.verify_toc has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 3, boolean chains 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/page_index_classic.py"},"region":{"startLine":1071}}}],"partialFingerprints":{"codehealthFindingId/v1":"d055827e03f03ef33a7632377245c12b56e34654e66746eca7d39a8e7efd70da"}},{"ruleId":"D2","level":"warning","message":{"text":"utils._completion (cognitive 21): utils._completion has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 2 (7 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/utils.py"},"region":{"startLine":582}}}],"partialFingerprints":{"codehealthFindingId/v1":"c58edd10d71e69f9157d9b8b62c99f906b78cc5e7f74c4896292ac9c0a8dd327"}},{"ruleId":"D2","level":"warning","message":{"text":"utils.convert_physical_index_to_int (cognitive 21): utils.convert_physical_index_to_int has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/utils.py"},"region":{"startLine":1108}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bb5b3e862c880ecb56919a770a4e2c5dd95fa5a2944aaa0aa01424acc872547"}},{"ruleId":"D2","level":"warning","message":{"text":"utils.summary_effort_ladder (cognitive 21): utils.summary_effort_ladder has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 6, loops 1 (2 pts), error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/utils.py"},"region":{"startLine":1362}}}],"partialFingerprints":{"codehealthFindingId/v1":"f949eb97b2879349f778b57adaab157ca10ac0ce4a0dc1d98a3596e5993b920b"}},{"ruleId":"D2","level":"warning","message":{"text":"agent_tools._make_tool_function (cognitive 20): agent_tools._make_tool_function has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 7, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/agent_tools.py"},"region":{"startLine":1506}}}],"partialFingerprints":{"codehealthFindingId/v1":"522c44ce1cd3eda4c2d9024dc72db78d7aad903db68c741e2b3c032b914a37d9"}},{"ruleId":"D2","level":"warning","message":{"text":"text_checks.matches_references (cognitive 20): text_checks.matches_references has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/heading_detection/text_checks.py"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0bc58f1c5b74cf1d593e406daf53dc1bf6393f052c4d324975257037aa80f8e"}},{"ruleId":"D2","level":"warning","message":{"text":"caption_regions.detect_captions (cognitive 20): caption_regions.detect_captions has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/labels/caption_regions.py"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"740e0fe890a6c1ecb7026ff6c780785722f4f7c72d08f3955a32b386af804000"}},{"ruleId":"D2","level":"warning","message":{"text":"assembly.next_numbered_heading (cognitive 20): assembly.next_numbered_heading has cognitive complexity 20 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 3 (6 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/outline_assembly/assembly.py"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"8beb5c9f59187dbd307b5a599b99dc2d32126fedee916d88141267eb92a4eb6b"}},{"ruleId":"D2","level":"warning","message":{"text":"content_stream._page_vertical_resource_names (cognitive 20): content_stream._page_vertical_resource_names has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (11 pts), error handling 2 (5 pts), boolean chains 3, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/content_stream.py"},"region":{"startLine":396}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3926f72f1a5406799b67af1e32e22434c343f2127bf96503190ea9b141e2a51"}},{"ruleId":"D2","level":"warning","message":{"text":"tries._trie_finalize (cognitive 20): tries._trie_finalize has cognitive complexity 20 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 4 (9 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/tokens/tries.py"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5e2c61f73bf45ccd289be04b9e4d1cf7c975dc46ee6a01909613f534cdf3580"}},{"ruleId":"D2","level":"warning","message":{"text":"_Replies._assemble (cognitive 20): _Replies._assemble has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 3 (8 pts), if/else 2 (5 pts), loops 2 (3 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/local_chat.py"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"73c9e1f318c5fe42cb6964b0f3ed0f768c70b2c61fdcb59024fffd3248543557"}},{"ruleId":"D2","level":"warning","message":{"text":"page_index_classic.process_toc_no_page_numbers (cognitive 20): page_index_classic.process_toc_no_page_numbers has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 3 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/page_index_classic.py"},"region":{"startLine":728}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe071c024271e509bbcfc1c8f5dcfcd2d2bede8621e3e7111289d5242626f60a"}},{"ruleId":"D2","level":"warning","message":{"text":"utils.chosen_effort (cognitive 20): utils.chosen_effort has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 4, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/utils.py"},"region":{"startLine":1431}}}],"partialFingerprints":{"codehealthFindingId/v1":"b52f94adb84d233351621e7ba6e9aeb85d71e5ce8a72922291e12710a6c27650"}},{"ruleId":"D2","level":"warning","message":{"text":"agent_tools._get_document (cognitive 19): agent_tools._get_document has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, ternaries 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/agent_tools.py"},"region":{"startLine":843}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ebe036288822ba95fb42568507be1a6383616db83ac651db15ace9f0ebd0442"}},{"ruleId":"D2","level":"warning","message":{"text":"build.build_initial_lines (cognitive 19): build.build_initial_lines has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/clustering/build.py"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7f7108df17b880daaa87fc18e3a2c7113870b7032f0ba8e1d712481d24e8f90"}},{"ruleId":"D2","level":"warning","message":{"text":"embedded_toc.read_bookmarks (cognitive 19): embedded_toc.read_bookmarks has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 4 (6 pts), boolean chains 2, error handling 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/embedded_toc.py"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9133b3985bbb3347002a1931eaa5b34590e9469f53a324d1af7c32fb9c5c723"}},{"ruleId":"D2","level":"warning","message":{"text":"detectors.passes_neighbor_check (cognitive 19): detectors.passes_neighbor_check has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, if/else 8, ternaries 2. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/heading_detection/detectors.py"},"region":{"startLine":400}}}],"partialFingerprints":{"codehealthFindingId/v1":"63cbd7401cc90189b818c3a170d92df618dde40cfd90489a1b113eac33f5dbe9"}},{"ruleId":"D2","level":"warning","message":{"text":"line_numbers.validate_line_number_cluster (cognitive 19): line_numbers.validate_line_number_cluster has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 4, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/phases/line_numbers.py"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"10a2adb4cb56791ce930a20b63236f40859d160ad223f954f2c9487a90fe9ae1"}},{"ruleId":"D2","level":"warning","message":{"text":"LineTokenizer._advance_char (cognitive 19): LineTokenizer._advance_char has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/tokens/tokenizer.py"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d16dee24a7764066374269179a4cfa1685609f7e7d8a5f737c7678da9defcb9"}},{"ruleId":"D2","level":"warning","message":{"text":"agent_tools._expand_pages (cognitive 18): agent_tools._expand_pages has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), error handling 2 (4 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/agent_tools.py"},"region":{"startLine":542}}}],"partialFingerprints":{"codehealthFindingId/v1":"684fb62d2c0d14d53b6870cd752327c1a20f69ff1838c2e0c64cc164bb70db04"}},{"ruleId":"D2","level":"warning","message":{"text":"CloudAPI._stream_chat_response_raw (cognitive 18): CloudAPI._stream_chat_response_raw has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (13 pts), error handling 1 (4 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/cloud_api.py"},"region":{"startLine":370}}}],"partialFingerprints":{"codehealthFindingId/v1":"67bfbf9dc6a385bc1c854dfaeb4243e86c9298e28285d465a113832074851790"}},{"ruleId":"D2","level":"warning","message":{"text":"header_footer.has_adjacent_page_numbers (cognitive 18): header_footer.has_adjacent_page_numbers has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 15, if/else 3. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/classification/header_footer.py"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"85bbb37f2cb5d3cf3ed85679b25bf6af064524c75a8d774b56d0617ac72a307d"}},{"ruleId":"D2","level":"warning","message":{"text":"main.find_references (cognitive 18): main.find_references has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (12 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/main.py"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"fffe22c7788842211cb754114c35ec143c5c85eaa443b2b620207121c76d8d49"}},{"ruleId":"D2","level":"warning","message":{"text":"numbering._detect_numbering (cognitive 18): numbering._detect_numbering has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 7, ternaries 1 (2 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/model/numbering.py"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"757d8b9b69ec2a2c7d98965eb1cf42cd190520f63922f4d52ba9950a8ff0cf4b"}},{"ruleId":"D2","level":"warning","message":{"text":"filtering.is_heading_candidate (cognitive 18): filtering.is_heading_candidate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, boolean chains 6. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/outline/filtering.py"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e88d8c4ce245d04fec654b452b30e579d2bb2c30cb5e3f6298e1090286ccb02"}},{"ruleId":"D2","level":"warning","message":{"text":"hashing.jenkins_hash (cognitive 18): hashing.jenkins_hash has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/tokens/hashing.py"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"25659e4356e367f018f7130b87411b564dcf3c4b2987cce3660f7cc74b2e9cc3"}},{"ruleId":"D2","level":"warning","message":{"text":"page_index_classic.check_toc (cognitive 18): page_index_classic.check_toc has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/page_index_classic.py"},"region":{"startLine":857}}}],"partialFingerprints":{"codehealthFindingId/v1":"28d3d4078ba10d55ea801ffeed22b0c26a7757ee9fb2f13d0c0ffb227daab49d"}},{"ruleId":"D2","level":"warning","message":{"text":"SummaryScheduler.finish (cognitive 18): SummaryScheduler.finish has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 7, if/else 5 (7 pts), loops 2, ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/utils.py"},"region":{"startLine":1808}}}],"partialFingerprints":{"codehealthFindingId/v1":"fef5cbcb742113f1c3d25f0395bad054f773d78b90a61cf5cc0926b32d2826f5"}},{"ruleId":"D2","level":"warning","message":{"text":"utils.leaf_own_text (cognitive 18): utils.leaf_own_text has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, if/else 5, ternaries 3, loops 2. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/utils.py"},"region":{"startLine":1243}}}],"partialFingerprints":{"codehealthFindingId/v1":"36ab6a2b218bff218c0a8d5b4a0495518d619331ee04916d2d88d0964876c58c"}},{"ruleId":"D2","level":"warning","message":{"text":"PageIndexClient.chat_completions (cognitive 17): PageIndexClient.chat_completions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 3 (4 pts), boolean chains 1, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/client.py"},"region":{"startLine":1741}}}],"partialFingerprints":{"codehealthFindingId/v1":"02bbc076cd2586817e3dea47d087723c1c3405f6365b3f0e565b6ff52157113d"}},{"ruleId":"D2","level":"warning","message":{"text":"toc_boilerplate.mark_watermarks (cognitive 17): toc_boilerplate.mark_watermarks has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 4 (6 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/classification/toc_boilerplate.py"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"f29263f8ae45a86ac1cf3adf0b4ba5ad86477ce034ca7bdc70f7ad53cf620efd"}},{"ruleId":"D2","level":"warning","message":{"text":"caption_regions.build_caption_regions (cognitive 17): caption_regions.build_caption_regions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3 (5 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/labels/caption_regions.py"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"2218a6e5f4be7ddc9d3934586c3e2ae8741030da62c89b729e516c804e546be2"}},{"ruleId":"D2","level":"warning","message":{"text":"filtering.filter_by_clique (cognitive 17): filtering.filter_by_clique has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/outline/filtering.py"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"67061a7229acfc7022b619ee370ace7b1e31a1a0c6e8778412b44db120818c44"}},{"ruleId":"D2","level":"warning","message":{"text":"geometry._find_obj_for_char (cognitive 17): geometry._find_obj_for_char has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, loops 1, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/geometry.py"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"871a4959ee079cac47f77e304585f88241de3ba9c7db32a6fa7b23aca7bb4c3f"}},{"ruleId":"D2","level":"warning","message":{"text":"page_index_classic.check_title_appearance_in_start_concurrent (cognitive 17): page_index_classic.check_title_appearance_in_start_concurrent has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/page_index_classic.py"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"db57a6543dfa259a1596c109fb8990351a06100c776f22508dc50f314ce97634"}},{"ruleId":"D2","level":"warning","message":{"text":"page_index_md.extract_nodes_from_markdown (cognitive 17): page_index_md.extract_nodes_from_markdown has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/page_index_md.py"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5bb2871b567727d58a9c2ab9fa9829a6e05fd41bd788b76233ffd4bb3b1bc53"}},{"ruleId":"D2","level":"warning","message":{"text":"SummaryScheduler._visit (cognitive 17): SummaryScheduler._visit has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 3, ternaries 2 (3 pts), loops 1 (2 pts), error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/utils.py"},"region":{"startLine":1786}}}],"partialFingerprints":{"codehealthFindingId/v1":"48976cd3d4fc4558020113186bb05a229caf89ff823340d1c07e0f778b8682e9"}},{"ruleId":"D2","level":"warning","message":{"text":"api.page_index_flash (cognitive 16): api.page_index_flash has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (6 pts), loops 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/api.py"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d6096b2bec2e2827aa22311238dc26ca29e73e1bc80e6577cc7180ad0458335"}},{"ruleId":"D2","level":"warning","message":{"text":"toc_boilerplate.is_boilerplate_block (cognitive 16): toc_boilerplate.is_boilerplate_block has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 2 (3 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/classification/toc_boilerplate.py"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a7c0c8a1e3e487fecc50dc24e5d64d34c1639145039e2a06e4c1e9ff195750e"}},{"ruleId":"D2","level":"warning","message":{"text":"toc_boilerplate.running_contents_links (cognitive 16): toc_boilerplate.running_contents_links has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/classification/toc_boilerplate.py"},"region":{"startLine":308}}}],"partialFingerprints":{"codehealthFindingId/v1":"92fa4d0293e60dd1c9551dced28ece43f857b2fa7a2721d40c04070fd3a02ff1"}},{"ruleId":"D2","level":"warning","message":{"text":"tree.build_tree (cognitive 16): tree.build_tree has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), loops 3 (4 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/outline/tree.py"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"11c8ddf7b0673c9356ac08902a5a91ae09ce41338d51247290280a266e24d01e"}},{"ruleId":"D2","level":"warning","message":{"text":"assembly.continue_numbering (cognitive 16): assembly.continue_numbering has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 6, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/outline_assembly/assembly.py"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbf6a6ab1569542b27b2dd4238832ec9d854ff9301ac3c8a60bde22679c2bcbb"}},{"ruleId":"D2","level":"warning","message":{"text":"CliqueTreeBuilder.__init__ (cognitive 16): CliqueTreeBuilder.__init__ has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/outline_assembly/cliques.py"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"650c2081c45316496a0c5bed608478a3f3bd90e3b8fcbaf3ed3f28cf56ca25c4"}},{"ruleId":"D2","level":"warning","message":{"text":"aggregates.compute_doc_stats (cognitive 16): aggregates.compute_doc_stats has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/stats/aggregates.py"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ae3f300eda3223d4aaa8095c84581e0e06037d204cec1483e278beb999138f2"}},{"ruleId":"D2","level":"warning","message":{"text":"_Workflow._run (cognitive 16): _Workflow._run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (6 pts), boolean chains 5, loops 2, ternaries 1 (2 pts), error handling 1 (nesting depth added 2). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/integrations/claude_agent_sdk.py"},"region":{"startLine":696}}}],"partialFingerprints":{"codehealthFindingId/v1":"662cf205142786c971f3297ecbbdba394b4228b3ae721400a2789ceb252af3b6"}},{"ruleId":"D2","level":"warning","message":{"text":"page_index_classic.process_large_node_recursively (cognitive 16): page_index_classic.process_large_node_recursively has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 2 (6 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/page_index_classic.py"},"region":{"startLine":1175}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6746631f03499dac122f91efbc1fa93335330862622b2da8604da58f673d69a"}},{"ruleId":"D2","level":"warning","message":{"text":"tree_optimize.propose_children (cognitive 16): tree_optimize.propose_children has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 6, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/tree_optimize.py"},"region":{"startLine":683}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d5ed52da9f042c9aa28301743d0c45a926849cb2c9d71cdfa5a0bdf0070d435"}},{"ruleId":"D2","level":"warning","message":{"text":"utils._acompletion (cognitive 16): utils._acompletion has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), ternaries 1 (4 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/utils.py"},"region":{"startLine":636}}}],"partialFingerprints":{"codehealthFindingId/v1":"04142b7a61d4ba9ddc35462ac90b0fc3438fa122e5d17fe386e7664825ad9792"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: pageindex/local_chat.py: FileTooLong \u2014 2135 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1635 over it, 4.27\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/local_chat.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4143e50c7003b82077bb5913294bceab07c3945f609e194531c0b7c4c1a1bdd9"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: pageindex/client.py: FileTooLong \u2014 1460 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 960 over it, 2.92\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/client.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e455586f160af5632186785c83b8887b72289ca0023f4c17ed6567cf86e97515"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: pageindex/utils.py: FileTooLong \u2014 1455 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 955 over it, 2.91\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fad156d5043ae0a3ed6c9dcd8dc40ba73361d8d9441a8990b532c963443d8355"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: pageindex/agent_tools.py: FileTooLong \u2014 1406 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 906 over it, 2.81\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/agent_tools.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e80944fa7a19bb522e3eb682ee78dc5c43d760766cc3a7c8c9ef3d822577766"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: pageindex/page_index_classic.py: FileTooLong \u2014 929 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 429 over it, 1.86\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/page_index_classic.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e9feccb4eceeb9d4890a9f834e6333a8f8a175a9f5d239cc1726fdbbc6daa91"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: PageIndexClient: TooManyMethods \u2014 55 methods. The bar is 30 methods; this is 25 over it, 1.83\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/client.py"},"region":{"startLine":342}}}],"partialFingerprints":{"codehealthFindingId/v1":"b141e1c10c9772ebec6483c51303c059f8a004c744e48c1fce9e7a1c3f93c246"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: pageindex/tree_optimize.py: FileTooLong \u2014 742 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 242 over it, 1.48\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/tree_optimize.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"885ca4be9a2b193afabfb8f989beca2be9a1cd77ed0824bef39361da6a6c9387"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: integrations/claude_agent_sdk.py: FileTooLong \u2014 528 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 28 over it, 1.06\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/integrations/claude_agent_sdk.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1dbef4ba3aa7709491d2b4d3f94583dfe538ee68d3d828839c4599f05b9e6221"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): pageindex/client.py:1761-1961 | pageindex/client.py:1982-2062 | pageindex/client.py:2085-2181 | pageindex/client.py:3225-3234 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/client.py"},"region":{"startLine":1761}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf3f53e8a2b22fa50ba658f77da3cd3404eebe2514db994b4bb049ca2da5af3e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): pageindex/flash/parser_pdfium_charlevel/remerge.py:75-99 | pageindex/flash/parser_pdfium_charlevel/remerge.py:194-215 \u2014 These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/remerge.py"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"646fa88ce27a22622b236a4001eae23402fcf50532623bb9222af28d02de5949"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): pageindex/utils.py:583-615 | pageindex/utils.py:637-665 \u2014 These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/utils.py"},"region":{"startLine":583}}}],"partialFingerprints":{"codehealthFindingId/v1":"123e84e13d8ec720d22615cd46b5a0911bf16649b989406caf761df5c35c20fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): pageindex/flash/model/numbering.py:54-70 | pageindex/flash/parser_pdfium_charlevel/cmap_parse.py:65-79 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/model/numbering.py"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"f585148b9e03dc136db52a52e550235ada34490e30df2025ff3977985f9b0eb5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): pageindex/utils.py:561-579 | pageindex/utils.py:619-633 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/utils.py"},"region":{"startLine":561}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3c6756ab31bba516f443229292607b881ac4e1a0be4b64067447d687d29e6bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): pageindex/utils.py:728-740 | pageindex/utils.py:757-772 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/utils.py"},"region":{"startLine":728}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf5849cd9ff2d199b268018f02a75466032bf114bf1d2e2f6a3b7ccb2fb51d84"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 8\u002B corresponding lines): pageindex/flash/model/rects.py:115-122 | pageindex/flash/model/rects.py:131-138 | pageindex/flash/model/rects.py:146-153 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/model/rects.py"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"f767aa86183b0a18c00a09bfa16133dfc06bff13f8eff616df5102fc8cd630c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): pageindex/cloud_api.py:113-135 | pageindex/cloud_api.py:218-238 \u2014 These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/cloud_api.py"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"2789e862b6cc662e835dc4c8476889650020122ccf62ded952b898b670bfb8b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): pageindex/utils.py:1143-1151 | pageindex/utils.py:1155-1163 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/utils.py"},"region":{"startLine":1143}}}],"partialFingerprints":{"codehealthFindingId/v1":"0506f29477bdd20828e3131073c2b1d9ed225cbc6c9f2e4196d18dc3b1f8020a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 25\u002B corresponding lines): pageindex/cloud_api.py:243-269 | pageindex/cloud_api.py:537-563 | pageindex/cloud_api.py:568-592 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 25 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/cloud_api.py"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ab3daaf80da8af2496117e7ba70fa3f47e9397d8376585fb326f448e6a40644"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (5 members, 19\u002B corresponding lines): pageindex/cloud_api.py:272-290 | pageindex/cloud_api.py:397-423 | pageindex/cloud_api.py:426-444 | pageindex/cloud_api.py:595-613 | pageindex/cloud_api.py:616-634 \u2014 These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/cloud_api.py"},"region":{"startLine":272}}}],"partialFingerprints":{"codehealthFindingId/v1":"26f5f93180a18971312863240ea52e5dd6839596a0ed24f405c8879d7e6742f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): pageindex/cloud_api.py:691-718 | pageindex/cloud_api.py:725-746 \u2014 These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/cloud_api.py"},"region":{"startLine":691}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfe7938fcb49bc51c7a2451defd5df7604068f42d417ff502cca9d0c3366afe2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): pageindex/page_index_classic.py:337-366 | pageindex/page_index_classic.py:902-925 \u2014 These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/page_index_classic.py"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"2740b385ac1305615abecaddb0db6e94fbab2c0cb1b83a4644ad3b85e033932d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (42\u201349 lines \u00D7 2): pageindex/flash/parser_pdfium_charlevel/cmap_parse.py:148-189 | pageindex/flash/parser_pdfium_charlevel/content_stream.py:91-139 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pageindex/flash/parser_pdfium_charlevel/cmap_parse.py:148\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/cmap_parse.py"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3d5a617758b17b152bf1b756f73e1c8d9effa8c8b3af5d0464e568376744dba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201324 lines \u00D7 2): pageindex/cloud_api.py:138-161 | pageindex/cloud_api.py:190-208 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/cloud_api.py"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7f5a699ffd473f4de9a7c818f54f696bc53449c54d455bb0a625428fb1c1271"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): pageindex/flash/columns/gutters.py:143-161 | pageindex/flash/columns/gutters.py:211-229 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060pageindex/flash/columns/gutters.py:162\u0060 calls \u0060min\u0060, \u0060max\u0060 and \u0060pageindex/flash/columns/gutters.py:230\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/columns/gutters.py"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a5027c1e35a042d0d5fd4b319d60b79a0d1964c332179643fc57ef161bc3e7c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): pageindex/flash/embedded_toc.py:408-423 | pageindex/flash/embedded_toc.py:560-575 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/embedded_toc.py"},"region":{"startLine":408}}}],"partialFingerprints":{"codehealthFindingId/v1":"b961bb0f44c1790a253e01d6f7bda64f9112ba1b31d83493aba06fa9f8b7b81b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 2): pageindex/flash/outline/tree.py:92-106 | pageindex/flash/outline_assembly/assembly.py:387-402 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pageindex/flash/outline_assembly/assembly.py:387\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060pageindex/flash/outline_assembly/assembly.py:407\u0060 calls \u0060enumerate\u0060, \u0060str\u0060, \u0060zfill\u0060 and \u0060pageindex/flash/outline/tree.py:109\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/outline/tree.py"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"71fc0b2bc7cf66e1622b2932a0b8b6873136fb46eba10b592d8c0e9c23cafc8e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): pageindex/cloud_api.py:478-491 | pageindex/cloud_api.py:550-563 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/cloud_api.py"},"region":{"startLine":478}}}],"partialFingerprints":{"codehealthFindingId/v1":"730827a36a5b8a585dc29e666608614aa5db7369db6b5238e60ac6be05addd59"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): pageindex/flash/embedded_toc.py:394-406 | pageindex/flash/embedded_toc.py:512-524 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/embedded_toc.py"},"region":{"startLine":394}}}],"partialFingerprints":{"codehealthFindingId/v1":"1dc3ff92856ffb9d6339c92664e324b6f13fa01337a4b8db46a0c5b29bdb4148"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): pageindex/agent_tools.py:915-926 | pageindex/agent_tools.py:1016-1027 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/agent_tools.py"},"region":{"startLine":915}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8546e6d55fb9d7abfc7af7b9051d546f929fd841185bab6c281d1fa78a604cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): pageindex/cloud_api.py:259-269 | pageindex/cloud_api.py:524-534 | pageindex/cloud_api.py:582-592 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/cloud_api.py"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"07467153d1f733db04ca56f98a0ce49e65ed95fad4fab7474ff17df2a7c09af7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): pageindex/page_index_classic.py:835-843 | pageindex/page_index_classic.py:981-989 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/page_index_classic.py"},"region":{"startLine":835}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9fc3c30fa55eaa1ab0bf81ce11e6aceacd448837bd318d9474a38a6f3e0956e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): pageindex/page_index_classic.py:264-271 | pageindex/page_index_classic.py:415-424 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/page_index_classic.py"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d93d6a75c40d1affc6e3baa2a5ee5dcb527225c5b912e24267fcd0b9d7c3c51"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 2): pageindex/agent_tools.py:1857-1862 | pageindex/agent_tools.py:1886-1892 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060pageindex/agent_tools.py:1893\u0060 calls \u0060dumps\u0060, \u0060get\u0060 and \u0060pageindex/agent_tools.py:1863\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/agent_tools.py"},"region":{"startLine":1857}}}],"partialFingerprints":{"codehealthFindingId/v1":"0803f882d0efb95ec6135ff81c6abb3f3dbfdc6b033cfbdb7a77c2db4c7555e3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): pageindex/client.py:1912-1918 | pageindex/client.py:2175-2181 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pageindex/client.py:1912\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/client.py"},"region":{"startLine":1912}}}],"partialFingerprints":{"codehealthFindingId/v1":"799a76638d149852ca24a0d1a320fdb147d9e81ed6d598a7cc627907e96d45eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): pageindex/flash/heading_detection/page_scan.py:191-197 | pageindex/flash/heading_detection/page_scan.py:198-204 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/heading_detection/page_scan.py"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"de23b1707e98fe4723df66c53eaeb948d927c6867484c03a12f0b9be68b93b0f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5\u20136 lines \u00D7 3): pageindex/client.py:1911-1916 | pageindex/client.py:2056-2061 | pageindex/client.py:2174-2178 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/client.py"},"region":{"startLine":1911}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0cc3cdf33f41d8b8a5599ea556e0a3dd470ad3ee443e28f8a183ac3b902be3e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): pageindex/flash/tokens/hashing.py:80-85 | pageindex/flash/tokens/hashing.py:86-91 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/tokens/hashing.py"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bd541538eac243af2b55edc086c2521b243d781b23dc474f2e191b7d646e55f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): pageindex/client.py:1912-1917 | pageindex/client.py:2175-2179 | pageindex/client.py:3226-3233 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/client.py"},"region":{"startLine":1912}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8567d6d218ebec5a903bb0e17c44252603ba3d34482583db1008b366c186de8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): pageindex/flash/blocks/build.py:88-92 | pageindex/flash/clustering/build.py:119-123 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/blocks/build.py"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc6c2760df64fd9fb3ff187d2f55cbb814a9da048059bb6c0da5a15346e25726"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): pageindex/flash/tokens/hashing.py:117-121 | pageindex/flash/tokens/hashing.py:125-129 | pageindex/flash/tokens/hashing.py:133-137 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/tokens/hashing.py"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"db230157a5eae9ae2d991bf0e0af6100f8bd893abfdb42a06b547bf2df0619a9"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: PageIndexClient (LCOM4 6): PageIndexClient\u0027s methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/client.py"},"region":{"startLine":342}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc3c37810a4c7038a0caf5f70138eee8f114c342c8a67c239c6063adcdeaad45"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: pageindex/client.py: pageindex/client.py changed 67 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 59 in PageIndexClient.__init__ at line 562. 20 of those changes were fix/bug commits, and the other 47 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 10:36:49 \u002B08:00\u0027 --until=\u00272026-11-14 10:36:49 \u002B08:00\u0027 --full-history --no-merges -- pageindex/client.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/client.py"},"region":{"startLine":562}}}],"partialFingerprints":{"codehealthFindingId/v1":"07bb09e38171acfc6b9c143f83b093d5d51e960acd2b43dcb4116524825bf37a"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: pageindex/local_chat.py: pageindex/local_chat.py changed 39 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in local_chat._openai_agent at line 883. 10 of those changes were fix/bug commits, and the other 29 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 10:36:49 \u002B08:00\u0027 --until=\u00272026-11-14 10:36:49 \u002B08:00\u0027 --full-history --no-merges -- pageindex/local_chat.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/local_chat.py"},"region":{"startLine":883}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac54e98edf11cafb33ddc85646dae360af410e762521a00362b0102ea0362e24"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: pageindex/flash/api.py: pageindex/flash/api.py changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in api._page_index_flash at line 237. 5 of those changes were fix/bug commits, and the other 7 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 10:36:49 \u002B08:00\u0027 --until=\u00272026-11-14 10:36:49 \u002B08:00\u0027 --full-history --no-merges -- pageindex/flash/api.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/api.py"},"region":{"startLine":237}}}],"partialFingerprints":{"codehealthFindingId/v1":"c36bcbb3a5d0ba055ef81e93cc9b4836a2164a4b45d6fed01cbde5ad5853c2bc"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: pageindex/utils.py: pageindex/utils.py changed 25 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in SummaryScheduler.finish at line 1808. 10 of those changes were fix/bug commits, and the other 15 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 10:36:49 \u002B08:00\u0027 --until=\u00272026-11-14 10:36:49 \u002B08:00\u0027 --full-history --no-merges -- pageindex/utils.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/utils.py"},"region":{"startLine":1808}}}],"partialFingerprints":{"codehealthFindingId/v1":"080bcdb8204a6762d994491608008bd8f99702c872ed60d49eae31eeadd97d76"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: pageindex/local_api.py: pageindex/local_api.py changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in LocalAPI.submit_document at line 86. 5 of those changes were fix/bug commits, and the other 12 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 10:36:49 \u002B08:00\u0027 --until=\u00272026-11-14 10:36:49 \u002B08:00\u0027 --full-history --no-merges -- pageindex/local_api.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/local_api.py"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0c58621e031be54c02469057ffe46695732a2095069b71e43bc7bdaa80076f6"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: pageindex/tree_optimize.py: pageindex/tree_optimize.py changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in tree_optimize.optimize at line 925. 7 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 10:36:49 \u002B08:00\u0027 --until=\u00272026-11-14 10:36:49 \u002B08:00\u0027 --full-history --no-merges -- pageindex/tree_optimize.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/tree_optimize.py"},"region":{"startLine":925}}}],"partialFingerprints":{"codehealthFindingId/v1":"43826e6e4fa955e1a33ee873d51e0ee56774220aa5fe0bed2ac54131a763c312"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: pageindex/flash/parser_pdfium_charlevel/unicode_apply.py: pageindex/flash/parser_pdfium_charlevel/unicode_apply.py changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in unicode_apply._apply_font_unicode at line 21. 3 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 10:36:49 \u002B08:00\u0027 --until=\u00272026-11-14 10:36:49 \u002B08:00\u0027 --full-history --no-merges -- pageindex/flash/parser_pdfium_charlevel/unicode_apply.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/unicode_apply.py"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"31a0400a41e821ee50829902918b14687e995b9ab2642afbd23594cc9b566989"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: pageindex/flash/main.py: pageindex/flash/main.py changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in main.extract_toc at line 124. 2 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 10:36:49 \u002B08:00\u0027 --until=\u00272026-11-14 10:36:49 \u002B08:00\u0027 --full-history --no-merges -- pageindex/flash/main.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/main.py"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"97cb2d1a9077bdd2d9e75774354336dc5235cf3f12e0d98b6c7abc12801530cb"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: pageindex/flash/parser_pdfium_charlevel/char_extract.py: pageindex/flash/parser_pdfium_charlevel/char_extract.py changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in char_extract._extract_raw_chars at line 20. 3 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 10:36:49 \u002B08:00\u0027 --until=\u00272026-11-14 10:36:49 \u002B08:00\u0027 --full-history --no-merges -- pageindex/flash/parser_pdfium_charlevel/char_extract.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/char_extract.py"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b3cd3f6803f638244555319eaa2c58caf24b3f39bd7a66ea8b9378e2318737b"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: pageindex/integrations/claude_agent_sdk.py: pageindex/integrations/claude_agent_sdk.py changed 13 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 15 (its worst body is _Workflow._run at line 696), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix(chat): own-model chat drops a citation box on a page whose picture the call never saw (#673)\u201D; \u201Cfix: every route keeps its reasoning across tool calls, retries follow the official SDK rule, \u0022none\u0022 turns Claude\u0027s thinking off, Claude caches through gateways, claude-code/ summaries run as one workflow, and outgrown workarounds retire (#622)\u201D; \u201Cfix(claude): a missing login fails in one clear error, saying how to log in (#603)\u201D; \u201Cfix(claude): quiet the reaped-probe warning, name an old or missing Agent SDK (#600)\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 10:36:49 \u002B08:00\u0027 --until=\u00272026-11-14 10:36:49 \u002B08:00\u0027 --full-history --no-merges -- pageindex/integrations/claude_agent_sdk.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/integrations/claude_agent_sdk.py"},"region":{"startLine":696}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0cd3e81ebd30e9788c8a204455ed43ec3d8e7a038bb0587c4e702e610a93e14"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: pageindex/flash/parser_pdfium_parallel.py: pageindex/flash/parser_pdfium_parallel.py changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 12 (its worst body is parser_pdfium_parallel.parse_charlevel_meta_parallel at line 132), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix: every route keeps its reasoning across tool calls, retries follow the official SDK rule, \u0022none\u0022 turns Claude\u0027s thinking off, Claude caches through gateways, claude-code/ summaries run as one workflow, and outgrown workarounds retire (#622)\u201D; \u201Cfix: indexing failures surface loud, chat envelopes append verbatim (#421)\u201D; \u201Cfix: Aug 18-19 review hardening \u2014 five max-effort rounds across tools, chat, and flash (#413)\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 10:36:49 \u002B08:00\u0027 --until=\u00272026-11-14 10:36:49 \u002B08:00\u0027 --full-history --no-merges -- pageindex/flash/parser_pdfium_parallel.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_parallel.py"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"b493828e0883aa2d80b61107990556d3c5f79f5d26567b2453e4c19ed35433f2"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #1: If anonymized user #1 becomes unavailable, 20 significant file(s) lose their only recent owner: pageindex/local_chat.py, pageindex/agent_tools.py, pageindex/tree_optimize.py, pageindex/integrations/claude_agent_sdk.py, pageindex/flash/classification/header_footer.py, pageindex/flash/embedded_toc.py, pageindex/flash/api.py, pageindex/flash/outline_assembly/assembly.py (\u002B12 more). Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"053e36a0b8a4f7d69998ecbd71783285cb26d4e3f1aba7cf8cdd4f12429ab684"}},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d5b8f11381d61a58459ffc7c595fd52d09c03c711894a63a9578043d2338412b"},"taxa":[{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ddc49ef52c93f5d89390c80bf8f0444bb97743496eeea781d1b7fcf904a3ea48"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"565cb0a25235d1502010c8d34a025c6ae5aeb826c7d5e305b97bb45399050c67"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"fdd80ff4efa055538dc59aafc5e380459b7d05030fbc7ee936f19fa678b3e896"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3da0ac29c51eb4c97825431fba929cb163f1b2ca71dc0bdcca574df447813966"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b8b7c21505d0dfce59e03bfde35252da1f893ba2d1214245a8e80fbdb6addee1"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"a7ae1d2ab3286903b03bb4160104df43d15a582bbcacd842921da17d99d580fb"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"5faad27a02ea51a8591fe1ead21ee0a8ec4d9423e628f048342d8d200830c389"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"34a4be1c03dd0359d6a547b8cd7f9b530e5c88d734793c2d8a90a7528e1e44b4"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"28cb6e31468c520b938350eae6ead17eed6154be1d868d8ba3cf5a29573714f9"},"taxa":[{"id":"CWE-95","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ceed77bdec61049e1f334123d2c7a718f2e9094642ec9c34935f4fd66b4948c0"},"taxa":[{"id":"CWE-319","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A04:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"a566a90d3dd39c31330dfc2005300365e4ea3845a1f2bdb5a0104eb0442fd2c9"},"properties":{"dependency":{"package":"pypdf2","version":"3.0.1","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","PYSEC-2026-1835","PYSEC-2026-3008"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"eb00976a698a5d68999b7ee6d27206fd374e916853e7ff1ead5eed42386f043f"},"taxa":[{"id":"CICD-SEC-9","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"90f83b4fa27db32740afe9540c905f3c0499caed87f61049a8a903ecc95b41c3"},"taxa":[{"id":"CICD-SEC-8","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"5e4607103018ccbf4772504c4475df05c43062f243e17471503584c98dc62fdc"},"taxa":[{"id":"CICD-SEC-4","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"M2","level":"note","message":{"text":"No ADRs: No Architecture Decision Records found \u2014 no conventional ADR directory, no numbered \u0060NNNN-title\u0060 documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"670b3d6e36a756d63097d0dfbf90afd5fc761308800b9354894a07c3f4e4aa14"}},{"ruleId":"M2","level":"note","message":{"text":"No architecture diagram/doc: No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named \u0060architecture\u0060 or \u0060design\u0060 in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape \u2014 no \u0060## Architecture\u0060 heading, no \u0022architecture overview\u0022/\u0022high-level design\u0022 phrasing, no \u0022the architecture is \u2026\u0022 introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document \u2014 not evidence that nobody wrote the shape down."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"0c190e7c159d1850ee706c3ac4486e151e8a4fe169de4bf61436b9f399654f06"}},{"ruleId":"M3","level":"note","message":{"text":"No src/ separation: Most of the production code is in directories of its own, but 1 application file(s) sit at the repository root beside the build and tooling files (\u0060run_pageindex.py\u0060)."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"fdf7f5b24e313364d10170a5c2542959902fe0d26ed70edef3eaa10ec5bcdb1d"}},{"ruleId":"P3","level":"note","message":{"text":"Dependabot does not watch pip: \u0060.github/dependabot.yml\u0060 schedules updates, but no \u0060package-ecosystem\u0060 entry covers \u0060pip\u0060, which this tree depends on \u2014 so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entry to the \u0060updates:\u0060 list."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".github/dependabot.yml"},"region":{"startLine":2}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf68ee1ea2969cbbdae4336ca738b5320c565628ea6ee894219d523831dd0f17"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060block.char_count() \u003C= 1 and block.char_stats.secondary_slot != 4\u0060 appears character-identically in 2 files \u2014 pageindex/flash/heading_detection/page_scan.py, pageindex/flash/outline_assembly/cliques.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/heading_detection/page_scan.py"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"f833f0f7d633d6cc93f854633d2fa83cfd248ea932cca4f6d600af5429c39d7a"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060text.startswith(\u0022[\u0022) and text.endswith(\u0022]\u0022)\u0060 appears character-identically in 2 files \u2014 pageindex/flash/clustering/merge_rules.py, pageindex/flash/columns/gutters.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/clustering/merge_rules.py"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"562826ad86c131e9e182d9ea6de85bea9ab13c708f395821a36094e7e8c97506"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/_version.py"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fe43fcd646caf16ce83b6e0d55df0b51bdecf1959a0f9a8d08afac9cbe4fc6e"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/client.py"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"1eda20a33bca64476e19b426dcabe6d1fb92f7af0dc60b333c051a579af2ff5c"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/local_chat.py"},"region":{"startLine":762}}}],"partialFingerprints":{"codehealthFindingId/v1":"330fa642f15f1f25143a32ffdaaf1428fa189a9f0cce2bc3636753ad91f303de"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/local_chat.py"},"region":{"startLine":825}}}],"partialFingerprints":{"codehealthFindingId/v1":"496d84e078ae349855a3c5675bfb6e229ac33f97efcd44505195c9cbb4fbf129"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/local_chat.py"},"region":{"startLine":1257}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb9d0bd6d6198745ff8c0f4342632d290a1aa51e5c37689076187bbc23695dee"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/page_index_md.py"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"80ed71fbd5053db22fb64627c362367af7a98f49cd371a7d751da00737235fe3"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/utils.py"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec4fb7e3d7b8ad67c43f2ba9ce2fa7fa7c575ee49dadcfd4d06f8fd3fb017d73"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/utils.py"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"93bba5da88a44bfcd3dbb25fbc52e8559b0481b6e105a616b31063aee585c1ed"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/utils.py"},"region":{"startLine":515}}}],"partialFingerprints":{"codehealthFindingId/v1":"530e01cde73017622bf2d474df8f3b10b44d8af5f765db58c371095cd1b06ec0"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/utils.py"},"region":{"startLine":1336}}}],"partialFingerprints":{"codehealthFindingId/v1":"a29b76865305baa9c3adc7176c6234617c3fd5990f20cc4f07b0c06d61a21191"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/utils.py"},"region":{"startLine":1351}}}],"partialFingerprints":{"codehealthFindingId/v1":"63d41f63272df8e111812c5461426d7da8f7116a32dbfaf06ea650911dc37c79"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_parallel.py"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"62746944d5ff23589d668cb0dfbde87de05b8800dc8c16d06bbbbd06f732f169"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/char_extract.py"},"region":{"startLine":377}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d9a3554036a2b5aa13a55cec51ce040ea760f640d64fa6792395a5acca20097"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/char_extract.py"},"region":{"startLine":395}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6f37fc3084ecd43efdf7d8c5bad10e738872e58274b180866456e835e7e0b9d"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/char_extract.py"},"region":{"startLine":403}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa695e8beeb89c8b23d32be56595acc8d3637394207b95636af8cf96ade5a540"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/code_walk.py"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d55bdfd207ca6e6a7155740dc507db48ab660ec3d2a3b747a8c934b8d65824b"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/code_walk.py"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b5c9125dac0ef53241d7da4af5c13ab7ba916ed9310bc040a9322ed236b0497"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/font_unicode.py"},"region":{"startLine":383}}}],"partialFingerprints":{"codehealthFindingId/v1":"88553d233b530e1c961d5711b1a4aabab96b10071ca9b826375deaf73bf22911"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/font_unicode.py"},"region":{"startLine":410}}}],"partialFingerprints":{"codehealthFindingId/v1":"306e8fcd101a5543a99aa99909645bcc715be094c53a0f1e3ffd79d20f388135"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/pdf_objects.py"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"11d6336f3ddf001faf64d33621b054a8686ed3ef8a46951dd61c0ee2e790ad15"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of \u0060close()\u0060 masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: narrow the catch to the exception this release can actually raise, and record it through whatever this codebase already uses to report problems \u2014 or, if it truly cannot matter, say why in a comment on the catch."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/pdf_objects.py"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"8904173d22194a473848a2e12bb860fe953ddf843c0d4467b5d97d4780f8319e"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/pipeline.py"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cc8add4b86d79113c9ca42847bbc2f46e13982b7618d481ee31939e51b6a3de"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/pipeline.py"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e0c9c3e00ea744dc5ecca5b9a9d4928d1cf5ae2a06d186bd11ddf864aa2a446"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/pipeline.py"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"46f69128f9020456d0840c79563d00f7a71df3c5713cc98b040c2aa18afd7c0d"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/pipeline.py"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"12bc93a004e01176d1f8c43737c113eba00bc3eac3e06eb2ee4d041e5cbefb0e"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/unicode_apply.py"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"51efbb78fa1e447d738b849ea6952362deb912af7fb8282de0e6b64c46771055"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/flash/parser_pdfium_charlevel/unicode_apply.py"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea5513df2d71ecc994ae65b6b8d139e74a20b779a511292eba3695321164699a"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060warning\u0060 at line 354 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.warning(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.warning(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/utils.py"},"region":{"startLine":354}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a1e1d9d2012af860c269f3bb8e65fb3dd7e834266b923ae4e8769ad1c783457"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060error\u0060 at line 605 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.error(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.error(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/utils.py"},"region":{"startLine":605}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e6c4901a0359de8e84b93799e0bc44245a04efb76b04aab64fd30e6dc51e833"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060error\u0060 at line 654 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.error(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.error(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/utils.py"},"region":{"startLine":654}}}],"partialFingerprints":{"codehealthFindingId/v1":"433126563b752aa95313127d7aef7a36ff4125f37e461525d68c87abfbb7a144"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060error\u0060 at line 702 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.error(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.error(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/utils.py"},"region":{"startLine":702}}}],"partialFingerprints":{"codehealthFindingId/v1":"967e9359405063ee7903d394035ef91f2fea2f34cd29330c09fe5141b3a39867"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060error\u0060 at line 712 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.error(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.error(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/utils.py"},"region":{"startLine":712}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f5e069fffaa95b227d06e81663f639fce50d0acf32a158675c6734ac54893b8"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060sdk_version\u0060 swallows every exception into \u0060return \u00270.0.0\u0027\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/_version.py"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"74a8e4fc003cb22b8d5c1d1f131431c6204fcc45a4454ed4caa09a7a6be70d83"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on parse failure: \u0060_litellm_allows\u0060 returns \u0060set()\u0060 when \u0060(ValueError, SyntaxError)\u0060 is raised, with no log or raise \u2014 a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/local_chat.py"},"region":{"startLine":558}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ca22422590d0a67551248ee7609bc1d2307416ca16322f95557adee31891e1c"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060_sends\u0060 swallows every exception into \u0060return {}\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pageindex/utils.py"},"region":{"startLine":1336}}}],"partialFingerprints":{"codehealthFindingId/v1":"3afe654145a79985a053992acff79aa20916104127237aaac757dd2c3c98feb6"}}],"taxonomies":[{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d","organization":"MITRE","informationUri":"https://cwe.mitre.org/","isComprehensive":false,"shortDescription":{"text":"The MITRE Common Weakness Enumeration (CWE)."},"taxa":[{"id":"CWE-1357","guid":"e4d2e772-757e-0a5c-bd7d-77052949d866","name":"Reliance on Insufficiently Trustworthy Component","shortDescription":{"text":"Reliance on Insufficiently Trustworthy Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1357.html"},{"id":"CWE-1395","guid":"800e09e7-c11a-8654-9fa6-86f398995fed","name":"Dependency on Vulnerable Third-Party Component","shortDescription":{"text":"Dependency on Vulnerable Third-Party Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1395.html"},{"id":"CWE-259","guid":"ae9ad959-fbb6-9d5e-892d-3dca66da0b69","name":"Use of Hard-coded Password","shortDescription":{"text":"Use of Hard-coded Password"},"helpUri":"https://cwe.mitre.org/data/definitions/259.html"},{"id":"CWE-319","guid":"7af97476-9f0d-4458-9163-3d2043918a1a","name":"Cleartext Transmission of Sensitive Information","shortDescription":{"text":"Cleartext Transmission of Sensitive Information"},"helpUri":"https://cwe.mitre.org/data/definitions/319.html"},{"id":"CWE-353","guid":"09d7e902-d4ee-f05d-ae6c-0a1554d0c18f","name":"Missing Support for Integrity Check","shortDescription":{"text":"Missing Support for Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/353.html"},{"id":"CWE-494","guid":"b8a65e0d-e459-4a55-a931-fc1136482375","name":"Download of Code Without Integrity Check","shortDescription":{"text":"Download of Code Without Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/494.html"},{"id":"CWE-506","guid":"401d6455-56e3-0552-9a39-f77461673e3f","name":"Embedded Malicious Code","shortDescription":{"text":"Embedded Malicious Code"},"helpUri":"https://cwe.mitre.org/data/definitions/506.html"},{"id":"CWE-77","guid":"332c8ade-6612-9f56-a06b-d8d90b1a8750","name":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/77.html"},{"id":"CWE-78","guid":"2e31ceaf-c7ae-2e5e-9661-cfb1362789cf","name":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/78.html"},{"id":"CWE-79","guid":"fd45580b-e8c4-fc5e-8c2f-aa8fab0b4dbf","name":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)","shortDescription":{"text":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/79.html"},{"id":"CWE-798","guid":"5e8f057d-fee3-995a-a0cb-9fc5b0d174d1","name":"Use of Hard-coded Credentials","shortDescription":{"text":"Use of Hard-coded Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/798.html"},{"id":"CWE-829","guid":"13c33925-97fb-5a5e-b40c-56d328b8a4d7","name":"Inclusion of Functionality from Untrusted Control Sphere","shortDescription":{"text":"Inclusion of Functionality from Untrusted Control Sphere"},"helpUri":"https://cwe.mitre.org/data/definitions/829.html"},{"id":"CWE-89","guid":"6d08fdad-37eb-c150-bbf0-d7d946863407","name":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-937","guid":"16f316ae-415c-b354-a59b-1f7905f756e9","name":"Using Components with Known Vulnerabilities","shortDescription":{"text":"Using Components with Known Vulnerabilities"},"helpUri":"https://cwe.mitre.org/data/definitions/937.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Improper Control of Generation of Code (\u0027Code Injection\u0027)","shortDescription":{"text":"Improper Control of Generation of Code (\u0027Code Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"},{"id":"CWE-95","guid":"400bba4e-483c-5c50-a695-114fa9168003","name":"Improper Neutralization of Directives in Dynamically Evaluated Code (\u0027Eval Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Directives in Dynamically Evaluated Code (\u0027Eval Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/95.html"}]},{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61","version":"2025","organization":"OWASP Foundation","informationUri":"https://top10.owasp.org/2025/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10:2025 web application security risks."},"taxa":[{"id":"A03:2025","guid":"168e227c-7735-2e57-bc6e-997affe644c5","name":"Software Supply Chain Failures","shortDescription":{"text":"Software Supply Chain Failures"},"helpUri":"https://top10.owasp.org/2025/A03_2025-Software_Supply_Chain_Failures/"},{"id":"A04:2025","guid":"6a9f5bfd-1a56-6453-beec-a7eff0ba3007","name":"Cryptographic Failures","shortDescription":{"text":"Cryptographic Failures"},"helpUri":"https://top10.owasp.org/2025/A04_2025-Cryptographic_Failures/"},{"id":"A05:2025","guid":"87e86033-3231-8458-8e4a-5cb82743553a","name":"Injection","shortDescription":{"text":"Injection"},"helpUri":"https://top10.owasp.org/2025/A05_2025-Injection/"},{"id":"A07:2025","guid":"334ddd78-539d-d35c-83dd-253647eb7eaf","name":"Authentication Failures","shortDescription":{"text":"Authentication Failures"},"helpUri":"https://top10.owasp.org/2025/A07_2025-Authentication_Failures/"},{"id":"A08:2025","guid":"84b0c297-710e-9a5f-9335-936ecb260c36","name":"Software or Data Integrity Failures","shortDescription":{"text":"Software or Data Integrity Failures"},"helpUri":"https://top10.owasp.org/2025/A08_2025-Software_or_Data_Integrity_Failures/"}]},{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35","organization":"OWASP Foundation","informationUri":"https://owasp.org/www-project-top-10-ci-cd-security-risks/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10 CI/CD Security Risks."},"taxa":[{"id":"CICD-SEC-4","guid":"c859d8ea-8b24-a157-9406-94929c10397a","name":"Poisoned Pipeline Execution (PPE)","shortDescription":{"text":"Poisoned Pipeline Execution (PPE)"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-04-Poisoned-Pipeline-Execution"},{"id":"CICD-SEC-8","guid":"b6b2dacf-a168-4957-876e-a8c73ee00eb0","name":"Ungoverned Usage of 3rd Party Services","shortDescription":{"text":"Ungoverned Usage of 3rd Party Services"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-08-Ungoverned-Usage-of-3rd-Party-Services"},{"id":"CICD-SEC-9","guid":"b3d36727-0395-5b51-94c4-5e173d62eab3","name":"Improper Artifact Integrity Validation","shortDescription":{"text":"Improper Artifact Integrity Validation"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-09-Improper-Artifact-Integrity-Validation"}]}],"properties":{"codehealthPublication":{"public":true,"notice":"This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings \u2014 which rule fired, in which file, on which line, and how to fix it \u2014 are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.","securityFindingsRedacted":15,"secretScannerRunsExcluded":0}},"redactionTokens":["A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."]}]}