Skip to content

fix(plugins): enforce connection provider admission - #4636

Merged
thymikee merged 8 commits into
fix/0.22-command-output-fuzz-prerequisitefrom
fix/0.22-plugin-connection-admission
Nov 17, 2026
Merged

thymikee merged 8 commits into
fix/0.22-command-output-fuzz-prerequisitefrom
fix/0.22-plugin-connection-admission

Conversation

@thymikee

@thymikee thymikee commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Summary

Reject a known provider whose plugin is missing or failed before a remote profile or stored connection uses generic daemon capabilities. Pass the supplied host environment through capability, lease and presentation decisions so each operation reads the correct registry. Generic remote profiles and disconnect cleanup remain supported.

This 13-file, 591-gross-line prerequisite supports #4617 and targets #4621, for #3310 and #4591.

Validation

Published head: d2f18cff2110e81c8a7b0b391dd02a32a10fe870, based on #4621 ccbf9ed. Pinned frozen install/build and exact affected passed: 42 checks passed, 25 skipped, unchanged checkout. All eight commits are patch-identical across the rebase; the complete branch diff is byte-identical.

Routed old-source comparisons exposed generic daemon URL errors for missing and failed plugins. Fixed-source tests cover stores, distinct supplied hosts, direct materialization, lease TTL, generic profiles and disconnect. Independent source review covers the implementation; root reviewed the test follow-ups and verified the rebase.

The published conflict is repaired. Hosted results at this head completed: 13 successful, one skipped and one neutral, including Android smoke success. Sentinel reports no open findings, and there are no review threads. The earlier 76202b8 Android smoke failure remains unexplained; helper diagnostics from merged #4648 are now included for new CI. This rebase is not an incident repair.

Live AWS acceptance passed separately at combined candidate 8c5fabc, including product close and independent service cleanup. Its remaining validation and publication are separate. No merge clearance is claimed.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

View guided diff Turn on auto-fix

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 6.13 MB 6.13 MB +255 B
Package (unpacked) 6.13 MB 6.13 MB +255 B
Package (download) 1.86 MB 1.86 MB +62 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 53.5 ms 48.9 ms -4.6 ms
CLI --help 126.4 ms 94.7 ms -31.7 ms

@apex-sentinel-staging

apex-sentinel-staging Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Apex Sentinel · ✅ Approve

Since the last review: 0 new · 0 still open · 0 no longer raised

No open findings.

Reviewed with this repository's own Sentinel configuration (655ede2796e5).

💬 Talking to Sentinel

In a finding's thread, reply with:

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.

Earlier reviews

Review of 76202b8f · 17.11.2026 15:34 UTC

Apex Sentinel · ✅ Approve

Since the last review: 0 new · 0 still open · 0 no longer raised

No open findings.

Reviewed with this repository's own Sentinel configuration (1cb2f242aea5).

Review of 218a1fea · 17.11.2026 13:27 UTC

Apex Sentinel · ✅ Approve

No open findings.

1 finding below minor hidden (user_settings.min_severity).

Reviewed with this repository's own Sentinel configuration (27a4e409dae6).

@thymikee

Copy link
Copy Markdown
Member Author

This PR is ready at 218a1fe: connection provider admission now refuses a declared provider whose plugin is missing or failed, before any daemon or device call. CI is green (15 checks, none failing) and there are no conflicts. Not blocking, take or leave: make env required on primeProviderConnection, isConnectProviderName and connectProviderNamesForError in provider-policy.ts, as you did for connectionProviderCapabilities, so the type covers every call site; drop the unavailableConnectPluginError branch in readConnectProvider (connection.ts), since primeProviderConnection already throws that refusal first; and update the doc comment on primeProviderConnection (or rename it) to say it also refuses a missing or failed plugin. On the CLI route host.env equals process.env, so lease behavior for installed plugins should not change there. connection status now refuses a stored connection whose plugin is missing, and the refusal omits the stored lease id. That looks fine because disconnect still releases it; a run against an active remote lease would confirm it.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 17, 2026
@thymikee
thymikee force-pushed the fix/0.22-plugin-connection-admission branch from 218a1fe to 76202b8 Compare November 17, 2026 15:24
@thymikee thymikee removed the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 17, 2026
@thymikee

Copy link
Copy Markdown
Member Author

This head (76202b8) now conflicts with its base after #4621 moved to ccbf9ed, so I removed the ready-for-human label. The earlier clean review still applies to the code. Please rebase onto the new #4621 head. If the range-diff of this PR's own commits is empty, the prior verdict carries forward and the label comes back. Otherwise the new head gets a delta review.

@thymikee
thymikee force-pushed the fix/0.22-plugin-connection-admission branch from 76202b8 to d2f18cf Compare November 17, 2026 18:00
@thymikee

Copy link
Copy Markdown
Member Author

The rebase onto #4621's new head resolved the conflict. The range-diff of this PR's eight commits from 76202b8 to d2f18cf is empty, so the earlier clean review carries forward to d2f18cf. CI is green and there are no conflicts, so the ready-for-human label is back.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 17, 2026
@thymikee
thymikee merged commit af80d8e into 0.22 Nov 17, 2026
15 checks passed
@thymikee
thymikee deleted the fix/0.22-plugin-connection-admission branch November 17, 2026 21:01
thymikee added a commit that referenced this pull request Nov 19, 2026
* fix(plugins): admit connection providers from their host registry

* test(plugins): cover routed connection admission

* test(plugins): use explicit remote session fixtures

* test(plugins): verify routed admission and cleanup

* fix(connection): pass host environment through capability decisions

* test(connection): isolate stored status output assertions

* test(connection): register providers in lease fixtures

* test(connection): colocate provider lease fixture
thymikee added a commit that referenced this pull request Nov 20, 2026
* fix(plugins): admit connection providers from their host registry

* test(plugins): cover routed connection admission

* test(plugins): use explicit remote session fixtures

* test(plugins): verify routed admission and cleanup

* fix(connection): pass host environment through capability decisions

* test(connection): isolate stored status output assertions

* test(connection): register providers in lease fixtures

* test(connection): colocate provider lease fixture
thymikee added a commit that referenced this pull request Nov 20, 2026
* fix(plugins): admit connection providers from their host registry

* test(plugins): cover routed connection admission

* test(plugins): use explicit remote session fixtures

* test(plugins): verify routed admission and cleanup

* fix(connection): pass host environment through capability decisions

* test(connection): isolate stored status output assertions

* test(connection): register providers in lease fixtures

* test(connection): colocate provider lease fixture
thymikee added a commit that referenced this pull request Nov 21, 2026
* fix(plugins): admit connection providers from their host registry

* test(plugins): cover routed connection admission

* test(plugins): use explicit remote session fixtures

* test(plugins): verify routed admission and cleanup

* fix(connection): pass host environment through capability decisions

* test(connection): isolate stored status output assertions

* test(connection): register providers in lease fixtures

* test(connection): colocate provider lease fixture
thymikee added a commit that referenced this pull request Nov 21, 2026
* fix(plugins): admit connection providers from their host registry

* test(plugins): cover routed connection admission

* test(plugins): use explicit remote session fixtures

* test(plugins): verify routed admission and cleanup

* fix(connection): pass host environment through capability decisions

* test(connection): isolate stored status output assertions

* test(connection): register providers in lease fixtures

* test(connection): colocate provider lease fixture
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