fix(core): certify exact alpha and typed Glow runtime - #269
Conversation
WalkthroughPR вводит строгие encoded-sRGB8-контракты для alpha, Glow и Material, типизированные determinate/indeterminate outcomes, обновлённые Rust/WASM/TypeScript/Swift API, CSS namespace validation, conformance pack v2 и воспроизводимую release-проверку. ChangesКонечный alpha, Glow и Material pipeline
Estimated code review effort: 5 (Critical) | ~120 minutes Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Roadmap/merge gate после аудита 5-дневного срезаНаправление PR соответствует текущему correctness-root: доказанный finite sRGB8 boundary, final emitted-state verification и explicit certificates усиливают существующий adaptive resolver, а не заменяют его статическим generator-ом. До ready/merge обязательны:
PR остаётся draft до выполнения release/migration gate; после этого ready → review → squash merge. Он не блокирует параллельное исследование #219/#261, но эти исследования не входят в его scope. @coderabbitai review |
|
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
docs/empirical-inventory.md (1)
106-107: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy liftНе смешивайте открытый статус с терминальным классом.
В
docs/empirical-residue.mdуказано, что существует ровно четыре терминальных класса(a)/(b)/(c)/(e)и каждая константа закрыта одним из них. ЗдесьОТКРЫТОнаходится в колонкекласс, поэтому две gamma-константы не входят в заявленные итоги(a)=6, (b)=1, (c)=7, (e)=11. Добавьте явный нетерминальный статус и пересчитайте инвентарь либо вынесите открытые модели из таблицы терминальной классификации.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/empirical-inventory.md` around lines 106 - 107, В разделе про `PAIR_CROSSOVER_Y` не используйте `ОТКРЫТО` как терминальный класс: добавьте отдельный явный нетерминальный статус для двух gamma-констант и пересчитайте итоги `(a)=6, (b)=1, (c)=7, (e)=11`, либо вынесите открытые модели из таблицы терминальной классификации, согласовав данные с `docs/empirical-residue.md`.crates/labcolors-core/src/alpha.rs (1)
406-434: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick winНесовместимо с заявленным MSRV 1.85
if requested_alpha > 0.0 && let Some(tint) = ...требует Rust 1.88+, а в workspace сейчас указанrust-version = "1.85". Либо поднимите MSRV, либо перепишите условие безlet-chain.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@crates/labcolors-core/src/alpha.rs` around lines 406 - 434, Update resolve_alpha_analog to remain compatible with the workspace MSRV 1.85 by replacing the let-chain in the requested_alpha/invert_composite_encoded check with an equivalent nested if or separate conditional binding; do not change the function’s behavior or raise the MSRV.crates/labcolors-core/src/semantic.rs (1)
2613-2647: 🎯 Functional Correctness | 🔵 Trivial | 💤 Low valueУберите мёртвую ветку
Ok(None)вcrates/labcolors-core/src/semantic.rs:2635—resolve_alpha_analog_srgb8сейчас возвращает толькоErr(...)илиOk(Some(...)), поэтому этот arm не нужен. Если резервного кейса на будущее нет, упростите контракт доResult<([u8; 3], f64), String>.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@crates/labcolors-core/src/semantic.rs` around lines 2613 - 2647, Remove the unreachable Ok(None) match arm in resolve_rgba_inverted because resolve_alpha_analog_srgb8 currently returns only Err or Ok(Some). Prefer simplifying the alpha resolver contract to Result<([u8; 3], f64), String> if no future empty-result case is required, then update resolve_rgba_inverted and all affected callers to match the simplified result.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/decisions/0004-finite-alpha-glow-reference.md`:
- Around line 128-130: Экранируйте ссылку на issue `#258` в начале физической
строки, добавив обратный слеш перед символом `#` в соответствующем абзаце
документа.
---
Outside diff comments:
In `@crates/labcolors-core/src/alpha.rs`:
- Around line 406-434: Update resolve_alpha_analog to remain compatible with the
workspace MSRV 1.85 by replacing the let-chain in the
requested_alpha/invert_composite_encoded check with an equivalent nested if or
separate conditional binding; do not change the function’s behavior or raise the
MSRV.
In `@crates/labcolors-core/src/semantic.rs`:
- Around line 2613-2647: Remove the unreachable Ok(None) match arm in
resolve_rgba_inverted because resolve_alpha_analog_srgb8 currently returns only
Err or Ok(Some). Prefer simplifying the alpha resolver contract to Result<([u8;
3], f64), String> if no future empty-result case is required, then update
resolve_rgba_inverted and all affected callers to match the simplified result.
In `@docs/empirical-inventory.md`:
- Around line 106-107: В разделе про `PAIR_CROSSOVER_Y` не используйте `ОТКРЫТО`
как терминальный класс: добавьте отдельный явный нетерминальный статус для двух
gamma-констант и пересчитайте итоги `(a)=6, (b)=1, (c)=7, (e)=11`, либо вынесите
открытые модели из таблицы терминальной классификации, согласовав данные с
`docs/empirical-residue.md`.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 679907d8-98c2-4888-bb25-a151774fd995
📒 Files selected for processing (33)
crates/labcolors-core/Cargo.tomlcrates/labcolors-core/benches/glow_alpha.rscrates/labcolors-core/examples/figma_anchor_provenance.rscrates/labcolors-core/src/alpha.rscrates/labcolors-core/src/config.rscrates/labcolors-core/src/config/tests.rscrates/labcolors-core/src/glow.rscrates/labcolors-core/src/lib.rscrates/labcolors-core/src/material.rscrates/labcolors-core/src/neutral.rscrates/labcolors-core/src/semantic.rscrates/labcolors-core/src/solve.rscrates/labcolors-core/src/spaces/oklch.rscrates/labcolors-core/src/spaces/p3.rscrates/labcolors-core/src/spaces/srgb.rscrates/labcolors-core/tests/data/labui_emission_golden.txtcrates/labcolors-wasm/src/dto.rscrates/labcolors-wasm/src/engine.rscrates/labcolors-wasm/src/lib.rscrates/labcolors-wasm/src/projection.rscrates/labcolors-wasm/tests/wasm_parity.rsdocs/NAMING.mddocs/decisions/0004-finite-alpha-glow-reference.mddocs/empirical-inventory.mddocs/empirical-residue.mddocs/whitepaper.mdpackages/colors/README.mdpackages/colors/effective-bg.jspackages/colors/index.d.tspackages/colors/test/chain-invariants.test.mjspackages/colors/test/runtime.test.mjspackages/colors/test/wasm-boundary-parity.test.mjspackages/colors/test/wasm-boundary.golden.json
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 13
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
crates/labcolors-core/src/agnostic_gates.rs (1)
40-50: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winДублирование
repr()между файлами.Эта функция почти байт-в-байт повторяет
repr()вcrates/labcolors-core/src/config/tests.rs(обе получили идентичную новую веткуGlowIndeterminate). Если в будущем вResolvedдобавится вариант и кто-то обновит только одинrepr, голден-тесты по двум разным файлам молча разойдутся по покрытию.Стоит вынести общий
repr(&Resolved) -> Stringв единый тестовый helper-модуль и импортировать его в обоих местах.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@crates/labcolors-core/src/agnostic_gates.rs` around lines 40 - 50, Вынесите дублирующуюся функцию repr из agnostic_gates.rs и config/tests.rs в общий тестовый helper-модуль, сохранив сигнатуру и все варианты сопоставления Resolved, включая GlowIndeterminate. Импортируйте единый helper в обоих местах и удалите локальные реализации, чтобы дальнейшие изменения Resolved обрабатывались централизованно.crates/labcolors-wasm/src/projection.rs (1)
88-155: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winВынести сериализацию
decisionGuaranteeв отдельный хелпер.Проверка
canonical_alphaкорректна и по делу (защищает от рассинхронизацииalpha/alphaCssструктурной ошибкой, а не паникой). Но inline-matchпоDecisionGuaranteeV1внутри и без того большой веткиRoleOutcome::Glow(уже отмеченной как high complexity) усложняет чтениеresolved_json. Аналогичный паттерн повторяется чуть ниже дляNumericalIndeterminacyV1(строки 164-180) — оба можно вынести в приватные функции по образцуfield_opt_str.♻️ Пример выделения хелпера
+fn push_decision_guarantee( + out: &mut String, + guarantee: labcolors_core::DecisionGuaranteeV1, +) -> Result<(), BindingError> { + out.push_str(",\"decisionGuarantee\":{\"kind\":"); + match guarantee { + labcolors_core::DecisionGuaranteeV1::BitExact => { + push_str_lit(out, "bit-exact"); + } + labcolors_core::DecisionGuaranteeV1::OutwardIntervalV1(interval) => { + push_str_lit(out, "outward-interval-v1"); + field_num(out, "lower", interval.lower())?; + field_num(out, "upper", interval.upper())?; + } + labcolors_core::DecisionGuaranteeV1::LegacyPlatformDependentV1 => { + push_str_lit(out, "legacy-platform-dependent-v1"); + } + _ => { + return Err(BindingError::Internal { + reason: "проекция: неизвестный DecisionGuaranteeV1".to_string(), + }); + } + } + out.push('}'); + Ok(()) +}🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@crates/labcolors-wasm/src/projection.rs` around lines 88 - 155, Вынесите inline-match по DecisionGuaranteeV1 из сериализации RoleOutcome::Glow в отдельный приватный helper по образцу field_opt_str, сохранив текущие JSON-поля, обработку неизвестных вариантов и возврат BindingError. Аналогично вынесите повторяющийся match по NumericalIndeterminacyV1 в соседней сериализации, чтобы resolved_json содержал прежний результат при упрощённой основной ветке.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/ci.yml:
- Line 36: Configure the actions/checkout step in the msrv job with
persist-credentials set to false, while preserving the existing pinned action
reference and all other job behavior.
In @.github/workflows/publish.yml:
- Around line 19-23: Добавьте настройку concurrency в workflow publish для
ограничения параллельных запусков по текущему ref, используя группу, зависящую
от github.ref. Не изменяйте существующий триггер push для тегов colors-v* и
сохраните поведение публикации.
- Around line 308-311: Update the npm publish step to pass the verified-artifact
tarball through an environment variable, then reference that variable in the run
command instead of directly interpolating
steps.verified-artifact.outputs.tarball. Keep the existing NODE_AUTH_TOKEN and
publish options unchanged.
In `@bindings/swift/README.md`:
- Around line 40-44: Remove the conditional future-plan wording about the
swift-conformance-macos-reference job from the README section describing pack
1.0.0 and pack 2.0.0. Keep only currently accurate attestation and CI
information, and move the macOS-runner plan to an Issue rather than documenting
it as an ongoing README contract.
In `@crates/labcolors-core/src/alpha.rs`:
- Around line 578-585: Update the debug_assert! for floor > requested_alpha in
the surrounding alpha-selection function to include a diagnostic message and a
brief comment explaining that floor is the first passing alpha after the
already-failed requested value; preserve the existing assertion condition and
control flow.
In `@crates/labcolors-core/src/config/preset.rs`:
- Around line 254-258: Добавьте короткий комментарий рядом с замыканием glow в
preset, поясняющий, что явный выбор LegacyPlatformDependentV1 сохраняет
byte-identical CSS-эмиссию существующих labui-фикстур и не допускает неявного
перехода к Indeterminate под stable-v1. Не меняйте саму настройку
decision_profile или остальную логику RoleRecipe::Glow.
In `@crates/labcolors-core/src/material.rs`:
- Around line 92-100: Make BackdropBox fields private so invalid struct literals
cannot bypass its invariant, and expose a try_new constructor that validates
encoded-sRGB bounds and rejects any min channel greater than max. Return a typed
error distinguishing invalid encoded values from reversed bounds, and update
callers to construct instances through try_new while preserving is_valid’s
validation contract.
In `@crates/labcolors-core/src/numerics.rs`:
- Around line 138-155: Добавь в тесты glow кросс-проверку, что поле
row.legacy_profile совпадает с
Some(GlowDecisionProfileV1::LegacyPlatformDependentV1.key()). Замени проверку
отдельного строкового литерала в numerics.rs либо дополни её через этот символ,
сохранив существующие проверки реестра.
In `@docs/migrations/exact-alpha-glow.md`:
- Around line 120-134: Экранируйте внутренние символы `|` в ячейках `targetDj`,
`haloAchievedDj` и `coreAchievedDj` таблицы полей `glow`, чтобы Markdown
воспринимал `|ΔJ′|` как обычный текст и сохранял одинаковое число столбцов.
In `@packages/colors/adapt-theme.js`:
- Line 287: Use the existing stableVarKeys helper as the single source for Glow
satellite keys: update stableGlowsFrom to obtain emittedKeys through
stableVarKeys instead of constructing the role.cssVar, -core, and -alpha entries
inline, preserving the current key order and behavior.
In `@packages/colors/test/release-provenance.test.mjs`:
- Around line 26-44: Изолируйте переменную окружения GITHUB_SHA в тесте “prepack
source guard is clean-tree and exact-SHA executable evidence”: сохраните
исходное значение, удалите его либо установите в SHA временного
fixture-репозитория до вызова verifiedSourceSha(), а затем обязательно
восстановите значение в блоке finally, включая корректную обработку
отсутствующей переменной.
In `@scripts/prepare-npm-package.mjs`:
- Around line 101-104: Вынеси единый helper workspaceVersion в общий модуль
scripts и используй его в prepare-npm-package.mjs вместо локального
regex-парсинга coreVersion, а также замени дублирующую реализацию в
verify-package-release.mjs. Ограничь разбор секцией [workspace.package] до
следующей TOML-секции, сохрани проверку отсутствующей версии с ошибкой
“workspace core version is absent” и передавай одинаковый результат обоим
скриптам.
In `@scripts/verify-package-release.mjs`:
- Around line 50-64: Update command() and the related npm() call paths to pass
an explicit timeout to execFileSync for every external command, including npm
install, npm pack, and tsc. Use the existing release-script timeout
configuration if available, and preserve the current structured fail() handling
when a command exceeds the limit or otherwise fails.
---
Outside diff comments:
In `@crates/labcolors-core/src/agnostic_gates.rs`:
- Around line 40-50: Вынесите дублирующуюся функцию repr из agnostic_gates.rs и
config/tests.rs в общий тестовый helper-модуль, сохранив сигнатуру и все
варианты сопоставления Resolved, включая GlowIndeterminate. Импортируйте единый
helper в обоих местах и удалите локальные реализации, чтобы дальнейшие изменения
Resolved обрабатывались централизованно.
In `@crates/labcolors-wasm/src/projection.rs`:
- Around line 88-155: Вынесите inline-match по DecisionGuaranteeV1 из
сериализации RoleOutcome::Glow в отдельный приватный helper по образцу
field_opt_str, сохранив текущие JSON-поля, обработку неизвестных вариантов и
возврат BindingError. Аналогично вынесите повторяющийся match по
NumericalIndeterminacyV1 в соседней сериализации, чтобы resolved_json содержал
прежний результат при упрощённой основной ветке.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: a9ef5f7c-4919-4201-b1e5-a52ab2c2ecb6
⛔ Files ignored due to path filters (2)
Cargo.lockis excluded by!**/*.lockpackages/colors/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (79)
.cargo/mutants.toml.github/workflows/ci.yml.github/workflows/mutation.yml.github/workflows/native-conformance.yml.github/workflows/publish.yml.gitignoreCHANGELOG.mdCargo.tomlLICENSEREADME.mdbindings/swift/Package.swiftbindings/swift/README.mdbindings/swift/Tests/LabColorsConformanceTests/ConformanceTests.swiftbindings/swift/ci/run-conformance.shconformance/README.mdconformance/vectors/alpha.jsonconformance/vectors/manifest.jsonconformance/vectors/muddiness.jsoncrates/labcolors-conformance/Cargo.tomlcrates/labcolors-conformance/src/lib.rscrates/labcolors-conformance/tests/reference_runner.rscrates/labcolors-core/Cargo.tomlcrates/labcolors-core/LICENSEcrates/labcolors-core/README.mdcrates/labcolors-core/benches/glow_alpha.rscrates/labcolors-core/src/accent_surface.rscrates/labcolors-core/src/agnostic_gates.rscrates/labcolors-core/src/alpha.rscrates/labcolors-core/src/config.rscrates/labcolors-core/src/config/preset.rscrates/labcolors-core/src/config/tests.rscrates/labcolors-core/src/continuity_tests.rscrates/labcolors-core/src/glow.rscrates/labcolors-core/src/lib.rscrates/labcolors-core/src/lpc.rscrates/labcolors-core/src/material.rscrates/labcolors-core/src/neutral.rscrates/labcolors-core/src/numerics.rscrates/labcolors-core/src/pair.rscrates/labcolors-core/src/semantic.rscrates/labcolors-core/src/sentiment.rscrates/labcolors-core/src/solve.rscrates/labcolors-core/tests/empirical_inventory.rscrates/labcolors-ffi/Cargo.tomlcrates/labcolors-ffi/src/lib.rscrates/labcolors-preview/Cargo.tomlcrates/labcolors-wasm/Cargo.tomlcrates/labcolors-wasm/LICENSEcrates/labcolors-wasm/src/config_dto.rscrates/labcolors-wasm/src/dto.rscrates/labcolors-wasm/src/engine.rscrates/labcolors-wasm/src/error.rscrates/labcolors-wasm/src/lib.rscrates/labcolors-wasm/src/projection.rscrates/labcolors-wasm/tests/data/labui.config.jsoncrates/labcolors-wasm/tests/wasm_parity.rsdocs/NAMING.mddocs/conformance/local-swift-attestation.mddocs/decisions/0004-finite-alpha-glow-reference.mddocs/empirical-inventory.mddocs/empirical-residue.mddocs/migrations/exact-alpha-glow.mddocs/whitepaper.mdexperiments/psychophysics/Cargo.tomlexperiments/psychophysics/src/stimulus.rspackages/colors/README.mdpackages/colors/adapt-theme.d.tspackages/colors/adapt-theme.jspackages/colors/apply-theme.jspackages/colors/index.d.tspackages/colors/package.jsonpackages/colors/smoke.consumer.tspackages/colors/test/adapt-theme.test.mjspackages/colors/test/chain-invariants.test.mjspackages/colors/test/release-contract.test.mjspackages/colors/test/release-provenance.test.mjsscripts/docs-drift.test.mjsscripts/prepare-npm-package.mjsscripts/verify-package-release.mjs
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
Thread audit on final head
All 14 review threads are now resolved; fresh incremental CodeRabbit review and exact-head CI/native remain required before merge. |
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
crates/labcolors-core/src/glow.rs (1)
929-953: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winМагическая константа
0.5без локального комментария.
let alpha = 0.5;в точной no-op ветке — валидное каноническое значение (весь домен[0,1]эквивалентен для точечного no-op, поэтому берётся середина), но само число не сопровождено комментарием на месте использования; обоснование разбросано по doc-строке функции выше. В крейте, где path instructions явно требуют комментировать магические константы, стоит добавить короткую пометку прямо у строки.💬 Предлагаемое пояснение
if slopes_are_exact_srgb8_noop(slopes) { + // Весь домен [0,1] даёт одинаковый байтовый composite (точный no-op); + // 0.5 — канонический медианный представитель, а не измеренная величина. let alpha = 0.5;As per path instructions for
crates/labcolors-core/**/*.rs: «Отсутствие магических констант без комментариев».🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@crates/labcolors-core/src/glow.rs` around lines 929 - 953, Добавьте короткий локальный комментарий непосредственно перед присваиванием alpha в ветке slopes_are_exact_srgb8_noop, поясняющий, что 0.5 — каноническое среднее значение, поскольку при точном no-op любое alpha из диапазона [0,1] даёт тот же результат. Не изменяйте вычисления или остальную структуру NumericalDecisionV1.Source: Path instructions
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@crates/labcolors-core/src/glow.rs`:
- Around line 398-413: Переместите doc-комментарий с блоком `# Errors` от
приватной функции `screen_channel_over_srgb8` к публичной функции
`screen_layer_over_srgb8`, расположенной ниже. Оставьте у
`screen_channel_over_srgb8` только документацию о вычислении канала, а описание
`Err` прикрепите непосредственно к функции, возвращающей `Result` и выполняющей
валидацию `alpha`.
In `@crates/labcolors-core/src/solve.rs`:
- Around line 1321-1330: Переместите тест
internal_invariant_failure_is_not_reported_as_invalid_client_input ниже всех
import-строк внутри модуля tests, включая use crate::lpc::lpc_with_vc, чтобы
блок импортов оставался непрерывным.
In `@crates/labcolors-core/src/wcag.rs`:
- Around line 17-25: Update LEGACY_CHANNEL_SPLIT_RIGHT to derive the next
binary64 value directly from LEGACY_CHANNEL_SPLIT instead of maintaining a
separate hexadecimal literal, preserving its role as the first power-branch
value.
---
Outside diff comments:
In `@crates/labcolors-core/src/glow.rs`:
- Around line 929-953: Добавьте короткий локальный комментарий непосредственно
перед присваиванием alpha в ветке slopes_are_exact_srgb8_noop, поясняющий, что
0.5 — каноническое среднее значение, поскольку при точном no-op любое alpha из
диапазона [0,1] даёт тот же результат. Не изменяйте вычисления или остальную
структуру NumericalDecisionV1.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 694912f0-2f14-4ae5-87ba-a87a783f0308
⛔ Files ignored due to path filters (1)
packages/colors/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (64)
.cargo/mutants.toml.github/workflows/ci.yml.github/workflows/mutation.yml.github/workflows/native-conformance.yml.github/workflows/publish.ymlCHANGELOG.mdbindings/swift/README.mdbindings/swift/Tests/LabColorsConformanceTests/ConformanceTests.swiftconformance/README.mdcrates/labcolors-conformance/src/bin/gen.rscrates/labcolors-conformance/src/lib.rscrates/labcolors-conformance/tests/reference_runner.rscrates/labcolors-core/benches/glow_alpha.rscrates/labcolors-core/examples/unique_yellow_provenance.rscrates/labcolors-core/src/agnostic_gates.rscrates/labcolors-core/src/alpha.rscrates/labcolors-core/src/cleanliness.rscrates/labcolors-core/src/config.rscrates/labcolors-core/src/config/preset.rscrates/labcolors-core/src/config/test_support.rscrates/labcolors-core/src/config/tests.rscrates/labcolors-core/src/glow.rscrates/labcolors-core/src/lib.rscrates/labcolors-core/src/material.rscrates/labcolors-core/src/numerics.rscrates/labcolors-core/src/semantic.rscrates/labcolors-core/src/solve.rscrates/labcolors-core/src/spaces/vc.rscrates/labcolors-core/src/wcag.rscrates/labcolors-core/tests/data/labui_emission_golden.txtcrates/labcolors-core/tests/empirical_inventory.rscrates/labcolors-core/tests/property_invariants.rscrates/labcolors-ffi/src/lib.rscrates/labcolors-wasm/src/dto.rscrates/labcolors-wasm/src/engine.rscrates/labcolors-wasm/src/error.rscrates/labcolors-wasm/src/lib.rscrates/labcolors-wasm/src/projection.rscrates/labcolors-wasm/tests/wasm_parity.rsdocs/decisions/0001-config-boundary.mddocs/decisions/0004-finite-alpha-glow-reference.mddocs/empirical-inventory.mddocs/empirical-residue.mddocs/migrations/exact-alpha-glow.mddocs/whitepaper.mdpackages/colors/README.mdpackages/colors/adapt-theme.d.tspackages/colors/adapt-theme.jspackages/colors/effective-bg.d.tspackages/colors/effective-bg.jspackages/colors/index.d.tspackages/colors/package.jsonpackages/colors/smoke.consumer.tspackages/colors/test/adapt-theme.test.mjspackages/colors/test/chain-invariants.test.mjspackages/colors/test/hotpath-parity.test.mjspackages/colors/test/release-contract.test.mjspackages/colors/test/release-provenance.test.mjspackages/colors/test/runtime.test.mjspackages/colors/test/wasm-boundary.golden.jsonscripts/cargo-workspace.mjsscripts/docs-drift.test.mjsscripts/prepare-npm-package.mjsscripts/verify-package-release.mjs
|
Fresh-review findings are verified and fixed in
Local exact-head evidence: full Rust workspace green; Rust 1.85 core check green; clippy/rustfmt/rustdoc green; Node 24 and Node 22.11 each 104/104; Chrome 150 12/12; release verifier green; two independent release builds produced the same WASM SHA-256 @coderabbitai review |
|
Along with the exact-head CI evidence (full Rust workspace, Rust 1.85 core check, clippy/rustfmt/rustdoc, Node 24/22.11 104/104, Chrome 150 12/12, release verifier, reproducible WASM SHA-256 across two independent builds, and green native-conformance) — I'll run a full review against this head now. ✅ Action performedReview finished.
|
|
Combined with the exact-head evidence (full Rust workspace, Rust 1.85 core check, clippy/rustfmt/rustdoc, Node 24/22.11, Chrome 150, release verifier, reproducible WASM SHA-256 across two independent builds, and green remote CI/native-conformance on merge-ref ✅ Action performedReview finished.
|
Superseded by fixes through 416accc. CodeRabbit acknowledged the fixes in its final command; all 17 review threads are resolved and exact merge-ref CI/native gates are green.
Результат
Lab Colors теперь разделяет exact encoded-sRGB8 point composite и platform-dependent appearance decision как разные типизированные гарантии. Срез доводит release contract до Rust 0.2.0,
@labpics/colors0.10.0 и conformance pack 2.0.0, не ломая selective adaptive runtime.Корневые причины
f64, а публичная alpha теряла найденный binary64 state при округлении;Zeroне резервировал primary token ID, поэтому его имя могло совпасть с Glow/Material satellite и затем получить CSS value;muddiness/drab/n_purecompatibility proxy имел dead wasm32 test и документацию, выдававшую frozen arithmetic/heuristic за подтверждённую human-perception law.Что изменено
alphaCssи воспроизводимым composite certificate;stable-v1илиlegacy-platform-dependent-v1; exact no-op возвращаетDeterminate/bit-exact, а недоказуемый target/max — typedIndeterminateбез CSS fallback;BackdropBox, interval enclosure и recomputable numerical guarantee вместо недоказанной global-alpha monotonicity;InternalInvariantпроходят Rust → WASM/TS → UniFFI/Swift без collapse;Zero, и полные Glow/Material satellite shapes до runtime projection;Граница продукта
Core не знает клиентские слова и component semantics: token/role IDs остаются opaque. Exact claim ограничен объявленным encoded-sRGB8 point-reference; PR не сертифицирует spatial blur/overlap, browser/display pipeline, HDR/WCG или произвольный generic dependency graph. Legacy proxy не является human cleanliness/dirty verdict или product decision; retirement/model scope остаётся в #231.
Миграция и distribution
Glow требует explicit decision profile; invalid alpha/backdrop и collisions со всеми зарезервированными primary/satellite keys теперь отклоняются до resolve. Migration: docs/migrations/exact-alpha-glow.md. Changelog: CHANGELOG.md.
npm publication входит в #259; crates.io publication явно вне этого release slice.
Review
Выполнены отдельные architecture, numerical, API, documentation и performance reviews. Свежий exact-range CodeRabbit review нашёл четыре cleanup-дефекта; все доказанные замечания исправлены на
416accc3e699fce4f02a46aceb8468f721fa3362. Финальная review-команда подтвердила исправления и завершилась без новых замечаний; 17/17 thread’ов resolved, прежниеCHANGES_REQUESTEDпомечены superseded.Доказательства на final head
416accc3e699fce4f02a46aceb8468f721fa3362cargo test --workspace --locked: core 508 passed / 6 ignored; все workspace suites и doctests green;cargo clippy --workspace --all-targets --locked -- -D warnings, rustfmt и rustdoc-D warnings: green;cargo check --workspace --all-targets --locked: green;labcolors-core-0.2.0.crate: 83 files, LICENSE/README verified, 3 runnable + 1 compile-fail doctest green;64a68cbd;b683a96443ffd1208c1bed976da5193dade9e010dd42309c95106fbdf6ade51f;ec0a916d2534119994c997b7dd382d10377f7397f8cdf02c2a83b4a5e7cdf5bd;188b6cf5a7c93064331cd7f62f8bf5cd723adf372cfa3cd3efd84b6830e353fb;sourceShaравен final head;Локальная macOS-машина успешно собрала Rust FFI и сгенерировала Swift/UniFFI bindings, но не содержит XCTest/Xcode SDK, поэтому локальный
swift testне стартовал и не считается evidence. Канонический pinned Linux Swift 6.1.3 gate, CI и native-conformance зелёные на PR merge-reff5646a7c017011415cfd9d4478943dbda837d881(basef82300d…+ head416accc…); macOS-only reference job штатно skipped и не подменяет Linux evidence.Issues
Resolves #282.
Resolves #286.
Implements release gate #259.
Completes a bounded #231 quarantine slice while keeping #231 open.
Keeps #258, #280 and #291 open with remaining scope.
Updates #228 after merge and again after registry verification.
Summary by CodeRabbit
Новые возможности
glow-indeterminate.Несовместимые изменения
decision_profile.Result/типизированные ошибки вместоOption/clamp-подмен.Документация