Skip to content

Nested API definition text incorrectly satisfies parent description #112

Closed

Description

@lanyue-llk

Nested API definition text can satisfy its enclosing definition's character floors even when the parent has no local description.

Reproduction HTML:

<dl><dt>parent()</dt><dd><dl><dt>child()</dt><dd>Child-only description.</dd></dl></dd></dl>

A definition contract declaring only parent() receives child() Child-only description. as the parent's body and incorrectly passes through public score_attempt/task_passed.

The exact pinned original source (lexmount/lexbench-webfetch@5a5b9367118dcc25f126ee16ef4de2d7c666f190) and current PR #81 give identical outcomes. _definition_html_events itself is byte-identical (SHA-256 bea622dd00a03c49b0b4112e24787c15ca4b51ae0d7e57bb8d80830cb9eb41cf). It emits the recursive dd.get_text() before a later child-heading event can restore ownership.

Repair the existing event owner so a nested API signature owns its own body. Preserve parent-local prose and legitimate nested parameter-definition lists; treating every nested <dl> as an API boundary would reject currently supported parameter descriptions. Controls verified in both original/current: nested-child-only false positive, genuine parent prose passing, sibling child excluded, nested parameter description passing.

Historical follow-up to PR #81 discussion_r4420481198. Deferred under the maintainer's instruction to keep this PR focused on migration and PR-introduced regressions.

Activity

  1. self-assigned this
    on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions