Skip to content

gen: derive the coder's figures from declared domains; count every coder figure - #180

Open
afflom wants to merge 29 commits into
mainfrom
claude/project-thread-njrm7z
Open

afflom wants to merge 29 commits into
mainfrom
claude/project-thread-njrm7z

Conversation

@afflom

@afflom afflom commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

What

1. Domain pass (client/gen/domains.py). Each coder model declares the domains of its quantities once, by extent:

  • stretch (offset form);
  • probability slot;
  • weight, with its origin and unit;
  • every stored cell, by its width.

The model also declares which tables and globals hold each domain. The pass infers the domains of every operand to a fixpoint, including the domain of where each value goes. A literal is restated as a quantity derived from its extent when it is one of these characteristic quantities of a domain in scope:

  • the extent itself, its last value, or its half;
  • the domain's origin or unit;
  • a byte lane of a cell;
  • a rescale between two domains;
  • the radix, for a quotient or remainder by 2.

The mixer's offset-form dot product takes its constant term from the two origins. python3 client/gen/domains.py lists the literals the pass leaves, with the domains in scope at each.

2. Global widths typed by domain (domains.Widths). A global's width is the least rung of the word ladder (wordBytes halved by the radix) whose cell holds the global's declared domain:

  • positions and lengths take the payload length field;
  • hashes take the hash word;
  • the coder interval takes its range;
  • the rest take a partial byte, stretches, slots, dot products, or a sum of stretches.

30 NCM globals now derive their width. The IR machine refuses any value set outside its global's declared domain, so ir_check checks every declaration. It caught one wrong declaration: pr holds a slot, not a stretch.

3. Format identities named once.

  • ir.py names the radix, the squash table's step and cell, the context hash's word, multipliers and folds, and the rolling hash's multiplier.
  • irlex emits hash and squash only into modules whose IR uses them.
  • The profile word is a layout chain: each field's unit is the previous unit times the previous field's range.
  • The probability maps' spacing, points, top and scale are derived from the extents.
  • Uorc.Wire.Word is built from 0 and 1 (from the page lane), and Client reads the frame and profile word layout from it. Its definitions are executable.

4. The gate counts every coder figure.

  • Before this change, the scanner admitted any parameterless numeral in a Uorc.Codec module as a format identity.
  • A coder numeral is now admitted only when a wire module (src/Uorc/Wire/Coder.lex.tex) states it with the same name and value. Every other coder numeral is counted as a fixed figure.

5. Coordinates re-decided on the merged v0.7 coder. The corpus is 574,441 B at the standard values.

  • Half-life: the corpus best is 19,912, saving 145 B. It is per-input, at a distance of 94 B.
  • Floor 24 and gain 104 remain the corpus best. They are per-input, at distances of 4 B and 36 B.

Measured

Step Register
Before 5,498
Domain pass 4,593
Identities, layout, maps 4,288
Hidden coder figures now counted 4,690
Main merged (#179, #181, #184, #183) 3,927
Widths by domain, Wire.Word + Client 3,716

Checks

  • just figures: passes at 3,716. cargo test -p figures: passes.
  • python3 client/gen/ir_check.py: 25/25 identical, with every global held to its domain.
  • lexlean fmt --check --all and lexlean check --all on pin 2bf5c1e: pass (94 modules). Client model check: passes (79 modules).
  • Client export on pin 2bf5c1e: done in 4h17m. node scripts/factory.mjs export-check reports "export proved".
  • On the exported tree, all native = model tests pass: native_archives_are_the_model_archives, model_decodes_every_frame_word_native_writes, shipped_states, performance.

🤖 Generated with Claude Code

https://claude.ai/code/session_013Asa3MrzwoXqXQR1FdKaod

The NCM decoder and encoder models read and write their globals at byte
offsets of one state table. The offsets were written out at every access
(2,086 sites of the register). They are now derived: each global's address
is the address of the global before it plus that global's width, and the
width is the one figure of its place. The register falls from 8,252 to
6,166 sites; the IR and its lowering are otherwise unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3MrzwoXqXQR1FdKaod
Uorc.Performance::parametricRelease names the first release whose
implementation must be parametric (0.7.0). From that workspace version on,
the figures check rejects the tree while the register lists any site, so the
version bump that tags the release cannot land until the distance of
implementationFigures is 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3MrzwoXqXQR1FdKaod
uorc::coordinates names the coder's figures the engine decides (the three
plasticity figures first): the coder reads each as set for a measurement or
at its standard value. frontier's CodecPoint carries the coordinates a point
sets (in its κ only when any is set, so earlier claims keep theirs), and a
run sets them for its compressions and decodes.

