Skip to content

Go: format code - #16813

Merged
JinHai-CN merged 5 commits into
infiniflow:mainfrom
JinHai-CN:fix534
Jul 10, 2026
Merged

JinHai-CN merged 5 commits into
infiniflow:mainfrom
JinHai-CN:fix534

Conversation

@JinHai-CN

Copy link
Copy Markdown
Member

Summary

Aligned to EE

Signed-off-by: Jin Hai <[email protected]>
@coderabbitai

coderabbitai Bot commented Jul 10, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The change adds a license helper used by heartbeat handling, adds PDF table span regression coverage, corrects parser constructor syntax, and applies formatting or whitespace cleanup across Go and C++ sources.

Changes

License propagation and repository cleanup

Layer / File(s) Summary
Heartbeat license result propagation
internal/admin/enterprise_service.go, internal/admin/service.go
Adds CheckLicense and routes heartbeat responses through its result after server information is updated.
PDF table span and rendering cleanup
internal/deepdoc/parser/pdf/...
Reformats table span and HTML conversion logic, updates PDF fixtures, and adds coverage for non-spanning cells near a spanning cell.
Parser constructor syntax correction
internal/parser/parser/factory.go
Corrects the extra brace in NewResumePDFParser and standardizes the stub constructors.
C++ formatting normalization
internal/binding/cpp/...
Normalizes whitespace, blank lines, and file-ending braces across analyzer, parser, tokenizer, trie, lemmatizer, tests, and headers.
Go formatting and text cleanup
internal/agent/tool/akshare.go, internal/dao/document.go, internal/harness/..., internal/ingestion/...
Adjusts article output spacing, expression alignment, comments, documentation formatting, and blank-line placement.

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

Suggested reviewers: yingfeng, yuzhichang

Poem

A rabbit checks the license light,
And tables span their cells just right.
Braces hop in tidy rows,
While parser syntax neatly grows.
Formatting bounces, clean and bright!

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The description is too vague and doesn't provide the required summary context, background, or purpose. Expand the Summary with the problem, what changed, and the rationale for aligning to EE.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the PR's primary focus on code formatting, even though it omits the small parser fix.
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.

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.

@JinHai-CN
JinHai-CN marked this pull request as ready for review July 10, 2026 08:16
@JinHai-CN JinHai-CN added the ci Continue Integration label Jul 10, 2026
@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jul 10, 2026

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

🧹 Nitpick comments (1)
internal/admin/enterprise_service.go (1)

1160-1163: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Make CheckLicense package-private. It’s only called from HandleHeartbeat in internal/admin, so checkLicense would reduce surface area. The stubbed return also makes the name look more authoritative than the behavior; if it stays as a placeholder, track that separately.

🤖 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 `@internal/admin/enterprise_service.go` around lines 1160 - 1163, Rename
CheckLicense to the package-private checkLicense and update its sole caller,
HandleHeartbeat, to use the new name; leave its current return behavior
unchanged.

Source: Coding guidelines

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

Nitpick comments:
In `@internal/admin/enterprise_service.go`:
- Around line 1160-1163: Rename CheckLicense to the package-private checkLicense
and update its sole caller, HandleHeartbeat, to use the new name; leave its
current return behavior unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2198697c-9233-42d3-bc4b-7fa1181cd152

📥 Commits

Reviewing files that changed from the base of the PR and between 07a3523 and 4c63511.

📒 Files selected for processing (27)
  • internal/admin/enterprise_service.go
  • internal/admin/service.go
  • internal/agent/component/userfillup.go
  • internal/agent/tool/akshare.go
  • internal/binding/cpp/darts_trie.cpp
  • internal/binding/cpp/main.cpp
  • internal/binding/cpp/pcre2.h
  • internal/binding/cpp/rag_analyzer.cpp
  • internal/binding/cpp/rag_analyzer_c_api_debug.cpp
  • internal/binding/cpp/rag_analyzer_c_test.cpp
  • internal/binding/cpp/term.cpp
  • internal/binding/cpp/thinc_parser.cpp
  • internal/binding/cpp/tokenizer.cpp
  • internal/binding/cpp/wordnet_lemmatizer.cpp
  • internal/dao/document.go
  • internal/deepdoc/parser/pdf/parser_ocr.go
  • internal/deepdoc/parser/pdf/table/group_boxes_test.go
  • internal/deepdoc/parser/pdf/table/table_html.go
  • internal/deepdoc/parser/pdf/table/table_html_test.go
  • internal/deepdoc/parser/pdf/table/table_merge.go
  • internal/deepdoc/parser/pdf/table/table_spans.go
  • internal/deepdoc/parser/pdf/table/table_spans_test.go
  • internal/harness/README.md
  • internal/harness/graph/pregel/engine.go
  • internal/ingestion/compilation/extractor/dep_relation.go
  • internal/ingestion/task/position.go
  • internal/parser/parser/factory.go
💤 Files with no reviewable changes (5)
  • internal/deepdoc/parser/pdf/table/table_html_test.go
  • internal/deepdoc/parser/pdf/table/table_merge.go
  • internal/deepdoc/parser/pdf/table/table_spans_test.go
  • internal/agent/component/userfillup.go
  • internal/ingestion/compilation/extractor/dep_relation.go

@JinHai-CN
JinHai-CN merged commit 0aa2993 into infiniflow:main Jul 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continue Integration size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant