Skip to content

Admit a reply whose option has no label: give unnamed-card advice on pages only - #6359

Merged
leaf-agent merged 1 commit into
mainfrom
nightly/unnamed-card-advice-on-pages-only
Nov 18, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
nightly/unnamed-card-advice-on-pages-only

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

leaf thread reply refused a reply holding a compact option with no label, such as <lf-option><strong>A</strong> first.</lf-option>, though the registry allows that shape; the refusal listed the unnamed-card advice as its reason.

Cause: unnamed_card_advice (#6325) marks its findings as advice but ran inside instance_errors, which message admission shares with page check (check_markup → message_markup_errors → fragment_errors → instance_errors). Admission refuses on any finding, and a message has no channel for advice, as pane_advice already notes. Registry examples (composition._validate_example) went through the same path.

Fix: the advice now runs from validation/source.py:_instance_errors, beside pane_advice and inert_allocation_advice, so only a page's documents get it. page check reports it exactly as before. The docstring now says what the loop checks (a <strong> before any of the widget's own words, whatever elements come first) instead of how options were once written.

Test: test_a_reply_admits_an_option_that_leads_with_a_strong_and_no_label runs check_markup on such a reply; it fails on main with the unnamed-card refusal and passes here. test_check_advises_a_label_where_a_card_leads_with_a_strong still passes, so page check still gives the advice.

…pages only

unnamed_card_advice (#6325) ran inside instance_errors, which message
admission shares with page check. Admission refuses on any finding, so a
reply holding a compact <lf-option><strong>A</strong> ...</lf-option> with
no label was rejected, though the registry allows it. The advice now runs
from page check's _instance_errors beside pane_advice and
inert_allocation_advice; page check reports it as before, and a message's
admission and registry examples no longer see it.

The docstring now says what the loop checks (a <strong> before any of the
widget's own words, whatever elements come first) instead of how options
were once written.

Behavior change: a reply with an unlabelled option led by <strong> is
admitted; test_a_reply_admits_an_option_that_leads_with_a_strong_and_no_label
covers it.
@leaf-agent
leaf-agent merged commit 108bd75 into main Nov 18, 2026
5 checks passed
@leaf-agent
leaf-agent deleted the nightly/unnamed-card-advice-on-pages-only branch November 18, 2026 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant