Project
cortex
Description
When clean_html removes images under certain settings, it parses the DOM and walks all descendants in a loop that performs no meaningful mutation, allocates an unused string, and then relies on remove_tags for the real work. This is wasted CPU and complexity on hot paths (scraping), and suggests an incomplete refactor. While not always user-visible, it is a maintainability and performance smell.
Error Message
Debug Logs
System Information
Screenshots
https://github.com/springoliver/bounty_challenge_report_image/blob/main/49115.png
Steps to Reproduce
- Open the affected cortex command or screen.
- Execute the exact input pattern named in this issue title and narrative.
- Compare actual output against the expected contract documented by the reporter.
Expected Behavior
The reporter expects cortex to match documented CLI/TUI contracts for this flow—correct output, honest flags/help, and no silent contradictions—consistent with the problem statement at the top of this rewrite.
Actual Behavior
When clean_html removes images under certain settings, it parses the DOM and walks all descendants in a loop that performs no meaningful mutation, allocates an unused string, and then relies on remove_tags for the real work. This is wasted CPU and complexity on hot paths (scraping), and suggests an incomplete refactor. While not always user-visible, it is a maintainability and performance smell.
Additional Context
No response
Project
cortex
Description
When
clean_htmlremoves images under certain settings, it parses the DOM and walks all descendants in a loop that performs no meaningful mutation, allocates an unused string, and then relies onremove_tagsfor the real work. This is wasted CPU and complexity on hot paths (scraping), and suggests an incomplete refactor. While not always user-visible, it is a maintainability and performance smell.Error Message
Debug Logs
System Information
Screenshots
https://github.com/springoliver/bounty_challenge_report_image/blob/main/49115.png
Steps to Reproduce
Expected Behavior
The reporter expects cortex to match documented CLI/TUI contracts for this flow—correct output, honest flags/help, and no silent contradictions—consistent with the problem statement at the top of this rewrite.
Actual Behavior
When
clean_htmlremoves images under certain settings, it parses the DOM and walks all descendants in a loop that performs no meaningful mutation, allocates an unused string, and then relies onremove_tagsfor the real work. This is wasted CPU and complexity on hot paths (scraping), and suggests an incomplete refactor. While not always user-visible, it is a maintainability and performance smell.Additional Context
No response