Expand description
Policy constants: our choices. Changing one
changes behavior and therefore requires EVAL evidence or an
explicit ruling. Data only — zero branches by charter.
The part crates/kernel/spec/ConstsPolicy.lean specifies this module.
Six entries carry a type rather than a plain number (crates/kernel/spec/ConstsPolicy.lean
§8-8): AUTONOMY_DEFAULT, CLOCK_STAMP_DEFAULT, DEFAULT_EFFORT, and the three limits
whose refusal derives from their type (crates/kernel/spec/PolicyLimit.lean §8-73).
Structs§
- Ratio
- Exact ratio as an integer pair: kernel decision paths never touch floats (determinism rule 6). Kept unreduced so the spelling mirrors the value as it was decided.
Constants§
- AUTONOMY_
DEFAULT - Who reads the Approval Inbox in a city nobody has configured: the person, because the inbox holds design questions and a design question is the kind a person wants. What a run may do is settled by the gates, which answer from the rules and never ask.
- BYTES_
PER_ TOKEN - Bytes per token, typical: the rate every budget that crosses the two
units is converted at. It is an estimate for English prose and code,
and it is deliberately not the worst-case ratio
INTERVAL_CAP_BYTESreasons from - a budget that has to hold is sized by the worst case, a budget that has to be spent is sized by the typical one. - CLOCK_
STAMP_ DEFAULT - Every
Timestampedresult carries the clock line, and aTimelessone at most once a minute, until a layer writes[clock] stamp: a model that cannot tell when a command ran cannot tell a stale answer from a fresh one (runtime D8). - CLOCK_
ZONES_ MAX - CREDENTIAL_
NAME_ MARKERS - Words that make an environment variable name read as a credential
(11.1). Matched as a case-insensitive substring, so
AWS_SECRET_KEYandnpm_passwordare both caught. - CTX_
REMINDER_ FIRST_ PERCENT - Where the context reminder’s two rungs sit, as whole percents of the
window. The first is not adjustable: one number, one meaning. The
second is the one a layer may move, and these three numbers are the
whole of what it may move it between —
kernel::config::SecondThresholdenforces the domain at its one construction point. - CTX_
REMINDER_ SECOND_ DEFAULT - CTX_
REMINDER_ SECOND_ MAX - CTX_
REMINDER_ SECOND_ MIN - DEFAULT_
AT - Where a city listens when nobody says otherwise: the loopback interface, so a city started by a double-click is reachable from the browser on that machine and from nowhere else.
- DEFAULT_
EFFORT - The thinking level a request takes when nobody stated one, if the
(Endpoint, model) offers it: a balanced level for a person who never
opened the setting. Whether it is used is the answer of the gateway’s
thinking ladder, which falls back to the upstream’s own default when
this level is not offered (
crates/kernel/spec/Model.leanD56). - DISCARD_
FILES_ MAX - DISCARD_
RETENTION_ DAYS - DRAFT_
HELD_ ESCALATE - EDIT_
WAR_ FREEZE - EXCHANGE_
BUDGET_ BYTES - What one turn’s exchange — its assistant reply and its wave’s
results — may occupy in the window, in bytes. Shared evenly across
the exchange’s texts when the whole does not fit; which end of a text
survives is
runtime::compaction’s decision, and this file only says how much there is. - HALL_
BUILDING - The building raised with every city, which holds the city’s own plan and the two residents that serve every other building.
- HALL_
CLERK - Who answers approvals when the person delegated them. Genesis writes
the delegation as an event rather than baking it into
AUTONOMY_DEFAULT: who answers is a decision this city made, and a decision the person can change needs a line of history to change. - HALL_
MAYOR - The city’s planner. It writes Markdown and plans; it does not build.
- IMAGES_
PER_ TURN - Four pictures in one turn. Past that the window is being spent on pixels rather than on the work, and a limit stated once is what a refusal can name.
- IMAGE_
MAX_ BYTES - 2 MiB per picture. A ceiling a refusal can state and a person can raise, sized so a base64 body (4/3 of this) stays inside what both providers accept.
- IMAGE_
QUALITY - 100 is the whole domain a lossy encoder has. Refused rather than
clamped where a caller names one:
quality: 120is a caller that believes it asked for something better, and an answer clamped to 100 would agree with it. - INTERVAL_
CAP_ BYTES - What one interval of a document may carry into the window: 64 KiB, cut on a line end, continued by the offset the answer reports.
- LOOP_
REPEAT_ THRESHOLD - OFFLOAD_
MIN_ BYTES - Floor, not threshold: the effective offload bound is derived by
pipelinefrom window headroom (4.4). - OUTPUT_
CEILING_ DEFAULT - How long one answer may be on the messages face when nobody has said: 8_192 tokens.
- PREFIX_
SLOTS - How many slots a whole-prefix budget divides evenly across.
runtime::prefix::SegmentSlotis the authority on how many slots there are, andruntime::prefix::testsholds this divisor against that enum so the two cannot drift apart. - SANDBOX_
FUEL_ DEFAULT - Instruction budget for one sandboxed call when no layer states one. Large enough that ordinary work finishes, small enough that a loop stops rather than runs until somebody notices: the point of fuel is that exhaustion is a verdict the city writes down, not a machine that gets slow.
- SECRET_
ENTROPY_ MIN - 3.5 bits/char. Second constant scheduled for re-estimation; evidence = false-positive rate on repository and fixture corpora.
- STARTUP_
BUDGET_ TOKENS - WORKTREE_
MAX_ BYTES - 2 GiB per node’s working tree. A ceiling rather than a free-space probe: free space is a moving fact about one machine, while this is the number a refusal can state and a person can raise. Checked before a tree is created, so an over-large city is refused rather than half-copied (11.4).