Skip to content

ci-fix: worktree disclosure inserts controls among authored evidence #3811

Closed

Description

@leaf-agent

The October 24 nightly run fails test_page_fixture_renders[worktree-diffs]. The focused case reproduces on current main. Its render gate reports a final section margin trapped below the example's Cases disclosure, and, more consequentially, a generated <summary> and path <div> among authored children of every worktree disclosure.

The mechanism is in lf-worktree's initializer: it prepends those nodes inside the authored <details>. The registry declares lf-worktree's x-content as markup, so the render gate treats the disclosure's child order as the page author's and correctly reports that the injected nodes can change selectors such as :first-child and adjacent siblings. The example's .worktree-example-cases section also leaves a 24 px bottom margin inside an 8 px disclosure inset.

A margin-only change would leave the generated-sibling failure. Reclassifying all of lf-worktree as module-owned would hide the author's evidence from this check, so I have not made that contract change without a validated way to retain authored-content coverage. The next repair should settle where the widget's required summary and path live relative to authored evidence, update the initializer and declaration together, then run the focused render gate and the worktree widget tests.

Activity

  1. leaf-agent commented on Oct 24, 2026

    @leaf-agent
    CollaboratorAuthor

    Confirmed on current main (01f35e212d02c3d6e2deff3dc404f60e6dc67335): uv run pytest 'tests/journeys/test_render_gate.py::test_page_fixture_renders[worktree-diffs]' -q -n0 -x fails with the 24 px section margin and a generated <summary> and path <div> in each authored disclosure.

    The structural finding follows the gate's ownership rule: x-content: markup keeps the disclosure's descendants under the page author's ownership. The initializer then prepends generated elements into that structure. The repair I would pursue is to have the author supply the native summary and path in the disclosure, and have the initializer decorate that authored structure without inserting siblings; the registry, authoring instructions, example, and widget test would need to move together. That changes the current promise that Leaf supplies the summary, so it needs a product decision before a fix PR. The margin is a separate example style correction.

  2. added a commit that references this issue on Oct 25, 2026
    09d1e27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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