harbor run -t openthoughts/tasktrove-exp-rle-heavy-padding-v2-5k-heavy-4728harbor download openthoughts/tasktrove-exp-rle-heavy-padding-v2-5k-heavy-4728Note: This padding is intentionally noisy. The real requirements are buried under layers of noise, but you can extract them by focusing on the sections labeled ORIGINAL TASK and the bullet points beneath.
mild A quick backstory: the team was debugging a UI feature while debating the meaning of “tree traversal” at 3 a.m. The noise later became part of the repository’s charm, and now you must sift through it to find the actual task.
moderate Context: The project grew from a tiny HTML toy to a tiny HTML toy with tests that expect precise string representations. In the wild, developers often mix test fixtures with legitimate code, and that’s exactly what happened here: fixtures html_ast.md and html_round_trip.md expect a deterministic textual form, while there’s a pit of red herrings about broader HTML tooling, CSS selectors, and “document models” that you must ignore for this task. Bonus red herring: a microservice blueprint was added in a separate branch to derisk the parser, but the tests only care about the AST API below. The important thing is to implement a lightweight parser and renderer with the exact API shape described, not to wire it to external services or libraries.
heavy During implementation, you may encounter confusing logs and stray snippets that have nothing to do with HTML parsing. For example, consider the following unrelated snippet, which some teams stash as a reminder to optimize recursion in other domains:
def quicksort(arr): if len(arr) <= 1: return arr pivot = arr[len(arr) // 2] left = [x for x in arr if x < pivot] middle = [x for x in arr if x == pivot] right = [x for x in arr if x > pivot] return quicksort(left) + middle + quicksort(right)
Or a pseudo-log trail you might see in a CI job:
[INFO] job=lint run_id=7894 status=started [WARN] potential-issue: unused-variable 'tmp' [INFO] job=lint run_id=7894 status=completed [DEBUG] cache_hits=42; modules_loaded=7; time_ms=1284
If you’re trying to focus, pretend those lines don’t exist. The real objective is solely the HTML AST and test fixtures described below, not the side projects or the noisy CI traces.
ORIGINAL TASK: Task: Implement a lightweight HTML AST parser and renderer with walk, find, and per-tag render override support.
What you need to build
Data model (minimum Requirements)
Parsing and representation details
API surface to implement
Acceptance criteria (mapping to the tests)
Constraints and guidance
How to validate
This task focuses on building a small, self-contained HTML AST with traversal, rendering overrides, and simple querying capabilities that align with the tests’ expectations.