Skip to content

test(coverage): split gap rows into owed work and accepted limitations - #3717

Merged
thymikee merged 2 commits into
mainfrom
maint/coverage-gap-rule
Oct 16, 2026
Merged

thymikee merged 2 commits into
mainfrom
maint/coverage-gap-rule

Conversation

@thymikee

@thymikee thymikee commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Summary

One rule for platform command-coverage gaps: every gap row is either owed work (known-gap, carrying a trackingIssue that names an open owning issue) or an accepted limitation (new accepted-gap level, carrying a non-empty reason why no evidence lane will cover it and no tracking issue). A shared manifest gate, assertCoverageGapRowsAreOwned, enforces both, mirroring the gap: waiver rule ADR 0011 already enforces for interaction guarantees.

Linux's 9 gap rows and web's 1 pointed at the closed #1915 and #1900; each now states its permanent limitation as an accepted limitation, and the closed constants are removed:

  • Linux shutdown, logs, install, reinstall, push, record, install-from-source: the Linux runtime declares those operation families unsupported-platform-leaf (verified via inspectFacts), so the commands refuse at admission and no lane can observe success.
  • Linux artifacts: local-CLI lane outputs are caller-owned paths; request finalization only inventories remote-transport artifacts or the sparse-snapshot fallback screenshot, which no Linux lane observes.
  • Linux trace: handleTraceCommand never binds a device runtime, and neither Linux lane carries a trace step.

macOS moves doctor, shutdown, events, trace, and react-native to accepted limitations, each reason checked against the lanes (the replay and both provider scenarios carry no such step); find, fill, type, focus, longpress, swipe, diff, batch, test, and replay stay known-gap on the open #1916, so the one-constant assertion still holds. tvOS keeps all 38 rows as owed work on #1914 (fact inspection shows those operations are admitted on tvOS; none is clearly not applicable). Test-only; no runtime behavior. 10 files touched, all in test/integration/command-coverage/ with its platform manifests and smoke tests.

Validation

Tested at 8f4a7b7aa99d1a88f2a609062b805e8e26e6164f. Planted-red proof under the new rule before reclassification: a known-gap row without a tracking issue failed with macOS replay: a known-gap row must carry a tracking issue that owns the work; an accepted row with an empty reason failed with macOS trace: an accepted-gap row must carry a non-empty reason. Both reverted; all six coverage suites then passed (Linux 6, web 8, macOS 7, tvOS 7, Android 10, iOS 14), and the web entry type dropping its known-gap variant makes a regressed row a compile error.

