Skip to content

feat: LSP foundation, baseline-scoped validation, 7.8x perf fix#58

Merged
avrabe merged 1 commit intomainfrom
feat/lsp-baseline-perf
Mar 21, 2026
Merged

feat: LSP foundation, baseline-scoped validation, 7.8x perf fix#58
avrabe merged 1 commit intomainfrom
feat/lsp-baseline-perf

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented Mar 21, 2026

Summary

  • rivet lsp subcommand foundation (lsp-server + lsp-types, stdio, capabilities)
  • --baseline v0.1.0 flag on validate/list/stats/coverage/export
  • 7.8x store insert speedup (O(n²) → O(n)), regex caching, cached diagnostics
  • Design docs for LSP+salsa architecture and baseline system

Test plan

  • All Rust tests pass
  • rivet validate PASS
  • rivet stats --baseline v0.1.0 → 53 artifacts
  • CI

🤖 Generated with Claude Code

Three workstreams:

1. LSP foundation (rivet lsp):
   - lsp-server + lsp-types dependencies
   - Lsp subcommand with stdio connection
   - Server capabilities: text sync, diagnostics, hover, goto-def, completion
   - Main message loop with shutdown handling
   - Foundation for incremental validation via salsa

2. Baseline-scoped validation (--baseline flag):
   - BaselineConfig in rivet.yaml (ordered, cumulative)
   - Artifact.baseline() helper reads from fields map
   - Store::scoped() filters by baseline (cumulative inclusion)
   - --baseline flag on validate, list, stats, coverage, export
   - Dogfood: v0.1.0 (53 artifacts) and v0.2.0-dev baselines defined
   - REQ/DD/FEAT artifacts tagged with baseline fields

3. Performance fixes (7.8x store speedup):
   - O(n²) Store::upsert fixed (linear contains → direct insert)
   - Regex pre-compilation for conditional rules (N×M → M compiles)
   - Cow<str> for get_field_value (zero-copy field reads)
   - Allocation-free allowed_values check
   - Hoisted forward-map entry in LinkGraph::build
   - Cached diagnostics in AppState (no re-validation per page view)

Implements: FEAT-047
Satisfies: REQ-029

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@avrabe avrabe merged commit fb2efbf into main Mar 21, 2026
@avrabe avrabe deleted the feat/lsp-baseline-perf branch March 21, 2026 06:10
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 21, 2026

Codecov Report

❌ Patch coverage is 64.36782% with 31 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
rivet-core/src/store.rs 25.00% 18 Missing ⚠️
rivet-core/src/schema.rs 60.00% 10 Missing ⚠️
rivet-core/src/model.rs 0.00% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

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.

1 participant