Summary
Define the canonical Environment/argv effect contract before changing the current hardcoded os.env and os.args behavior, and establish the intended boundary between public compiler-shipped .jett declarations and private host-access runtime kernels.
Source documentation
Current state
- The typechecker exposes capability-free
os.env(string) -> optional[string] and os.args() -> list[string] signatures.
- The interpreter calls
std::env::var and std::env::args directly. The environment lookup collapses missing variables and non-Unicode values to none, while std::env::args includes the program name.
- These public
os.* calls are not classified as impure and can currently run in verify blocks.
- Rule Set 16 instead says OS reads require explicit capability values, documents
Environment.get(view env, ...), and specifies Environment.args(view env) with the program name excluded.
- A partial hardcoded
Environment.args checker entry exists, but there is no corresponding public stdlib declaration or interpreter implementation.
- There is no
stdlib/os.jett; the public signatures and behavior remain compiler/Rust-owned rather than source-owned with private runtime kernels.
Scope
This issue should decide:
- whether the canonical public API remains under
os.*, becomes capability-shaped Environment operations, or uses a compatibility transition between them;
- whether environment and argv reads require
view Environment, how impurity propagates, and whether these reads are available during verify or comptime execution;
- whether argv includes the executable/program name;
- how missing and invalid/non-Unicode environment values are represented;
- which public declarations and compositional behavior live in compiler-shipped
.jett source, with host access retained only behind private interpreter/runtime kernels;
- how the current
os.env, os.args, and partial Environment.args paths migrate without leaving duplicate public contracts.
It does not include process spawning/lifecycle APIs, new filesystem APIs, HIR/MIR/native lowering, the general runtime ABI, or the module/import/trusted-origin work tracked by #3.
Acceptance criteria
Dependencies / open questions
Issue #3 owns module imports and trusted stdlib origins. Process management should receive separate tracking only after its public capability and lifecycle requirements are bounded; it is intentionally not folded into this Environment/argv issue.
This was generated by an AI agent (vycdev2). Please verify any changes before merging or applying.
Summary
Define the canonical
Environment/argv effect contract before changing the current hardcodedos.envandos.argsbehavior, and establish the intended boundary between public compiler-shipped.jettdeclarations and private host-access runtime kernels.Source documentation
docs/progress.md— Phase Kosstatusdocs/design.md— Rule Set 16: Capability-Based I/Odocs/architecture.md— Phase 6 capability typesdocs/architecture.md— Phase K standard libraryCurrent state
os.env(string) -> optional[string]andos.args() -> list[string]signatures.std::env::varandstd::env::argsdirectly. The environment lookup collapses missing variables and non-Unicode values tonone, whilestd::env::argsincludes the program name.os.*calls are not classified as impure and can currently run inverifyblocks.Environment.get(view env, ...), and specifiesEnvironment.args(view env)with the program name excluded.Environment.argschecker entry exists, but there is no corresponding public stdlib declaration or interpreter implementation.stdlib/os.jett; the public signatures and behavior remain compiler/Rust-owned rather than source-owned with private runtime kernels.Scope
This issue should decide:
os.*, becomes capability-shapedEnvironmentoperations, or uses a compatibility transition between them;view Environment, how impurity propagates, and whether these reads are available duringverifyor comptime execution;.jettsource, with host access retained only behind private interpreter/runtime kernels;os.env,os.args, and partialEnvironment.argspaths migrate without leaving duplicate public contracts.It does not include process spawning/lifecycle APIs, new filesystem APIs, HIR/MIR/native lowering, the general runtime ABI, or the module/import/trusted-origin work tracked by #3.
Acceptance criteria
os.env,os.args, andEnvironment.argsare documented.osdeclarations are owned by compiler-shipped.jettsource; Rust/interpreter/runtime code retains only private host-access kernels.docs/progress.md,docs/design.md, anddocs/architecture.mdreflect the decision.Dependencies / open questions
Issue #3 owns module imports and trusted stdlib origins. Process management should receive separate tracking only after its public capability and lifecycle requirements are bounded; it is intentionally not folded into this Environment/argv issue.
This was generated by an AI agent (vycdev2). Please verify any changes before merging or applying.