Skip to content

defer storage path validation off plugin init#810

Merged
rwmjhb merged 1 commit into
CortexReach:masterfrom
TurboTheTurtle:fix/async-storage-path-validation
May 23, 2026
Merged

defer storage path validation off plugin init#810
rwmjhb merged 1 commit into
CortexReach:masterfrom
TurboTheTurtle:fix/async-storage-path-validation

Conversation

@TurboTheTurtle
Copy link
Copy Markdown
Contributor

Summary

  • add an async storage path validator for runtime initialization
  • stop synchronously validating/creating dbPath during plugin registration
  • preserve the existing warn-and-continue behavior when storage path preparation fails

Closes #795.

Validation

  • node --test test/storage-path-normalization.test.mjs
  • node test/plugin-manifest-regression.mjs
  • npm run test:storage-and-schema
  • node scripts/verify-ci-test-manifest.mjs
  • npx tsc --noEmit
  • git diff --check

If maintainers squash/rework this PR, please preserve author attribution or include:

Co-authored-by: Andy Ye <35905412+TurboTheTurtle@users.noreply.github.com>

@TurboTheTurtle TurboTheTurtle marked this pull request as ready for review May 22, 2026 02:50
Copy link
Copy Markdown
Collaborator

@rwmjhb rwmjhb left a comment

Choose a reason for hiding this comment

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

PR #810 Review: defer storage path validation off plugin init

Verdict: APPROVE | 6 rounds completed | Value: 64% | Size: MEDIUM | Author: TurboTheTurtle

Value Assessment

Problem: Plugin registration currently performs synchronous filesystem validation and directory creation for dbPath, which can block the event loop during every plugin startup. The PR defers that storage path preparation into async store initialization while keeping warning behavior when preparation fails.

Dimension Assessment
Value Score 64%
Value Verdict review
Issue Linked true
Project Aligned true
Duplicate false
AI Slop Score 0/6
User Impact high
Urgency medium

Open Questions:

  • Issue #795 has no maintainer labels, assignment, or comments in the provided context, so maintainer acknowledgement is unknown.
  • The base is marked stale; confirm main has not already changed plugin init or storage path validation in a conflicting way.
  • Confirm whether exporting validateStoragePathAsync is intended as public API or should remain internal.

Summary

Plugin registration currently performs synchronous filesystem validation and directory creation for dbPath, which can block the event loop during every plugin startup. The PR defers that storage path preparation into async store initialization while keeping warning behavior when preparation fails.

Evaluation Signals

Signal Value
Blockers 0
Warnings 1
PR Size MEDIUM
Verdict Floor approve
Risk Level high
Value Model codex
Primary Model codex
Adversarial Model claude

Nice to Have

  • F2: Canonicalized dbPath no longer reaches plugin-level auxiliary paths
  • F3: Async validator symlink check uses the unnormalized input path
  • EF1: Static analysis reports added any types
  • MR1: New async validator's error branches are entirely untested
  • MR2: lstat failures other than ENOENT are silently swallowed, skipping symlink resolution

Recommended Action

Ready to merge.


Reviewed at 2026-05-22T14:38:50Z | 6 rounds | Value: codex | Primary: codex | Adversarial: claude

@rwmjhb rwmjhb merged commit 7ceb6f0 into CortexReach:master May 23, 2026
11 checks passed
@TurboTheTurtle TurboTheTurtle deleted the fix/async-storage-path-validation branch May 23, 2026 04:53
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.

[perf] plugin init 時 validateStoragePath sync blocking(Issue #763 follow-up)

2 participants