The engine's coordinate stage gallops each coordinate from its identity by
doubling while the corpus gets strictly smaller, then bisects the bracket
around the best value. Every value measured is a closed claim under its κ,
so later ticks walk the path free and measure at most hypothesisBudget new
values. A finished search is decided when every family codes smallest at the
corpus's best value, and per-input (a frame-word facet is needed) with its
distance otherwise; model/coordinates.toml records it. `uorc-engine
coordinates` runs the stage alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3MrzwoXqXQR1FdKaod
… the budget did not reach has no row yet

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3MrzwoXqXQR1FdKaod
…allop past the standard value, key stored warmed models by the coordinates

A warmed-model image was keyed by build, kernel, profile, mask and state but
not by the coordinates the model learned at, so a measurement at a
non-standard value could read a model warmed at another value: the encoder
coded a state frame from it and the native decoder refused the payload,
sending the frame to the reference decoder. The image key now carries every
coordinate's value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3MrzwoXqXQR1FdKaod
…ched them)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3MrzwoXqXQR1FdKaod
The decoder's in-process cache of warmed models matched state, profile and
dimensions but not the coordinates, so after a measurement at one value a
frame coded at another decoded from the wrong model: the native decoder
refused it and the frame fell to the reference decoder. The test fails
without the key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3MrzwoXqXQR1FdKaod
…best; first stage over uorc-v0.3.0

plasticityGain is decided at its standard 104 (families that prefer another
value tie it). plasticityFloor is per-input with a distance of 1 byte (tiny
codes 1 byte smaller at 22). plasticityHalfLife is per-input: the corpus codes
453 B smaller at 47888 than at 4096, and the families lose 171 B against
their own bests. 71 closed claims in frontier.toml; a rerun reads them all
and measures nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3MrzwoXqXQR1FdKaod
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3MrzwoXqXQR1FdKaod
…rged tree (6,151 sites)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3MrzwoXqXQR1FdKaod
Setting a coordinate changes what every coder in the process reads, so the
warmed-model test ran under the library's parallel tests and moved
stored_warm_keeps_bytes off its bytes (rest, ubuntu-24.04-arm). It now lives
in tests/coordinates.rs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3MrzwoXqXQR1FdKaod
…ree is main's

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3MrzwoXqXQR1FdKaod
client/gen/domains.py: a model declares each domain of its quantities once,
by its extent (stretch, slot, weight with origin and unit; every stored cell
by its width), and the tables and globals that hold it. The pass infers
every operand's domains to a fixpoint and states each literal that is a
characteristic quantity of the domains it acts with, or of where its value
goes (extent, last, half, origin, unit, byte lanes, a rescale between two
domains), as that quantity derived from the extent. The offset-form mixer
dot product's constant term is derived from the two origins
(domains.origins). Values are unchanged; the kernel graph and basis bytes
are identical; ir_check 25/25 identical.

python3 client/gen/domains.py reports the literals left, by value, with
the domains in scope: the next declarations.

NcmEncode/NcmDecode: 1,827 -> 922 fixed-figure sites; register 5,498 -> 4,593.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3MrzwoXqXQR1FdKaod
Corpus 574,441 B at the standard coordinates. Half-life: best 19,912 saves
145 B over the corpus, family bests differ (per-input, distance 94 B).
Floor 24 and gain 104 stay the corpus best; each is per-input (distance 4 B
and 36 B), so they wait on a frame-word facet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3MrzwoXqXQR1FdKaod
…y where used

ir.py names the format's identities: the binary radix, the squash table's
spacing (half derived) and cell width, the context hash's word and each
round's multiplier and fold (shifts derived from the folds). irlex emits
squash and hash only into modules whose IR uses them, so X86 carries
neither. X86.lex.tex regenerated (now with the derived global layout).
ir_check 25/25, x86 round-trips, kernel graph and basis bytes unchanged.

