Skip to content

An expectation for a subject whose observable is text - #17

Merged
pathscale merged 1 commit into
masterfrom
feat/present-expectation
Sep 7, 2026
Merged

pathscale merged 1 commit into
masterfrom
feat/present-expectation

Conversation

@pathscale

Copy link
Copy Markdown
Owner

Every assertion here that names a node also demands a non-zero box. That is right for a control, a panel or an icon. It is wrong for a heading, because a heading is exactly as wide as its line and exactly as tall as its shaped glyphs. On a host with no font registered it lays out at 1328x0, and a check about it fails while the engine did nothing wrong.

This is not hypothetical

All six of ps-blitz's activation fixtures report their outcome by appending a heading whose text says what happened — "Press saw true, left false" — and assert it with PaintsNamed. All fourteen checks failed the moment qa-inspect-host stopped enabling system-fonts in #15:

FAIL cancelled-click       FAIL checkbox-activation
FAIL controlled-checkbox   FAIL disabled-label
FAIL radio-set             FAIL switch-over-label

They had only ever passed because the host carried a font catalogue, which is precisely what a headless check must not need. The claim on record that they passed "against a host with no font at all" was measured against a host that had one.

What Present asks

Did the node the document was supposed to produce appear, with the name it was supposed to have, and was it laid out.

It stays falsifiable in the two ways that matter, and both are measured rather than asserted:

  • Repointing cancelled-click at heading:Not In This Document fails with no node matching "heading:Not In This Document" exists in the tree, while the other five fixtures still pass. So it discriminates rather than failing everything.
  • A node created but never laid out fails on the bounds.

What it deliberately does not claim is that glyphs reached the scene. That is a question about fonts rather than about the engine, and it cannot be asked on a machine that has none.

Paints and PaintsNamed are unchanged and remain correct for anything with a box of its own. They are stronger, and they cost nothing on a fontless host.

Breaking, hence 0.6.0

Adding a variant to a public enum stops a downstream match over Expect compiling. Minor bump rather than patch.

Verified

Against ps-blitz's suite, with a host built from this checkout and no system-fonts anywhere in its graph: 6 of 6 fixtures, 14 of 14 checks. The paired ps-blitz change is pathscale/ps-blitz#87, whose Debug control job builds ps-qa from this branch's master and cannot go green until this lands.

Every assertion here that names a node also demands a non-zero box. That is
right for a control, a panel or an icon, and wrong for a heading, because a
heading is exactly as wide as its line and exactly as tall as its shaped
glyphs. On a host with no font registered it lays out at 1328x0, and a check
about it fails while the engine did nothing wrong.

Not hypothetical. All six of ps-blitz's activation fixtures report their
outcome by appending a heading whose text says what happened -- "Press saw
true, left false" -- and assert it with `PaintsNamed`. All fourteen checks
failed the moment `qa-inspect-host` stopped enabling `system-fonts`. They had
only ever passed because the host carried a font catalogue, which is precisely
what a headless check must not need. The claim on record that they passed
"against a host with no font at all" was measured against a host that had one.

`Present` asks what those checks mean: did the node the document was supposed
to produce appear, with the name it was supposed to have, and was it laid out.

It stays falsifiable in the two ways that matter, both measured rather than
asserted. Repointing `cancelled-click` at `heading:Not In This Document` fails
with "no node matching ... exists in the tree" while the other five fixtures
still pass, so it discriminates. A node created but never laid out fails on the
bounds. What it deliberately does not claim is that glyphs reached the scene:
that is a question about fonts, not about the engine, and there is no way to
ask it on a machine that has none.

`Paints` and `PaintsNamed` are unchanged and remain correct for anything with a
box of its own. They are stronger, and they cost nothing on a fontless host.

Minor bump rather than patch: this adds a variant to a public enum, so a match
over `Expect` in a downstream crate stops compiling.

Verified against ps-blitz's suite with a host built from this checkout and no
`system-fonts` anywhere in its graph: 6 of 6 fixtures, 14 of 14 checks.
@pathscale
pathscale merged commit 440960d into master Sep 7, 2026
4 checks passed
@pathscale
pathscale deleted the feat/present-expectation branch September 7, 2026 04:08
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