Skip to content

build(deps): upgrade OpenDAL to 0.49.5 - #2015

Merged
yyhhyyyyyy merged 1 commit into
devfrom
chore/upgrade-opendal-0.49.5
Jul 24, 2026
Merged

build(deps): upgrade OpenDAL to 0.49.5#2015
yyhhyyyyyy merged 1 commit into
devfrom
chore/upgrade-opendal-0.49.5

Conversation

@yyhhyyyyyy

@yyhhyyyyyy yyhhyyyyyy commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Upgrade opendal and all platform-specific native packages from 0.49.2 to 0.49.5.
  • Require packaged OpenDAL native modules to exactly match the facade version, preventing stale pnpm virtual-store packages from causing ABI mismatches.
  • Expand the native smoke check to cover the production ESM entry, memory read/write, S3 operator construction, and retry/timeout layers.
  • Refresh the generated provider database and ACP registry through the standard prebuild workflow.

Compatibility

  • OpenDAL 0.49.5 Linux x64 requires GLIBC_2.38.
  • This matches DeepChat's current Ubuntu 24.04 Linux build and runtime baseline; Ubuntu 22.04 is not supported by this native package.
  • Native package sizes increased, most notably Linux x64 from approximately 43.2 MB to 80.9 MB. Package-size CI gates will validate final installer growth.

Summary by CodeRabbit

  • New Features

    • Updated the bundled agent registry to the latest Harn release.
    • Improved OpenDAL native package compatibility across supported platforms and package managers.
    • Added stronger runtime validation for OpenDAL’s ESM exports and memory/S3 operations.
  • Bug Fixes

    • Corrected OpenDAL native package version matching during packaging.
    • Updated supported model listings and adjusted a provider context limit.
  • Tests

    • Expanded packaging and smoke tests to verify version-aware native package resolution.

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

OpenDAL was upgraded to 0.49.5 with version-aware native package copying and asynchronous ESM smoke tests. The harn registry now targets 0.10.35 binaries, while provider metadata updates a context limit and removes nine models.

Changes

OpenDAL version alignment and validation

Layer / File(s) Summary
OpenDAL version pins and packaging assertions
package.json, test/main/build/electronBuilderConfig.test.ts
OpenDAL facade and native packages are pinned to 0.49.5, and packaging tests validate the updated shared version.
Version-aware native package copying
scripts/afterPack.js, test/main/scripts/afterPack.test.ts
After-pack resolution validates the unpacked OpenDAL version and selects matching native packages across package layouts; fixtures cover stale and missing versions.
Async ESM native smoke flow
scripts/smoke-opendal-native.js
The smoke test dynamically imports ESM exports, exercises memory and S3 operators, and resolves native packages using the installed OpenDAL version.

Registry and model metadata updates

Layer / File(s) Summary
Harn release metadata
resources/acp-registry/registry.json
The harn entry now references 0.10.35 archives and updated platform checksums.
Provider model configuration
resources/model-db/providers.json
One provider context limit changed from 204800 to 196608, and nine model objects were removed.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant SmokeScript
  participant OpenDALESM
  participant NativePackages
  SmokeScript->>OpenDALESM: dynamically import index.mjs
  OpenDALESM-->>SmokeScript: return required constructors
  SmokeScript->>OpenDALESM: perform memory write/read and construct S3 operator
  SmokeScript->>NativePackages: resolve package for installed OpenDAL version
  NativePackages-->>SmokeScript: return matching native package
Loading

Possibly related PRs

Suggested reviewers: zerob13, zhangmo8

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Clearly summarizes the main dependency upgrade to OpenDAL 0.49.5.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/upgrade-opendal-0.49.5

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
scripts/afterPack.js (2)

246-256: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Include actual identity in the error for easier debugging.

The thrown error for an invalid unpacked opendal identity omits the actual name/version found, which would speed up diagnosing packaging failures.

💡 Proposed improvement
   if (opendalPackageJson.name !== 'opendal' || typeof opendalPackageJson.version !== 'string') {
-    throw new Error(`Invalid unpacked opendal package identity at ${opendalDir}`)
+    throw new Error(
+      `Invalid unpacked opendal package identity at ${opendalDir}: name=${opendalPackageJson.name}, version=${opendalPackageJson.version}`
+    )
   }
🤖 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 `@scripts/afterPack.js` around lines 246 - 256, Update the validation error in
the opendal package identity check near opendalPackageJson to include the actual
name and version values read from the unpacked package, while preserving the
existing invalid-identity condition.

117-148: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚖️ Poor tradeoff

Duplicate version-aware package resolution logic across build/smoke scripts. Both scripts independently implement the same "walk node_modules/.pnpm-hoist/pnpm-virtual-store, optionally match name+version" algorithm; the shared logic risks diverging as one is CJS and the other ESM.

  • scripts/afterPack.js#L117-L148: extract resolveInstalledPackageDir into a small shared helper module (e.g. scripts/lib/resolvePackage.js) usable from both CJS and ESM contexts.
  • scripts/smoke-opendal-native.js#L85-L123: replace packageMatches/resolvePackageDirFromNodeModules with the same shared helper instead of a parallel sync implementation.
🤖 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 `@scripts/afterPack.js` around lines 117 - 148, Extract the version-aware
package resolution algorithm from resolveInstalledPackageDir in
scripts/afterPack.js into a shared helper module usable by both CommonJS and
ESM. Replace packageMatches and resolvePackageDirFromNodeModules in
scripts/smoke-opendal-native.js with that helper, preserving
package-name/version validation and pnpm virtual-store support; update both
scripts to import and use the shared implementation.
🤖 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 `@resources/acp-registry/registry.json`:
- Around line 712-748: Update normalizeBinaryTarget and
AcpRegistryBinaryDistribution to preserve and expose each binary target’s sha256
digest, then validate downloaded archives against that declared checksum before
extraction or execution. Apply this consistently to all platform targets; if
checksum validation is intentionally not implemented, remove the unused sha256
fields from the raw registry entries instead.

---

Nitpick comments:
In `@scripts/afterPack.js`:
- Around line 246-256: Update the validation error in the opendal package
identity check near opendalPackageJson to include the actual name and version
values read from the unpacked package, while preserving the existing
invalid-identity condition.
- Around line 117-148: Extract the version-aware package resolution algorithm
from resolveInstalledPackageDir in scripts/afterPack.js into a shared helper
module usable by both CommonJS and ESM. Replace packageMatches and
resolvePackageDirFromNodeModules in scripts/smoke-opendal-native.js with that
helper, preserving package-name/version validation and pnpm virtual-store
support; update both scripts to import and use the shared implementation.
🪄 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 58fd4eae-ad44-4585-baad-57451df8c736

📥 Commits

Reviewing files that changed from the base of the PR and between a707f79 and 9847502.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (7)
  • package.json
  • resources/acp-registry/registry.json
  • resources/model-db/providers.json
  • scripts/afterPack.js
  • scripts/smoke-opendal-native.js
  • test/main/build/electronBuilderConfig.test.ts
  • test/main/scripts/afterPack.test.ts

Comment thread resources/acp-registry/registry.json
@yyhhyyyyyy
yyhhyyyyyy merged commit 38e8d66 into dev Jul 24, 2026
21 of 27 checks passed
@yyhhyyyyyy
yyhhyyyyyy deleted the chore/upgrade-opendal-0.49.5 branch July 24, 2026 10:01
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