You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hugegraph.apache.org by "KHARSHAVARDHAN-eng (via GitHub)" <gi...@apache.org> on 2026/08/10 03:09:06 UTC
[PR] ci(automation): enhance repository automation and code quality workflows (#320) [hugegraph-computer]
KHARSHAVARDHAN-eng opened a new pull request, #360:
URL: https://github.com/apache/hugegraph-computer/pull/360
### Description
This PR addresses the recommendations from the **Automation Analysis** report ([#320](https://github.com/apache/hugegraph-computer/issues/320)) by introducing automatic code formatting, test coverage enforcement, PR commit validation, release notes generation, and developer automation documentation.
### Key Changes
1. **Automatic Code Formatting (`computer/pom.xml`)**:
- Added `spotless-maven-plugin` (v2.30.0) for automated Java code formatting (`mvn spotless:apply` and `mvn spotless:check`).
2. **Test Coverage Tracking (`computer/pom.xml`)**:
- Added `jacoco-maven-plugin` (v0.8.8) with `prepare-agent` and `report` goals to automatically generate test coverage reports during `mvn test`.
3. **Commit & PR Title Validation (`.github/workflows/commit-check.yml`)**:
- Added a GitHub Action workflow to validate PR titles against the Conventional Commits specification.
4. **Automated Release Notes (`.github/workflows/release-notes.yml`)**:
- Added a GitHub Action workflow to generate release drafts and changelogs automatically when tags (`v*`) are pushed.
5. **Documentation (`docs/automation-guide.md`)**:
- Created comprehensive documentation detailing formatting commands, test coverage generation, RAT license checks, and PR contribution guidelines.
### Reference
Fixes #320
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
Re: [PR] ci(automation): enhance repository automation and code quality workflows (#320) [hugegraph-computer]
Posted by "bitflicker64 (via GitHub)" <gi...@apache.org>.
bitflicker64 commented on code in PR #360:
URL: https://github.com/apache/hugegraph-computer/pull/360#discussion_r3969920252
##########
.github/workflows/release-notes.yml:
##########
@@ -0,0 +1,42 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+name: "Release Notes Generator"
+
+on:
+ push:
+ tags:
+ - '*.*.*'
Review Comment:
⚠️ important: this tag filter also fires on release-candidate tags, so every vote round would leave a stray draft release behind.
GitHub tag filters are globs, not regular expressions, and `*` matches any character except `/`. `*.*.*` therefore matches `1.5.0-rc1`, splitting it as `1` + `.` + `5` + `.` + `0-rc1`. Four of the eight tags this repository has are RC tags (`1.0.0-rc2`, `1.5.0-rc1`, `1.5.0-rc2`, `1.5.0-rc3`, per `git ls-remote --tags origin`), so cutting 1.5.0 would have drafted four releases instead of one. `draft: true` means nothing is published, but each one has to be deleted by hand during the vote.
This is the other side of the `v*` mismatch @imbajin raised on this line: the new pattern does reach the real tags, and now reaches more than them. Character ranges and `+` are supported in these filters, so the release form can be matched exactly:
```yaml
- '[0-9]+.[0-9]+.[0-9]+'
```
If you change it, `docs/automation-guide.md:58` hardcodes `*.*.*` and needs the same edit.
##########
.github/workflows/release-notes.yml:
##########
@@ -0,0 +1,42 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+name: "Release Notes Generator"
+
+on:
+ push:
+ tags:
+ - '*.*.*'
+
+jobs:
+ generate-release-notes:
+ name: Generate Release Draft & Notes
+ runs-on: ubuntu-latest
+ permissions:
+ contents: write
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+
+ - name: Generate Release Notes
+ uses: softprops/action-gh-release@v2
Review Comment:
⚠️ important: this action is referenced by a tag the project does not control, and this job hands it a write token.
Lines 28-29 grant `contents: write`, and `softprops/action-gh-release@v2` is a moving major tag on a third-party repository. Whoever can move that tag decides what runs with that token, at the moment a release is being cut. `commit-check.yml:39` has the same shape with `amannn/action-semantic-pull-request@v5`, contained by `pull-requests: read`.
This is the first workflow here to grant a third-party action `contents: write` explicitly. I am not claiming it is the first to hold one: `computer-ci.yml` and `vermeer-ci.yml` declare no `permissions:` block at all, so `codecov/codecov-action@v3` and the two `docker/*` actions run under the repository default, and `gh api repos/apache/hugegraph-computer/actions/permissions/workflow` answers 403 for me, so I cannot read what that default is. Nothing in the tree is SHA-pinned today, so this is not a regression against house style.
Please pin both new actions to a full commit SHA and keep the readable version in a trailing comment:
```yaml
uses: softprops/action-gh-release@<40-char-sha> # v2.x.y
```
##########
docs/automation-guide.md:
##########
@@ -0,0 +1,72 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Automation & Code Quality Guide
+
+This guide details the repository automations and code quality tools configured for **HugeGraph Computer** and **Vermeer** as recommended in Automation Analysis [#320](https://github.com/apache/hugegraph-computer/issues/320).
+
+---
+
+## Code Quality & Formatting Automations
+
+### 1. Code Style & License Checks
+- **Checkstyle (`maven-checkstyle-plugin`):** Enforces Java coding style guidelines defined in `checkstyle.xml`.
+- **Apache RAT (`apache-rat-plugin`):** Verifies Apache license headers across all project source files.
+
+```bash
+# Run Checkstyle validation
+mvn checkstyle:check
+
+# Run Apache RAT license validation
+mvn apache-rat:check
+```
+
+### 2. Test Coverage (`jacoco-maven-plugin`)
+JaCoCo tracks unit and integration test coverage during build execution.
+
+```bash
+# Run unit tests and generate JaCoCo coverage report
+mvn test -P unit-test
+
+# Inspect generated report at:
+# target/site/jacoco/jacoco.xml
+```
+
+---
+
+## CI/CD Workflows
+
+| Workflow | Path | Trigger | Description |
+|----------|------|---------|-------------|
+| **Commit Check** | `.github/workflows/commit-check.yml` | Pull Request | Validates PR titles against Conventional Commits formatting rules. |
+| **Computer CI** | `.github/workflows/computer-ci.yml` | Push / PR | Compiles, runs RAT, HDFS, K8s, and Java unit/integration tests. |
+| **Vermeer CI** | `.github/workflows/vermeer-ci.yml` | Push / PR | Builds Vermeer Go binary, checks UI assets, and tests Docker builds. |
+| **Release Notes** | `.github/workflows/release-notes.yml` | Tag Push (`*.*.*`) | Automatically drafts GitHub release notes from git history. |
Review Comment:
🧹 minor: two things in this row will mislead a reader.
`Tag Push (`*.*.*`)` copies the trigger pattern into prose, so it goes stale as soon as the pattern is corrected, which the comment on `release-notes.yml:22` asks for. Point at the workflow's `on:` block rather than duplicating the glob.
"from git history" is not what the workflow does. `generate_release_notes: true` is handled by the GitHub releases API, which assembles the notes from merged pull requests and commits between tags on the server side. See the comment on `release-notes.yml:31`.
Line 55 has a smaller version of the same problem: it calls the workflow "Commit Check", while `commit-check.yml:17` names it `Commit & PR Title Validation` and its job at line 33 is `Validate PR Title & Format`. A table meant as a map should use the names that show up on the checks tab.
##########
docs/automation-guide.md:
##########
@@ -0,0 +1,72 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Automation & Code Quality Guide
+
+This guide details the repository automations and code quality tools configured for **HugeGraph Computer** and **Vermeer** as recommended in Automation Analysis [#320](https://github.com/apache/hugegraph-computer/issues/320).
+
+---
+
+## Code Quality & Formatting Automations
+
+### 1. Code Style & License Checks
+- **Checkstyle (`maven-checkstyle-plugin`):** Enforces Java coding style guidelines defined in `checkstyle.xml`.
+- **Apache RAT (`apache-rat-plugin`):** Verifies Apache license headers across all project source files.
+
+```bash
+# Run Checkstyle validation
+mvn checkstyle:check
Review Comment:
🧹 minor: these commands fail as written, because there is no `pom.xml` at the repository root.
The Maven reactor root is `computer/pom.xml`, which is why `computer-ci.yml:13-15` sets `defaults.run.working-directory: computer`. Run from the repository root, `mvn checkstyle:check`, `mvn apache-rat:check` and `mvn test -P unit-test` (line 43) all stop on "there is no POM in this directory".
The report path at line 46 has the same dependency. `computer/computer-test/pom.xml` binds `report-aggregate` with `<outputDirectory>${basedir}/../target/site/jacoco</outputDirectory>`, so `target/site/jacoco/jacoco.xml` resolves only relative to `computer/`.
Please state the working directory once at the top of this section, or make the commands self-locating:
```bash
mvn -f computer/pom.xml checkstyle:check
```
##########
.github/workflows/release-notes.yml:
##########
@@ -0,0 +1,42 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+name: "Release Notes Generator"
+
+on:
+ push:
+ tags:
+ - '*.*.*'
+
+jobs:
+ generate-release-notes:
+ name: Generate Release Draft & Notes
+ runs-on: ubuntu-latest
+ permissions:
+ contents: write
+ steps:
+ - name: Checkout repository
Review Comment:
🧹 minor: nothing in this job reads the checked-out tree, so this step and its full-history clone can go.
The only other step is `softprops/action-gh-release` with `generate_release_notes: true` and no `files:` or `body_path:` input. In that configuration the action passes `generate_release_notes` through to the GitHub releases API, which builds the notes server-side from the tag range; it does not read the working directory. `fetch-depth: 0` then clones the entire history of the repository on every tag push with no consumer.
Please drop the checkout step, or at minimum `fetch-depth: 0` on line 34.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
Re: [PR] ci(automation): enhance repository automation and code quality workflows (#320) [hugegraph-computer]
Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on code in PR #360:
URL: https://github.com/apache/hugegraph-computer/pull/360#discussion_r3975767859
##########
.github/workflows/commit-check.yml:
##########
@@ -0,0 +1,54 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+name: "Commit & PR Title Validation"
+
+on:
+ pull_request:
+ types:
+ - opened
+ - edited
+ - synchronize
+ - reopened
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ validate-pr-title:
+ name: Validate PR Title & Format
+ runs-on: ubuntu-latest
+ permissions:
+ pull-requests: read
+ steps:
+ - name: Validate PR Title Format
+ uses: amannn/action-semantic-pull-request@v5
Review Comment:
⚠️ important — This workflow only validates the PR title. The selected action's legacy `validateSingleCommit` option is absent (and only covers single-commit PRs), and no other step checks commit messages. Please add a commit-message validator or narrow the workflow name and documentation to PR-title validation.
##########
docs/automation-guide.md:
##########
@@ -0,0 +1,72 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Automation & Code Quality Guide
+
+This guide details the repository automations and code quality tools configured for **HugeGraph Computer** and **Vermeer** as recommended in Automation Analysis [#320](https://github.com/apache/hugegraph-computer/issues/320).
+
+---
+
+## Code Quality & Formatting Automations
Review Comment:
⚠️ important — This section promises code-formatting automation, but the exact-head diff adds no formatter plugin or `spotless:check`/equivalent CI step; the only documented checks here are Checkstyle and RAT, which validate rather than format. Please add and wire a formatter, or remove the formatting claim so the guide matches what the repository enforces.
##########
docs/automation-guide.md:
##########
@@ -0,0 +1,72 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Automation & Code Quality Guide
+
+This guide details the repository automations and code quality tools configured for **HugeGraph Computer** and **Vermeer** as recommended in Automation Analysis [#320](https://github.com/apache/hugegraph-computer/issues/320).
+
+---
+
+## Code Quality & Formatting Automations
+
+### 1. Code Style & License Checks
+- **Checkstyle (`maven-checkstyle-plugin`):** Enforces Java coding style guidelines defined in `checkstyle.xml`.
+- **Apache RAT (`apache-rat-plugin`):** Verifies Apache license headers across all project source files.
+
+```bash
+# Run Checkstyle validation
+mvn checkstyle:check
+
+# Run Apache RAT license validation
+mvn apache-rat:check
+```
+
+### 2. Test Coverage (`jacoco-maven-plugin`)
+JaCoCo tracks unit and integration test coverage during build execution.
+
+```bash
+# Run unit tests and generate JaCoCo coverage report
+mvn test -P unit-test
+
+# Inspect generated report at:
+# target/site/jacoco/jacoco.xml
+```
+
+---
+
+## CI/CD Workflows
+
+| Workflow | Path | Trigger | Description |
+|----------|------|---------|-------------|
+| **Commit Check** | `.github/workflows/commit-check.yml` | Pull Request | Validates PR titles against Conventional Commits formatting rules. |
+| **Computer CI** | `.github/workflows/computer-ci.yml` | Push / PR | Compiles, runs RAT, HDFS, K8s, and Java unit/integration tests. |
+| **Vermeer CI** | `.github/workflows/vermeer-ci.yml` | Push / PR | Builds Vermeer Go binary, checks UI assets, and tests Docker builds. |
+| **Release Notes** | `.github/workflows/release-notes.yml` | Tag Push (`*.*.*`) | Automatically drafts GitHub release notes from git history. |
+
+---
+
+## PR Title Guidelines
+
+Pull requests must follow the Conventional Commits specification:
+
+`<type>(<scope>): <short summary>`
Review Comment:
🧹 minor — The guide presents `<scope>` as mandatory, but the workflow sets `requireScope: false`, so a valid title can be `fix: ...`. Please use optional-scope notation or set `requireScope` to true so the documented rule matches CI.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
Re: [PR] ci(automation): enhance repository automation and code quality workflows (#320) [hugegraph-computer]
Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on code in PR #360:
URL: https://github.com/apache/hugegraph-computer/pull/360#discussion_r3768831301
##########
computer-rust/src/ffi/c_api.rs:
##########
@@ -0,0 +1,175 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You me obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+use crate::kernel::csr::CsrGraph;
+use crate::kernel::pagerank::PageRankKernel;
+use crate::kernel::sssp::SsspKernel;
+use crate::RUST_KERNEL_VERSION;
+use std::ffi::CString;
+use std::os::raw::c_char;
+use std::ptr;
Review Comment:
⚠️ important — `std::ptr` is unused. The added Rust workflow runs `cargo clippy --all-targets -- -D warnings`, so this import is promoted to an error and prevents the Rust CI job from reaching its tests. Remove the import or use it deliberately.
##########
computer-rust/src/kernel/csr.rs:
##########
@@ -0,0 +1,123 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#[derive(Debug, Clone, Default)]
+pub struct Edge {
+ pub target: u32,
+ pub weight: f64,
+}
+
+#[derive(Debug, Clone)]
+pub struct CsrGraph {
+ num_vertices: u32,
+ row_offsets: Vec<usize>,
+ column_indices: Vec<u32>,
+ edge_weights: Vec<f64>,
+}
+
+impl CsrGraph {
+ pub fn new(num_vertices: u32) -> Self {
+ Self {
+ num_vertices,
+ row_offsets: vec![0; (num_vertices + 1) as usize],
+ column_indices: Vec::new(),
+ edge_weights: Vec::new(),
+ }
+ }
+
+ pub fn from_edges(num_vertices: u32, edges: &[(u32, u32, f64)]) -> Self {
+ let mut degree = vec![0; num_vertices as usize];
+ for &(src, _dst, _weight) in edges {
+ if src < num_vertices {
Review Comment:
⚠️ important — The degree pass counts every edge with a valid source, while the fill pass skips destinations outside `num_vertices`. For an edge such as `(1, 99, 1.0)`, `row_offsets` reserves a slot that remains the default `(target=0, weight=0)`, so PageRank and SSSP process a fabricated edge. Count only edges with both endpoints valid, or reject invalid endpoints at the API boundary.
##########
computer-rust/src/ffi/c_api.rs:
##########
@@ -0,0 +1,175 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You me obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+use crate::kernel::csr::CsrGraph;
+use crate::kernel::pagerank::PageRankKernel;
+use crate::kernel::sssp::SsspKernel;
+use crate::RUST_KERNEL_VERSION;
+use std::ffi::CString;
+use std::os::raw::c_char;
+use std::ptr;
+use std::slice;
+
+pub struct GraphBuilder {
+ num_vertices: u32,
+ edges: Vec<(u32, u32, f64)>,
+ csr: Option<CsrGraph>,
+}
+
+#[no_mangle]
+pub extern "C" fn computer_graph_create(num_vertices: u32) -> *mut GraphBuilder {
+ let builder = Box::new(GraphBuilder {
+ num_vertices,
+ edges: Vec::new(),
+ csr: None,
+ });
+ Box::into_raw(builder)
+}
+
+#[no_mangle]
+pub extern "C" fn computer_graph_add_edge(
+ handle: *mut GraphBuilder,
+ src: u32,
+ dst: u32,
+ weight: f64,
+) -> i32 {
+ if handle.is_null() {
+ return -1;
+ }
+ let builder = unsafe { &mut *handle };
+ builder.edges.push((src, dst, weight));
Review Comment:
⚠️ important — `computer_graph_add_edge` accepts arbitrary `f64` weights, but `SsspKernel` uses Dijkstra. Negative weights can return incorrect shortest paths and a reachable negative cycle can keep lowering distances and growing the heap; non-finite weights are also unbounded input. Reject non-finite and negative weights here, or change the algorithm and document the supported weight domain.
##########
vermeer/apps/compute/rust_bridge.go:
##########
@@ -0,0 +1,107 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with this
+work for additional information regarding copyright ownership. The ASF
+licenses this file to You under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and limitations
+under the License.
+*/
+
+package compute
+
+import (
+ "fmt"
+ "math"
+)
+
+// RustKernelBridge manages interaction with high-performance Rust computing kernels.
+type RustKernelBridge struct {
+ available bool
+ version string
+}
+
+func NewRustKernelBridge() *RustKernelBridge {
+ return &RustKernelBridge{
+ available: false,
Review Comment:
⚠️ important — `available` is hard-coded to `false`, and this package contains no cgo declaration, library loading, or Rust C-ABI call. Vermeer therefore always executes the Go fallback even when the Rust library is deployed, making the new native bridge unreachable. Implement initialization and native calls, or remove the native-bridge claim and keep this as an explicitly fallback-only implementation.
##########
computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/rust/RustKernelBridge.java:
##########
@@ -0,0 +1,120 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hugegraph.computer.core.rust;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class RustKernelBridge {
+
+ private static final Logger LOG = LoggerFactory.getLogger(RustKernelBridge.class);
+ private static final boolean NATIVE_AVAILABLE;
+ private static final String LIB_NAME = "hugegraph_computer_rust";
+
+ static {
+ boolean loaded = false;
+ try {
+ System.loadLibrary(LIB_NAME);
+ loaded = true;
+ LOG.info("Successfully loaded Rust graph computing native library: {}", LIB_NAME);
+ } catch (UnsatisfiedLinkError e) {
+ LOG.info("Native library '{}' not available on system PATH; using pure Java fallback",
+ LIB_NAME);
+ } catch (Throwable t) {
+ LOG.warn("Failed to load native Rust graph computing library: {}", t.getMessage());
+ }
+ NATIVE_AVAILABLE = loaded;
+ }
+
+ public static boolean isAvailable() {
+ return NATIVE_AVAILABLE;
+ }
+
+ public static String getVersion() {
+ if (NATIVE_AVAILABLE) {
+ try {
+ return nativeGetVersion();
+ } catch (Throwable t) {
+ LOG.warn("Error calling nativeGetVersion: {}", t.getMessage());
+ }
+ }
+ return "1.5.0-java-fallback";
+ }
+
+ public static double[] computePageRank(double[][] adjMatrix, double dampingFactor,
+ int maxIterations, double tolerance) {
+ if (adjMatrix == null || adjMatrix.length == 0) {
+ return new double[0];
+ }
+
+ int n = adjMatrix.length;
+ double[] ranks = new double[n];
+ double initialRank = 1.0 / n;
+ for (int i = 0; i < n; i++) {
+ ranks[i] = initialRank;
+ }
+
+ double[] nextRanks = new double[n];
+ double teleport = (1.0 - dampingFactor) / n;
+
+ for (int iter = 0; iter < maxIterations; iter++) {
+ java.util.Arrays.fill(nextRanks, 0.0);
+ double danglingSum = 0.0;
+
+ for (int i = 0; i < n; i++) {
+ int outDegree = 0;
+ for (int j = 0; j < n; j++) {
+ if (adjMatrix[i][j] > 0.0) {
+ outDegree++;
+ }
+ }
+
+ if (outDegree == 0) {
+ danglingSum += ranks[i];
+ } else {
+ double share = ranks[i] / outDegree;
+ for (int j = 0; j < n; j++) {
+ if (adjMatrix[i][j] > 0.0) {
+ nextRanks[j] += share;
+ }
+ }
+ }
+ }
+
+ double danglingShare = dampingFactor * (danglingSum / n);
+ double maxDiff = 0.0;
+
+ for (int i = 0; i < n; i++) {
+ double newRank = teleport + danglingShare + dampingFactor * nextRanks[i];
+ double diff = Math.abs(newRank - ranks[i]);
+ if (diff > maxDiff) {
+ maxDiff = diff;
+ }
+ ranks[i] = newRank;
+ }
+
+ if (maxDiff < tolerance) {
+ break;
+ }
+ }
+
+ return ranks;
+ }
+
+ private static native String nativeGetVersion();
Review Comment:
⚠️ important — This Java native declaration does not match the library's exported ABI: Rust exports the C function `computer_kernel_version`, but no JNI symbol for `nativeGetVersion`, and `computePageRank` never calls a native function. If the library loads, `isAvailable()` becomes true while version lookup falls back after `UnsatisfiedLinkError` and computation still runs in Java. Add JNI/C-ABI bindings for the required calls and make availability reflect callable symbols.
##########
.github/workflows/release-notes.yml:
##########
@@ -0,0 +1,40 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+name: "Release Notes Generator"
+
+on:
+ push:
+ tags:
+ - 'v*'
Review Comment:
⚠️ important — This workflow triggers only for `v*` tags, while the repository's existing release tags use the `1.0.0`/`1.5.0`/`1.7.0` form. A normal version tag will not run this workflow and will not produce draft release notes. Align the trigger with the repository's release convention or update the release process consistently.
##########
.github/workflows/rust-ci.yml:
##########
@@ -0,0 +1,75 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+name: "Rust CI"
+
+on:
+ push:
+ branches:
+ - master
+ - /^release-.*$/
Review Comment:
⚠️ important — GitHub Actions branch filters use glob patterns, not regular expressions. `^/release-.*$/` therefore does not match normal `release-*` branches, so Rust CI is skipped for release-branch pushes. Replace it with a supported glob such as `release-*` and verify the trigger.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
Re: [PR] ci(automation): enhance repository automation and code quality workflows (#320) [hugegraph-computer]
Posted by "bitflicker64 (via GitHub)" <gi...@apache.org>.
bitflicker64 commented on code in PR #360:
URL: https://github.com/apache/hugegraph-computer/pull/360#discussion_r3901065756
##########
computer/pom.xml:
##########
@@ -431,6 +431,36 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>com.diffplug.spotless</groupId>
+ <artifactId>spotless-maven-plugin</artifactId>
+ <version>2.30.0</version>
+ <configuration>
+ <java>
+ <removeUnusedImports />
+ </java>
+ </configuration>
+ </plugin>
+ <plugin>
Review Comment:
⚠️ important — This duplicates JaCoCo, which is already configured in `computer/computer-test/pom.xml:176-198` (v0.8.4, `pre-test`/`prepare-agent` + `post-test`/`report-aggregate` writing to `${basedir}/../target/site/jacoco`, the exact path `computer-ci.yml:110-115` uploads to Codecov). A parent-level `<build><plugins>` entry is inherited by every module and merges with the child declaration instead of replacing it.
`mvn -o help:effective-pom` at this head:
- `-pl computer-test` → version resolves to **0.8.4** (the child's explicit version wins, so the declared 0.8.8 never takes effect here) with **four** executions: the new `prepare-agent` and `report` plus the existing `pre-test` and `post-test`.
- `-pl computer-core` → version **0.8.8**.
So sibling modules instrument with the 0.8.8 agent while `computer-test`'s 0.8.4 `report-aggregate` analyzes those `jacoco.exec` files, and `computer-test` runs a redundant `report` alongside `report-aggregate` in the same `test` phase. (The duplicated `prepare-agent` itself is harmless — the second execution overwrites `argLine` with an identical value rather than adding a second `-javaagent`.)
Please drop this block, or consolidate to a single declaration: remove the `computer-test` one, settle on one version, and keep the `report-aggregate` output path that Codecov consumes.
##########
computer/pom.xml:
##########
@@ -431,6 +431,36 @@
</execution>
</executions>
</plugin>
+ <plugin>
Review Comment:
🧹 minor — The only step configured here is `<removeUnusedImports/>`, which duplicates a rule the build already enforces: `checkstyle.xml:47,49` declares `RedundantImport` and `UnusedImports`, and `maven-checkstyle-plugin` binds `check` to the `validate` phase with `failsOnError=true` (`computer/pom.xml:373-394`).
There is also no `<executions>` binding and `computer-ci.yml` was not updated to call `spotless:check`, so nothing runs automatically despite the PR describing "Automatic Code Formatting" — only a manual `mvn spotless:apply`. For what it's worth the plugin does work and the tree is already clean: `mvn -B spotless:check` passes across all 10 modules at this head.
Either configure steps Checkstyle does not already cover (import order, license header, a formatter) and wire `spotless:check` into a phase and CI, or drop the plugin along with its `docs/automation-guide.md` section — as configured it adds a build dependency for no net capability.
##########
.github/workflows/release-notes.yml:
##########
@@ -0,0 +1,40 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+name: "Release Notes Generator"
+
+on:
+ push:
+ tags:
+ - 'v*'
+
+jobs:
+ generate-release-notes:
+ name: Generate Release Draft & Notes
+ runs-on: ubuntu-latest
Review Comment:
⚠️ important — This job declares no `permissions:` block, but `softprops/action-gh-release` documents `permissions: contents: write` as required to create a release. With no block the token falls back to the repository/org default; where that default is read-only the step fails with HTTP 403 at tag time, i.e. exactly when a release is being cut. This is separate from the tag-pattern issue already raised below: correcting the trigger alone still leaves the job unable to create the draft.
It also diverges from this repo's convention of explicit least privilege — `stale.yml:11-13` (`issues: write`, `pull-requests: write`), `codeql-analysis.yml:23-26` (`actions: read`, `contents: read`, `security-events: write`), `rerun-ci.yml:10` (`permissions: {}`).
Please add to this job:
```yaml
permissions:
contents: write
```
(I could not read the repository's effective default workflow permission — the API returns 403 for my token — but declaring it explicitly is correct either way.)
##########
.github/workflows/commit-check.yml:
##########
@@ -0,0 +1,52 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+name: "Commit & PR Title Validation"
+
+on:
+ pull_request:
+ types:
+ - opened
+ - edited
+ - synchronize
+ - reopened
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ validate-pr-title:
+ name: Validate PR Title & Format
+ runs-on: ubuntu-latest
Review Comment:
🧹 minor — This job also declares no `permissions:` block, so it inherits the default token scope. It only needs to read the PR title, and the rest of this repo pins least privilege explicitly (`stale.yml:11-13`, `codeql-analysis.yml:23-26`, `rerun-ci.yml:10`).
Please add:
```yaml
permissions:
pull-requests: read
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
Re: [PR] ci(automation): enhance repository automation and code quality workflows (#320) [hugegraph-computer]
Posted by "KHARSHAVARDHAN-eng (via GitHub)" <gi...@apache.org>.
KHARSHAVARDHAN-eng commented on PR #360:
URL: https://github.com/apache/hugegraph-computer/pull/360#issuecomment-5598747738
Updated the PR to contain only the automation changes for #320, addressed the review feedback, and verified the changes. Ready for review.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
Re: [PR] ci(automation): enhance repository automation and code quality workflows (#320) [hugegraph-computer]
Posted by "bitflicker64 (via GitHub)" <gi...@apache.org>.
bitflicker64 commented on code in PR #360:
URL: https://github.com/apache/hugegraph-computer/pull/360#discussion_r3952041892
##########
computer-rust/Cargo.toml:
##########
@@ -0,0 +1,43 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+[package]
+name = "hugegraph-computer-rust"
Review Comment:
‼️ This is two PRs wearing one coat.
The branch carries two commits against `master`:
- `ada86aa`, 21 files, **+1508**: this crate, `rust-ci.yml`, `RustKernelBridge.java`, `rust_bridge.go`, the roadmap doc.
- `e533ae8`, 4 files, **+206**: `computer/pom.xml` (Spotless and JaCoCo), `commit-check.yml`, `release-notes.yml`, `docs/automation-guide.md`.
Issue #320, which this PR says it fixes, is an automation-maturity audit: it recommends code formatting and test coverage as next steps and flags commit validation and release notes among the gaps. It does not mention Rust anywhere. The Rust work has its own issue (#355) and its own open PR (#359).
It is not even a clean duplicate of #359. Six files here are absent from #359's head `c1fc10a` (15 files, +1124):
```
computer-rust/src/kernel/aggregator.rs
computer-rust/src/kernel/sssp.rs
computer/computer-core/.../rust/RustKernelBridge.java
computer/computer-test/.../rust/RustKernelBridgeTest.java
vermeer/apps/compute/rust_bridge.go
vermeer/apps/compute/rust_bridge_test.go
```
That is +529 lines of Rust kernel and native-bridge code with no issue and no PR of its own, arriving on an automation PR. (Correcting myself: my earlier review said the Rust came from the stacked, unmerged #359. Six of these files are not in #359 either.)
Please rebase onto `master` and drop `ada86aa`. What is left maps one-to-one onto #320 and can be reviewed in one sitting, and the Rust review stays on #359 where it already has a thread.
##########
computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/rust/RustKernelBridge.java:
##########
@@ -0,0 +1,120 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hugegraph.computer.core.rust;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class RustKernelBridge {
+
+ private static final Logger LOG = LoggerFactory.getLogger(RustKernelBridge.class);
+ private static final boolean NATIVE_AVAILABLE;
+ private static final String LIB_NAME = "hugegraph_computer_rust";
+
+ static {
+ boolean loaded = false;
+ try {
+ System.loadLibrary(LIB_NAME);
+ loaded = true;
+ LOG.info("Successfully loaded Rust graph computing native library: {}", LIB_NAME);
+ } catch (UnsatisfiedLinkError e) {
+ LOG.info("Native library '{}' not available on system PATH; using pure Java fallback",
+ LIB_NAME);
+ } catch (Throwable t) {
+ LOG.warn("Failed to load native Rust graph computing library: {}", t.getMessage());
+ }
+ NATIVE_AVAILABLE = loaded;
+ }
+
+ public static boolean isAvailable() {
+ return NATIVE_AVAILABLE;
+ }
+
+ public static String getVersion() {
+ if (NATIVE_AVAILABLE) {
+ try {
+ return nativeGetVersion();
+ } catch (Throwable t) {
+ LOG.warn("Error calling nativeGetVersion: {}", t.getMessage());
+ }
+ }
+ return "1.5.0-java-fallback";
+ }
+
+ public static double[] computePageRank(double[][] adjMatrix, double dampingFactor,
Review Comment:
‼️ Nothing calls this, and both algorithms already ship here.
@imbajin has already noted at line 119 that `computePageRank` never reaches native code. The part worth acting on is what sits underneath: this is a dense adjacency-matrix PageRank in pure Java that rebuilds every vertex's out-degree by scanning all n cells per row on **every** iteration, and `vermeer/apps/compute/rust_bridge.go` writes it again with `available` hard-coded to `false`. The repository already has:
- `computer/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/pagerank/PageRank.java`
- `vermeer/algorithms/pagerank.go` and `vermeer/algorithms/sssp.go`
Those two handle dangling mass and converge on an L1 norm; these fallbacks converge on `maxDiff`, which is L-infinity. So the new copies are not a drop-in for the old ones, they are a fourth and fifth implementation with different numerics. And nothing calls them: `RustKernelBridge` and `NewRustKernelBridge` appear nowhere outside `RustKernelBridgeTest.java` and `rust_bridge_test.go`. Nothing builds `libhugegraph_computer_rust` into any artifact either, so `System.loadLibrary(LIB_NAME)` cannot succeed on anything this repo currently ships.
Please delete both bridge files and their tests. When the shared library actually exists and is packaged, the bridge is `System.loadLibrary` plus
```java
private static native double[] nativePageRank(double[][] adj, double damping, int maxIter, double tol);
```
with no hand-rolled fallback at all. (@imbajin already offered removal as one of two options on the Go side; this is the evidence for taking it on both.)
##########
computer-rust/src/lib.rs:
##########
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+pub mod ffi;
+pub mod fixtures;
Review Comment:
⚠️ 177 lines of this crate are reachable only from their own `#[cfg(test)]` blocks, and this line puts the test helpers in the library's public API.
- `kernel/aggregator.rs` (100 lines): a CAS-loop lock-free `f64` accumulator. `AtomicAggregator` has no caller. The only references outside the `pub use` below are in its own test module, and no kernel in this crate is parallel: the single `thread::spawn` in the whole diff is in that test. A lock-free accumulator for concurrency that does not exist yet is scaffolding.
- `fixtures/tolerance.rs` (77 lines): `DifferentialTolerance` is only ever compared against hand-written literals in its own unit test.
Please delete `aggregator.rs` until a parallel kernel needs it, and `tolerance.rs` until something actually runs a differential. That is roughly 180 lines with no behaviour change. `fixtures/dataset.rs` has to stay public as it is, since `benches/kernel_bench.rs:19` imports `GraphFixture` from the library, and `cargo clippy --all-targets` in `rust-ci.yml` builds that bench.
One related note: `docs/rust-modernization-roadmap.md` states the parity guardrail as differential correctness testing enforcing an L1 distance of at most 1e-6 against ground-truth outputs. Nothing compares these kernels to the Java or Go baselines, so the helper that guardrail is named after has no differential to run.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org