Skip to content

C8c: строгий browser gate Point | Unknown - #364

Merged
lemone112 merged 1 commit into
mainfrom
agent/c8c-point-unknown-observation
Jul 20, 2026
Merged

C8c: строгий browser gate Point | Unknown#364
lemone112 merged 1 commit into
mainfrom
agent/c8c-point-unknown-observation

Conversation

@lemone112

@lemone112 lemone112 commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Срез

Package-private C8c browser observation bridge поверх F2.

supported computed-CSS point stack → Point(hex)
unsupported / unproven host state    → Unknown(reason)

Реализовано

  • один strict observePointBackground для watchTheme и adaptTheme;
  • никакого default white: прозрачный root требует caller-declared opaque canvas;
  • каждый translucent source-over edge исполняется Core __over, а не JS accumulator;
  • вся ancestor chain проверяется на cycle/depth и group effects даже после первого opaque colour;
  • gradients/images, blend, filters, backdrop-filter, masks, clip-path, non-default background-clip, box-shadow, group opacity, non-rendered/display-contents/content-visibility-auto состояния дают typed Unknown;
  • invalid canvas и host seams отклоняются до первого host read;
  • watchTheme/adaptTheme на Unknown не вызывают resolver/recheck и не пишут DOM;
  • initial Unknown → Point bootstrap и pending theme intent сохраняются;
  • Q1 observer acquisition, retained cleanup ownership, async error delivery и reentrant cancellation сохранены;
  • explicit authored background не может подделать внутренний {kind: point|unknown} channel;
  • legacy white-fallback walker удалён; effective-bg.js оставляет только parser/interpolation helpers;
  • private bridge упаковывается в npm tarball, но не становится public export;
  • OKLCH и public-claim contract tests переведены на нового observation owner.

Доказательства финального merge-head 62f7b0c2

  • Rust workspace tests и независимые WCAG Q55/neutral-axis proofs — PASS;
  • rustfmt, clippy -D warnings, MSRV 1.85, rustdoc и packaged doctests — PASS;
  • cargo-audit — PASS;
  • reproducible runtime WASM build и exact size ratchet — PASS;
  • полный npm test и TypeScript — PASS;
  • byte-exact npm tarball и manifest — PASS;
  • headless Chrome WASM tests — PASS;
  • packed public entrypoints на Node 22 floor — PASS;
  • Swift 6.1.3 conformance — PASS.

Границы

  • Base: F2 merge 9d91b841.
  • Один clean commit 62f7b0c2; 13 package/controller/contract-test files.
  • Нет изменений Core public API, DOM output protocol, Raster/Field inference или public observation API.

Summary by CodeRabbit

  • Новые возможности

    • Добавлено строгое определение фонового цвета с учётом прозрачности, видимости и неподдерживаемых CSS-эффектов.
    • Добавлена опция canvas для прозрачного корня.
    • Добавлен типизированный обработчик ошибок onError.
  • Исправления

    • При неопределённом фоне обновления темы и DOM временно приостанавливаются без подстановки приблизительного цвета.
    • Автоматическое обновление корректно возобновляется после появления достоверных данных.
    • Сохранено выбранное пользователем намерение темы при временно недоступном фоне.
  • Документация

    • Уточнены публичные TypeScript-типы и описание поведения состояний Point и Unknown.

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Draft review-status comment superseded by current implementation and package diagnostics.

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown

Controller locations использованы; диагностический список больше не актуален.

@lemone112
lemone112 force-pushed the agent/c8c-point-unknown-observation branch 2 times, most recently from c442da5 to 4af896d Compare July 20, 2026 08:12

@lemone112 lemone112 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Owner self-review in progress. Required before merge: exact full CI, npm tarball includes the package-private bridge, no public export of observation internals, unsupported host state remains Unknown, and no legacy white fallback/controller lifecycle shadow remains.

@lemone112 lemone112 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@coderabbitai review

@github-actions

Copy link
Copy Markdown

C8c exact package RED

  • npm ci: 0
  • typecheck: 0
  • runtime: 1

typecheck


test

    '\n' +
    'permissions:\n' +
    '  contents: read\n' +
    '  pull-requests: write\n' +
    '\n' +
    '              else:\n' +
    '                  useful = []\n' +
    '                  for index, line in enumerate(lines):\n' +
    "                      if ('not ok ' in line or 'AssertionError' in line or 'ERR_' in line or 'Error:' in line or 'failureType:' in line):\n" +
    '                          useful.extend(lines[max(0, index - 3):index + 10])\n' +
    "              parts.extend(['', f'#### {name}', '```text', '\\n'.join(useful[-limit:]), '```'])\n" +
    "          print(json.dumps({'body': '\\n'.join(parts)[:20000]}))\n" +
    '          PY\n' +
    '          curl --fail-with-body \\\n' +
    '            -X POST \\\n' +
    '            -H "Authorization: Bearer $GH_TOKEN" \\\n' +
    '            -H "Accept: application/vnd.github+json" \\\n' +
    '            -H "X-GitHub-Api-Version: 2022-11-28" \\\n' +
      at Test.run (node:internal/test_runner/test:1175:12)
      at async Test.processPendingSubtests (node:internal/test_runner/test:787:7) {
    generatedMessage: true,
    code: 'ERR_ASSERTION',
    actual: 'name: C8c package diagnostics\n\non: [pull_request]\n\npermissions:\n  contents: read\n  pull-requests: write\n\njobs:\n  package-diagnostics:\n    runs-on: [self-hosted, Linux, X64]\n    env:\n      CARGO_TERM_COLOR: never\n      NO_COLOR: 1\n    steps:\n      - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3\n        with:\n          persist-credentials: false\n      - name: Isolated toolchain paths\n        shell: bash\n        run: |\n          echo "RUSTUP_HOME=$RUNNER_TEMP/rustup-$GITHUB_JOB" >> "$GITHUB_ENV"\n          echo "CARGO_HOME=$RUNNER_TEMP/cargo-$GITHUB_JOB" >> "$GITHUB_ENV"\n          echo "TMPDIR=$RUNNER_TEMP/tmp-$GITHUB_JOB" >> "$GITHUB_ENV"\n          mkdir -p "$RUNNER_TEMP/tmp-$GITHUB_JOB"\n      - uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 # master @ 2026-03-27\n        with:\n          toolchain: 1.96.0\n          targets: wasm32-unknown-unknown\n      - name: Build package bindings\n        shell: bash\n        run: |\n          set -euo pipefail\n          cargo install wasm-pack --version 0.13.1 --locked\n          "$CARGO_HOME/bin/wasm-pack" build crates/labcolors-wasm --release --target web --out-dir ../../packages/colors/pkg --out-name labcolors --locked\n      - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0\n        with:\n          node-version: 24.14.0\n          cache: npm\n          cache-dependency-path: packages/colors/package-lock.json\n      - name: Publish exact type/runtime RED\n        working-directory: packages/colors\n        env:\n          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        shell: bash\n        run: |\n          set +e\n          npm ci >"$RUNNER_TEMP/npm-ci.log" 2>&1\n          ci_status=$?\n          npm run typecheck >"$RUNNER_TEMP/typecheck.log" 2>&1\n          type_status=$?\n          npm test >"$RUNNER_TEMP/test.log" 2>&1\n          test_status=$?\n          set -e\n          python3 - "$RUNNER_TEMP" "$ci_status" "$type_status" "$test_status" >"$RUNNER_TEMP/comment.json" <<\'PY\'\n          import json\n          import pathlib\n          import re\n          import sys\n\n          root = pathlib.Path(sys.argv[1])\n          ansi = re.compile(r\'\\x1b\\[[0-9;]*m\')\n          parts = [\n              \'### C8c exact package RED\',\n              \'\',\n              f\'- npm ci: `{sys.argv[2]}`\',\n              f\'- typecheck: `{sys.argv[3]}`\',\n              f\'- runtime: `{sys.argv[4]}`\',\n          ]\n          for name, limit in [(\'typecheck\', 180), (\'test\', 300)]:\n              lines = [ansi.sub(\'\', line) for line in root.joinpath(name + \'.log\').read_text(errors=\'replace\').splitlines()]\n              if name == \'typecheck\':\n                  useful = [line for line in lines if (\'error TS\' in line or \'.ts(\' in line or \'.d.ts(\' in line)]\n              else:\n                  useful = []\n                  for index, line in enumerate(lines):\n                      if (\'not ok \' in line or \'AssertionError\' in line or \'ERR_\' in line or \'Error:\' in line or \'failureType:\' in line):\n                          useful.extend(lines[max(0, index - 3):index + 10])\n              parts.extend([\'\', f\'#### {name}\', \'```text\', \'\\n\'.join(useful[-limit:]), \'```\'])\n          print(json.dumps({\'body\': \'\\n\'.join(parts)[:20000]}))\n          PY\n          curl --fail-with-body \\\n            -X POST \\\n            -H "Authorization: Bearer $GH_TOKEN" \\\n            -H "Accept: application/vnd.github+json" \\\n            -H "X-GitHub-Api-Version: 2022-11-28" \\\n            "https://api.github.com/repos/Labpics-Team/lab-colors/issues/364/comments" \\\n            --data-binary @"$RUNNER_TEMP/comment.json"\n          test "$ci_status" -eq 0\n          test "$type_status" -eq 0\n          test "$test_status" -eq 0\n',
    expected: /^\s*MSRV_TOOLCHAIN: 1\.85\.0$/m,
    operator: 'match',
    diff: 'simple'
  }

test at test/release-contract.test.mjs:1187:1
✖ WASM runtime budget is one canonical self-contained exact contract (3.417617ms)
  AssertionError [ERR_ASSERTION]: The input did not match the regular expression /name: enforce measured WASM runtime budget/u. Input:
      at async Test.processPendingSubtests (node:internal/test_runner/test:787:7) {
    generatedMessage: true,
    code: 'ERR_ASSERTION',
    actual: 'name: C8c package diagnostics\n\non: [pull_request]\n\npermissions:\n  contents: read\n  pull-requests: write\n\njobs:\n  package-diagnostics:\n    runs-on: [self-hosted, Linux, X64]\n    env:\n      CARGO_TERM_COLOR: never\n      NO_COLOR: 1\n    steps:\n      - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3\n        with:\n          persist-credentials: false\n      - name: Isolated toolchain paths\n        shell: bash\n        run: |\n          echo "RUSTUP_HOME=$RUNNER_TEMP/rustup-$GITHUB_JOB" >> "$GITHUB_ENV"\n          echo "CARGO_HOME=$RUNNER_TEMP/cargo-$GITHUB_JOB" >> "$GITHUB_ENV"\n          echo "TMPDIR=$RUNNER_TEMP/tmp-$GITHUB_JOB" >> "$GITHUB_ENV"\n          mkdir -p "$RUNNER_TEMP/tmp-$GITHUB_JOB"\n      - uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 # master @ 2026-03-27\n        with:\n          toolchain: 1.96.0\n          targets: wasm32-unknown-unknown\n      - name: Build package bindings\n        shell: bash\n        run: |\n          set -euo pipefail\n          cargo install wasm-pack --version 0.13.1 --locked\n          "$CARGO_HOME/bin/wasm-pack" build crates/labcolors-wasm --release --target web --out-dir ../../packages/colors/pkg --out-name labcolors --locked\n      - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0\n        with:\n          node-version: 24.14.0\n          cache: npm\n          cache-dependency-path: packages/colors/package-lock.json\n      - name: Publish exact type/runtime RED\n        working-directory: packages/colors\n        env:\n          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        shell: bash\n        run: |\n          set +e\n          npm ci >"$RUNNER_TEMP/npm-ci.log" 2>&1\n          ci_status=$?\n          npm run typecheck >"$RUNNER_TEMP/typecheck.log" 2>&1\n          type_status=$?\n          npm test >"$RUNNER_TEMP/test.log" 2>&1\n          test_status=$?\n          set -e\n          python3 - "$RUNNER_TEMP" "$ci_status" "$type_status" "$test_status" >"$RUNNER_TEMP/comment.json" <<\'PY\'\n          import json\n          import pathlib\n          import re\n          import sys\n\n          root = pathlib.Path(sys.argv[1])\n          ansi = re.compile(r\'\\x1b\\[[0-9;]*m\')\n          parts = [\n              \'### C8c exact package RED\',\n              \'\',\n              f\'- npm ci: `{sys.argv[2]}`\',\n              f\'- typecheck: `{sys.argv[3]}`\',\n              f\'- runtime: `{sys.argv[4]}`\',\n          ]\n          for name, limit in [(\'typecheck\', 180), (\'test\', 300)]:\n              lines = [ansi.sub(\'\', line) for line in root.joinpath(name + \'.log\').read_text(errors=\'replace\').splitlines()]\n              if name == \'typecheck\':\n                  useful = [line for line in lines if (\'error TS\' in line or \'.ts(\' in line or \'.d.ts(\' in line)]\n              else:\n                  useful = []\n                  for index, line in enumerate(lines):\n                      if (\'not ok \' in line or \'AssertionError\' in line or \'ERR_\' in line or \'Error:\' in line or \'failureType:\' in line):\n                          useful.extend(lines[max(0, index - 3):index + 10])\n              parts.extend([\'\', f\'#### {name}\', \'```text\', \'\\n\'.join(useful[-limit:]), \'```\'])\n          print(json.dumps({\'body\': \'\\n\'.join(parts)[:20000]}))\n          PY\n          curl --fail-with-body \\\n            -X POST \\\n            -H "Authorization: Bearer $GH_TOKEN" \\\n            -H "Accept: application/vnd.github+json" \\\n            -H "X-GitHub-Api-Version: 2022-11-28" \\\n            "https://api.github.com/repos/Labpics-Team/lab-colors/issues/364/comments" \\\n            --data-binary @"$RUNNER_TEMP/comment.json"\n          test "$ci_status" -eq 0\n          test "$type_status" -eq 0\n          test "$test_status" -eq 0\n',
    expected: /^\s*MSRV_TOOLCHAIN: 1\.85\.0$/m,
    operator: 'match',
    diff: 'simple'
  }

