Skip to content

update#49

Merged
alwaysmavs merged 2 commits into
mainfrom
dev
Sep 18, 2025
Merged

update#49
alwaysmavs merged 2 commits into
mainfrom
dev

Conversation

@alwaysmavs
Copy link
Copy Markdown
Contributor

No description provided.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Sep 14, 2025

Walkthrough

Adds 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

Cohort / File(s) Summary of changes
CI workflow
.github/workflows/export-layer.yml
New workflow with three jobs: package metadata extraction, conditional publish based on registry HTTP status, and delegating export to a reusable workflow. Sets job outputs and permissions.
Documentation
README.md, README_zh-CN.md
README rewritten in English; new Chinese README added with equivalent content covering fields, prompts, controls, output, and resume behavior.
Localization
oo-locales/en.json, oo-locales/zh-CN.json
Adds two i18n keys: books-translator and translate-the-epub-book-using-llm-side-by-side with English and Chinese values.
Package metadata
package.oo.yaml
Version updated 0.1.11 → 0.1.13; displayName and description switched to i18n placeholders: %books-translator% and %translate-the-epub-book-using-llm-side-by-side%.
Repo hygiene
.gitignore
Adds .DS_Store to ignored files.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Pre-merge checks

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Title Check ⚠️ Warning The PR title "update" is generic and does not follow the required "(): " convention; it fails to describe the primary change(s) or include a conventional type (e.g., feat, fix, docs, chore), so it does not meet the title requirements. Rename the PR to follow the required format and clearly summarise the main change; for example "ci(export-layer): add GitHub Actions workflow to export OOMOL layer" or "docs(i18n): translate README and add locale files" depending on the primary intent, then re-run the checks.
Description Check ❓ Inconclusive No pull request description was provided by the author, so it is not possible to determine whether the description is related to the changeset; the raw summary shows multiple changes (workflow, README translations, locale files, package bump) but the author's intent and primary focus are unclear without a description. Please add a concise PR description that states the primary purpose, lists key affected files or changes (for example the new export-layer workflow, README and locale updates, and package version bump), and any reviewer guidance so this check can be re-evaluated.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c6a0845 and 0d3430e.

📒 Files selected for processing (1)
  • .gitignore (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • .gitignore

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.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

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.

❤️ Share

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

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

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 behavior

Echo 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 runs

Add 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

📥 Commits

Reviewing files that changed from the base of the PR and between 6b2c8a6 and c6a0845.

📒 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 values

Keys 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: LGTM

Strings align with placeholders and tone.

package.oo.yaml (1)

11-13: Placeholders wired correctly

version bump + i18n placeholders look good.

README.md (1)

3-3: LGTM

Clear, concise one-liner.

.github/workflows/export-layer.yml (1)

7-12: Permissions look good

OIDC permissions present for downstream workflow.

Comment on lines +23 to +35
- 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
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue

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 name

Option 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 name

Also 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.

Comment on lines +64 to +80
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'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛠️ 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.

Suggested change
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.

Comment on lines +78 to +79
uses: oomol-lab/oopm-publish-action@main
if: needs.package.outputs.is-publish == 'false'
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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.

Comment thread package.oo.yaml
version: 0.1.11
displayName: Books Translator
description: Translate the epub book using LLM side by side.
version: 0.1.13
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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).

Comment thread package.oo.yaml
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
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue

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.

Suggested change
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.

@alwaysmavs alwaysmavs closed this Sep 18, 2025
@alwaysmavs alwaysmavs reopened this Sep 18, 2025
@alwaysmavs alwaysmavs merged commit 5e0888b into main Sep 18, 2025
2 checks passed
@alwaysmavs alwaysmavs deleted the dev branch September 18, 2025 03:36
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