Commit Graph

2 Commits

Author SHA1 Message Date
Michał Pierzchała edbd96ea30 refactor(contracts): additive capability facts pilot on touch family (#2420)
* refactor(contracts): make touch capability facts additive

The touch family's facts builder took one required cell per operation, so an
operation only one owner implements still cost a hand-written denial in every
other owner. The builder now takes the family's denial once, as `unsupported`,
and every operation cell is optional: an owner names what it implements and
omission reports that denial verbatim, with the reason and hint the owner would
otherwise have repeated per cell.

Omission stays a classified refusal, never an unclassified cell and never an
implied success: `unsupported` is required, so a call that leaves the family
blank does not compile. Facts are unchanged for every owner, so the per-platform
admission assertions hold untouched.

Refs #2412

* fix(contracts): keep tap/longPress/fill required in touch facts

Making every touch cell optional dropped the compile-time guard on the
three operations every owner implements, with nothing replacing it: an
owner could silently drop `tap` and nothing would fail. Only the truly
per-owner cells (tapRef, hover, hoverRef, fillRef, tapElementSelector)
need `unsupported` as their default.

Restoring the required fields caught a real regression this refactor
introduced: platform-web's touch facts had silently lost their explicit
`longPress: readinessUnavailable` cell, so longPress reported the
family's `unsupported` fallback instead of the owner's own readiness
reason. Restored it, and fixed the other now-required-field call sites
(the fully-unavailable owner fixtures, and the screenshot-runtime-fixture
test double, which had also silently lost its longPress/fill distinction).

Refs #2412

* fix(coverage): repoint hover evidence off the retired runtime.ts source line

The touch family's additive-facts refactor dropped every owner's explicit
hover: unavailable cell in favor of the family-level unsupported fallback,
so the coverage manifests' literal-substring checks against
packages/platform-apple/src/runtime.ts and packages/platform-linux/src/runtime.ts
broke: that source line no longer exists.

Point the macOS, iOS, tvOS, and Linux hover rows at new tests that assert the
typed unavailable denial directly against each owner's bound facts, instead of
re-adding a hand-written denial line the refactor was meant to retire.

Refs #2412

* test(coverage): point hover evidence at the typed-denial tests in the declaration table
2026-09-09 22:16:45 +02:00
Michał Pierzchała 9d7d60c5e0 test(coverage): declare every public command's coverage judgments once (#2418)
* test(coverage): declare every public command's six platform coverage judgments once

One row per public command in test/integration/command-coverage/declarations.ts
carries the android-emulator, ios-simulator, macOS, tvOS, web and Linux
classifications with the same fields the six per-platform manifests use today.
Each platform's Record<PublicCommand, ...> is projected from that table at load
time by a small per-platform view module, so no projected record is committed.

No judgment is derived from another platform's: all six stay authored per command.

* test(coverage): read the projected per-platform coverage view

The six coverage smoke tests, live harnesses and coverage reports now import the
platform view module that projects the declaration table. Both the depgraph
blast-radius query and the device-lane test follow the iOS and macOS paths.

* test(coverage): delete the six per-platform coverage manifests

Their rows now live once, per command, in the declaration table; each platform's
record is projected from it at load time.

* fix(check-affected): extend macos-coverage and integration-node ownership to command-coverage/

test/integration/command-coverage/declarations.ts now carries the per-command
coverage judgments that used to live directly under test/integration/macos-e2e/.
Its nested path wasn't matched by macosCoverageOwnership (top-level or macos-e2e/
only) or isNodeIntegrationPath (no nested segments), so it fell through to
vitest-related, which can't actually run its node --test consumers. Extend both
rules to also match test/integration/command-coverage/.
2026-09-09 15:55:00 +02:00