refactor: extract platform device inventory runtime - #1699
Conversation
|
Size Report
Startup median (7 runs, lower is better):
Top changed chunks:
|
|
Reviewed exact head ae15898. Code review is clean: the devices descriptor now has one inventory execution shape, request routing binds the provider-authoritative/request-scoped gateway, local family mechanics remain lazy, legacy discovery routes are removed, and planted structural cases prove atomicity. Exact-head Android emulator and iOS simulator smoke exercise the migrated inventory/target-resolution path; provider/family projection is covered by contract/integration suites. The PR is not merge-ready only because required Coverage is red: the log shows no failed assertion, but Vitest could not terminate the unchanged scripts/fuzz/corpus-replay.test.ts fork and emitted an unhandled worker-exit error. This appears to be a harness/infrastructure flake, not a source regression, but Coverage must be rerun green before readiness and no ready-for-human label should be applied while it remains red. Residual assurance: the body records planted-red structural evidence but not red-before/revert evidence for all behavioral parity tests. |
|
Exact head ae15898 is now ready for human review. The required Coverage rerun passed; all 31 non-skipped checks are green, the branch is MERGEABLE/CLEAN, and the earlier clean code/evidence verdict is unchanged. |
|
Agreed. The committed stack has genuine planted-negative structural evidence in platform-execution.test.ts (legacy and neither-route violations), the platform package policy/source/repository tests (back-edges, eager evaluation, host probing, and untracked production files), and platform-module.test.ts (missing/duplicate/unknown family ownership). I’m not claiming equivalent red-before proof for the behavioral parity suite: provider-authoritative empty inventory, selector parity, Apple fast paths, six-family discovery, doctor/sharding consumers, and device smoke are green parity evidence only. The claims-directory lifecycle test is described as planted, but no failing pre-fix output was preserved, so it is not independently red-proven. The residual assurance note therefore stands without implying a code defect. |
|
Claude’s final stacked-diff review found one remaining P1 in the devices slice: migrated Apple inventory had bypassed the scoped Apple tool provider by invoking raw |
|
Exact-head re-review at |
|
Exact-head follow-up at |
|
Thermo review follow-up is now on Implemented:
I did not delete the descriptor discriminant or Seen-red evidence covered provider-policy leakage, web host eagerness, stale runtime-use signatures, the handwritten chooser, Android stdout false positives, swallowed cancellation, lost Vega evidence, and planted structural violations. Validation: |
|
Exact-head readiness re-review at Residual assurance: rejection of the removed function form is enforced by the narrowed type surface and green typecheck rather than a dedicated planted-negative compile gate; the surviving full-provider runtime test is valid for the supported route but would not itself fail on the former union. No label applied. |
Summary
Extract device inventory behind request-bound contracts and six implementation-lazy platform packages.
Migrate the devices command and legacy local discovery consumers to the composed inventory gateway, preserve provider-first behavior and platform parity, delete the superseded discovery routes, and add structural/atomicity gates for the package boundary. Also isolate Node integration device claims after the full gate exposed host-global test state.
Part of #1696.
Validation