notes

The inert-configuration page: TZ, LANG, TERM, and what still waits

Milestone 47's environment-variable fork. Built 2026-08-23. The contract is environment_contract; the decision is DECISIONS §111 (inert configuration is a read-only page).

What this is

Milestone 47 splits what Unix puts in one string-to-string environment map into three parts. They are inert configuration (TZ, LANG, TERM, genuinely just data, no authority in it) and names (PATH, HOME, directory capabilities wearing a string costume). Then secrets (authority badly encoded as a bearer string). Only the first third is built here. Names wait on bind (milestone 154's two-directory endowment, not yet built); secrets are answered elsewhere, by an endpoint (§41), and are never meant to arrive as a string on this table at all.

The wire encoding is a read-only page, the same rights-ladder shape the clock page uses. No capability, or a PageFrame with READ. A config value is never something a person designates on a command line. There is nothing to propose or set from inside the process that holds it, so an endpoint (as the clock's propose half uses) would be the wrong shape here.

Each declared key is validated against a closed domain before it is ever written to the page. TZ must be a real IANA-style timezone identifier, LANG a real locale identifier, TERM a real terminal type. A value that does not parse as a member of its key's domain is refused when the page is assembled, not carried through disguised as configuration. This closes the gap DECISIONS §111 identifies: a capability governs reach, not meaning, so once a value is bytes on a page nothing about the capability model can tell a password from a timezone. environment_contract::domain's three lists are curated and real, not the full IANA/glibc/terminfo databases; see the crate's own BUGS section for why growing them on demand is deliberate rather than a gap.

Why no seqlock, unlike the clock page

The clock page is published to repeatedly by a running service while readers hold a stale mapping, so a reader can catch a writer mid-publish and must retry rather than blend. The config page has exactly one writer, and it finishes before the page has a second reader: it is assembled in a buffer nothing else can see, and only then mapped read-only into the process that will read it. There is nothing to race, so environment_contract::ConfigurationPage is a plain length-prefixed byte layout with no atomics at all.

The layout

Interface 13, version 1, magic ENVCONF1. After the 8-byte magic, each of TZ, LANG and TERM is one length byte and a field of 40, 24 and 32 bytes: 107 bytes in all, inside one frame. A host test in the crate pins the widths and the identity.

What's built end to end

What this does not do, and why

Tests

the environment_contract package host suite: 13 unit tests plus 2 doctests. They cover the round trip, every domain check, and an undeclared key reading as absent rather than empty. Then a zeroed frame and an unrecognized magic both reading as "no configuration," and the layout offsets not overlapping. A length byte past its field, and a recognized page whose field holds a non-member, read as absent; the Kani harnesses in the crate prove the bound and the round trip. kernel::user::std_tests::a_whole_std_program_runs_on_the_native_abi, both ISAs: the real std_exerciser binary, granted a real config page assembled by the real kernel wiring, reads TZ/LANG/TERM back through the real std PAL and the real std::env API.

BUGS