test at test/release-contract.test.mjs:1187:1
✖ WASM runtime budget is one canonical self-contained exact contract (3.417617ms)
  AssertionError [ERR_ASSERTION]: The input did not match the regular expression /name: enforce measured WASM runtime budget/u. Input:
  

test at test/release-contract.test.mjs:1187:1
✖ WASM runtime budget is one canonical self-contained exact contract (3.417617ms)
  AssertionError [ERR_ASSERTION]: The input did not match the regular expression /name: enforce measured WASM runtime budget/u. Input:
  
  'name: C8c package diagnostics\n' +
    '\n' +
    'on: [pull_request]\n' +
    '\n' +
    'permissions:\n' +
    '  contents: read\n' +
    '  pull-requests: write\n' +
    '\n' +
    '              else:\n' +
    '                  useful = []\n' +
    '                  for index, line in enumerate(lines):\n' +
    "                      if ('not ok ' in line or 'AssertionError' in line or 'ERR_' in line or 'Error:' in line or 'failureType:' in line):\n" +
    '                          useful.extend(lines[max(0, index - 3):index + 10])\n' +
    "              parts.extend(['', f'#### {name}', '```text', '\\n'.join(useful[-limit:]), '```'])\n" +
    "          print(json.dumps({'body': '\\n'.join(parts)[:20000]}))\n" +
    '          PY\n' +
    '          curl --fail-with-body \\\n' +
    '            -X POST \\\n' +
    '            -H "Authorization: Bearer $GH_TOKEN" \\\n' +
    '            -H "Accept: application/vnd.github+json" \\\n' +
    '            -H "X-GitHub-Api-Version: 2022-11-28" \\\n' +
      at async Test.run (node:internal/test_runner/test:1125:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:787:7) {
    generatedMessage: true,
    code: 'ERR_ASSERTION',
    actual: 'name: C8c package diagnostics\n\non: [pull_request]\n\npermissions:\n  contents: read\n  pull-requests: write\n\njobs:\n  package-diagnostics:\n    runs-on: [self-hosted, Linux, X64]\n    env:\n      CARGO_TERM_COLOR: never\n      NO_COLOR: 1\n    steps:\n      - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3\n        with:\n          persist-credentials: false\n      - name: Isolated toolchain paths\n        shell: bash\n        run: |\n          echo "RUSTUP_HOME=$RUNNER_TEMP/rustup-$GITHUB_JOB" >> "$GITHUB_ENV"\n          echo "CARGO_HOME=$RUNNER_TEMP/cargo-$GITHUB_JOB" >> "$GITHUB_ENV"\n          echo "TMPDIR=$RUNNER_TEMP/tmp-$GITHUB_JOB" >> "$GITHUB_ENV"\n          mkdir -p "$RUNNER_TEMP/tmp-$GITHUB_JOB"\n      - uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 # master @ 2026-03-27\n        with:\n          toolchain: 1.96.0\n          targets: wasm32-unknown-unknown\n      - name: Build package bindings\n        shell: bash\n        run: |\n          set -euo pipefail\n          cargo install wasm-pack --version 0.13.1 --locked\n          "$CARGO_HOME/bin/wasm-pack" build crates/labcolors-wasm --release --target web --out-dir ../../packages/colors/pkg --out-name labcolors --locked\n      - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0\n        with:\n          node-version: 24.14.0\n          cache: npm\n          cache-dependency-path: packages/colors/package-lock.json\n      - name: Publish exact type/runtime RED\n        working-directory: packages/colors\n        env:\n          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        shell: bash\n        run: |\n          set +e\n          npm ci >"$RUNNER_TEMP/npm-ci.log" 2>&1\n          ci_status=$?\n          npm run typecheck >"$RUNNER_TEMP/typecheck.log" 2>&1\n          type_status=$?\n          npm test >"$RUNNER_TEMP/test.log" 2>&1\n          test_status=$?\n          set -e\n          python3 - "$RUNNER_TEMP" "$ci_status" "$type_status" "$test_status" >"$RUNNER_TEMP/comment.json" <<\'PY\'\n          import json\n          import pathlib\n          import re\n          import sys\n\n          root = pathlib.Path(sys.argv[1])\n          ansi = re.compile(r\'\\x1b\\[[0-9;]*m\')\n          parts = [\n              \'### C8c exact package RED\',\n              \'\',\n              f\'- npm ci: `{sys.argv[2]}`\',\n              f\'- typecheck: `{sys.argv[3]}`\',\n              f\'- runtime: `{sys.argv[4]}`\',\n          ]\n          for name, limit in [(\'typecheck\', 180), (\'test\', 300)]:\n              lines = [ansi.sub(\'\', line) for line in root.joinpath(name + \'.log\').read_text(errors=\'replace\').splitlines()]\n              if name == \'typecheck\':\n                  useful = [line for line in lines if (\'error TS\' in line or \'.ts(\' in line or \'.d.ts(\' in line)]\n              else:\n                  useful = []\n                  for index, line in enumerate(lines):\n                      if (\'not ok \' in line or \'AssertionError\' in line or \'ERR_\' in line or \'Error:\' in line or \'failureType:\' in line):\n                          useful.extend(lines[max(0, index - 3):index + 10])\n              parts.extend([\'\', f\'#### {name}\', \'```text\', \'\\n\'.join(useful[-limit:]), \'```\'])\n          print(json.dumps({\'body\': \'\\n\'.join(parts)[:20000]}))\n          PY\n          curl --fail-with-body \\\n            -X POST \\\n            -H "Authorization: Bearer $GH_TOKEN" \\\n            -H "Accept: application/vnd.github+json" \\\n            -H "X-GitHub-Api-Version: 2022-11-28" \\\n            "https://api.github.com/repos/Labpics-Team/lab-colors/issues/364/comments" \\\n            --data-binary @"$RUNNER_TEMP/comment.json"\n          test "$ci_status" -eq 0\n          test "$type_status" -eq 0\n          test "$test_status" -eq 0\n',
    expected: /name: enforce measured WASM runtime budget/u,
    operator: 'match',
    diff: 'simple'
  }

