Repository navigation
refactor(platform): let optional platform families be absent - #4781
Conversation
Deliver the three shared prerequisites for moving web, HarmonyOS, Vega and Linux desktop out of the packed core into platform plugins (ADR 0034), without moving any platform yet: - packages/contracts/src/platform-module.ts is the single owner of the required/optional family partition (apple+android required, completeness still enforced; harmonyos/vega/linux/web optional). The registry gains has(), lists only registered families, and get() on an absent optional family throws the typed plugin-not-installed AppError. Inventory enumeration skips absent optional families silently; the runtime gateway and the request-provider gate report the same typed outcome before any device binding. BuiltinPluginsCoverAllPlatforms becomes BuiltinPluginsCoverRequiredPlatforms (required-only exhaustiveness). - The engine-free install-hint catalog maps each optional family to its @agent-device/* package and the 'agent-device plugins add <package>' command; the plugin-not-installed error carries it. Unknown names produce no inferred package. - scripts/check-package.ts gains a declared (empty) absence list of paths and module markers that must not appear in the packed core tarball, checked against the npm pack file list and the bundled dist; each extraction PR adds one line. The rule lives in scripts/lib/packed-core-absence.ts with a self-test unit test. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
- platform-module.ts: keep the four install-hint declarations module-local; the catalog lookup is the public surface. - materialize the two compile-time partition guards in their test files so they have consumers. - check-package.ts: share one readPackedFiles helper between the test-code and packed-core-absence content checks instead of duplicating the packed file reader. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
Size Report
Startup median (7 runs, lower is better):
|
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on a213eef. The verdict and the full list are in the summary comment.
…families The gate threw plugin-not-installed for any device of an absent optional family, which blocked provider-owned devices and threw from unrelated resolver gates. The typed outcome already comes from the inventory and runtime lookups, so the gate returns false again.
|
One change is needed before merge at a213eef: the help sentence added at cli-help.ts:488 describes behavior no user can reach yet. It says Not blocking, and you can take or leave these: presence of a family is answered by three sources (the contracts Could the smallest version be just the required/optional partition with the required-only completeness check in On the open review thread (#4781 (comment), throw in request-providers): it does not apply, so please resolve it. That throw fires only when vega's PlatformPlugin is unregistered, which no shipped composition does, and once it is absent the gateway fails with plugin-not-installed anyway, which is the intended outcome. The placement concern is covered by the note above. The Mutants and Affected decision-kernel mutants checks fail in Stryker's dry run on an unrelated test in the move/script-publication area ('Setting process.umask() is not supported in workers'), and Runner Build (tvOS + visionOS + watchOS) fails at 'Restore and build tvOS XCTest runner'. This diff touches neither area, so these failures look unrelated. No live device run is needed while all six families stay registered. |
Keep the required/optional partition and make the platform module registry the one presence authority (ADR 0034): the required families (apple, android) are still completeness-checked, an optional family may be absent, and `get` raises the typed plugin-not-installed outcome for it. The runtime module map and the src/core PlatformPlugin registry now answer presence through that registry, so the gateway's missing-module contract error and the throwing request-provider predicate are gone. Share one release-channel rule with the provider catalog, so an optional family's install hint names the same nightly release a provider hint does. The version comes from the composition that builds a registry: contracts does not read host mechanics. Drop the CLI help sentence that promised plugin-not-installed for families still compiled into the packed core, and drop the empty packed-core absence gate. Both land with the first extraction PR that removes a family from the composition. Refs #4781 review.
|
Shrunk to the smallest version and force-pushed ( Blocking — the help sentence. Dropped. Presence answered by three sources; Optional-family catalog copying the provider catalog and dropping the nightly selector. Taken. The catalog is now The
On the thread at #4781 (comment): replied there and resolved it. The predicate is non-throwing now, so both the placement concern and the throw are gone. Mutants, Affected decision-kernel mutants and Runner Build (tvOS + visionOS + watchOS) look unrelated as you said: no live device run, no new families registered or unregistered. Validation on this head: |
This comment has been minimized.
This comment has been minimized.
|
Thanks for the update. At b989170 the code looks good, and the earlier findings (#4781 (comment)) are fixed: the predicate in request-providers.ts no longer throws and returns false for an absent family (#4781 (comment), which you can resolve). All 13 checks pass at this commit. There are no known conflicts. No absent-family composition ships yet, so the plugin-not-installed route is proven only by the unit and integration fixtures, not by a packed build. That is expected until the first extraction PR, so no extra evidence is needed. Not blocking, and you can take or leave these: the Could plugin-set composition own the interactor registry's absence reporter as one initialization input? The family classification and typed error already belong to |
The interactor registry's absence reporter was an argument of registerPlatformPlugin, so every plugin in a set carried the same reporter and a duplicate could replace the absence policy before registration rejected it. Move it to the plugin set: registerPlatformPluginSet takes the plugins and the reporter together, checks every leaf platform before it changes any state, and is the only registration path. registerBuiltinPlatformPlugins composes the builtin set through it once. getPlugin for an absent optional family still raises the typed plugin-not-installed outcome. Fold the getPlugin assertion into the scenario that composes the lazy request-provider wrapper, so it no longer passes only because another test ran first, and pin that a rejected duplicate leaves the reporter unchanged. PR-4781 review: #4781 (comment)
|
Addressed on Absence reporter is now a plugin-set input. Test fold. The Body fixes. Families are required Request-providers throw thread resolved. |
Apex Sentinel · ✅ Approve · review of
|
| Command | What it does |
|---|---|
@apex-sentinel-staging note <context> |
Adds context; Sentinel re-checks the cited code |
@apex-sentinel-staging pivot <why> |
Says the finding is wrong; Sentinel re-checks the cited code |
@apex-sentinel-staging like |
Marks the finding as useful |
@apex-sentinel-staging dislike <why> |
Marks it as not useful, so it is not raised again |
On this conversation, comment @apex-sentinel-staging review to run a full review once again.
|
At ca65654 the code looks good, and the absence reporter is now one input to the plugin set, which answers the earlier design question. The one open inline thread from the earlier review is fixed: The 13 checks are green at this commit, and there are no conflicts. The new duplicate-set test is a valid regression for the duplicate case. No packed build ships an absent family yet, so the plugin-not-installed route is proven only by unit and integration fixtures, which the earlier review accepted. Once a build that ships an absent family exists, a run that reaches the plugin-not-installed error and prints the install hint would close the evidence gap. Not blocking, and fine to take or leave: Could |
|
Both are out of scope for this PR; they move into the first extraction PR (#4597, web as the first
The request-providers thread (r4636329881) is resolved; it is the only review thread on this PR. |
* refactor(platform): let optional platform families be absent Deliver the three shared prerequisites for moving web, HarmonyOS, Vega and Linux desktop out of the packed core into platform plugins (ADR 0034), without moving any platform yet: - packages/contracts/src/platform-module.ts is the single owner of the required/optional family partition (apple+android required, completeness still enforced; harmonyos/vega/linux/web optional). The registry gains has(), lists only registered families, and get() on an absent optional family throws the typed plugin-not-installed AppError. Inventory enumeration skips absent optional families silently; the runtime gateway and the request-provider gate report the same typed outcome before any device binding. BuiltinPluginsCoverAllPlatforms becomes BuiltinPluginsCoverRequiredPlatforms (required-only exhaustiveness). - The engine-free install-hint catalog maps each optional family to its @agent-device/* package and the 'agent-device plugins add <package>' command; the plugin-not-installed error carries it. Unknown names produce no inferred package. - scripts/check-package.ts gains a declared (empty) absence list of paths and module markers that must not appear in the packed core tarball, checked against the npm pack file list and the bundled dist; each extraction PR adds one line. The rule lives in scripts/lib/packed-core-absence.ts with a self-test unit test. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai> * fix(gates): resolve fallow findings in the optional-family change - platform-module.ts: keep the four install-hint declarations module-local; the catalog lookup is the public surface. - materialize the two compile-time partition guards in their test files so they have consumers. - check-package.ts: share one readPackedFiles helper between the test-code and packed-core-absence content checks instead of duplicating the packed file reader. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai> * refactor(platform): drop the test-only required-family predicate * fix(platform): keep the request-provider gate a predicate for absent families The gate threw plugin-not-installed for any device of an absent optional family, which blocked provider-owned devices and threw from unrelated resolver gates. The typed outcome already comes from the inventory and runtime lookups, so the gate returns false again. * refactor(platform): answer family presence from one registry Keep the required/optional partition and make the platform module registry the one presence authority (ADR 0034): the required families (apple, android) are still completeness-checked, an optional family may be absent, and `get` raises the typed plugin-not-installed outcome for it. The runtime module map and the src/core PlatformPlugin registry now answer presence through that registry, so the gateway's missing-module contract error and the throwing request-provider predicate are gone. Share one release-channel rule with the provider catalog, so an optional family's install hint names the same nightly release a provider hint does. The version comes from the composition that builds a registry: contracts does not read host mechanics. Drop the CLI help sentence that promised plugin-not-installed for families still compiled into the packed core, and drop the empty packed-core absence gate. Both land with the first extraction PR that removes a family from the composition. Refs #4781 review. * refactor(platform): give the plugin set one absence reporter The interactor registry's absence reporter was an argument of registerPlatformPlugin, so every plugin in a set carried the same reporter and a duplicate could replace the absence policy before registration rejected it. Move it to the plugin set: registerPlatformPluginSet takes the plugins and the reporter together, checks every leaf platform before it changes any state, and is the only registration path. registerBuiltinPlatformPlugins composes the builtin set through it once. getPlugin for an absent optional family still raises the typed plugin-not-installed outcome. Fold the getPlugin assertion into the scenario that composes the lazy request-provider wrapper, so it no longer passes only because another test ran first, and pin that a rejected duplicate leaves the reporter unchanged. PR-4781 review: #4781 (comment) --------- Co-authored-by: Mistral Vibe <vibe@mistral.ai>
* refactor(platform): let optional platform families be absent Deliver the three shared prerequisites for moving web, HarmonyOS, Vega and Linux desktop out of the packed core into platform plugins (ADR 0034), without moving any platform yet: - packages/contracts/src/platform-module.ts is the single owner of the required/optional family partition (apple+android required, completeness still enforced; harmonyos/vega/linux/web optional). The registry gains has(), lists only registered families, and get() on an absent optional family throws the typed plugin-not-installed AppError. Inventory enumeration skips absent optional families silently; the runtime gateway and the request-provider gate report the same typed outcome before any device binding. BuiltinPluginsCoverAllPlatforms becomes BuiltinPluginsCoverRequiredPlatforms (required-only exhaustiveness). - The engine-free install-hint catalog maps each optional family to its @agent-device/* package and the 'agent-device plugins add <package>' command; the plugin-not-installed error carries it. Unknown names produce no inferred package. - scripts/check-package.ts gains a declared (empty) absence list of paths and module markers that must not appear in the packed core tarball, checked against the npm pack file list and the bundled dist; each extraction PR adds one line. The rule lives in scripts/lib/packed-core-absence.ts with a self-test unit test. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai> * fix(gates): resolve fallow findings in the optional-family change - platform-module.ts: keep the four install-hint declarations module-local; the catalog lookup is the public surface. - materialize the two compile-time partition guards in their test files so they have consumers. - check-package.ts: share one readPackedFiles helper between the test-code and packed-core-absence content checks instead of duplicating the packed file reader. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai> * refactor(platform): drop the test-only required-family predicate * fix(platform): keep the request-provider gate a predicate for absent families The gate threw plugin-not-installed for any device of an absent optional family, which blocked provider-owned devices and threw from unrelated resolver gates. The typed outcome already comes from the inventory and runtime lookups, so the gate returns false again. * refactor(platform): answer family presence from one registry Keep the required/optional partition and make the platform module registry the one presence authority (ADR 0034): the required families (apple, android) are still completeness-checked, an optional family may be absent, and `get` raises the typed plugin-not-installed outcome for it. The runtime module map and the src/core PlatformPlugin registry now answer presence through that registry, so the gateway's missing-module contract error and the throwing request-provider predicate are gone. Share one release-channel rule with the provider catalog, so an optional family's install hint names the same nightly release a provider hint does. The version comes from the composition that builds a registry: contracts does not read host mechanics. Drop the CLI help sentence that promised plugin-not-installed for families still compiled into the packed core, and drop the empty packed-core absence gate. Both land with the first extraction PR that removes a family from the composition. Refs #4781 review. * refactor(platform): give the plugin set one absence reporter The interactor registry's absence reporter was an argument of registerPlatformPlugin, so every plugin in a set carried the same reporter and a duplicate could replace the absence policy before registration rejected it. Move it to the plugin set: registerPlatformPluginSet takes the plugins and the reporter together, checks every leaf platform before it changes any state, and is the only registration path. registerBuiltinPlatformPlugins composes the builtin set through it once. getPlugin for an absent optional family still raises the typed plugin-not-installed outcome. Fold the getPlugin assertion into the scenario that composes the lazy request-provider wrapper, so it no longer passes only because another test ran first, and pin that a rejected duplicate leaves the reporter unchanged. PR-4781 review: #4781 (comment) --------- Co-authored-by: Mistral Vibe <vibe@mistral.ai>
* refactor(platform): let optional platform families be absent Deliver the three shared prerequisites for moving web, HarmonyOS, Vega and Linux desktop out of the packed core into platform plugins (ADR 0034), without moving any platform yet: - packages/contracts/src/platform-module.ts is the single owner of the required/optional family partition (apple+android required, completeness still enforced; harmonyos/vega/linux/web optional). The registry gains has(), lists only registered families, and get() on an absent optional family throws the typed plugin-not-installed AppError. Inventory enumeration skips absent optional families silently; the runtime gateway and the request-provider gate report the same typed outcome before any device binding. BuiltinPluginsCoverAllPlatforms becomes BuiltinPluginsCoverRequiredPlatforms (required-only exhaustiveness). - The engine-free install-hint catalog maps each optional family to its @agent-device/* package and the 'agent-device plugins add <package>' command; the plugin-not-installed error carries it. Unknown names produce no inferred package. - scripts/check-package.ts gains a declared (empty) absence list of paths and module markers that must not appear in the packed core tarball, checked against the npm pack file list and the bundled dist; each extraction PR adds one line. The rule lives in scripts/lib/packed-core-absence.ts with a self-test unit test. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai> * fix(gates): resolve fallow findings in the optional-family change - platform-module.ts: keep the four install-hint declarations module-local; the catalog lookup is the public surface. - materialize the two compile-time partition guards in their test files so they have consumers. - check-package.ts: share one readPackedFiles helper between the test-code and packed-core-absence content checks instead of duplicating the packed file reader. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai> * refactor(platform): drop the test-only required-family predicate * fix(platform): keep the request-provider gate a predicate for absent families The gate threw plugin-not-installed for any device of an absent optional family, which blocked provider-owned devices and threw from unrelated resolver gates. The typed outcome already comes from the inventory and runtime lookups, so the gate returns false again. * refactor(platform): answer family presence from one registry Keep the required/optional partition and make the platform module registry the one presence authority (ADR 0034): the required families (apple, android) are still completeness-checked, an optional family may be absent, and `get` raises the typed plugin-not-installed outcome for it. The runtime module map and the src/core PlatformPlugin registry now answer presence through that registry, so the gateway's missing-module contract error and the throwing request-provider predicate are gone. Share one release-channel rule with the provider catalog, so an optional family's install hint names the same nightly release a provider hint does. The version comes from the composition that builds a registry: contracts does not read host mechanics. Drop the CLI help sentence that promised plugin-not-installed for families still compiled into the packed core, and drop the empty packed-core absence gate. Both land with the first extraction PR that removes a family from the composition. Refs #4781 review. * refactor(platform): give the plugin set one absence reporter The interactor registry's absence reporter was an argument of registerPlatformPlugin, so every plugin in a set carried the same reporter and a duplicate could replace the absence policy before registration rejected it. Move it to the plugin set: registerPlatformPluginSet takes the plugins and the reporter together, checks every leaf platform before it changes any state, and is the only registration path. registerBuiltinPlatformPlugins composes the builtin set through it once. getPlugin for an absent optional family still raises the typed plugin-not-installed outcome. Fold the getPlugin assertion into the scenario that composes the lazy request-provider wrapper, so it no longer passes only because another test ran first, and pin that a rejected duplicate leaves the reporter unchanged. PR-4781 review: #4781 (comment) --------- Co-authored-by: Mistral Vibe <vibe@mistral.ai>
* refactor(platform): let optional platform families be absent Deliver the three shared prerequisites for moving web, HarmonyOS, Vega and Linux desktop out of the packed core into platform plugins (ADR 0034), without moving any platform yet: - packages/contracts/src/platform-module.ts is the single owner of the required/optional family partition (apple+android required, completeness still enforced; harmonyos/vega/linux/web optional). The registry gains has(), lists only registered families, and get() on an absent optional family throws the typed plugin-not-installed AppError. Inventory enumeration skips absent optional families silently; the runtime gateway and the request-provider gate report the same typed outcome before any device binding. BuiltinPluginsCoverAllPlatforms becomes BuiltinPluginsCoverRequiredPlatforms (required-only exhaustiveness). - The engine-free install-hint catalog maps each optional family to its @agent-device/* package and the 'agent-device plugins add <package>' command; the plugin-not-installed error carries it. Unknown names produce no inferred package. - scripts/check-package.ts gains a declared (empty) absence list of paths and module markers that must not appear in the packed core tarball, checked against the npm pack file list and the bundled dist; each extraction PR adds one line. The rule lives in scripts/lib/packed-core-absence.ts with a self-test unit test. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai> * fix(gates): resolve fallow findings in the optional-family change - platform-module.ts: keep the four install-hint declarations module-local; the catalog lookup is the public surface. - materialize the two compile-time partition guards in their test files so they have consumers. - check-package.ts: share one readPackedFiles helper between the test-code and packed-core-absence content checks instead of duplicating the packed file reader. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai> * refactor(platform): drop the test-only required-family predicate * fix(platform): keep the request-provider gate a predicate for absent families The gate threw plugin-not-installed for any device of an absent optional family, which blocked provider-owned devices and threw from unrelated resolver gates. The typed outcome already comes from the inventory and runtime lookups, so the gate returns false again. * refactor(platform): answer family presence from one registry Keep the required/optional partition and make the platform module registry the one presence authority (ADR 0034): the required families (apple, android) are still completeness-checked, an optional family may be absent, and `get` raises the typed plugin-not-installed outcome for it. The runtime module map and the src/core PlatformPlugin registry now answer presence through that registry, so the gateway's missing-module contract error and the throwing request-provider predicate are gone. Share one release-channel rule with the provider catalog, so an optional family's install hint names the same nightly release a provider hint does. The version comes from the composition that builds a registry: contracts does not read host mechanics. Drop the CLI help sentence that promised plugin-not-installed for families still compiled into the packed core, and drop the empty packed-core absence gate. Both land with the first extraction PR that removes a family from the composition. Refs #4781 review. * refactor(platform): give the plugin set one absence reporter The interactor registry's absence reporter was an argument of registerPlatformPlugin, so every plugin in a set carried the same reporter and a duplicate could replace the absence policy before registration rejected it. Move it to the plugin set: registerPlatformPluginSet takes the plugins and the reporter together, checks every leaf platform before it changes any state, and is the only registration path. registerBuiltinPlatformPlugins composes the builtin set through it once. getPlugin for an absent optional family still raises the typed plugin-not-installed outcome. Fold the getPlugin assertion into the scenario that composes the lazy request-provider wrapper, so it no longer passes only because another test ran first, and pin that a rejected duplicate leaves the reporter unchanged. PR-4781 review: #4781 (comment) --------- Co-authored-by: Mistral Vibe <vibe@mistral.ai>
* refactor(platform): let optional platform families be absent Deliver the three shared prerequisites for moving web, HarmonyOS, Vega and Linux desktop out of the packed core into platform plugins (ADR 0034), without moving any platform yet: - packages/contracts/src/platform-module.ts is the single owner of the required/optional family partition (apple+android required, completeness still enforced; harmonyos/vega/linux/web optional). The registry gains has(), lists only registered families, and get() on an absent optional family throws the typed plugin-not-installed AppError. Inventory enumeration skips absent optional families silently; the runtime gateway and the request-provider gate report the same typed outcome before any device binding. BuiltinPluginsCoverAllPlatforms becomes BuiltinPluginsCoverRequiredPlatforms (required-only exhaustiveness). - The engine-free install-hint catalog maps each optional family to its @agent-device/* package and the 'agent-device plugins add <package>' command; the plugin-not-installed error carries it. Unknown names produce no inferred package. - scripts/check-package.ts gains a declared (empty) absence list of paths and module markers that must not appear in the packed core tarball, checked against the npm pack file list and the bundled dist; each extraction PR adds one line. The rule lives in scripts/lib/packed-core-absence.ts with a self-test unit test. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai> * fix(gates): resolve fallow findings in the optional-family change - platform-module.ts: keep the four install-hint declarations module-local; the catalog lookup is the public surface. - materialize the two compile-time partition guards in their test files so they have consumers. - check-package.ts: share one readPackedFiles helper between the test-code and packed-core-absence content checks instead of duplicating the packed file reader. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai> * refactor(platform): drop the test-only required-family predicate * fix(platform): keep the request-provider gate a predicate for absent families The gate threw plugin-not-installed for any device of an absent optional family, which blocked provider-owned devices and threw from unrelated resolver gates. The typed outcome already comes from the inventory and runtime lookups, so the gate returns false again. * refactor(platform): answer family presence from one registry Keep the required/optional partition and make the platform module registry the one presence authority (ADR 0034): the required families (apple, android) are still completeness-checked, an optional family may be absent, and `get` raises the typed plugin-not-installed outcome for it. The runtime module map and the src/core PlatformPlugin registry now answer presence through that registry, so the gateway's missing-module contract error and the throwing request-provider predicate are gone. Share one release-channel rule with the provider catalog, so an optional family's install hint names the same nightly release a provider hint does. The version comes from the composition that builds a registry: contracts does not read host mechanics. Drop the CLI help sentence that promised plugin-not-installed for families still compiled into the packed core, and drop the empty packed-core absence gate. Both land with the first extraction PR that removes a family from the composition. Refs #4781 review. * refactor(platform): give the plugin set one absence reporter The interactor registry's absence reporter was an argument of registerPlatformPlugin, so every plugin in a set carried the same reporter and a duplicate could replace the absence policy before registration rejected it. Move it to the plugin set: registerPlatformPluginSet takes the plugins and the reporter together, checks every leaf platform before it changes any state, and is the only registration path. registerBuiltinPlatformPlugins composes the builtin set through it once. getPlugin for an absent optional family still raises the typed plugin-not-installed outcome. Fold the getPlugin assertion into the scenario that composes the lazy request-provider wrapper, so it no longer passes only because another test ran first, and pin that a rejected duplicate leaves the reporter unchanged. PR-4781 review: #4781 (comment) --------- Co-authored-by: Mistral Vibe <vibe@mistral.ai>
…ck#4781) * refactor(platform): let optional platform families be absent Deliver the three shared prerequisites for moving web, HarmonyOS, Vega and Linux desktop out of the packed core into platform plugins (ADR 0034), without moving any platform yet: - packages/contracts/src/platform-module.ts is the single owner of the required/optional family partition (apple+android required, completeness still enforced; harmonyos/vega/linux/web optional). The registry gains has(), lists only registered families, and get() on an absent optional family throws the typed plugin-not-installed AppError. Inventory enumeration skips absent optional families silently; the runtime gateway and the request-provider gate report the same typed outcome before any device binding. BuiltinPluginsCoverAllPlatforms becomes BuiltinPluginsCoverRequiredPlatforms (required-only exhaustiveness). - The engine-free install-hint catalog maps each optional family to its @agent-device/* package and the 'agent-device plugins add <package>' command; the plugin-not-installed error carries it. Unknown names produce no inferred package. - scripts/check-package.ts gains a declared (empty) absence list of paths and module markers that must not appear in the packed core tarball, checked against the npm pack file list and the bundled dist; each extraction PR adds one line. The rule lives in scripts/lib/packed-core-absence.ts with a self-test unit test. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai> * fix(gates): resolve fallow findings in the optional-family change - platform-module.ts: keep the four install-hint declarations module-local; the catalog lookup is the public surface. - materialize the two compile-time partition guards in their test files so they have consumers. - check-package.ts: share one readPackedFiles helper between the test-code and packed-core-absence content checks instead of duplicating the packed file reader. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai> * refactor(platform): drop the test-only required-family predicate * fix(platform): keep the request-provider gate a predicate for absent families The gate threw plugin-not-installed for any device of an absent optional family, which blocked provider-owned devices and threw from unrelated resolver gates. The typed outcome already comes from the inventory and runtime lookups, so the gate returns false again. * refactor(platform): answer family presence from one registry Keep the required/optional partition and make the platform module registry the one presence authority (ADR 0034): the required families (apple, android) are still completeness-checked, an optional family may be absent, and `get` raises the typed plugin-not-installed outcome for it. The runtime module map and the src/core PlatformPlugin registry now answer presence through that registry, so the gateway's missing-module contract error and the throwing request-provider predicate are gone. Share one release-channel rule with the provider catalog, so an optional family's install hint names the same nightly release a provider hint does. The version comes from the composition that builds a registry: contracts does not read host mechanics. Drop the CLI help sentence that promised plugin-not-installed for families still compiled into the packed core, and drop the empty packed-core absence gate. Both land with the first extraction PR that removes a family from the composition. Refs callstack#4781 review. * refactor(platform): give the plugin set one absence reporter The interactor registry's absence reporter was an argument of registerPlatformPlugin, so every plugin in a set carried the same reporter and a duplicate could replace the absence policy before registration rejected it. Move it to the plugin set: registerPlatformPluginSet takes the plugins and the reporter together, checks every leaf platform before it changes any state, and is the only registration path. registerBuiltinPlatformPlugins composes the builtin set through it once. getPlugin for an absent optional family still raises the typed plugin-not-installed outcome. Fold the getPlugin assertion into the scenario that composes the lazy request-provider wrapper, so it no longer passes only because another test ran first, and pin that a rejected duplicate leaves the reporter unchanged. PR-4781 review: callstack#4781 (comment) --------- Co-authored-by: Mistral Vibe <vibe@mistral.ai>
* refactor(platform): let optional platform families be absent Deliver the three shared prerequisites for moving web, HarmonyOS, Vega and Linux desktop out of the packed core into platform plugins (ADR 0034), without moving any platform yet: - packages/contracts/src/platform-module.ts is the single owner of the required/optional family partition (apple+android required, completeness still enforced; harmonyos/vega/linux/web optional). The registry gains has(), lists only registered families, and get() on an absent optional family throws the typed plugin-not-installed AppError. Inventory enumeration skips absent optional families silently; the runtime gateway and the request-provider gate report the same typed outcome before any device binding. BuiltinPluginsCoverAllPlatforms becomes BuiltinPluginsCoverRequiredPlatforms (required-only exhaustiveness). - The engine-free install-hint catalog maps each optional family to its @agent-device/* package and the 'agent-device plugins add <package>' command; the plugin-not-installed error carries it. Unknown names produce no inferred package. - scripts/check-package.ts gains a declared (empty) absence list of paths and module markers that must not appear in the packed core tarball, checked against the npm pack file list and the bundled dist; each extraction PR adds one line. The rule lives in scripts/lib/packed-core-absence.ts with a self-test unit test. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai> * fix(gates): resolve fallow findings in the optional-family change - platform-module.ts: keep the four install-hint declarations module-local; the catalog lookup is the public surface. - materialize the two compile-time partition guards in their test files so they have consumers. - check-package.ts: share one readPackedFiles helper between the test-code and packed-core-absence content checks instead of duplicating the packed file reader. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai> * refactor(platform): drop the test-only required-family predicate * fix(platform): keep the request-provider gate a predicate for absent families The gate threw plugin-not-installed for any device of an absent optional family, which blocked provider-owned devices and threw from unrelated resolver gates. The typed outcome already comes from the inventory and runtime lookups, so the gate returns false again. * refactor(platform): answer family presence from one registry Keep the required/optional partition and make the platform module registry the one presence authority (ADR 0034): the required families (apple, android) are still completeness-checked, an optional family may be absent, and `get` raises the typed plugin-not-installed outcome for it. The runtime module map and the src/core PlatformPlugin registry now answer presence through that registry, so the gateway's missing-module contract error and the throwing request-provider predicate are gone. Share one release-channel rule with the provider catalog, so an optional family's install hint names the same nightly release a provider hint does. The version comes from the composition that builds a registry: contracts does not read host mechanics. Drop the CLI help sentence that promised plugin-not-installed for families still compiled into the packed core, and drop the empty packed-core absence gate. Both land with the first extraction PR that removes a family from the composition. Refs #4781 review. * refactor(platform): give the plugin set one absence reporter The interactor registry's absence reporter was an argument of registerPlatformPlugin, so every plugin in a set carried the same reporter and a duplicate could replace the absence policy before registration rejected it. Move it to the plugin set: registerPlatformPluginSet takes the plugins and the reporter together, checks every leaf platform before it changes any state, and is the only registration path. registerBuiltinPlatformPlugins composes the builtin set through it once. getPlugin for an absent optional family still raises the typed plugin-not-installed outcome. Fold the getPlugin assertion into the scenario that composes the lazy request-provider wrapper, so it no longer passes only because another test ran first, and pin that a rejected duplicate leaves the reporter unchanged. PR-4781 review: #4781 (comment) --------- Co-authored-by: Mistral Vibe <vibe@mistral.ai>
Summary
Families are declared in one partition and every consumer answers presence from one registry (
packages/contracts/src/platform-module.ts). Required:apple,android. Optional:harmonyos,vega,linux,web. 32 files. No linked issue; no scope beyond this PR's review round.PlatformModuleRegistry.get()on an absent optional family is the single "not installed" answer:UNSUPPORTED_PLATFORM,details.reason: 'plugin-not-installed', the package, itspluginInstallCommand, and a hint.src/core/platform-plugin-registry.tsregisterPlatformPluginSet(plugins, reportAbsent)owns the absence reporter as one input for the set and rejects a duplicate before any state change.getPluginexisted; its absent-family answer is now that reporter's typed outcome, not a plain unsupported error.tryGetPlugin,registeredPlatformsunchangedsrc/core/interactors/register-builtins.tsregisterBuiltinPlatformPlugins(reportAbsent)composes the builtin set in one call, so no plugin carries an absence policysrc/platform-runtime-gateway.tsmodulesis aPlatformModuleRegistry; dropped the missing-module contract error andmodule.family !== familyguardsrc/platform-runtime/request-providers.tsplatformGatedResolverAppliesstays a non-throwing predicatepackages/device-selectioncomposed-inventory-gateways.tsunchanged: unfiltered discovery already swallows a per-family failure, an explicit request propagatesregistry.get's outcome; tests passcoreVersionsrc/daemon-composition.ts,src/platform-runtime-claim-recovery.tscoreVersion: readVersion()src/commands/provider-plugin-catalog.tscontracts/platform-module.ts; no new exports subpathValidation
pnpm check:affected --run --base origin/0.22 --head ca65654ec→ exit 0,exactCommit: true(receipt.tmp/validation/run-BvMvAX/receipt.json): format, lint, typecheck, layering, fallow, build, integration-node (155 passed, 13 skipped), vitest-related (97 files, 441 tests), unit (2202 files, 21347 passed, 10 skipped).CI owns the parked
replay-*and authoritative smoke lanes. Hosted Mutants and tvOS Runner Build are unrelated (fixed in #4782). No packed build ships an absent family yet, so the outcome is proven by unit and integration fixtures.