feat(core): seal revision-bound point support - #447
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
WalkthroughChangesPR добавляет point-support retained-surplus вычисления и revision-bound session pipeline, переводит наблюдения и joint evaluation на новые контракты, регистрирует numerical evidence и усиливает CI/npm-релиз проверки канонических байтов, SHA-256, proof binding и release-manifest schema v4. Point-support pipeline
Package release validation
Estimated code review effort: 5 (Critical) | ~120 minutes Sequence Diagram(s)sequenceDiagram
participant CI
participant PointSupportSessionV1
participant prepare_observation
participant BoundPointSupportRecheckV1
participant verifyPackageRelease
participant npmTarball
CI->>PointSupportSessionV1: run point-support tests
PointSupportSessionV1->>prepare_observation: prepare revision-bound update
prepare_observation->>BoundPointSupportRecheckV1: evaluate observation with permit
BoundPointSupportRecheckV1-->>PointSupportSessionV1: PointSupportDecisionV1
verifyPackageRelease->>npmTarball: extract packed evidence
npmTarball-->>verifyPackageRelease: bytes and manifest records
verifyPackageRelease->>BoundPointSupportRecheckV1: validate numerical proof chain
BoundPointSupportRecheckV1-->>verifyPackageRelease: validated evidence
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Remove speculative private accessors, exercise every stability anchor and typed report diagnostic, and make the allocation-complete inline witness choice explicit. Rebind the exact source proof, ratchet the measured WASM artifact, and reconcile main through b12afe0.
Reissue the WCAG and dependent point-support proof metadata after the criterion-free facade addition without changing the numerical kernel, artifact, thresholds, or claim. Reconcile the package tests with the canonical four-file numerical-evidence inventory and release schema V4 instead of restoring the removed WCAG-only compatibility export.
Regenerate the exact WCAG22 vector metadata after the proof reissue, recompute the raw-family pack digest, and make the pack-10 byte guard describe the current canonical identity instead of a stale pack-9 compatibility promise.
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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/publish.yml:
- Around line 283-405: Сведите реализацию exactJsonPayloadWithoutTopLevelField и
логику POINT_SUPPORT_* в .github/workflows/publish.yml и
scripts/verify-package-release.mjs к единому источнику; если вынести общий
модуль невозможно, добавьте отдельную CI-проверку, сравнивающую их
эквивалентность, чтобы publish-gate и локальная валидация всегда оставались
синхронными.
In `@scripts/verify_point_support_surplus.py`:
- Around line 356-371: Update the zip call in multiply to use strict=True when
combining left_monomial and right_monomial powers, preserving the existing
multiplication behavior while detecting any future exponent-length mismatch.
- Around line 379-388: Замените тавтологичные проверки вокруг identity_anchor в
universal_algebraic_certificate на независимый символьный вывод anchor-surplus
из определения contrast ratio (20L+S)/(20D+S) и порогов 1, 3 и 4.5. Проверьте
коэффициенты 2, 7 и 40 через исходные выражения с l_value, d_value и
scale_value, не используя identity_anchor как эталон; сохраните явные assert для
трёх формул и их проверку относительно anchor_surplus().
🪄 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: 79f3775a-d400-4284-8cb9-c7d3c66a110f
📒 Files selected for processing (37)
.github/workflows/ci.yml.github/workflows/publish.ymlconformance/vectors/manifest.jsonconformance/vectors/wcag22.jsoncrates/labcolors-conformance/tests/pack_v10_contract.rscrates/labcolors-core/contracts/point-support-reference-surplus-q55-bps-proof-v1.jsoncrates/labcolors-core/contracts/wcag22-srgb8-q55-proof-v1.jsoncrates/labcolors-core/src/appearance.rscrates/labcolors-core/src/composition.rscrates/labcolors-core/src/constraints/mod.rscrates/labcolors-core/src/constraints/readability.rscrates/labcolors-core/src/joint.rscrates/labcolors-core/src/joint_tests.rscrates/labcolors-core/src/lib.rscrates/labcolors-core/src/numerics.rscrates/labcolors-core/src/observation.rscrates/labcolors-core/src/observation_tests.rscrates/labcolors-core/src/pair.rscrates/labcolors-core/src/point_support.rscrates/labcolors-core/src/point_support_tests.rscrates/labcolors-core/src/recheck.rscrates/labcolors-core/src/recheck_tests.rscrates/labcolors-core/src/session.rscrates/labcolors-core/src/session_tests.rscrates/labcolors-core/src/wcag22.rspackages/colors/bench/wasm.jsonpackages/colors/package.jsonpackages/colors/test/capability-manifest.test.mjspackages/colors/test/release-contract.test.mjspackages/colors/test/release-provenance.test.mjsscripts/check-wasm-size-budget.mjsscripts/prepare-npm-package.mjsscripts/release-evidence.mjsscripts/test_point_support_surplus_source_binding.pyscripts/verify-package-release.mjsscripts/verify_point_support_surplus.pyscripts/verify_wcag22_q55.py
💤 Files with no reviewable changes (4)
- crates/labcolors-core/src/constraints/readability.rs
- crates/labcolors-core/src/recheck_tests.rs
- crates/labcolors-core/src/recheck.rs
- crates/labcolors-core/src/constraints/mod.rs
Derive anchor and retained-surplus identities independently, separate Q55 and basis-point scales, centralize release verification data, and keep the extracted publish validator under the same test contract.
Scope — private C8d/F2 Core slice
This replaces the draft public DTO cut with one Session-owned, crate-private protocol. A compiled physical program owns the canonical keyed surface schema and declared occurrence order; the Session alone admits revision-bound observations, supplies the private evaluation permit, and commits a new head only after successful full-support evaluation.
recheckand readability bridge implementations are removed instead of retained as parallel truth;Evidence boundary
The retained-surplus artifact certifies this exact law:
The artifact binds the exact bytes of an 18-file private Rust semantic cone, including its two WCAG compile-time inputs, and has 33 fail-closed source controls. Its general integer/rational identities are checked dependency-free and cross-checked by the recorded Wolfram Language result.
This is deliberately narrower than whole-evaluator certification. It is not whole-crate/compiler/toolchain attestation and does not attest package/FFI/browser transport, renderer pixels, renderer equivalence outside encoded-sRGB8 source-over, or an exact unknown baseline surplus. Evaluation failure yields no successful decision and no Session commit.
Release verification now carries the proof as metadata, binds staged and packed bytes to the exact repository source, and recomputes its self-digest without lossy JavaScript round-tripping of Q55/u128 integer lexemes. The publish gate independently requires the packed proof to equal the exact tag checkout.
Public and policy boundary
No public Program/authoring root, point-support/observation/session type, callable WASM/package evaluator, FFI wire, controller migration, renderer claim, or LPC
ReportOnlypolicy lands here.ThemeConfig/RoleReciperemain the sole frozen public authoring root until the atomic C7c cut.WCAG remains an explicit independent criterion axis. A WCAG failure is never relabelled as a pass; retained surplus is neither WCAG, readability, LPC, cleanliness, nor sentiment evidence. The npm tarball and numerical capability manifest expose proof metadata for the private Core site, not a callable point-support API.
The existing public raw
semantic::recheck_against*controller route is unchanged legacy debt for #419; this PR does not add a compatibility shim or claim that hard-cut complete.Validation
measure_wcag22_srgb8;50dc0131;c2825216354b796924560d98e01ae5cebedf324c47e7b26332119c61aded783e.Authoritative exact-head validation is green: CI run
29878830524(Rust, full finite-domain WCAG proof, package/release, reproducible WASM, real browser, and Node 22 floor) and Swift run29878830519.Still open
This is one private vertical slice, not overall production readiness. Package-private WASM/controller migration (#419), exact #429 resource caps, C8e, the atomic public C7c authoring cut, and later LPC/LCS/cleanliness/sentiment work remain separate DAG steps.
Refs #417 #419 #421 #429 #442 #443 #408
Summary by CodeRabbit
schemaVersion.