test at test/release-contract.test.mjs:1516:1
✖ npm release carries and re-verifies the exact WCAG22 finite evidence (0.911565ms)
  AssertionError [ERR_ASSERTION]: The input did not match the regular expression /python3 scripts\/verify_wcag22_q55\.py/. Input:
      at async Test.processPendingSubtests (node:internal/test_runner/test:787:7) {
    generatedMessage: true,
    code: 'ERR_ASSERTION',
    actual: 'name: C8c package diagnostics\n\non: [pull_request]\n\npermissions:\n  contents: read\n  pull-requests: write\n\njobs:\n  package-diagnostics:\n    runs-on: [self-hosted, Linux, X64]\n    env:\n      CARGO_TERM_COLOR: never\n      NO_COLOR: 1\n    steps:\n      - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3\n        with:\n          persist-credentials: false\n      - name: Isolated toolchain paths\n        shell: bash\n        run: |\n          echo "RUSTUP_HOME=$RUNNER_TEMP/rustup-$GITHUB_JOB" >> "$GITHUB_ENV"\n          echo "CARGO_HOME=$RUNNER_TEMP/cargo-$GITHUB_JOB" >> "$GITHUB_ENV"\n          echo "TMPDIR=$RUNNER_TEMP/tmp-$GITHUB_JOB" >> "$GITHUB_ENV"\n          mkdir -p "$RUNNER_TEMP/tmp-$GITHUB_JOB"\n      - uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 # master @ 2026-03-27\n        with:\n          toolchain: 1.96.0\n          targets: wasm32-unknown-unknown\n      - name: Build package bindings\n        shell: bash\n        run: |\n          set -euo pipefail\n          cargo install wasm-pack --version 0.13.1 --locked\n          "$CARGO_HOME/bin/wasm-pack" build crates/labcolors-wasm --release --target web --out-dir ../../packages/colors/pkg --out-name labcolors --locked\n      - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0\n        with:\n          node-version: 24.14.0\n          cache: npm\n          cache-dependency-path: packages/colors/package-lock.json\n      - name: Publish exact type/runtime RED\n        working-directory: packages/colors\n        env:\n          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        shell: bash\n        run: |\n          set +e\n          npm ci >"$RUNNER_TEMP/npm-ci.log" 2>&1\n          ci_status=$?\n          npm run typecheck >"$RUNNER_TEMP/typecheck.log" 2>&1\n          type_status=$?\n          npm test >"$RUNNER_TEMP/test.log" 2>&1\n          test_status=$?\n          set -e\n          python3 - "$RUNNER_TEMP" "$ci_status" "$type_status" "$test_status" >"$RUNNER_TEMP/comment.json" <<\'PY\'\n          import json\n          import pathlib\n          import re\n          import sys\n\n          root = pathlib.Path(sys.argv[1])\n          ansi = re.compile(r\'\\x1b\\[[0-9;]*m\')\n          parts = [\n              \'### C8c exact package RED\',\n              \'\',\n              f\'- npm ci: `{sys.argv[2]}`\',\n              f\'- typecheck: `{sys.argv[3]}`\',\n              f\'- runtime: `{sys.argv[4]}`\',\n          ]\n          for name, limit in [(\'typecheck\', 180), (\'test\', 300)]:\n              lines = [ansi.sub(\'\', line) for line in root.joinpath(name + \'.log\').read_text(errors=\'replace\').splitlines()]\n              if name == \'typecheck\':\n                  useful = [line for line in lines if (\'error TS\' in line or \'.ts(\' in line or \'.d.ts(\' in line)]\n              else:\n                  useful = []\n                  for index, line in enumerate(lines):\n                      if (\'not ok \' in line or \'AssertionError\' in line or \'ERR_\' in line or \'Error:\' in line or \'failureType:\' in line):\n                          useful.extend(lines[max(0, index - 3):index + 10])\n              parts.extend([\'\', f\'#### {name}\', \'```text\', \'\\n\'.join(useful[-limit:]), \'```\'])\n          print(json.dumps({\'body\': \'\\n\'.join(parts)[:20000]}))\n          PY\n          curl --fail-with-body \\\n            -X POST \\\n            -H "Authorization: Bearer $GH_TOKEN" \\\n            -H "Accept: application/vnd.github+json" \\\n            -H "X-GitHub-Api-Version: 2022-11-28" \\\n            "https://api.github.com/repos/Labpics-Team/lab-colors/issues/364/comments" \\\n            --data-binary @"$RUNNER_TEMP/comment.json"\n          test "$ci_status" -eq 0\n          test "$type_status" -eq 0\n          test "$test_status" -eq 0\n',
    expected: /name: enforce measured WASM runtime budget/u,
    operator: 'match',
    diff: 'simple'
  }

test at test/release-contract.test.mjs:1516:1
✖ npm release carries and re-verifies the exact WCAG22 finite evidence (0.911565ms)
  AssertionError [ERR_ASSERTION]: The input did not match the regular expression /python3 scripts\/ver

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

No new commits to review since the last review.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: b7d25d25-fac2-4508-87fa-71ab3dd58df5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

Добавлен строгий адаптер наблюдения точечного фона с результатами point или unknown. watchTheme и adaptTheme используют его, откладывая вычисление и DOM-коммиты без point-доказательства. Опция fallback заменена на canvas, обновлены типы, документация и тесты.

Changes

Strict point observation

Layer / File(s) Summary
Наблюдение и композиция фона
packages/colors/background-observation.js, packages/colors/effective-bg.js, packages/colors/package.json
Добавлен observePointBackground, который валидирует CSS-сигналы, обходит предков, композитит поддерживаемые слои через __over и возвращает point либо unknown; старая функция effectiveBackground удалена.
Интеграция watchTheme
packages/colors/watch-theme.js, packages/colors/watch-theme.d.ts, packages/colors/test/c8c-point-unknown.test.mjs, packages/colors/test/runtime.test.mjs
watchTheme использует строгие наблюдения, не коммитит DOM при unknown, сохраняет последнее состояние и принимает canvas вместо fallback.
Интеграция adaptTheme
packages/colors/adapt-theme.js, packages/colors/adapt-theme.d.ts, packages/colors/test/adapt-theme.test.mjs, packages/colors/test/c8c-point-unknown.test.mjs
adaptTheme откладывает tick, bootstrap и setTheme-коммит до появления point-доказательства, сохраняя намерение выбранной темы.
Проверка публичной упаковки и CSS-сценариев
packages/colors/test/c8c-hostile-ancestor.test.mjs, packages/colors/test/oklch-parse.test.mjs, packages/colors/test/public-api-cleanup.test.mjs
Тесты покрывают hostile-предков, прозрачные корни, canvas, циклы, ограничения глубины, Oklch-композицию и доступность нового runtime-артефакта без внутренних экспортов.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 30.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Заголовок точно отражает основное изменение: строгий browser gate с результатами Point/Unknown.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/c8c-point-unknown-observation

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


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

@github-actions

Copy link
Copy Markdown

C8c exact package RED

  • npm ci: 0
  • typecheck: 0
  • runtime: 1

typecheck


test

    '\n' +
    'permissions:\n' +
    '  contents: read\n' +
    '  pull-requests: write\n' +
    '\n' +
    '              else:\n' +
    '                  useful = []\n' +
    '                  for index, line in enumerate(lines):\n' +
    "                      if ('not ok ' in line or 'AssertionError' in line or 'ERR_' in line or 'Error:' in line or 'failureType:' in line):\n" +
    '                          useful.extend(lines[max(0, index - 3):index + 10])\n' +
    "              parts.extend(['', f'#### {name}', '```text', '\\n'.join(useful[-limit:]), '```'])\n" +
    "          print(json.dumps({'body': '\\n'.join(parts)[:20000]}))\n" +
    '          PY\n' +
    '          curl --fail-with-body \\\n' +
    '            -X POST \\\n' +
    '            -H "Authorization: Bearer $GH_TOKEN" \\\n' +
    '            -H "Accept: application/vnd.github+json" \\\n' +
    '            -H "X-GitHub-Api-Version: 2022-11-28" \\\n' +
      at Test.run (node:internal/test_runner/test:1175:12)
      at async Test.processPendingSubtests (node:internal/test_runner/test:787:7) {
    generatedMessage: true,
    code: 'ERR_ASSERTION',
    actual: 'name: C8c package diagnostics\n\non: [pull_request]\n\npermissions:\n  contents: read\n  pull-requests: write\n\njobs:\n  package-diagnostics:\n    runs-on: [self-hosted, Linux, X64]\n    env:\n      CARGO_TERM_COLOR: never\n      NO_COLOR: 1\n    steps:\n      - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3\n        with:\n          persist-credentials: false\n      - name: Isolated toolchain paths\n        shell: bash\n        run: |\n          echo "RUSTUP_HOME=$RUNNER_TEMP/rustup-$GITHUB_JOB" >> "$GITHUB_ENV"\n          echo "CARGO_HOME=$RUNNER_TEMP/cargo-$GITHUB_JOB" >> "$GITHUB_ENV"\n          echo "TMPDIR=$RUNNER_TEMP/tmp-$GITHUB_JOB" >> "$GITHUB_ENV"\n          mkdir -p "$RUNNER_TEMP/tmp-$GITHUB_JOB"\n      - uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 # master @ 2026-03-27\n        with:\n          toolchain: 1.96.0\n          targets: wasm32-unknown-unknown\n      - name: Build package bindings\n        shell: bash\n        run: |\n          set -euo pipefail\n          cargo install wasm-pack --version 0.13.1 --locked\n          "$CARGO_HOME/bin/wasm-pack" build crates/labcolors-wasm --release --target web --out-dir ../../packages/colors/pkg --out-name labcolors --locked\n      - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0\n        with:\n          node-version: 24.14.0\n          cache: npm\n          cache-dependency-path: packages/colors/package-lock.json\n      - name: Publish exact type/runtime RED\n        working-directory: packages/colors\n        env:\n          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        shell: bash\n        run: |\n          set +e\n          npm ci >"$RUNNER_TEMP/npm-ci.log" 2>&1\n          ci_status=$?\n          npm run typecheck >"$RUNNER_TEMP/typecheck.log" 2>&1\n          type_status=$?\n          npm test >"$RUNNER_TEMP/test.log" 2>&1\n          test_status=$?\n          set -e\n          python3 - "$RUNNER_TEMP" "$ci_status" "$type_status" "$test_status" >"$RUNNER_TEMP/comment.json" <<\'PY\'\n          import json\n          import pathlib\n          import re\n          import sys\n\n          root = pathlib.Path(sys.argv[1])\n          ansi = re.compile(r\'\\x1b\\[[0-9;]*m\')\n          parts = [\n              \'### C8c exact package RED\',\n              \'\',\n              f\'- npm ci: `{sys.argv[2]}`\',\n              f\'- typecheck: `{sys.argv[3]}`\',\n              f\'- runtime: `{sys.argv[4]}`\',\n          ]\n          for name, limit in [(\'typecheck\', 180), (\'test\', 300)]:\n              lines = [ansi.sub(\'\', line) for line in root.joinpath(name + \'.log\').read_text(errors=\'replace\').splitlines()]\n              if name == \'typecheck\':\n                  useful = [line for line in lines if (\'error TS\' in line or \'.ts(\' in line or \'.d.ts(\' in line)]\n              else:\n                  useful = []\n                  for index, line in enumerate(lines):\n                      if (\'not ok \' in line or \'AssertionError\' in line or \'ERR_\' in line or \'Error:\' in line or \'failureType:\' in line):\n                          useful.extend(lines[max(0, index - 3):index + 10])\n              parts.extend([\'\', f\'#### {name}\', \'```text\', \'\\n\'.join(useful[-limit:]), \'```\'])\n          print(json.dumps({\'body\': \'\\n\'.join(parts)[:20000]}))\n          PY\n          curl --fail-with-body \\\n            -X POST \\\n            -H "Authorization: Bearer $GH_TOKEN" \\\n            -H "Accept: application/vnd.github+json" \\\n            -H "X-GitHub-Api-Version: 2022-11-28" \\\n            "https://api.github.com/repos/Labpics-Team/lab-colors/issues/364/comments" \\\n            --data-binary @"$RUNNER_TEMP/comment.json"\n          test "$ci_status" -eq 0\n          test "$type_status" -eq 0\n          test "$test_status" -eq 0\n',
    expected: /^\s*MSRV_TOOLCHAIN: 1\.85\.0$/m,
    operator: 'match',
    diff: 'simple'
  }

