Skip to content

OpenViking Plugin Exception Handling & Fixing#449

Merged
MaojiaSheng merged 1 commit intovolcengine:mainfrom
wlff123:ov_fix
Mar 5, 2026
Merged

OpenViking Plugin Exception Handling & Fixing#449
MaojiaSheng merged 1 commit intovolcengine:mainfrom
wlff123:ov_fix

Conversation

@wlff123
Copy link
Contributor

@wlff123 wlff123 commented Mar 5, 2026

Description

Related Issue

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test update

Changes Made

Testing

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have tested this on the following platforms:
    • Linux
    • macOS
    • Windows

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Screenshots (if applicable)

Additional Notes

@wlff123 wlff123 changed the title [wip]OpenViking Plugin Exception Handling & Fixing OpenViking Plugin Exception Handling & Fixing Mar 5, 2026
@MaojiaSheng
Copy link
Collaborator

/review

@MaojiaSheng MaojiaSheng merged commit 49320bf into volcengine:main Mar 5, 2026
7 checks passed
@github-project-automation github-project-automation bot moved this from Backlog to Done in OpenViking project Mar 5, 2026
@github-actions
Copy link

github-actions bot commented Mar 5, 2026

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Possible Regression

Local mode startup health check timeout reduced from 120s to 60s, which may cause timeouts for slow startups (embedder load, AGFS initialization can take 1–2 minutes).

const timeoutMs = 60_000;
Redundant Code

Duplicate leading timestamp regex replacement in sanitizeUserTextForCapture; LEADING_TIMESTAMP_PREFIX_RE is already applied, making the second replace call unnecessary.

.replace(LEADING_TIMESTAMP_PREFIX_RE, "")
.replace(/^\s*\[[^\]\n]{1,120}\]\s*/, "")
Suggestion

getAgfsPortFromConfig assumes ov.conf is JSON; consider validating file format or adding a comment if ov.conf is indeed JSON, to avoid confusion.

function getAgfsPortFromConfig(configPath: string): number {
  try {
    if (!existsSync(configPath)) return DEFAULT_AGFS_PORT;
    const raw = readFileSync(configPath, "utf-8");
    const obj = JSON.parse(raw) as { storage?: { agfs?: { port?: number } } };
    const p = obj?.storage?.agfs?.port;
    return typeof p === "number" && p >= 1 && p <= 65535 ? p : DEFAULT_AGFS_PORT;
  } catch {
    return DEFAULT_AGFS_PORT;
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants