You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@jayvdb, you've reached your PR review limit, so we couldn't start this review.
Next review available in:30 minutes
You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.
How can I continue?
After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.
To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.
How do review limits work?
CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.
For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.
Reviewing files that changed from the base of the PR and between 6b256e8 and 135f388.
📒 Files selected for processing (2)
CLAUDE.md
services/ws-modules/js-data1/README.md
📝 Walkthrough
Walkthrough
The change adds HEAD storage support with ETag metadata, introduces a bundled JavaScript S3 round-trip module, integrates its build and runner checks, centralizes the Rust nightly toolchain, adjusts wasm tooling, and adds CI reproduction guidance.
Changes
Storage API and JavaScript data module
Layer / File(s)
Summary
Storage metadata API services/storage/..., utilities/int-gen/src/openapi.rs, services/storage/tests/put.rs
Storage PUT and GET responses now expose ETags. A new HEAD route returns content length and ETag, with 404 handling. OpenAPI definitions and integration tests cover the behavior.
A bundled JavaScript module connects through WebSocket, performs an S3 upload/download/HEAD round trip, verifies bytes and ETags, and cleans up resources. Build and runner integration are added.
sequenceDiagram
participant JSModule
participant AgentWebSocket
participant StorageAPI
participant ObjectStore
JSModule->>AgentWebSocket: Send et-connect handshake
AgentWebSocket-->>JSModule: Return agent ID
JSModule->>StorageAPI: PUT timestamped object
StorageAPI->>ObjectStore: Store object
ObjectStore-->>StorageAPI: Return ETag
StorageAPI-->>JSModule: Return PUT ETag
JSModule->>StorageAPI: GET and HEAD object
StorageAPI->>ObjectStore: Read object and metadata
ObjectStore-->>StorageAPI: Return bytes, size, and ETag
StorageAPI-->>JSModule: Return object data and metadata
Loading
Possibly related PRs
edge-toolkit/core#85: Changes the same coverage configuration area with different toolchain concerns.
We reviewed changes in 72ed322...135f388 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.
Some issues found as part of this review are outside of the diff in this pull request and aren't shown in the inline review comments due to GitHub's API limitations. You can see those issues on the DeepSource dashboard.
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer TIP This summary will be updated as you push new changes.
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
🤖 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 `@services/ws-modules/js-data1/README.md`:
- Around line 17-19: Remove the “See ../../../s3.md” sentence from the README
paragraph describing PutObject, GetObject, and HeadObject, leaving the endpoint
mapping and verification details unchanged.
In `@services/ws-modules/js-data1/src/index.js`:
- Around line 124-139: Compare the persisted object ETag with the PUT ETag at
both affected sites: in services/ws-modules/js-data1/src/index.js lines 124-139,
pass put.ETag into verifyHeadObject and require equality with head.ETag; in
services/storage/tests/put.rs lines 167-190, retain the PUT ETag and assert that
both GET and HEAD return the same value.
- Around line 53-72: Update connectAgent’s timeout and WebSocket error handlers
to close ws before rejecting, and guard promise settlement so timeout, error,
and acknowledgement cannot settle the connection more than once. Preserve the
successful acknowledgement path while ensuring no active socket remains after
failure.
In `@services/ws-web-runner/tests/modules.rs`:
- Around line 92-95: Remove the early-return skip for module “et-ws-js-data1” in
the integration test setup and delete the now-unused js_data1_pkg_built helper.
Ensure the test’s prerequisite setup invokes the targeted mise run task to build
the bundle before executing the test, and fail loudly if that build or the
resulting pkg/et_ws_js_data1.js is unavailable.
🪄 Autofix
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: 402e2fd2-49ba-445d-97de-e4896aa68385
📥 Commits
Reviewing files that changed from the base of the PR and between 72ed322 and 6b256e8.
⛔ Files ignored due to path filters (8)
generated/dart-rest/lib/clients/storage.dart is excluded by !**/generated/**
generated/dart-rest/lib/clients/storage.g.dart is excluded by !**/generated/**
generated/dart-rest/lib/rest_client.dart is excluded by !**/generated/**
generated/python-rest/et_rest_client/api/storage/head_file.py is excluded by !**/generated/**
generated/rust-rest/src/lib.rs is excluded by !**/generated/**
generated/specs/rest.yaml is excluded by !**/generated/**
generated/zig-rest/src/et_rest_client.zig is excluded by !**/generated/**
If the acknowledgement times out or the socket errors, connectAgent rejects before run enters its finally block. The socket remains open. Close it in each failure path and guard settlement so the runner does not retain an active socket after failure.
Proposed fix
function connectAgent() {
const ws = new WebSocket(websocketUrl());
return new Promise((resolve, reject) => {
- const timer = setTimeout(() => reject(new Error("timed out waiting for et-connect-ack")), 10000);+ let settled = false;+ const fail = (error) => {+ if (settled) return;+ settled = true;+ clearTimeout(timer);+ ws.close();+ reject(error);+ };+ const timer = setTimeout(() => fail(new Error("timed out waiting for et-connect-ack")), 10000);
ws.addEventListener("message", (event) => {
let frame;
try {
frame = JSON.parse(event.data);
} catch {
return;
}
if (frame.type === "et-connect-ack" && frame.agent_id) {
+ if (settled) return;+ settled = true;
clearTimeout(timer);
resolve({ agentId: frame.agent_id, ws });
}
});
- ws.addEventListener("error", () => {- clearTimeout(timer);- reject(new Error("websocket error before et-connect-ack"));- });+ ws.addEventListener("error", () => fail(new Error("websocket error before et-connect-ack")));
📝 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
returnnewPromise((resolve,reject)=>{
consttimer=setTimeout(()=>reject(newError("timed out waiting for et-connect-ack")),10000);
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@services/ws-modules/js-data1/src/index.js` around lines 53 - 72, Update
connectAgent’s timeout and WebSocket error handlers to close ws before
rejecting, and guard promise settlement so timeout, error, and acknowledgement
cannot settle the connection more than once. Preserve the successful
acknowledgement path while ensuring no active socket remains after failure.
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
Compare the PUT ETag with the persisted object ETag.
Both sites only verify ETag presence. A storage implementation that returns one ETag from PUT and a different ETag from later object metadata passes these checks.
services/ws-modules/js-data1/src/index.js#L124-L139: pass put.ETag to verifyHeadObject and require equality with head.ETag.
services/storage/tests/put.rs#L167-L190: retain the PUT ETag and assert that both GET and HEAD return that value.
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@services/ws-modules/js-data1/src/index.js` around lines 124 - 139, Compare
the persisted object ETag with the PUT ETag at both affected sites: in
services/ws-modules/js-data1/src/index.js lines 124-139, pass put.ETag into
verifyHeadObject and require equality with head.ETag; in
services/storage/tests/put.rs lines 167-190, retain the PUT ETag and assert that
both GET and HEAD return the same value.
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Do not skip the et-ws-js-data1 integration test.
When pkg/et_ws_js_data1.js is absent, this branch returns successfully. The test then does not verify the new storage and ETag round trip. Build the bundle as a required test prerequisite, or fail the test when it is absent. Remove js_data1_pkg_built after removing this skip.
Based on learnings, use the targeted mise run task to build the bundle before this test. As per coding guidelines, "Never skip, ignore, platform-disable, conditionally compile out, or early-return from a test without explicit user approval; missing tools must fail loudly."
Also applies to: 118-131
🤖 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 `@services/ws-web-runner/tests/modules.rs` around lines 92 - 95, Remove the
early-return skip for module “et-ws-js-data1” in the integration test setup and
delete the now-unused js_data1_pkg_built helper. Ensure the test’s prerequisite
setup invokes the targeted mise run task to build the bundle before executing
the test, and fail loudly if that build or the resulting pkg/et_ws_js_data1.js
is unavailable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by CodeRabbit
New Features
HEADstorage endpoint that returns object metadata, including size and ETag.Documentation
Improvements