test at test/release-contract.test.mjs:1187:1
✖ WASM runtime budget is one canonical self-contained exact contract (4.460398ms)
  AssertionError [ERR_ASSERTION]: The input did not match the regular expression /name: enforce measured WASM runtime budget/u. Input:
      at async Test.processPendingSubtests (node:internal/test_runner/test:787:7) {
    generatedMessage: true,
    code: 'ERR_ASSERTION',
    actual: 'name: C8c package diagnostics\n\non: [pull_request]\n\npermissions:\n  contents: read\n  pull-requests: write\n\njobs:\n  package-diagnostics:\n    runs-on: [self-hosted, Linux, X64]\n    env:\n      CARGO_TERM_COLOR: never\n      NO_COLOR: 1\n    steps:\n      - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3\n        with:\n          persist-credentials: false\n      - name: Isolated toolchain paths\n        shell: bash\n        run: |\n          echo "RUSTUP_HOME=$RUNNER_TEMP/rustup-$GITHUB_JOB" >> "$GITHUB_ENV"\n          echo "CARGO_HOME=$RUNNER_TEMP/cargo-$GITHUB_JOB" >> "$GITHUB_ENV"\n          echo "TMPDIR=$RUNNER_TEMP/tmp-$GITHUB_JOB" >> "$GITHUB_ENV"\n          mkdir -p "$RUNNER_TEMP/tmp-$GITHUB_JOB"\n      - uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 # master @ 2026-03-27\n        with:\n          toolchain: 1.96.0\n          targets: wasm32-unknown-unknown\n      - name: Build package bindings\n        shell: bash\n        run: |\n          set -euo pipefail\n          cargo install wasm-pack --version 0.13.1 --locked\n          "$CARGO_HOME/bin/wasm-pack" build crates/labcolors-wasm --release --target web --out-dir ../../packages/colors/pkg --out-name labcolors --locked\n      - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0\n        with:\n          node-version: 24.14.0\n          cache: npm\n          cache-dependency-path: packages/colors/package-lock.json\n      - name: Publish exact type/runtime RED\n        working-directory: packages/colors\n        env:\n          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        shell: bash\n        run: |\n          set +e\n          npm ci >"$RUNNER_TEMP/npm-ci.log" 2>&1\n          ci_status=$?\n          npm run typecheck >"$RUNNER_TEMP/typecheck.log" 2>&1\n          type_status=$?\n          npm test >"$RUNNER_TEMP/test.log" 2>&1\n          test_status=$?\n          set -e\n          python3 - "$RUNNER_TEMP" "$ci_status" "$type_status" "$test_status" >"$RUNNER_TEMP/comment.json" <<\'PY\'\n          import json\n          import pathlib\n          import re\n          import sys\n\n          root = pathlib.Path(sys.argv[1])\n          ansi = re.compile(r\'\\x1b\\[[0-9;]*m\')\n          parts = [\n              \'### C8c exact package RED\',\n              \'\',\n              f\'- npm ci: `{sys.argv[2]}`\',\n              f\'- typecheck: `{sys.argv[3]}`\',\n              f\'- runtime: `{sys.argv[4]}`\',\n          ]\n          for name, limit in [(\'typecheck\', 180), (\'test\', 300)]:\n              lines = [ansi.sub(\'\', line) for line in root.joinpath(name + \'.log\').read_text(errors=\'replace\').splitlines()]\n              if name == \'typecheck\':\n                  useful = [line for line in lines if (\'error TS\' in line or \'.ts(\' in line or \'.d.ts(\' in line)]\n              else:\n                  useful = []\n                  for index, line in enumerate(lines):\n                      if (\'not ok \' in line or \'AssertionError\' in line or \'ERR_\' in line or \'Error:\' in line or \'failureType:\' in line):\n                          useful.extend(lines[max(0, index - 3):index + 10])\n              parts.extend([\'\', f\'#### {name}\', \'```text\', \'\\n\'.join(useful[-limit:]), \'```\'])\n          print(json.dumps({\'body\': \'\\n\'.join(parts)[:20000]}))\n          PY\n          curl --fail-with-body \\\n            -X POST \\\n            -H "Authorization: Bearer $GH_TOKEN" \\\n            -H "Accept: application/vnd.github+json" \\\n            -H "X-GitHub-Api-Version: 2022-11-28" \\\n            "https://api.github.com/repos/Labpics-Team/lab-colors/issues/364/comments" \\\n            --data-binary @"$RUNNER_TEMP/comment.json"\n          test "$ci_status" -eq 0\n          test "$type_status" -eq 0\n          test "$test_status" -eq 0\n',
    expected: /^\s*MSRV_TOOLCHAIN: 1\.85\.0$/m,
    operator: 'match',
    diff: 'simple'
  }

test at test/release-contract.test.mjs:1187:1
✖ WASM runtime budget is one canonical self-contained exact contract (4.460398ms)
  AssertionError [ERR_ASSERTION]: The input did not match the regular expression /name: enforce measured WASM runtime budget/u. Input:
  

test at test/release-contract.test.mjs:1187:1
✖ WASM runtime budget is one canonical self-contained exact contract (4.460398ms)
  AssertionError [ERR_ASSERTION]: The input did not match the regular expression /name: enforce measured WASM runtime budget/u. Input:
  
  'name: C8c package diagnostics\n' +
    '\n' +
    'on: [pull_request]\n' +
    '\n' +
    'permissions:\n' +
    '  contents: read\n' +
    '  pull-requests: write\n' +
    '\n' +
    '              else:\n' +
    '                  useful = []\n' +
    '                  for index, line in enumerate(lines):\n' +
    "                      if ('not ok ' in line or 'AssertionError' in line or 'ERR_' in line or 'Error:' in line or 'failureType:' in line):\n" +
    '                          useful.extend(lines[max(0, index - 3):index + 10])\n' +
    "              parts.extend(['', f'#### {name}', '```text', '\\n'.join(useful[-limit:]), '```'])\n" +
    "          print(json.dumps({'body': '\\n'.join(parts)[:20000]}))\n" +
    '          PY\n' +
    '          curl --fail-with-body \\\n' +
    '            -X POST \\\n' +
    '            -H "Authorization: Bearer $GH_TOKEN" \\\n' +
    '            -H "Accept: application/vnd.github+json" \\\n' +
    '            -H "X-GitHub-Api-Version: 2022-11-28" \\\n' +
      at async Test.run (node:internal/test_runner/test:1125:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:787:7) {
    generatedMessage: true,
    code: 'ERR_ASSERTION',
    actual: 'name: C8c package diagnostics\n\non: [pull_request]\n\npermissions:\n  contents: read\n  pull-requests: write\n\njobs:\n  package-diagnostics:\n    runs-on: [self-hosted, Linux, X64]\n    env:\n      CARGO_TERM_COLOR: never\n      NO_COLOR: 1\n    steps:\n      - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3\n        with:\n          persist-credentials: false\n      - name: Isolated toolchain paths\n        shell: bash\n        run: |\n          echo "RUSTUP_HOME=$RUNNER_TEMP/rustup-$GITHUB_JOB" >> "$GITHUB_ENV"\n          echo "CARGO_HOME=$RUNNER_TEMP/cargo-$GITHUB_JOB" >> "$GITHUB_ENV"\n          echo "TMPDIR=$RUNNER_TEMP/tmp-$GITHUB_JOB" >> "$GITHUB_ENV"\n          mkdir -p "$RUNNER_TEMP/tmp-$GITHUB_JOB"\n      - uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 # master @ 2026-03-27\n        with:\n          toolchain: 1.96.0\n          targets: wasm32-unknown-unknown\n      - name: Build package bindings\n        shell: bash\n        run: |\n          set -euo pipefail\n          cargo install wasm-pack --version 0.13.1 --locked\n          "$CARGO_HOME/bin/wasm-pack" build crates/labcolors-wasm --release --target web --out-dir ../../packages/colors/pkg --out-name labcolors --locked\n      - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0\n        with:\n          node-version: 24.14.0\n          cache: npm\n          cache-dependency-path: packages/colors/package-lock.json\n      - name: Publish exact type/runtime RED\n        working-directory: packages/colors\n        env:\n          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        shell: bash\n        run: |\n          set +e\n          npm ci >"$RUNNER_TEMP/npm-ci.log" 2>&1\n          ci_status=$?\n          npm run typecheck >"$RUNNER_TEMP/typecheck.log" 2>&1\n          type_status=$?\n          npm test >"$RUNNER_TEMP/test.log" 2>&1\n          test_status=$?\n          set -e\n          python3 - "$RUNNER_TEMP" "$ci_status" "$type_status" "$test_status" >"$RUNNER_TEMP/comment.json" <<\'PY\'\n          import json\n          import pathlib\n          import re\n          import sys\n\n          root = pathlib.Path(sys.argv[1])\n          ansi = re.compile(r\'\\x1b\\[[0-9;]*m\')\n          parts = [\n              \'### C8c exact package RED\',\n              \'\',\n              f\'- npm ci: `{sys.argv[2]}`\',\n              f\'- typecheck: `{sys.argv[3]}`\',\n              f\'- runtime: `{sys.argv[4]}`\',\n          ]\n          for name, limit in [(\'typecheck\', 180), (\'test\', 300)]:\n              lines = [ansi.sub(\'\', line) for line in root.joinpath(name + \'.log\').read_text(errors=\'replace\').splitlines()]\n              if name == \'typecheck\':\n                  useful = [line for line in lines if (\'error TS\' in line or \'.ts(\' in line or \'.d.ts(\' in line)]\n              else:\n                  useful = []\n                  for index, line in enumerate(lines):\n                      if (\'not ok \' in line or \'AssertionError\' in line or \'ERR_\' in line or \'Error:\' in line or \'failureType:\' in line):\n                          useful.extend(lines[max(0, index - 3):index + 10])\n              parts.extend([\'\', f\'#### {name}\', \'```text\', \'\\n\'.join(useful[-limit:]), \'```\'])\n          print(json.dumps({\'body\': \'\\n\'.join(parts)[:20000]}))\n          PY\n          curl --fail-with-body \\\n            -X POST \\\n            -H "Authorization: Bearer $GH_TOKEN" \\\n            -H "Accept: application/vnd.github+json" \\\n            -H "X-GitHub-Api-Version: 2022-11-28" \\\n            "https://api.github.com/repos/Labpics-Team/lab-colors/issues/364/comments" \\\n            --data-binary @"$RUNNER_TEMP/comment.json"\n          test "$ci_status" -eq 0\n          test "$type_status" -eq 0\n          test "$test_status" -eq 0\n',
    expected: /name: enforce measured WASM runtime budget/u,
    operator: 'match',
    diff: 'simple'
  }

test at test/release-contract.test.mjs:1516:1
✖ npm release carries and re-verifies the exact WCAG22 finite evidence (1.045166ms)
  AssertionError [ERR_ASSERTION]: The input did not match the regular expression /python3 scripts\/verify_wcag22_q55\.py/. Input:
      at async Test.processPendingSubtests (node:internal/test_runner/test:787:7) {
    generatedMessage: true,
    code: 'ERR_ASSERTION',
    actual: 'name: C8c package diagnostics\n\non: [pull_request]\n\npermissions:\n  contents: read\n  pull-requests: write\n\njobs:\n  package-diagnostics:\n    runs-on: [self-hosted, Linux, X64]\n    env:\n      CARGO_TERM_COLOR: never\n      NO_COLOR: 1\n    steps:\n      - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3\n        with:\n          persist-credentials: false\n      - name: Isolated toolchain paths\n        shell: bash\n        run: |\n          echo "RUSTUP_HOME=$RUNNER_TEMP/rustup-$GITHUB_JOB" >> "$GITHUB_ENV"\n          echo "CARGO_HOME=$RUNNER_TEMP/cargo-$GITHUB_JOB" >> "$GITHUB_ENV"\n          echo "TMPDIR=$RUNNER_TEMP/tmp-$GITHUB_JOB" >> "$GITHUB_ENV"\n          mkdir -p "$RUNNER_TEMP/tmp-$GITHUB_JOB"\n      - uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 # master @ 2026-03-27\n        with:\n          toolchain: 1.96.0\n          targets: wasm32-unknown-unknown\n      - name: Build package bindings\n        shell: bash\n        run: |\n          set -euo pipefail\n          cargo install wasm-pack --version 0.13.1 --locked\n          "$CARGO_HOME/bin/wasm-pack" build crates/labcolors-wasm --release --target web --out-dir ../../packages/colors/pkg --out-name labcolors --locked\n      - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0\n        with:\n          node-version: 24.14.0\n          cache: npm\n          cache-dependency-path: packages/colors/package-lock.json\n      - name: Publish exact type/runtime RED\n        working-directory: packages/colors\n        env:\n          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        shell: bash\n        run: |\n          set +e\n          npm ci >"$RUNNER_TEMP/npm-ci.log" 2>&1\n          ci_status=$?\n          npm run typecheck >"$RUNNER_TEMP/typecheck.log" 2>&1\n          type_status=$?\n          npm test >"$RUNNER_TEMP/test.log" 2>&1\n          test_status=$?\n          set -e\n          python3 - "$RUNNER_TEMP" "$ci_status" "$type_status" "$test_status" >"$RUNNER_TEMP/comment.json" <<\'PY\'\n          import json\n          import pathlib\n          import re\n          import sys\n\n          root = pathlib.Path(sys.argv[1])\n          ansi = re.compile(r\'\\x1b\\[[0-9;]*m\')\n          parts = [\n              \'### C8c exact package RED\',\n              \'\',\n              f\'- npm ci: `{sys.argv[2]}`\',\n              f\'- typecheck: `{sys.argv[3]}`\',\n              f\'- runtime: `{sys.argv[4]}`\',\n          ]\n          for name, limit in [(\'typecheck\', 180), (\'test\', 300)]:\n              lines = [ansi.sub(\'\', line) for line in root.joinpath(name + \'.log\').read_text(errors=\'replace\').splitlines()]\n              if name == \'typecheck\':\n                  useful = [line for line in lines if (\'error TS\' in line or \'.ts(\' in line or \'.d.ts(\' in line)]\n              else:\n                  useful = []\n                  for index, line in enumerate(lines):\n                      if (\'not ok \' in line or \'AssertionError\' in line or \'ERR_\' in line or \'Error:\' in line or \'failureType:\' in line):\n                          useful.extend(lines[max(0, index - 3):index + 10])\n              parts.extend([\'\', f\'#### {name}\', \'```text\', \'\\n\'.join(useful[-limit:]), \'```\'])\n          print(json.dumps({\'body\': \'\\n\'.join(parts)[:20000]}))\n          PY\n          curl --fail-with-body \\\n            -X POST \\\n            -H "Authorization: Bearer $GH_TOKEN" \\\n            -H "Accept: application/vnd.github+json" \\\n            -H "X-GitHub-Api-Version: 2022-11-28" \\\n            "https://api.github.com/repos/Labpics-Team/lab-colors/issues/364/comments" \\\n            --data-binary @"$RUNNER_TEMP/comment.json"\n          test "$ci_status" -eq 0\n          test "$type_status" -eq 0\n          test "$test_status" -eq 0\n',
    expected: /name: enforce measured WASM runtime budget/u,
    operator: 'match',
    diff: 'simple'
  }

