Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions .github/workflows/npm-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
version:
description: Core and stable Small facade version
required: true
default: 0.5.6
default: 0.5.7
type: string
publish_to_registry:
description: Publish the tested candidate to npm under next
Expand Down Expand Up @@ -283,7 +283,7 @@ jobs:
npm install --offline --ignore-scripts --no-audit --no-fund --package-lock=false \
../dist/release/arcships-light-ocr-model-ppocrv6-small-0.3.4.tgz \
../dist/release/arcships-light-ocr-${{ matrix.native }}-${RELEASE_VERSION}.tgz \
../dist/release/arcships-light-ocr-runtime-0.1.6.tgz \
../dist/release/arcships-light-ocr-runtime-0.1.7.tgz \
../dist/release/arcships-light-ocr-${RELEASE_VERSION}.tgz
cp ../tools/npm/smoke.cjs .
- name: Run stable Small OCR
Expand All @@ -296,6 +296,17 @@ jobs:
shell: bash
working-directory: package-smoke
run: node ../tools/npm/document-smoke.cjs
- name: Validate macOS signed-artifact policy with the default host
if: runner.os == 'macOS'
run: node --test bindings/node/test/signed-artifact.test.cjs
- name: Validate macOS signed-artifact policy with an ad-hoc host
if: runner.os == 'macOS'
shell: bash
run: |
adhoc_node="$RUNNER_TEMP/light-ocr-adhoc-node"
cp "$(command -v node)" "$adhoc_node"
codesign --force --sign - "$adhoc_node"
"$adhoc_node" --test bindings/node/test/signed-artifact.test.cjs
- name: Install and smoke preview tiers
if: matrix.preview
shell: bash
Expand All @@ -306,8 +317,8 @@ jobs:
npm install --offline --ignore-scripts --no-audit --no-fund --package-lock=false \
../dist/release/arcships-light-ocr-model-ppocrv6-tiny-0.1.0.tgz \
../dist/release/arcships-light-ocr-model-ppocrv6-medium-0.1.0.tgz \
../dist/release/arcships-light-ocr-tiny-0.1.5.tgz \
../dist/release/arcships-light-ocr-medium-0.1.5.tgz
../dist/release/arcships-light-ocr-tiny-0.1.6.tgz \
../dist/release/arcships-light-ocr-medium-0.1.6.tgz
node ../tools/npm/smoke-tier.cjs @arcships/light-ocr-tiny light-ocr-tiny \
ppocrv6-tiny-onnx-20260722.1
node ../tools/npm/smoke-tier.cjs @arcships/light-ocr-medium light-ocr-medium \
Expand Down Expand Up @@ -362,7 +373,7 @@ jobs:
cd registry-document
npm init --yes
npm install --ignore-scripts --no-audit --no-fund --package-lock=false \
"@arcships/light-ocr-document@0.1.2"
"@arcships/light-ocr-document@0.1.3"
node ../tools/npm/document-smoke.cjs
- name: Verify the published stable package offline
shell: bash
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,21 @@ This file records user-visible changes to `light-ocr`. Published artifact detail

## [Unreleased]

### Fixed

- On macOS only, accepted a re-signed native payload as an equivalent
integrity proof when its runtime descriptor size/SHA-256 check diverges.
Downstream macOS packagers (for example app notarization pipelines) may
re-sign `light_ocr_node.node` and the ONNX Runtime dylib with their own
Developer ID or ad-hoc identity, which rewrites the code signature and
changes both file size and SHA-256. The re-signature is trusted only when
`codesign --verify --strict` passes and the artifact's TeamIdentifier
equals the host process's, or when both sides are ad-hoc signed; unsigned
mutations, non-Mach-O artifacts, and every other platform keep the strict
descriptor gate and the `package_load_failed` contract. The ad-hoc
acceptance is deliberately macOS-only and documented because ad-hoc
signatures are reproducible by anyone.

## [0.5.6] - 2026-07-31

### Changed
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ for await (const page of recognizeDocument([buf1, buf2, buf3])) {
- **Application-friendly execution.** Recognition runs off the JavaScript main thread and supports queues, cancellation, and explicit cleanup.
- **Small text in large images.** An optional `tiled` mode preserves small and dense text in high-resolution images.

> **macOS re-signing.** Downstream macOS packagers may re-sign the native binaries with their own Developer ID (or ad-hoc) identity, for example when notarizing a distributed app. On macOS the loader accepts a re-signed Mach-O when its code signature verifies and its signing identity matches the host application (same TeamIdentifier, or both ad-hoc signed); other platforms and unsigned mutations keep the strict size + SHA-256 gate.

> ⭐ **Like light-ocr?** Give it a star — it helps others discover the project and keeps us motivated!

## Platform acceleration
Expand Down
2 changes: 2 additions & 0 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ for await (const page of recognizeDocument([buf1, buf2, buf3])) {
- **适合应用内调用。**识别任务在 JavaScript 主线程之外执行,并支持队列、取消和明确释放资源。
- **识别大图中的小字。**可选的 `tiled` 模式可以保留高分辨率图片中的小字和密集文字。

> **macOS 重新签名。**下游 macOS 打包方可以用自己的 Developer ID(或 ad-hoc)身份重新签名原生二进制,例如在公证分发的应用时。加载器在 macOS 上接受重新签名过的 Mach-O,前提是其代码签名校验通过且签名身份与宿主应用一致(TeamIdentifier 相同,或双方均为 ad-hoc 签名);其他平台与未经签名的篡改仍保持严格的字节数 + SHA-256 校验。

> ⭐ **觉得 light-ocr 有用?** 点个 Star,让更多人发现这个项目!

## 平台加速
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.6
0.5.7
2 changes: 1 addition & 1 deletion bindings/node/test/cli.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ test('info: --version is metadata-only and reports the Small tier', async () =>
assert.equal(code, EXIT.success);
assert.equal(stderr, '');
const info = JSON.parse(stdout);
assert.equal(info.core, '0.5.6');
assert.equal(info.core, '0.5.7');
assert.equal(info.tier, 'small');
assert.equal(info.maturity, 'stable');
assert.equal(info.model, 'ppocrv6-small-native-20260719.1');
Expand Down
Loading
Loading