update#49
Conversation
WalkthroughAdds a new GitHub Actions workflow to package, conditionally publish, and export an OOMOL layer. Updates README to English and adds a Chinese README. Introduces en/zh-CN locale JSON with two keys. Bumps package version and switches displayName/description to i18n placeholders. Updates .gitignore to include .DS_Store. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Pre-merge checks❌ Failed checks (1 warning, 1 inconclusive)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
🧹 Nitpick comments (7)
oo-locales/zh-CN.json (1)
3-3: Optional: product name nuance“图书翻译” reads like an action; if this string is used as the app/display name, consider “图书翻译器” for noun form.
- "books-translator": "图书翻译" + "books-translator": "图书翻译器"README_zh-CN.md (3)
3-3: Tiny wording tweak避免“并列列出”的重复“列”。
-使用 LLM 翻译 epub 电子书。翻译后的书将保留原文,并将译文与原文并列列出。 +使用 LLM 翻译 EPUB 电子书。翻译后的书将保留原文,并将译文与原文并列呈现。
7-9: Polish phrasing更自然的表达。
-大多数情况,你只需要配置这三个字段就可完整运行。 +在大多数情况下,你只需配置以下三个字段即可完成运行。
21-23: Minor consistency“16 路并发”前加上“不要超过”,并统一术语大小写。
-- `max_chunk_tokens`: 翻译分段时,限制每段的最大 tokens 数。由于 LLM 的特性,不可能将整本书一次性输入大语言模型来翻译。因此,会将书籍分段提交给 LLM。这个参数用于限制每一段的最大长度(单位是 token)。 +- `max_chunk_tokens`: 翻译分段时,限制每段的最大 token 数。由于 LLM 的特性,不可能将整本书一次性输入模型进行翻译。因此会将书籍分段提交给 LLM。该参数用于限制每段的最大长度(单位为 token)。 - `threads`: 并发发起翻译请求。如果你觉得翻译过慢,可以将这个值调高。但建议不要超过 16 路并发,会触发 LLM 供应商的限流策略。README.md (1)
7-7: Tiny copy edit“run completely” → “get started” reads more native.
-In most cases, you only need to configure these three fields to run completely. +In most cases, you only need to configure these three fields to get started..github/workflows/export-layer.yml (2)
49-62: Error-handling message contradicts behaviorEcho says “assuming it doesn't exist” but the step exits 1. Clarify intent; keep failing on non-200/404.
- else - echo "Error checking package existence (HTTP status: $http_status). Assuming it doesn't exist." - exit 1 + else + echo "Error checking package existence (HTTP status: $http_status). Failing fast." + exit 1
1-6: Optional: prevent duplicate runsAdd concurrency to avoid duplicate exports on re-tagging.
name: export layer on: push: tags: - "**" +concurrency: + group: export-layer-${{ github.ref }} + cancel-in-progress: true
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (8)
.github/workflows/build.yml(0 hunks).github/workflows/export-layer.yml(1 hunks).github/workflows/release.yml(0 hunks)README.md(1 hunks)README_zh-CN.md(1 hunks)oo-locales/en.json(1 hunks)oo-locales/zh-CN.json(1 hunks)package.oo.yaml(1 hunks)
💤 Files with no reviewable changes (2)
- .github/workflows/build.yml
- .github/workflows/release.yml
🔇 Additional comments (6)
oo-locales/zh-CN.json (1)
2-3: LGTM for keys and valuesKeys match package placeholders and the copy reads well.
README_zh-CN.md (1)
32-32: LGTM: resume semantics续跑说明清晰。
oo-locales/en.json (1)
2-3: LGTMStrings align with placeholders and tone.
package.oo.yaml (1)
11-13: Placeholders wired correctlyversion bump + i18n placeholders look good.
README.md (1)
3-3: LGTMClear, concise one-liner.
.github/workflows/export-layer.yml (1)
7-12: Permissions look goodOIDC permissions present for downstream workflow.
| - name: Get name | ||
| id: get_name | ||
| run: | | ||
| if [ -f package.oo.yaml ]; then | ||
| name=$(yq eval '.name' package.oo.yaml) | ||
| echo "name=$name" >> "$GITHUB_OUTPUT" | ||
| elif [ -f package.oo.yml ]; then | ||
| name=$(yq eval '.name' package.oo.yml) | ||
| echo "name=$name" >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo "No valid package file found" | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
Blocker: yq not installed → steps will fail
The workflow calls yq but never installs it on ubuntu-latest.
Apply one of the following:
Option A (download static binary):
- name: Checkout
uses: actions/checkout@v4
+ - name: Install yq
+ run: |
+ YQ_VERSION=v4.44.3
+ curl -L "https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64" -o yq
+ sudo install -m 0755 yq /usr/local/bin/yq
+ yq --version
- name: Get nameOption B (action, pinned):
- name: Checkout
uses: actions/checkout@v4
+ - name: Setup yq
+ uses: dcarbone/install-yq-action@9b4c7b20a5c7b8f8c2e8c2f8d9b1f5a4b1c2f6ab
+ with:
+ version: v4.44.3
- name: Get nameAlso applies to: 37-48
🤖 Prompt for AI Agents
.github/workflows/export-layer.yml around lines 23-35 (and also apply same fix
to 37-48): the workflow uses yq but never installs it; add a prior job step to
install yq either by downloading the static binary and placing it on PATH
(download the matching release for runner, chmod +x, move to /usr/local/bin) or
by adding a pinned action such as a maintained setup-yq action (use a specific
tag or commit) before the "Get name" step so subsequent steps can call yq
successfully.
| publish: | ||
| runs-on: ubuntu-latest | ||
| needs: [package] | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| if: needs.package.outputs.is-publish == 'false' | ||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v4 | ||
| if: needs.package.outputs.is-publish == 'false' | ||
| - name: Install oopm | ||
| run: npm install -g oopm | ||
| if: needs.package.outputs.is-publish == 'false' | ||
| - name: Publish OOMOL Package | ||
| uses: oomol-lab/oopm-publish-action@main | ||
| if: needs.package.outputs.is-publish == 'false' | ||
|
|
There was a problem hiding this comment.
🛠️ Refactor suggestion
Simplify: gate the whole publish job
Instead of repeating if on each step, put if at the job level.
- publish:
- runs-on: ubuntu-latest
- needs: [package]
- steps:
+ publish:
+ if: needs.package.outputs.is-publish == 'false'
+ runs-on: ubuntu-latest
+ needs: [package]
+ steps:
- name: Checkout code
- uses: actions/checkout@v4
- if: needs.package.outputs.is-publish == 'false'
+ uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
- if: needs.package.outputs.is-publish == 'false'
+ with:
+ node-version: 20
+ cache: 'npm'
- name: Install oopm
run: npm install -g oopm
- if: needs.package.outputs.is-publish == 'false'
- name: Publish OOMOL Package
uses: oomol-lab/oopm-publish-action@main
- if: needs.package.outputs.is-publish == 'false'📝 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.
| publish: | |
| runs-on: ubuntu-latest | |
| needs: [package] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| if: needs.package.outputs.is-publish == 'false' | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| if: needs.package.outputs.is-publish == 'false' | |
| - name: Install oopm | |
| run: npm install -g oopm | |
| if: needs.package.outputs.is-publish == 'false' | |
| - name: Publish OOMOL Package | |
| uses: oomol-lab/oopm-publish-action@main | |
| if: needs.package.outputs.is-publish == 'false' | |
| publish: | |
| if: needs.package.outputs.is-publish == 'false' | |
| runs-on: ubuntu-latest | |
| needs: [package] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: 'npm' | |
| - name: Install oopm | |
| run: npm install -g oopm | |
| - name: Publish OOMOL Package | |
| uses: oomol-lab/oopm-publish-action@main |
🤖 Prompt for AI Agents
.github/workflows/export-layer.yml lines 64-80: the publish job repeats the same
step-level condition if: needs.package.outputs.is-publish == 'false'; move this
condition up to the job level by adding the if at the publish job declaration so
the entire job is gated, and remove the redundant if clauses from each step to
simplify and avoid repetition.
| uses: oomol-lab/oopm-publish-action@main | ||
| if: needs.package.outputs.is-publish == 'false' |
There was a problem hiding this comment.
💡 Verification agent
🧩 Analysis chain
Pin external reusable actions to immutable SHAs
Reduce supply-chain risk; avoid floating main.
- uses: oomol-lab/oopm-publish-action@main
+ uses: oomol-lab/oopm-publish-action@<commit-sha>
...
- uses: oomol/ovmlayer-rootfs/.github/workflows/export-package-layer.yml@main
+ uses: oomol/ovmlayer-rootfs/.github/workflows/export-package-layer.yml@<commit-sha>Also applies to: 87-92
🌐 Web query:
What is the latest stable tagged commit for oomol-lab/oopm-publish-action and oomol/ovmlayer-rootfs export-package-layer workflow?
💡 Result:
- oomol-lab/oopm-publish-action — no tags or releases (no stable tagged commit). [1]
- oomol/ovmlayer-rootfs (latest stable tag) — executor-layer@0.1.1 → commit 0c50ec0 (tagged 01 Sep 2025). [2]
Sources:
[1] GitHub — oomol-lab/oopm-publish-action (repository page/tags).
[2] GitHub — oomol/ovmlayer-rootfs (Releases; executor-layer@0.1.1).
Pin external reusable actions to immutable SHAs
- .github/workflows/export-layer.yml (lines 78-79; also applies to 87-92): oomol-lab/oopm-publish-action has no tags/releases — pin to a commit SHA, e.g. 5e6ed2ea4182f0240383d9768bb51c5b3ff9050e. (github.com)
- .github/workflows/export-layer.yml (export-package-layer reference): oomol/ovmlayer-rootfs has release executor-layer@0.1.1 → commit 0c50ec062882e1fbedd9ade461e7ce77cc24c113 (tagged 01 Sep 2025) — pin to that tag or its commit SHA. (github.com)
🤖 Prompt for AI Agents
.github/workflows/export-layer.yml lines 78-79 and 87-92: the workflow uses
external reusable actions by branch/name which is mutable; update the uses
entries to pin to immutable commit SHAs — replace
oomol-lab/oopm-publish-action@main with
oomol-lab/oopm-publish-action@5e6ed2ea4182f0240383d9768bb51c5b3ff9050e (or
another exact commit SHA) for both occurrences, and for the export-package-layer
reference change oomol/ovmlayer-rootfs@executor-layer@0.1.1 to the exact tag or
commit SHA (e.g. 0c50ec062882e1fbedd9ade461e7ce77cc24c113) so the workflow pins
to immutable versions.
| version: 0.1.11 | ||
| displayName: Books Translator | ||
| description: Translate the epub book using LLM side by side. | ||
| version: 0.1.13 |
There was a problem hiding this comment.
💡 Verification agent
🧩 Analysis chain
Tag-version parity check
Ensure the git tag that triggers the workflow matches 0.1.13.
🏁 Script executed:
#!/bin/bash
# Expect a tag like v0.1.13 or 0.1.13 matching package.oo.yaml
rg -n '^version:\s*0\.1\.13\b' package.oo.yaml
git tag --list | grep -E '^v?0\.1\.13$' || echo "Tag 0.1.13 not found"Length of output: 39
Create & push a git tag matching package.oo.yaml (v0.1.13).
package.oo.yaml:11 — version: 0.1.13; no git tag v0.1.13 or 0.1.13 found.
Run:
git tag -a v0.1.13 -m "release v0.1.13" && git push origin v0.1.13
(or, if your workflow expects no v prefix:)
git tag -a 0.1.13 -m "release 0.1.13" && git push origin 0.1.13
🤖 Prompt for AI Agents
package.oo.yaml lines 11–11: package version is 0.1.13 but there is no matching
git tag; create and push a release tag that matches the file version—either use
the prefixed tag "v0.1.13" (git tag -a v0.1.13 -m "release v0.1.13" && git push
origin v0.1.13) or, if your release workflow omits the v prefix, create and push
"0.1.13" (git tag -a 0.1.13 -m "release 0.1.13" && git push origin 0.1.13).
| displayName: "%books-translator%" | ||
| description: "%translate-the-epub-book-using-llm-side-by-side%" | ||
| releaseNotes: support the write_mode field | ||
| repository: https://github.com/oomol-flows/books-translater |
There was a problem hiding this comment.
Fix repository URL typo
The repo path uses “translater”; current repo is “books-translator”. Broken link affects metadata in registries.
-repository: https://github.com/oomol-flows/books-translater
+repository: https://github.com/oomol-flows/books-translator📝 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.
| repository: https://github.com/oomol-flows/books-translater | |
| repository: https://github.com/oomol-flows/books-translator |
🤖 Prompt for AI Agents
In package.oo.yaml around line 15, the repository URL contains a typo
("books-translater") that should be "books-translator"; update the repository
field to the correct URL (https://github.com/oomol-flows/books-translator) so
the metadata link points to the actual repo.
No description provided.