Skip to content

docs: census and lift design for layer composition - #621

Merged
midagedev merged 1 commit into
midagedev:mainfrom
Burntgogi:docs/issue609-composition-census
Oct 21, 2026
Merged

midagedev merged 1 commit into
midagedev:mainfrom
Burntgogi:docs/issue609-composition-census

Conversation

@Burntgogi

Copy link
Copy Markdown
Contributor

Scope

Refs #609; completes only the first two checkboxes (census and design/lift order). No body/kernel lift, new model support, runtime equivalence or performance result is claimed.

The initial census was refreshed after #599/#602 and Raon merged. Frozen base: faa81674ff09ebc1871652e7416cd00db49616fe (release main), not a moving worktree.

Deliverable

  • docs/research/layer-composition.md: definitions/limits, per-family table, dependency-safe load-time composition design, nine ordered moves and source-linked candidate catalog.
  • layer-composition-census.json: reviewed defaults/exact-symbol exceptions, source/table hashes, all 72 source-resolved pairs, three retired already-landed pairs, exact selected items and explicit common/binding budgets for each forecast.
  • layer-composition-census.py: standalone reproducible CLI reading the frozen git objects, pinned parser versions, strict ownership/hash/parse/override/selector/count/arithmetic checks. No workspace dependency or GPU requirement added.

All 15 canonical registry rows and the four declared non-architecture gate groups are covered. Shared Qwen globs are non-additive; the union is deduplicated. The corpus includes private application adapters by mirroring their existing model/gpu namespace ownership, without a second family-name registry. Common code outside that source scope is not arbitrarily charged to models; existing model-tax remains its own owner.

The recorded union is 505 Rust source files / 8537 item/scaffolding units:

Class Code-bearing physical rows
Fact-bearing primitive/description/instance item (F) 36779
Composable glue, including already-common owners (G) 81592
Independent verification/referee/fixture/gate support (V) 146602
Deduplicated total 264973

Whole mixed F items include incidental glue; G is not automatically unlifted or deletable. Comments/blank rows are excluded, feature branches are not pruned, and a physical code row is counted once. The note labels these limits instead of presenting a minimum-LOC or compiled-support claim.

Design decisions

Reuse ModelSpec/LayerSpec, runtime::layer, runtime::sched::LayerProgram, existing site/state/host/placement owners and the existing coverage Need/program/format/parser refusal dispatcher. GPU-side bindings refer to existing Available predicates; do not create a model→GPU dependency cycle or duplicate capability vocabulary. Program and per-role format guards remain until complete concrete binding admission is enforced. No per-step opcode VM, new launches, copied descriptions, unfused boundary or guessed default.

The landed routed/prompt/app-batch/hybrid-seat/tier moves are explicitly retired, not proposed again. The catalog retains real differences (RDA versus KDA/GDN, chart versus DeepSeek HC rounding, MSA causality, latent-MoE form lifetime, rotary/layout/nonfinite behavior) rather than call every similar spelling interchangeable.

Every forecast is measured old selected rows - new common owner budget - retained/new binding budget, with both budgets shown. It is an unexecuted design forecast, not a measured deletion or speedup. Actual move acceptance still requires the complete immediate-base PTX move proof, real affected selection and owning runtime/graph/state/refusal gates.

Exercised evidence

  • Real normal CLI and --json completed against the frozen objects: all source hashes, table/ownership set, parser checks, exact overrides, 72 pairs and nine lift calculations matched the data; no Rust parse error.
  • Three actual parser boundary scenarios passed: raw-string comment markers versus real comments; cfg(not(test)) versus cfg(test) impl ownership; file macros and same-line deduplication.
  • Three runs of the actual CLI refused a bad source hash, unknown classification item and unknown twin selector with rc=2 and no misleading success table.
  • Throwaway drivers/probes were removed; no permanent wiring/wording test or source scaffold.

Reproduction (dependency setup is documented in the note):

PYTHONPATH=/path/to/pinned/parser/deps python3 docs/research/layer-composition-census.py --root .

Pinned tree-sitter==0.25.2, tree-sitter-rust==0.24.2; no Cargo build, model, NVIDIA driver or lease. This PR does not claim any GPU gate or PTX proof for its future lifts.

Owning static contributor slice (full check-recipes, no narrowed self-test):

fmt rc=0 6s
check-arch rc=0 0s
check-comments rc=0 7s
check-model-tax rc=0 9s
check-recipes rc=0 140s
DONE tier=t0 total=5 red=0 wall=162s

Command: LC_ALL=C bash tools/contrib-check.sh --tier t0 --only '^(fmt|check-comments|check-recipes|check-arch|check-model-tax)$'.

Two independent read-only prepublication reviews (tool/data contract; design/source catalog) found no MUST_FIX issues. They did not rerun checks or claim GPU evidence. The canonical local just pre-review remains unavailable because this host lacks the Claude CLI; normal repository review and PR T0 are still required.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: CLEAN: No must-fix findings remain in the census, verifier, or design scope.

Checked

Duplicates: 19 new functions/constants checked. The short glob utility overlaps recipes.class_glob; sharing adds import/path plumbing to the standalone tool. No actionable duplicate found.

Complexity: No Rust functions changed. The Python verifier follows ownership, classification, selector and forecast stages.

Silent failure: Three .get sites followed. Classification defaults are explicit policy; unknown supporting files and ambiguous selectors raise named errors. Git failures propagate before any success table.

Tests: No tests added or changed; mutation review is not applicable. Validation confirmed Python syntax, 518 source/table hashes covering all 505 census files, 182 snapshot links and line ranges, and 15 referenced gate recipes. All nine lift selector sets are disjoint, and their forecast arithmetic matches the documented selected-row counts. AST-derived counts and selector resolution were not rerun.

Gates: No gate, tolerance or pin changed. No runtime hot path changed.

Escape catalog: No C1–C4 pattern matched.

Notes

Dryer and crapper did not run because no Rust file changed.

The full parser-based CLI was not rerun during validation. Source hashes and link ranges do not independently establish AST classifications or census totals.

🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)

@midagedev
midagedev merged commit 76387c8 into midagedev:main Oct 21, 2026
6 of 7 checks passed
@midagedev

Copy link
Copy Markdown
Owner

Merged. The one red check was the sj-vs-clef.sh self-test (1 of 116), which passed on rerun and passes on main. Thank you for the census and the design.

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

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants