Skip to content

Commit 31f11e8

Browse files
test(explore): add awsConfig + cfnStackModel model tests; archive change
Add ported model tests completing task 3.5: - awsConfig.test.ts: profile listing, region resolution (file + AWS_REGION precedence), endpoint_url surfacing, missing-file fallback - cfnStackModel.test.ts: stack-resource -> Focus conversion, same-type grouping, and the per-resource skip/warn behavior (covers the previously-fatal missing-ResourceType case) Sync the change's delta specs into openspec/specs/ (focus-model, localstack-explorer-view, localstack-metamodel, resource-browser) and archive the completed integrate-resource-browsers change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 059ea55 commit 31f11e8

15 files changed

Lines changed: 858 additions & 0 deletions

File tree

openspec/changes/integrate-resource-browsers/.openspec.yaml renamed to openspec/changes/archive/2026-06-23-integrate-resource-browsers/.openspec.yaml

File renamed without changes.

openspec/changes/integrate-resource-browsers/design.md renamed to openspec/changes/archive/2026-06-23-integrate-resource-browsers/design.md

File renamed without changes.

openspec/changes/integrate-resource-browsers/metamodel-sample.json renamed to openspec/changes/archive/2026-06-23-integrate-resource-browsers/metamodel-sample.json

File renamed without changes.

openspec/changes/integrate-resource-browsers/proposal.md renamed to openspec/changes/archive/2026-06-23-integrate-resource-browsers/proposal.md

File renamed without changes.

openspec/changes/integrate-resource-browsers/specs/focus-model/spec.md renamed to openspec/changes/archive/2026-06-23-integrate-resource-browsers/specs/focus-model/spec.md

File renamed without changes.

openspec/changes/integrate-resource-browsers/specs/localstack-explorer-view/spec.md renamed to openspec/changes/archive/2026-06-23-integrate-resource-browsers/specs/localstack-explorer-view/spec.md

File renamed without changes.

openspec/changes/integrate-resource-browsers/specs/localstack-metamodel/spec.md renamed to openspec/changes/archive/2026-06-23-integrate-resource-browsers/specs/localstack-metamodel/spec.md

File renamed without changes.

openspec/changes/integrate-resource-browsers/specs/resource-browser/spec.md renamed to openspec/changes/archive/2026-06-23-integrate-resource-browsers/specs/resource-browser/spec.md

File renamed without changes.

openspec/changes/integrate-resource-browsers/tasks.md renamed to openspec/changes/archive/2026-06-23-integrate-resource-browsers/tasks.md

File renamed without changes.

openspec/specs/focus-model/spec.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# focus-model Specification
2+
3+
## Purpose
4+
TBD - created by archiving change integrate-resource-browsers. Update Purpose after archive.
5+
## Requirements
6+
### Requirement: Focus data structure
7+
8+
The system SHALL represent a "focus" as a hierarchical structure of profiles → regions → services → resource types → ARNs. A focus SHALL carry a `version` string and a list of profiles; each profile SHALL have an `id` and a list of regions; each region SHALL have an `id` and a list of services; each service SHALL have an `id` and a list of resource types; each resource type SHALL have an `id` and a list of ARN strings. The structure SHALL be validated against a schema before use.
9+
10+
#### Scenario: Valid focus is accepted
11+
12+
- **WHEN** a focus object matching the schema (version, profiles, regions, services, resource types, arns) is parsed
13+
- **THEN** parsing succeeds and the typed focus object is returned
14+
15+
#### Scenario: Malformed focus is rejected
16+
17+
- **WHEN** a focus object missing required fields or with mistyped fields is parsed
18+
- **THEN** parsing fails with a descriptive validation error and no focus is returned
19+
20+
### Requirement: Wildcard and default selectors
21+
22+
The system SHALL support wildcard (`*`) selectors for profiles, regions, services, resource types, and ARNs, and a `default` selector for regions. A wildcard at a level SHALL mean "expand dynamically to all available items at that level when rendered"; a `default` region SHALL mean "the profile's configured default region". Non-wildcard ids SHALL be used literally.
23+
24+
#### Scenario: Wildcard service expands to all supported services
25+
26+
- **WHEN** a region's services list contains exactly one service with id `*`
27+
- **THEN** consumers SHALL expand it to every supported service provider, each with wildcard resource types and ARNs
28+
29+
#### Scenario: Default region resolves to the profile's configured region
30+
31+
- **WHEN** a profile's regions list contains exactly one region with id `default`
32+
- **THEN** consumers SHALL resolve it to the region configured for that profile, or surface an error if none is configured
33+
34+
#### Scenario: Wildcard ARN triggers live listing
35+
36+
- **WHEN** a resource type's arns list is exactly `["*"]`
37+
- **THEN** consumers SHALL list the actual ARNs from the platform rather than using literal values
38+
39+
### Requirement: Merging multiple focuses
40+
41+
The system SHALL merge a set of selected focuses into a single focus such that the union of all selected profiles/regions/services/resource types/ARNs is represented, with duplicate ids collapsed and child lists combined. Merging an empty set SHALL yield no focus.
42+
43+
#### Scenario: Two focuses on the same profile and region are unioned
44+
45+
- **WHEN** two focuses each select the same profile and region but different services are merged
46+
- **THEN** the result contains that single profile and region with both services present
47+
48+
#### Scenario: Merging an empty selection yields nothing
49+
50+
- **WHEN** an empty set of focuses is merged
51+
- **THEN** the result is undefined and the Resources view shows its empty-state placeholder
52+

0 commit comments

Comments
 (0)