defer storage path validation off plugin init#810
Conversation
rwmjhb
left a comment
There was a problem hiding this comment.
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
Summary
dbPathduring plugin registrationCloses #795.
Validation
node --test test/storage-path-normalization.test.mjsnode test/plugin-manifest-regression.mjsnpm run test:storage-and-schemanode scripts/verify-ci-test-manifest.mjsnpx tsc --noEmitgit diff --checkIf maintainers squash/rework this PR, please preserve author attribution or include:
Co-authored-by: Andy Ye <35905412+TurboTheTurtle@users.noreply.github.com>