Skip to content

Command route tests receive undefined command keys #5073

Closed

Description

@leaf-agent

Push run 41395985405, at 5d7e533eb225, records the following failures.

The route probe expects x:1 and gets undefined:1; Escape becomes undefined in the key-owning widget; the native-form probe gets [None, None]; the floating-panel callback records no command key. Compare the public callback contract with these fixtures. Similar symptoms are leads; establish the shared mechanism before consolidating a repair.

  • tests.browser.controls.test_command_routes::test_route_corner_hint_overrides_the_rows_face_in_obligation_and_widget: AssertionError: Locator expected to have text 'x:1' Actual value: undefined:1 Call log: - Expect "to_have_text" locator("#probe output") with timeout 120000ms - waiting for locator("#probe output") 240 × locator resolved to undefined:1 - unexpected value "undefined:1" Aria snapshot: - status: undefined:1
  • tests.browser.navigation.test_key_scopes::test_a_text_box_keeps_its_keys_from_the_widget_around_it: AssertionError: Locator expected to have attribute 'Escape' Actual value: undefined Call log: - Expect "to_have_attribute" locator("#key-owning-widget") with timeout 120000ms - waiting for locator("#key-owning-widget") 243 × locator resolved to
    …
    - unexpected value "undefined" Aria snapshot: - textbox
  • tests.browser.navigation.test_key_scopes::test_a_command_button_owns_activation_and_the_native_form_default: AssertionError: assert [None, None] == ['2', '2'] At index 0 diff: None != '2' Full diff: [ - '2', - '2', + None, + None, ]
  • tests.browser.test_render_floating_panel::test_a_pointer_folds_the_panel_from_its_corner: AssertionError: assert None == 'panel.floating.fold' + where None = evaluate('window.invoked') + where evaluate = .evaluate
Representative failing boundary
browser = <render_harness.WatchedBrowser object at 0x7f2d546b0b30>
serve = <function serve.<locals>.go at 0x7f2d56815bc0>

    def test_route_corner_hint_overrides_the_rows_face_in_obligation_and_widget(
        browser, serve
    ):
        """Explicit null chooses a corner hint instead of inheriting the row's face.
    
        Obligation forwarding and the intrinsic route must preserve that choice and merge into
        one hint when both bindings reach the same original command.
        """
        registry = {
            "lf-verdict": {
                key: value
                for key, value in SEATED_OBLIGATION_LAYER["lf-verdict"].items()
                if key != "x-thread-seat"
            }
        }
        page = open_page(
            browser,
            serve(
                leaf_page(
                    "route hint override",
                    '<h1>Inspection</h1><lf-ask id="question"><h2>Inspect this?</h2>'
                    '<lf-verdict id="probe" asks>The proposal.</lf-verdict></lf-ask>',
                ),
                layer_registry=registry,
                layer_widgets={"lf-verdict.js": ROUTE_HINT_OVERRIDE_MODULE},
            ),
        )
        control = page.get_by_role("button", name="Inspect", exact=True)
        inherited = page.locator("#probe kbd")
        chip = page.locator(".lf-command-binding-badges .lf-command-binding-badge")
        result = page.locator("#probe output")
    
        page.keyboard.press("m")
        expect(page.locator("#question")).to_be_focused()
        expect(chip).to_have_text("1")
        expect(chip).to_be_visible()
        expect(inherited).to_be_hidden()
        page.keyboard.press("1")
>       expect(result).to_have_text("x:1")
E       AssertionError: Locator expected to have text 'x:1'
E       Actual value: undefined:1 
E       Call log:
E         - Expect "to_have_text" locator("#probe output") with timeout 120000ms
E         - waiting for locator("#probe output")
E           240 × locator resolved to <output data-lf-gen="1" data-lf-offer="" class="lf-ui lf-ui-face">undefined:1</output>
E               - unexpected value "undefined:1"
E       
E       Aria snapshot:
E       - status: undefined:1

/home/runner/work/leaf/leaf/tests/browser/controls/test_command_routes.py:920: AssertionError

This session read the CI evidence but ran no local reproduction. Reconcile current main, later repairs and active work first; reproduce the focused boundary and read the introducing change’s intent before choosing a repair. Preserve the user behavior, and distinguish a stale test contract from a product regression. A passing attempt alone does not retire an intermittent failure.

Cause of a failure tracked in #3985.

Activity

  1. added
    tend-ci-cause
    on Nov 2, 2026
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

    tend-ci-cause

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions