Skip to content

Refuse an Ask that registers no Question - #2448

Merged
max-sixty merged 4 commits into
mainfrom
ask-holds-a-question
Oct 12, 2026
Merged

max-sixty merged 4 commits into
mainfrom
ask-holds-a-question

Conversation

@max-sixty

@max-sixty max-sixty commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

leaf page check now refuses an lf-ask that registers no Question. A page went out with four Asks whose lf-options lacked choose: each read as a question, but the banner counted none of them and the user could answer none. The check passed because #2240 dropped the old exactly-one-source rule so an Ask could frame several Questions, and nothing kept its lower bound.

The rule lives in question_context_errors (skills/leaf/scripts/leaf/validation/instances.py), so it covers page source and thread message markup alike, and it reads declarations only: an x-question-context region needs at least one x-awaits widget, outside an x-exhibit, whose nearest context is that region and which asks or was retired. The error names what each framed widget lacks, for example <lf-options id="pick"> (line 12) asks only where choose is present.

A retired Question keeps its context. x-awaits gains retired, naming the flag an author sets to end a Question already asked; lf-options declares "retired": "settled", and registry validation requires when to read that flag's presence as not asking, so retirement and registration agree. The review-queue and comparison fixtures and the corpus keep settled decisions inside their Asks. A when condition a recorded value writes counts too, since a gesture can still meet it, and an Ask quoted inside an exhibit is exempt. references/packages.md documents retired and the rule.

Behavior changes in tests: an empty lf-ask was asserted valid and is now refused. The shared PAGE fixture framed a choose-less lf-options in an lf-ask, the incident's shape; it is now a div with the same id. Two server tests' added Asks gain choose, and one render case drops a nested Ask around a draft without needed.

This was written by Claude Code on behalf of max-sixty

A page went out with four lf-ask regions whose lf-options lacked choose: each
read as a question, the banner counted none, and the user could answer none.
`page check` passed because #2240 dropped the exactly-one-source rule to let an
Ask frame several Questions, and nothing kept its lower bound.

question_context_errors now refuses an x-question-context region that frames no
asking x-awaits widget, naming what each framed widget lacks. A when condition
that only requires an attribute absent (settled) is how a decision already
asked is retired, so a settled source keeps its context; one a recorded value
writes can still be met by a gesture. A quoted Ask stays exempt.

Behavior change in tests: an empty lf-ask was asserted valid and is now
refused. The shared PAGE fixture framed a choose-less lf-options in an lf-ask
(the incident's shape) and is now a div with the same id; two server tests'
added Asks gain choose, and one render case drops a nested Ask around a draft
without needed.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
leaf-agent previously approved these changes Oct 11, 2026

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The values != [False] exception in unasked leaves the original empty-Ask failure open for package widgets. A widget may declare x-awaits.when as {"needed": [false]}. When its needed flag is present, canonical asking returns false, but question_context_errors returns no error for an Ask containing only that widget; I reproduced both readings with this validator. A false-only predicate does not itself say the Question was previously asked. The retirement allowance needs an explicit basis that agrees with Question registration, so a never-asking source cannot satisfy the context check.

The context check counted a widget failing only an absence-requiring `when`
condition as a retired Question. That reads retirement off the predicate's
shape: a widget whose flag stops it asking from the start would satisfy an Ask
it never asked in.

`x-awaits.retired` now names the flag an author sets to end a Question already
asked (lf-options: settled), and registry validation requires `when` to read
that flag's presence as not asking, so retirement and registration agree.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit fff472f into main Oct 12, 2026
3 checks passed
@max-sixty
max-sixty deleted the ask-holds-a-question branch October 12, 2026 02:30
leaf-agent added a commit that referenced this pull request Oct 12, 2026
The [failed main
run](https://github.com/max-sixty/leaf/actions/runs/38196042452) hit
three parameterizations of
`test_command_hub_an_absorbed_input_stays_fulfilled`: its honoring
revision removed `needed` from the only draft inside an `lf-ask`, so the
new check from #2448 correctly refused the empty Question context. The
test now changes that Ask to a plain region when the draft becomes
optional editing. It still verifies that the recorded answer remains
reviewable at `1/5` after the revision.

The three cases failed on current `main` before this edit and pass after
it (`uv run pytest tests/test_render_projection.py -q -n0 -k
test_command_hub_an_absorbed_input_stays_fulfilled`). This repairs the
test fixture; the validator's lower bound remains intact.

---------

Co-authored-by: leaf-agent <[email protected]>
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.

2 participants