docs(autodiff): separate the expansion namespace from addressing - #140
Open
AlekseiChirkovVention wants to merge 1 commit into
Open
docs(autodiff): separate the expansion namespace from addressing#140AlekseiChirkovVention wants to merge 1 commit into
AlekseiChirkovVention wants to merge 1 commit into
Conversation
The reserved namespace was documented only as disjoint from the tracer's and the transform's, which leaves open how it relates to the way parameters and constants are addressed. Two points answer that and neither was written down. Minted identifiers name positions inside one artifact, not addresses. A declared input's address is the reference its name produces, while its value id is minted separately, so nothing a pass mints can shadow a parameter name. The seed is the one value id a caller supplies directly, which is why the collision check spans every identifier an artifact mentions rather than only those it produces. A generated constant never becomes addressable: dependency analysis reports the same required inputs and the same provenance vocabulary after expansion as before, and a constant is materialized by its handler from its own descriptor rather than bound like an input.
code-tc
approved these changes
Aug 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Answers a review question on the expansion namespace by writing down the part that was true but
undocumented. Documentation only — no behaviour change, no test change.
The question
Review asked how the reserved
exn/exvnamespace relates to the broader one autodiff uses toaddress trainable parameters and constants. The comment block said only that it is disjoint
from the tracer's and the transform's, which does not answer it.
What was missing
Minted identifiers name positions in an artifact, not addresses. A declared input's address
is the reference its name produces; its value id is minted separately. A parameter named
weightsis valuev0, so nothing a pass mints can shadow that name — the two are differentkinds of thing rather than two ranges of one namespace.
The seed is the one value id a caller supplies directly, which is exactly why the collision
check spans every identifier an artifact mentions — produced, read, declared as an input,
declared as an output or gradient — rather than only the ones it produces. It fails closed:
A generated constant never becomes addressable. Expansion leaves both dependency-analysis
entry points reporting the same
required_inputsand the same provenance vocabulary as before,so a consumer binds exactly what it bound already. A constant is materialized by its handler
from its own descriptor, never bound like an input — the deliberate alternative to modelling
constants as free dependencies with a new provenance category, which would have forced every
consumer's
bind_inputto learn a category for a value it never asked for.Why here rather than on the branch that was reviewed
The comment being asked about lives on an earlier branch in this series, with six branches
based on it. Amending it would force a rebase of all six for a documentation change. This lands
at the top of the stack instead and reads identically once the series merges.
Stack position
Stack position 10 of 10 — based on
fix/expansion-artifact-guards.Cannot merge into
mainbefore the nine branches below it.