One authority.
Contracts and edge cases
Platform spec article
Contracts and edge cases
Spec standingStandard
-
Hub authority
Context
Decision
Hub owns snapshot/refresh MUST/SHOULD.
Consequences
IDE parity.
Verification anchors
beskid_lsp tests.
-
Invalidation
Context
Stale snapshots.
Decision
Invalidate on focus, manifest, lock; debounce watchers.
Consequences
Config notification.
Verification anchors
session store.
- Contracts and edge cases Strict guarantees for LSP snapshot lifecycle and refresh behavior.
- Design model Conceptual model for `Snapshot and refresh contract` and its subsystem boundaries.
- Examples Observable LSP refresh scenarios for snapshots and diagnostics.
- FAQ and troubleshooting Common LSP snapshot and refresh issues.
- Flow and algorithm End-to-end refresh flow for LSP workspace snapshots and diagnostics.
- Verification and traceability Tests and traceability for the LSP snapshot and refresh contract.
0 revisions (git unavailable at build; counts may be empty)
No commits recorded for this path.
| Section id | Required | Found |
|---|---|---|
what-this-feature-specifies | yes | yes |
implementation-anchors | yes | yes |
Full tree: run pnpm verify:platform-spec-layout (writes src/generated/platform-spec-layout-report.json).
Contracts
Section titled “Contracts”- Open buffer wins — Disk index must not overwrite an open
Documentfor the sameUri. - Monotonic versions — Stale
didChangeversions must be ignored per LSP rules. - Cache generation — When
ANALYSIS_CACHE_VERSIONincrements, all snapshots must rebuild even if text is unchanged. - Diagnostic debounce — Only the latest scheduled revision per URI may publish; superseded tasks must no-op.
- Manifest URIs —
.projfiles must not run Beskid semantic analysis snapshots. - Parity — Diagnostic codes and severities must match
beskid analyzefor the sameCompilationContext.
Edge cases
Section titled “Edge cases”| Case | Behavior |
|---|---|
| Source outside focused project tree | Fall back to focused Project.proj when path is under focus root (project_context.rs) |
| No resolvable manifest | Analysis snapshot is None; features degrade gracefully without fabricated graphs |
| Large workspace scan | Progress events must remain cancellable by subsequent invalidation |
| Rapid typing | Text-hash fast path avoids parse until pause; debounced diagnostics may lag one generation |
| Lockfile change during edit | Hard invalidation; user may see transient empty diagnostics until rescan completes |
Meta invalidation
Section titled “Meta invalidation”Changes to project.mod or mod AOT outputs must hard-invalidate compilation cache before re-running generators. Soft paths are opt-in and require proven stable capture keys.