Code reference detail
index-diagnostics-store.ts
packages/analytical/src/index-store/index-diagnostics-store.ts
| Idea | Status | Tags | Summary |
|---|---|---|---|
| index_diagnostics | done | Indexing performance diagnostics: measure and inspect time spent indexing a [indexer.index] base. Timing is persisted in a dedicated * * diagnostic index * * under application memory ( [app_memory.index_diagnostics_store] ), not in `ideas-index.sqlite`, so history survives Clear & rebuild. Surfaces: [index_diagnostics_webview]. Owned by `@reqlan/analytical` for recording; the extension hosts the webview. | |
| index_diagnostics_metrics | done | For each sync / index run on a base, record: - wall-clock * * sum / total duration * * of the pass - * * file count * * ( visited ), skipped-by-mtime count, indexed ( parse / persist attempted ) count, error count - * * average path depth * * of visited files ( segments under the base root ) - per-file * * duration * * and outcome ( `mtime_skip` | `mtime_refresh` | `hash_skip` | `persisted` | `error` ) Runs are attributable to a trigger ( `soft_sync` | `rebuild` | `enqueue` | `stale` ). Instrumentation wraps [workspace_index] soft sync and [indexer.nonblocking_index] single-file paths via [diagnostics_store]. | |
| application_memory | done | Base-local application memory for reqlan tools lives under `<base>/.reqlan/`. The presence of `.reqlan` * * marks * * a directory as a ["../../bases/base.rq".base]; each base owns its own store. Shared by the VS Code extension, ["../../cli/cli_package.rq".cli_package], and MCP ( [mcp_server] ) — not VS Code `globalStorageUri` / extension-private storage. The ideas graph index ( ["../features-graph-analysers.rq".index_ideas] / ["../features-graph-analysers.rq".index_technology] ) persists as `ideas-index.sqlite` inside that directory. Index timing diagnostics persist separately as `index-diagnostics.sqlite` ( [index_diagnostics_store] / ["../features-index-diagnostics.rq".index_diagnostics] ) so rebuilds of the ideas index do not wipe history. Export form defaults ( all formats via ["../features-export.rq".export_webview], including HTML options in ["../features-html-export.rq".html_export_form] ) persist as `export_settings.json` in the same directory ( active base ). Path ignore rules live as `.rqignore` in the same directory ( [rqignore] / [configuration.configuration_rqignore] ). Path resolution is owned by [application_memory_impl] ( `resolveApplicationMemoryPath` ); consumers must use it ( or `REQLAN_INDEX_PATH` override for a single store ) so tools read and write the same store for a given base. Multi-base discovery / registry: ["../../bases/base.rq".multi_base_environment]. Index engine ownership: ["../../indexer/indexer.rq".ownership]. Extension wiring: [analytical_submodule]. Aligns with ["../../cli/cli_package.rq".function_parity]: shared analytical memory, not host-only state. | |
| index_diagnostics_store | done | Per-base diagnostic timing index at `<base>/.reqlan/index-diagnostics.sqlite`. Sibling of `ideas-index.sqlite`; not deleted by Clear & rebuild. Records sync runs and per-file durations for ["../features-index-diagnostics.rq".index_diagnostics_metrics]. Webview: ["../features-index-diagnostics.rq".index_diagnostics_webview]. | |
| extension_startup_reliability | done | Reqlan startup must make the activity-bar shell and contributed commands available before optional indexing, parser construction, database initialization, or language-client startup can monopolize the extension host. The implementation contract is [first_paint_contract], [deferred_startup_sequence], [lazy_runtime_dependencies], and [development_bundle_freshness]. Operational diagnosis follows [startup_diagnostics]. [activation.activation_sequence] [activitybar.loading_state] [indexer.nonblocking_index] [build.extension_bundle] | |
| lazy_runtime_dependencies | done | Base discovery must be cheap: - Constructing `WorkspaceIndex` does not construct Langium / Chevrotain services; services are memoized on first parse. - sql. js asm is not parsed as part of `main.cjs`; both index stores dynamically import the generated vendor bundle when a database first opens. - Export / physics source is generated at build time rather than read via extension-runtime URLs. The host bundle consequently fell from approximately 11. 2 MB to 2. 66 MB; sql. js occupies a separate approximately 8. 0 MB lazy vendor bundle. ["../../packages/analytical/src/index-store/workspace-index.ts"] ["../../packages/analytical/src/index-store/sqlite-store.ts"] ["../../packages/analytical/src/index-store/index-diagnostics-store.ts"] ["../../packages/extension/esbuild.mjs"] |
Reference labels
../../../packages/analytical/src/index-store/index-diagnostics-store.ts, ../../packages/analytical/src/index-store/index-diagnostics-store.ts, diagnostics_store