Register 4,593 -> 4,500.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3MrzwoXqXQR1FdKaod
…hash from named quantities

The profile word's fields are a layout chain (each unit the one before times
that field's range); the probability maps' spacing, points, top and scale
derive from the stretch and slot extents and the squash step; the rolling
context hashes share one multiplier; a quotient or remainder by 2 is the
radix. ir_check 25/25, lexlean check passes.

Register 4,500 -> 4,288.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3MrzwoXqXQR1FdKaod
… wire model states it

The scanner admitted every parameterless numeral of a Uorc.Codec module as a
format identity, so a generator could name any choice (a count limit, a
slack, a stride, a table's depth or base, a global's width) and the register
would not see it. Uorc.Wire.Coder now states the coder's identities (radix,
byte and word, the fixed-point domains' extents, the squash table, the hash
constants, the model's structure, the profile and frame words' fields, the
merged tables' ids, the v0.3 coder's profile); a coder numeral is admitted
only with that name and value. The rest are fixed figures, each counted once
at its definition.

The register is reseeded at the measured state: 4,288 -> 4,690. The 402
added sites are all named numerals of the coder modules (194 in each NCM
module, 10 Archive, 4 X86) that were figures before and went uncounted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3MrzwoXqXQR1FdKaod
@afflom afflom changed the title gen: derive the coder's figures from declared domains gen: derive the coder's figures from declared domains; count every coder figure Nov 15, 2026
A module whose generator has no axioms.json entries for its layout (X86, newly
regenerated with the derived layout) fell back to [Quot.sound, propext],
which the production export rejects as an inexact axiom policy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3MrzwoXqXQR1FdKaod
afflom pushed a commit that referenced this pull request Nov 15, 2026
model/figures.toml taken from #180; the next commit records the register
over the merged tree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3QAe9P9zPb9g25h2nZ
afflom pushed a commit that referenced this pull request Nov 15, 2026
… at the warmed state's length

Under #180's derived global layout each IR global states its width, so a
separate `learned` global added a width site. `coded` now starts at the
bytes the base model learned (a model state's length, 0 after a window)
and counts on with each epoch; native Frame drops its `learned` field the
same way. Register 4,690 -> 4,681; ir_check --k 1,2,3 --n 300 --h 200
27/27 identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3QAe9P9zPb9g25h2nZ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3MrzwoXqXQR1FdKaod
afflom pushed a commit that referenced this pull request Nov 16, 2026
afflom pushed a commit that referenced this pull request Nov 16, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3MrzwoXqXQR1FdKaod
# Conflicts:
#	model/figures.toml
A global's width is the least rung of the word ladder (wordBytes halved by the radix) whose cell holds
its declared domain: positions by the payload length field, hashes by the hash word, the coder interval
by its range, a partial byte, stretches, slots, dot products. The IR machine holds every value set to
its domain, so ir_check checks each declaration (it caught pr, a slot, declared as a stretch).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3MrzwoXqXQR1FdKaod
…built from 0 and 1

Uorc.Wire.Word states the codec point word once: each field's range is a
power of bitRange = 1 + 1, and each field's base is the previous base times
the previous field's range (shortBit, repBit, selBit, tableUnit, matchUnit,
wideBase, profileBase, streamsBase, epochBase), with the strategy record
(a little-endian profile word and a state byte) and the input count of a
profile (its context bits counted, the fixed inputs, each feature's inputs).
Client.lex.tex reads every such number from it: 118 sites -> 32.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3LzgnA6Pz4jrM6Qz1i
…e it codes)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3MrzwoXqXQR1FdKaod
afflom pushed a commit that referenced this pull request Nov 16, 2026
…by domains and slots

One export of the merged closure (#179 + #180 + this lane) at pin 2bf5c1e:
3 packages from 79 modules, 4 h 8 min on 4 cores.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3M7pu1nwsA7VLR4o6D
afflom pushed a commit that referenced this pull request Nov 16, 2026
… main

#180 (the coder domains pass) is still open and has moved on, so this
branch no longer carries its earlier head: client/src, the coder
generators, frontier/coordinates and generated/rust are main's, and the
register is rewritten on main plus this lane: 4,735 -> 4,086 (649 sites).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3M7pu1nwsA7VLR4o6D

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants