Skip to content

Commit 0abd5d7

Browse files
authored
Merge pull request #13 from AGIBuild/cursor/analyze-plugin-architecture-optimization-gpt-5.1-codex-max-xhigh-d3ba
Analyze plugin architecture optimization
2 parents 8c1ea75 + 18a7462 commit 0abd5d7

File tree

3 files changed

+48
-0
lines changed

3 files changed

+48
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Change: Enforce host-aware manifest validation at install time
2+
3+
## Why
4+
- Module installation currently skips host-specific validation; incompatible modules (unsupported host, missing UI assemblies, bad dependency ranges) slip through and fail only at runtime.
5+
- Installation should block or flag invalid modules before they can be enabled or loaded.
6+
7+
## What Changes
8+
- Pass hostType through installer flows and enforce `supportedHosts` plus host-specific `uiAssemblies` at install time.
9+
- Validate dependency version ranges during install; reject or flag modules with invalid semver ranges.
10+
- Persist validation errors to module state and surface diagnostics to logs/UI so invalid modules are not enabled or loaded.
11+
12+
## Impact
13+
- Affected specs: runtime
14+
- Affected code: ModuleInstallerService, manifest validation pipeline, module state handling, installer diagnostics/UX
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
## ADDED Requirements
2+
3+
### Requirement: Install-time host-aware manifest validation
4+
Module installation SHALL validate host compatibility, UI assemblies for the target host, and dependency version ranges before a module can be enabled or loaded.
5+
6+
#### Scenario: Unsupported host blocks install
7+
- **WHEN** the installer runs with `hostType` X
8+
- **AND** `supportedHosts` does not include X
9+
- **THEN** validation fails with a diagnostic explaining the mismatch
10+
- **AND** the module is not marked Ready or enabled.
11+
12+
#### Scenario: Missing host UI assemblies blocks install
13+
- **WHEN** the installer runs with `hostType` X
14+
- **AND** `uiAssemblies` is missing or empty for X
15+
- **THEN** validation fails with a diagnostic naming the host and missing UI assemblies
16+
- **AND** the module remains disabled/not Ready.
17+
18+
#### Scenario: Invalid dependency ranges are rejected
19+
- **WHEN** the manifest lists dependencies with an invalid semantic version range
20+
- **THEN** validation fails with a diagnostic citing the offending dependency id and range
21+
- **AND** the module is not installed as Ready.
22+
23+
#### Scenario: Valid manifest becomes installable
24+
- **WHEN** supportedHosts includes the current host
25+
- **AND** uiAssemblies provides entries for that host
26+
- **AND** all dependency ranges parse successfully
27+
- **THEN** installation records the module as Ready
28+
- **AND** the module may be enabled/loaded.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
## 1. Implementation
2+
- [ ] 1.1 Propagate hostType into installer validation paths and enforce `supportedHosts`.
3+
- [ ] 1.2 Require host-specific `uiAssemblies` at install time; fail or flag when missing/empty.
4+
- [ ] 1.3 Validate dependency version ranges during install; record diagnostics and block enable/load on invalid manifests.
5+
- [ ] 1.4 Persist validation outcome to module state and surface errors to logs/UI.
6+
- [ ] 1.5 Add tests covering install-time host/UI/dependency validation and state updates.

0 commit comments

Comments
 (0)