test at test/release-contract.test.mjs:1516:1
✖ npm release carries and re-verifies the exact WCAG22 finite evidence (1.045166ms)
  AssertionError [ERR_ASSERTION]: The input did not match the regular expression /python3 scripts\/ver

@lemone112
lemone112 force-pushed the agent/c8c-point-unknown-observation branch 4 times, most recently from a72a1b6 to a62e9a1 Compare July 20, 2026 09:12
@lemone112
lemone112 force-pushed the agent/c8c-point-unknown-observation branch from 8fce9f7 to 62f7b0c Compare July 20, 2026 09:20
@lemone112
lemone112 marked this pull request as ready for review July 20, 2026 09:26

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@lemone112
lemone112 merged commit b023def into main Jul 20, 2026
9 of 10 checks passed
@lemone112
lemone112 deleted the agent/c8c-point-unknown-observation branch July 20, 2026 09:27

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 `@packages/colors/watch-theme.js`:
- Around line 77-86: Приведите описание параметра `onError` в публичном JSDoc к
единому языку, заменив смешанные русские и английские фразы на связное
английское описание. Сохраните смысл: обработчик получает ошибки обновлений
наблюдателя и запуска после захвата observer, а явные вызовы `refresh` и
`setTheme` по-прежнему выбрасывают ошибки.
🪄 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: cfd4845d-2442-48dc-87ec-e07572024bcd

📥 Commits

Reviewing files that changed from the base of the PR and between 9d91b84 and 62f7b0c.

📒 Files selected for processing (13)
  • packages/colors/adapt-theme.d.ts
  • packages/colors/adapt-theme.js
  • packages/colors/background-observation.js
  • packages/colors/effective-bg.js
  • packages/colors/package.json
  • packages/colors/test/adapt-theme.test.mjs
  • packages/colors/test/c8c-hostile-ancestor.test.mjs
  • packages/colors/test/c8c-point-unknown.test.mjs
  • packages/colors/test/oklch-parse.test.mjs
  • packages/colors/test/public-api-cleanup.test.mjs
  • packages/colors/test/runtime.test.mjs
  • packages/colors/watch-theme.d.ts
  • packages/colors/watch-theme.js

Comment on lines +77 to +86
* @param {string} [options.canvas] Caller-declared opaque page canvas.
* @param {boolean} [options.observe=true] Auto-refresh on `style`/`class`
* attribute changes in the observed subtree.
* @param {(error: unknown) => void} [options.onError] Receives failures from
* observer-обновлений и startup после захвата observer. Явные
* `refresh`/`setTheme` по-прежнему бросают.
* @param {*} [options.root] Mutation-observer root (default: the document element).
* @param {*} [options.win=globalThis] Window-like host (for MutationObserver).
* @param {(el:*)=>*} [options.getStyle] Injection seam for `effectiveBackground`.
* @param {(el:*)=>*} [options.parentOf] Injection seam for `effectiveBackground`.
* @param {(el:*)=>*} [options.getStyle] Injection seam for strict point observation.
* @param {(el:*)=>*} [options.parentOf] Injection seam for strict point observation.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Смешение языков в публичном JSDoc для onError.

Строки 80-82 переключаются с английского на русский посреди одного предложения ("Receives failures from observer-обновлений и startup после захвата observer. Явные refresh/setTheme по-прежнему бросают."). Для публичного API-описания это снижает читаемость и выглядит как артефакт неполного перевода.

✏️ Предложенная правка
- * `@param` {(error: unknown) => void} [options.onError]  Receives failures from
- *   observer-обновлений и startup после захвата observer. Явные
- *   `refresh`/`setTheme` по-прежнему бросают.
+ * `@param` {(error: unknown) => void} [options.onError]  Receives failures from
+ *   observer updates and startup after observer acquisition. Explicit
+ *   `refresh`/`setTheme` calls still throw synchronously.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
* @param {string} [options.canvas] Caller-declared opaque page canvas.
* @param {boolean} [options.observe=true] Auto-refresh on `style`/`class`
* attribute changes in the observed subtree.
* @param {(error: unknown) => void} [options.onError] Receives failures from
* observer-обновлений и startup после захвата observer. Явные
* `refresh`/`setTheme` по-прежнему бросают.
* @param {*} [options.root] Mutation-observer root (default: the document element).
* @param {*} [options.win=globalThis] Window-like host (for MutationObserver).
* @param {(el:*)=>*} [options.getStyle] Injection seam for `effectiveBackground`.
* @param {(el:*)=>*} [options.parentOf] Injection seam for `effectiveBackground`.
* @param {(el:*)=>*} [options.getStyle] Injection seam for strict point observation.
* @param {(el:*)=>*} [options.parentOf] Injection seam for strict point observation.
* `@param` {string} [options.canvas] Caller-declared opaque page canvas.
* `@param` {boolean} [options.observe=true] Auto-refresh on `style`/`class`
* attribute changes in the observed subtree.
* `@param` {(error: unknown) => void} [options.onError] Receives failures from
* observer updates and startup after observer acquisition. Explicit
* `refresh`/`setTheme` calls still throw synchronously.
* `@param` {*} [options.root] Mutation-observer root (default: the document element).
* `@param` {*} [options.win=globalThis] Window-like host (for MutationObserver).
* `@param` {(el:*)=>*} [options.getStyle] Injection seam for strict point observation.
* `@param` {(el:*)=>*} [options.parentOf] Injection seam for strict point observation.
🤖 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 `@packages/colors/watch-theme.js` around lines 77 - 86, Приведите описание
параметра `onError` в публичном JSDoc к единому языку, заменив смешанные русские
и английские фразы на связное английское описание. Сохраните смысл: обработчик
получает ошибки обновлений наблюдателя и запуска после захвата observer, а явные
вызовы `refresh` и `setTheme` по-прежнему выбрасывают ошибки.

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