Repository navigation
Closed
Labels
app/lab-ops-hubPackage/app: lab-ops-hub (pkgs/ or apps/ in this repo)Package/app: lab-ops-hub (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day of workMedium: expected under 1 day of workkind/bugSomething isn't working (prefixed form of the classic bug label)Something isn't working (prefixed form of the classic bug label)meta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)Ordinary priority (the default)source/queue-workerFiled or worked by the queue/worker pilotFiled or worked by the queue/worker pilottask/triageQueue packet kind: verify, reproduce, and route this itemQueue packet kind: verify, reproduce, and route this item
Description
Problem
The lab-ops-hub Worker-fallback extractor (pkgs/lab-ops-hub/src/lib.ts, extractHtml) only treats script/style/title as raw-text/RCDATA elements. The container Extractor (Python html.parser) also treats textarea, iframe, xmp, noembed, and noframes as CDATA elements, so literal markup inside them is misparsed by the Worker fallback — worse, it can activate real tag handling: a literal <script> inside a textarea starts script skipping and swallows the rest of the article.
Found by Codex review round 4 on PR #3918 (comment 4437512018), dispositioned there as a follow-up because adding parser modes is larger than a review-fix round. Sibling of #569.
Evidence (verified against the container Extractor, Python 3.13.13)
Input: <textarea><script></textarea><p>Article body</p>
- Container: text
<script> Article body - Worker fallback: empty text (the literal script tag activates skip mode and discards the body)
Scope
- Add CDATA-mode handling for textarea, iframe, xmp, noembed, noframes matching HTMLParser's behavior (only the matching close tag ends the region; content is character data — note textarea content is text that IS extracted, per the example, unlike script/style whose content is skipped).
- Careful with the title distinction: title/textarea content contributes text (title to the title field, textarea to body text); script/style/iframe/xmp/noembed/noframes content does not — verify each element against the container before pinning fixtures.
- Add shared parity fixtures (test/extractor-fixtures.json) for the example plus one fixture per element; both suites (node + python) green.
Acceptance
- The example above produces identical {title, links, text} from the Worker fallback and the container Extractor.
- Fixtures pin container-verified behavior for textarea, iframe, xmp, noembed, noframes.
Acceptance criteria
- The Worker-fallback extractor (
pkgs/lab-ops-hub/src/lib.ts,extractHtml) treats textarea, iframe, xmp, noembed, and noframes as CDATA/raw-text regions matching Pythonhtml.parser: only the matching close tag ends the region. - Filed evidence case: input
<textarea><script></textarea><p>Article body</p>yields text<script> Article bodyfrom the Worker fallback, identical to the container Extractor. - Differential tests cover each of the five elements (literal markup inside, script-tag-in-textarea, unterminated region) against the container Extractor's output.
- Existing extractor test suites (Worker and container) pass; script/style/title behavior is unchanged.
Metadata
Metadata
Assignees
Labels
app/lab-ops-hubPackage/app: lab-ops-hub (pkgs/ or apps/ in this repo)Package/app: lab-ops-hub (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day of workMedium: expected under 1 day of workkind/bugSomething isn't working (prefixed form of the classic bug label)Something isn't working (prefixed form of the classic bug label)meta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)Ordinary priority (the default)source/queue-workerFiled or worked by the queue/worker pilotFiled or worked by the queue/worker pilottask/triageQueue packet kind: verify, reproduce, and route this itemQueue packet kind: verify, reproduce, and route this item
Activity
dezren39 commentedon Nov 1, 2026
Intake review
<script>inside a textarea currently activates the fallback's script-skipping and silently discards the rest of the article, so stored text depends on which crawl path ran.titleis RCDATA (entities decoded) while textarea is RCDATA too in HTML5 buthtml.parsertreats these as CDATA — match the container's behavior, not the spec's, since parity with the container is the goal.extractHtmlfrom the script/style/title set to the container's full CDATA element set, keyed on the matching close tag, and add the filed evidence input plus per-element cases to the differential fixtures.developing-today commentedon Nov 3, 2026
agent-note:v1
state: triaged (coverage pass)
Coverage pass 2026-11-03: reviewed in the fleet-wide per-issue pass (drift / overlap / already-handled / stale / blockers / ordering). Verdict: still live; queued in repo-health-code-pilot as triage at priority 40 (priority/normal). If this is already handled at current main, the triage closes it with evidence; if it needs splitting, the triage files the split.
Found via: coverage pass 2026-11-03
23 remaining items
dezren39 commentedon Nov 4, 2026
🤖 Agent note · picked up
queue/8964-4008-rcdata-paritydezren39 commentedon Nov 4, 2026
🤖 Agent note · parked
production-line-guard/basic).dezren39 commentedon Nov 4, 2026
🤖 Agent note · picked up
Merge pull request #5228 from developing-today/queue/8964-4008-rcdata…
dezren39 commentedon Nov 4, 2026
🤖 Agent note · done