pnpm check:affected --run --head 8f4a7b7aa — all runnable checks passed with exactCommit=true (format, lint, typecheck, fallow, integration-node, macos-coverage, vitest-related; device/GitHub-authoritative lanes are CI's obligation). At the first head 2f9c56f, pnpm check:affected --run --head 2f9c56f1a passed the same way and CI went green after one rerun of an unrelated iOS deep-link flake (APP_NOT_RUNNING in the fixture smoke). Published classification summaries are unchanged in all four buckets. Not device-facing; no device run applies.

Refs #1914 #1916

🤖 Generated with Claude Code

Every coverage-gap row is now one of two kinds: a known-gap row is owed
work and must carry a tracking issue that owns it; a new accepted-gap
row states a non-empty reason why no evidence lane will cover it and
has no tracking issue. Enforce both in a shared manifest gate.

Linux (9 rows) and web (1 row) carried rows pointing at closed issues
#1915 and #1900; each states its permanent limitation instead, so the
closed constants are removed. macOS moves doctor, shutdown, events,
test, trace, and react-native to accepted limitations per the #1916
decision, keeping the scheduled interaction rows on the open umbrella.
tvOS keeps all 38 rows as owed work on #1914.
@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 5.30 MB 5.29 MB -2.3 kB
Package (unpacked) 5.30 MB 5.29 MB -2.3 kB
Package (download) 1.59 MB 1.59 MB -565 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 28.5 ms 28.8 ms +0.4 ms
CLI --help 79.2 ms 80.1 ms +0.9 ms

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 10 files

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread test/integration/support/coverage-classification.ts
Comment thread test/integration/command-coverage/declarations.ts
@thymikee

Copy link
Copy Markdown
Member Author

The macOS test row is now an accepted gap with the reason that no lane asserts the test command's suite result and JUnit output, and that reason is false (reviewed at 2f9c56f). The macOS replay gate runs agent-device test test/integration/replays/macos with --report-junit and gates on its exit status (macos.yml:149, test:replay:macos in package.json). So this row records a closeable gap as a permanent limitation, and #1916 loses it. That is the silent move from owed to accepted that this PR is meant to prevent. Please make the rule that an accepted-gap reason may only claim an absence that holds against the repo's lanes. Either cite the replay:macos lane as live or contract evidence for test, or leave the row as known-gap on #1916. Then check all six macOS rows moved here (doctor, shutdown, events, test, trace, react-native) against the lanes and daemon tests their reasons assume.

Not blocking, and you can take or leave these: the PR body says the six macOS rows moved "per the #1916 decision", but #1916 is open, still lists them, and records no such decision, so please update that issue or link the decision. Linux shutdown, logs, install, reinstall, push, record and install-from-source are admission refusals that web already pins with web.contract and an owning test, so assertions in packages/platform-linux/src/runtime.test.ts cited with linux.contract would fail if Linux later gains one of them.

The open thread on declarations.ts:408 still stands and is the same issue as above. The thread on coverage-classification.ts:50 does not apply: an offline unit gate cannot check whether an issue is open, the closed #1900 and #1915 constants are deleted, and the remaining constants are fixed values in evidence.ts, so please resolve it.

CI is still running, with ten jobs queued or in progress and no failures yet, so I can't attribute anything to this change. There are no conflicts. I did not run the coverage suites or check:affected, so the planted-red and green claims in the PR body are unverified. I also did not check the macOS reasons for doctor, events, trace and react-native against daemon tests, or the Linux trace and artifacts claims against handler code. Before merge, please fix or drop the false macOS test reason, audit the other five rows, and let CI finish green.

… accepted reasons

The CI macOS replay lane runs agent-device test with --report-junit and
gates on its exit status, so the test row is closeable with real lane
evidence and stays known-gap on #1916. Each accepted-gap reason now
states the absence it claims against the repository's lanes, and the
gate's docstring encodes that rule.
@thymikee

Copy link
Copy Markdown
Member Author

Fixed in 8f4a7b7 (gate result will be recorded in the body when it completes at that head):

  • macOS test: back to known-gap on test: close macOS platform command-coverage gaps from #1426 #1916. The replay-macos gate exits nonzero on suite failure, so the gap is closeable with existing evidence and was exactly the silent owed-to-accepted move this PR guards against.
  • The rule you stated is now written into assertCoverageGapRowsAreOwned: an accepted-gap reason may only claim an absence that holds against the repository's lanes.
  • Audited the remaining five macOS rows and the ten Linux/web rows against their lanes and handlers: the macOS replay and both provider scenarios carry no doctor, events, trace, or react-native step (grep at this head); handleTraceCommand has no bindDevice/inspectFacts call; the Linux command-evidence lane's command list contains no trace step. The reasons now state those absences concretely instead of inferring them.
  • Decision link: the macOS split follows the maintainer decision recorded at test: close macOS platform command-coverage gaps from #1426 #1916 (comment); test: close macOS platform command-coverage gaps from #1426 #1916 itself stays as the coordinator's to update, per the campaign rule that issue posts go through them.
  • On the non-blocking Linux suggestion (convert admission refusals to linux.contract rows citing new runtime.test.ts assertions): left as accepted gaps, because test: close Linux platform command-coverage gaps from #1426 #1915 was closed with the row set as the disposition and adding Linux fact assertions across seven families is the follow-up that closes those rows properly — worth a child issue if you want them as contract rows rather than limitations.
  • CI: green at 2f9c56f after one rerun of an unrelated iOS deep-link flake (APP_NOT_RUNNING in the fixture smoke, no coverage-file involvement); same failure twice would have been treated as a finding.

@thymikee

Copy link
Copy Markdown
Member Author

This PR is ready at 8f4a7b7. The earlier findings from 2f9c56f are fixed: the macOS test row is now a known gap on #1916, and the closed #1900 and #1915 constants are gone.

Not blocking: the five remaining macOS accepted-gap reasons in declarations.ts (doctor, shutdown, events, trace, react-native) are prose claims like "no macOS lane invokes the command". They are true now, and a later lane that adds one of these commands would be forced to make a live claim, but the reason text would not be rechecked on its own (Linux trace is the same). You can update #1916 to drop the five rows, or link the decision comment in the PR body, or leave it.

Of the open review threads, the P2 on the macOS test row is fixed at this head and can be resolved. The P2 on the offline issue-open check does not apply: an offline gate cannot check whether an issue is open, the closed constants are deleted, and coverage-classification.ts enforces the link as ADR 0011 does, so it can be resolved too.

Smoke Tests is still running at 8f4a7b7. The diff touches only the coverage manifests, the classification helper and the coverage smoke tests, so a failure outside a coverage suite would most likely be unrelated. The last head's only failure was an iOS deep-link fixture flake (APP_NOT_RUNNING). There are no conflicts. The only thing left before merge is for Smoke Tests to finish green.

I did not run the coverage suites, check:affected or the planted-red proofs, so those PR-body claims are unverified. I checked the "pinned by daemon tests" clauses only for events and trace, not doctor. I did not recheck the Linux unsupported-platform claims from the earlier review.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Oct 16, 2026
@thymikee
thymikee merged commit 4db1b7d into main Oct 16, 2026
17 checks passed
@thymikee
thymikee deleted the maint/coverage-gap-rule branch October 16, 2026 15:41
@github-actions

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-10-16 15:42 UTC

thymikee added a commit that referenced this pull request Oct 16, 2026
#3720 added the uninstall row with `linux.gap(...)` after #3717 had removed the Linux
known-gap builder, so main fails to load the coverage manifest
(`TypeError: linux.gap is not a function`). Uninstall belongs to the app-deployment family
the Linux runtime leaves unavailable, so it is an accepted limitation like install,
reinstall and install-from-source.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: close Linux platform command-coverage gaps from #1426

1 participant