Core Environment
Canonical OpenSpec capability for Core Environment.
Document layout: Feature capability layoutConforming
## Purpose## Requirements
Core.Environment Specification
Purpose
Provides environment-variable access and mutation with typed permission and key errors.
Requirements
Requirement: Environment access and enumeration: Decision [D-CORE-PRIM-0150]
The Beskid standard SHALL enforce the following migrated contract section. Accepted ADR decisions are binding; uppercase requirement keywords retain their BCP-14 meaning.
Get(string key)SHALL read through the__env_getbuiltin and returnOption<string>, whileAll()MUST return the complete environment asMap<string,string>. Missing keys SHALL be represented byNone, not a panic.
Stable ID: BSP-REQ-4E91B7C2A6D0F835
Scenario: Conformance exercises Decision
- GIVEN an implementation claims conformance with this capability
- WHEN behavior governed by this contract section is exercised
- THEN every MUST, SHALL, REQUIRED, prohibition, and accepted decision in the section is satisfied
Requirement: Environment mutation and errors: Decision [D-CORE-PRIM-0151]
The Beskid standard SHALL enforce the following migrated contract section. Accepted ADR decisions are binding; uppercase requirement keywords retain their BCP-14 meaning.
SetandUnsetMUST delegate to__env_setand__env_unsetrespectively and returnResult<Unit, EnvironmentError>.EnvironmentErrorSHALL includeKeyNotFound(string),PermissionDenied(string), andInvalidKey(string)variants; mutation failures MUST NOT be silently ignored.
Stable ID: BSP-REQ-A83F1D6C0E9274B5
Scenario: Conformance exercises Decision
- GIVEN an implementation claims conformance with this capability
- WHEN behavior governed by this contract section is exercised
- THEN every MUST, SHALL, REQUIRED, prohibition, and accepted decision in the section is satisfied
Requirement: Supported environment tier: Decision [D-CORE-PRIM-0152]
The Beskid standard SHALL enforce the following migrated contract section. Accepted ADR decisions are binding; uppercase requirement keywords retain their BCP-14 meaning.
Core.Environmentand itsCore.Environment.EnvironmentErrorsubmodule MUST be exposed at@tier(supported).
Stable ID: BSP-REQ-2F6A9C1E4D8B7035
Scenario: Conformance exercises Decision
- GIVEN an implementation claims conformance with this capability
- WHEN behavior governed by this contract section is exercised
- THEN every MUST, SHALL, REQUIRED, prohibition, and accepted decision in the section is satisfied