Skip to content

feat(colors): C7d - lower Material into the compiled Program spine and delete its physical recipe path - #578

Merged
lemone112 merged 4 commits into
mainfrom
feat/c7d-material-lowering
Aug 14, 2026
Merged

feat(colors): C7d - lower Material into the compiled Program spine and delete its physical recipe path#578
lemone112 merged 4 commits into
mainfrom
feat/c7d-material-lowering

Conversation

@lemone112

Copy link
Copy Markdown
Collaborator

Что сделано

C7d Material hard cut (эпик lab-colors-stage-a-continuation, ch09/t02): Material перестаёт быть исполняемым special-recipe path.

  • Характеризационный корпус до среза (первый коммит): бит-в-бит пины всех construction paths конфига (все источники x четыре темы x оба пола AaText/AaUi), прямая граница NamedRoleTable::new и типизированные конфликты — GREEN на старой физике до каких-либо изменений.
  • Физика перенесена дословно в приватный vocabulary-clean generic-модуль corridor_representation: 60-шаговая бисекция над BackdropBox, conservative channel/EOTF envelope (константы и error-accounting без изменений), directed-search guard, rechecked-bracket постусловие. Физические тесты (EOTF seam witness, interior-jitter enclosure, bracket postcondition, opaque identity) переехали вместе с ней.
  • Одностороннее lowering всех construction paths: DTO-тег material -> RoleRecipe::Material -> RoleSpec::Material / NamedRoleTable::new компилируются в приватный CompiledMaterialInvocationV1 (прецедент AlphaAnalog Core: заменить AlphaAnalog execution единым point-представлением #518). resolve_named_set перехватывает ordinal ДО recipe-dispatch с InternalInvariant-гейтами на дрейф порядка и лишние invocations.
  • Старый исполняемый путь удалён: resolve_material удалён целиком; raw RoleSpec::Material-арм — typed InternalInvariant guard (не fallback).
  • Публичный Material-синтаксис заморожен pre-C7c: фасады material.rs делегируют corridor-физике; бит-идентичность фасада и corridor закреплена тестом; публичный export-diff lib.rs не изменён.
  • Zero-floor fail-closed на обеих границах компиляции: ConfigError::MaterialFloorRequired и NamedRoleTableCompileError::Material (второй гейт для from_validated_parts).
  • Hostile scanner: corridor_representation включён в GENERIC_SOURCES (запрет client/legacy словаря), новый гейт material_physics_lives_only_in_the_generic_corridor_module доказывает отсутствие Material-физики вне generic lowering и отсутствие fn resolve_material в semantic.
  • WASM-адаптеры остаются projection-only: projection.rs/engine.rs проецируют provenance-энумы и валидируют согласованность (validate_material_provenance), дублированной математики бисекции нет — удалять нечего, свидетельство в этом описании.
  • Канонический reseal point-support капсулы после регистрации модуля в lib.rs; независимый верификатор scripts/verify_point_support_surplus.py — PASS.

Доказательства

  • Характеризационный корпус (закреплён до среза на старой физике) проходит бит-в-бит на новом compiled-пути — дифференциальный паритет через срез.
  • Sabotage-тесты: опустошённые material_invocations -> InternalInvariant без recipe-fallback; подмена entry на Zero после компиляции -> исполняется по-прежнему compiled Material (dispatch не перечитывает recipe kind).
  • Corridor multi-backdrop envelope: interior-jitter тест отвергает endpoint-only (one-backdrop) монотонность — RED при однофоновой подмене.
  • cargo test --workspace: green (кроме pre-existing platform-fixture solve_characterization::fixture_replays_bit_for_bit, падает идентично на базовом коммите — отсутствует Windows-fixture, к срезу не относится; в CI Linux не воспроизводится).
  • cargo clippy --workspace --all-targets: 0 предупреждений. cargo fmt --check: чисто.

Rollback

Revert squash-merge этого PR.

… lowering

Every public Material construction path (Brand / Family / five NeutralPick
sources, all four passport themes, mixed per-theme tones, both legal floors,
gray-background pole flip, the direct NamedRoleTable boundary with hue: None,
and the typed chromatic-source conflict on both boundaries) is pinned
bit-for-bit on the current physics: tone hex, selected alpha bits, worst
conservative contrast bits, achieved dJ' bits, committed pole, satisfied
status and the ordered 60-step bisection bracket.

The corpus is the differential oracle for the C7d one-way lowering: a missed
construction path, a compositor/order change, a single-backdrop substitute for
the [black, white] corridor or a silent degradation breaks these pins.
Sensitivity was proven by a deliberate one-bit alpha mutation (RED observed,
then reverted).
…te its physical recipe path (C7d)

- move the 60-step BackdropBox bisection physics verbatim into the private
  vocabulary-clean generic module corridor_representation (single source of
  the compositor envelope, directed-search guard and rechecked bracket)
- compile every Material construction path (config, DTO tag, direct
  NamedRoleTable::new / from_validated_parts) one-way into
  CompiledMaterialInvocationV1; resolve_named_set intercepts the ordinal
  before recipe dispatch (AlphaAnalog #518 precedent) with order-drift and
  leftover-invocation InternalInvariant guards
- raw RoleSpec::Material arm becomes a typed InternalInvariant guard;
  resolve_material and the callable old physical path are deleted
- public Material syntax stays frozen pre-C7c: material.rs facades delegate
  bit-identically to corridor physics (locked by a facade/corridor
  bit-identity test); WASM adapters remain projection-only
- zero-floor Material is rejected fail-closed at both compile boundaries
  (ConfigError::MaterialFloorRequired / NamedRoleTableCompileError::Material)
- hostile source scanner: corridor module joins GENERIC_SOURCES and a new
  gate proves no Material physics outside the generic lowering
- canonical reseal of the point-support capsule after the lib.rs module
  registration (independent verifier PASS)
@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 25 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: dac68b75-66fa-48d3-8b76-b936f7265e2f

📥 Commits

Reviewing files that changed from the base of the PR and between 01da09a and cdeecb4.

📒 Files selected for processing (13)
  • crates/labcolors-core/contracts/clean-set-srgb8-v1/receipt-v1.json
  • crates/labcolors-core/contracts/clean-set-srgb8-v1/receipt-v1.sha256
  • crates/labcolors-core/contracts/point-support-reference-surplus-q55-bps-proof-v1.json
  • crates/labcolors-core/src/config.rs
  • crates/labcolors-core/src/config/tests.rs
  • crates/labcolors-core/src/corridor_representation.rs
  • crates/labcolors-core/src/generic_boundary_tests.rs
  • crates/labcolors-core/src/lib.rs
  • crates/labcolors-core/src/material.rs
  • crates/labcolors-core/src/semantic.rs
  • packages/colors/bench/wasm.json
  • scripts/check-wasm-size-budget.mjs
  • scripts/verify_point_support_surplus.py

Comment @coderabbitai help to get the list of available commands.

… C7d CI measurement

The Material corridor lowering changes runtime WASM bytes
(378113 -> 379268 on the canonical linux-x64 toolchain-pinned job,
github-actions-run-31819594271). The budget is an exact measured pin with
zero arbitrary headroom, so the new measurement replaces the old one and
the checker file SHA-256 is re-bound to the canonical document.
…oint-support proof

The C7d reseal rewrote the proof artifact with a CRLF tail on Windows;
the release contract requires exactly one canonical JSON object followed
by one LF. Byte-level fix only: the JSON payload, verifier PASS and the
sealed capsule hashes are unchanged.
@lemone112
lemone112 merged commit cfed690 into main Aug 14, 2026
10 checks passed
@lemone112
lemone112 deleted the feat/c7d-material-lowering branch August 14, 2026 17:33
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.

1 participant