Skip to content

test(daemon): one typed conformance helper for the daemon runtime suites - #2298

Merged
thymikee merged 1 commit into
mainfrom
claude/test-daemon-runtime-family-conformance
Sep 5, 2026
Merged

test(daemon): one typed conformance helper for the daemon runtime suites#2298
thymikee merged 1 commit into
mainfrom
claude/test-daemon-runtime-family-conformance

Conversation

@thymikee

@thymikee thymikee commented Sep 5, 2026

Copy link
Copy Markdown
Member

Summary

Nine src/daemon/__tests__/*-runtime.test.ts suites (back, home, app-switcher, focus,
viewport, orientation, tv-remote, type, diff) repeated the same "rejects an unavailable
exact-owner fact before binding" mechanics by copy. runtime-binding-conformance.ts is the
one typed helper carrying those mechanics (mock facts, inspect-then-refuse assertions); each
suite keeps its own expected table (device, unavailable fact, owner-specific refusal wording).
runtime-binding-conformance-completeness.test.ts cross-checks the shared table against the
command registry's runtime-use declarations in both directions, and a new app-switcher-runtime.test.ts
fills a gap the completeness check surfaced. Rebasing onto current main also surfaced swipe
as a new single-use interaction-route command; it now has its own conformance entry (via the
shared gesture-runtime.ts resolver) so the completeness check stays green.

Validation

Focused checks (all green on the final commit):

  • npx vitest run --project unit-core src/daemon/__tests__ — 183 files, 1331 tests
  • pnpm check:quick (oxlint + tsc across all packages) — clean
  • node scripts/layering/check.ts, node scripts/gate/check.ts, pnpm check:fallow — clean

Planted-red evidence:

  • Removed the back entry from conformedRuntimeBindingsnpx vitest run src/daemon/__tests__/runtime-binding-conformance-completeness.test.ts failed: "every
    single-use generic or interaction route descriptor has a conformance entry: expected
    ['back'] to deeply equal []". Restored, re-ran green.
  • Removed the hint field from snapshot-diff-runtime.test.ts's own expected refusal → npx vitest run src/daemon/__tests__/snapshot-diff-runtime.test.ts -t "rejects an unavailable exact-owner fact before binding" failed on that suite alone (+ hint: 'Re-run without --actions...'); the completeness suite stayed green throughout. Restored, re-ran green.

Full affected gate: green at 4cca76f (pnpm check:affected --run; gates run: format, lint, typecheck, fallow, vitest-related).

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
JS raw 2.61 MB 2.61 MB 0 B
JS gzip 878.5 kB 878.5 kB 0 B
npm bundled raw 2.61 MB 2.61 MB 0 B
npm bundled gzip 878.5 kB 878.5 kB 0 B
npm tarball 1.04 MB 1.04 MB +3 B
npm unpacked 3.52 MB 3.52 MB 0 B
npm clean-installed 3.52 MB 3.52 MB 0 B

npm unpacked components

Component Base Current Diff
JS / dist source 2.77 MB 2.77 MB 0 B
Apple runner source/project 544.4 kB 544.4 kB 0 B
Apple snapshot presentation source 33.8 kB 33.8 kB 0 B
Apple Simulator snapshot bridge source 30.5 kB 30.5 kB 0 B
macOS helper source 54.8 kB 54.8 kB 0 B
Android helper artifacts 43.3 kB 43.3 kB 0 B
Other package files 46.7 kB 46.7 kB 0 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 29.5 ms 29.7 ms +0.3 ms
CLI --help 79.0 ms 80.3 ms +1.3 ms

Top changed chunks: no changes in the largest emitted chunks.

Top changed packed files

No changed packed files.

Extracts the shared exact-owner-unavailable admission mechanics repeated
across back/home/app-switcher/focus/viewport/orientation/tv-remote/type/diff
runtime test suites into runtime-binding-conformance.ts. Each suite keeps its
own expected table (device, unavailable fact, and any owner-specific refusal
wording); a new cross-module completeness test checks the shared table
against the command registry's runtime-use declarations in both directions,
including the newly-registered swipe command.
@thymikee
thymikee force-pushed the claude/test-daemon-runtime-family-conformance branch from ab204d7 to 4cca76f Compare September 5, 2026 17:09
@thymikee

thymikee commented Sep 5, 2026

Copy link
Copy Markdown
Member Author

Sentinel review at 4cca76f208f6a240d420aff5cef877b24e11ec5a.

No actionable findings. Shared refusal mechanics preserve per-family expected errors and no-bind assertions; registry-backed completeness exercises real resolvers. Dedicated success/routing tests remain. Planted-red evidence and CI are green; tests-only.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Sep 5, 2026
@thymikee
thymikee merged commit 17e0c86 into main Sep 5, 2026
17 checks passed
@thymikee
thymikee deleted the claude/test-daemon-runtime-family-conformance branch September 5, 2026 18:48
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-09-05 18:48 UTC

thymikee added a commit that referenced this pull request Sep 5, 2026
* origin/main:
  perf: bundle runtime dependencies and report full install size (#2310)
  ci: avoid unrelated Apple runner cache invalidation (#2303)
  fix(web): preserve the backend ref so snapshot refs match actionable refs (#2283)
  test(daemon): session-open-url-prewarm through the request seam (#2304)
  test(daemon): session-devices-batch-runtime through the request seam (#2305)
  chore(gates): layering baselines ratchet against merge-base (#2299)
  test(daemon): one typed conformance helper for the daemon runtime suites (#2298)
  chore(layering): derive the contracts export inventory from package.json (#2297)
  perf: bundle tar-stream to reduce install footprint (#2286)
  docs: simplify agent context and resolve conflicting guidance (#2287)
  refactor(cli): let help resolve command aliases itself and retire R12 (#2293)
thymikee added a commit that referenced this pull request Sep 5, 2026
* origin/main:
  perf: bundle runtime dependencies and report full install size (#2310)
  ci: avoid unrelated Apple runner cache invalidation (#2303)
  fix(web): preserve the backend ref so snapshot refs match actionable refs (#2283)
  test(daemon): session-open-url-prewarm through the request seam (#2304)
  test(daemon): session-devices-batch-runtime through the request seam (#2305)
  chore(gates): layering baselines ratchet against merge-base (#2299)
  test(daemon): one typed conformance helper for the daemon runtime suites (#2298)
  chore(layering): derive the contracts export inventory from package.json (#2297)
  perf: bundle tar-stream to reduce install footprint (#2286)
  docs: simplify agent context and resolve conflicting guidance (#2287)
  refactor(cli): let help resolve command aliases itself and retire R12 (#2293)
  refactor(commands): retire the navigation-only type projection (#2294)
  feat(runtime): route managed leases through contained transports (#2285)
  refactor(contracts): build unavailable runtime facts once (#2291)
  refactor(cli): derive the common flag readers from the common-field table (#2292)
  feat(daemon): add managed allocation operation journal (#2284)
thymikee added a commit that referenced this pull request Sep 5, 2026
* origin/main:
  perf: bundle runtime dependencies and report full install size (#2310)
  ci: avoid unrelated Apple runner cache invalidation (#2303)
  fix(web): preserve the backend ref so snapshot refs match actionable refs (#2283)
  test(daemon): session-open-url-prewarm through the request seam (#2304)
  test(daemon): session-devices-batch-runtime through the request seam (#2305)
  chore(gates): layering baselines ratchet against merge-base (#2299)
  test(daemon): one typed conformance helper for the daemon runtime suites (#2298)
  chore(layering): derive the contracts export inventory from package.json (#2297)
  perf: bundle tar-stream to reduce install footprint (#2286)
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.

1 participant