Code reference detail
langium-corpus-golden.test.ts
reqlan rq/core_analysis/packages/language/test/langium-corpus-golden.test.ts
| Idea | Status | Tags | Summary | Katz |
|---|---|---|---|---|
| golden_corpus | done | Parser / extractor alignment uses a frozen `.rq` tree under `testdata/golden-corpus/`, not live product requirements in `reqlan rq/`. Production idea lists may change without regenerating the dump. Copy a representative file into the corpus and refresh `crates/reqlan-index/tests/golden/langium-corpus-names.json` only when grammar or extract behaviour needs a new sample. Langium and Rust both extract name + kind from that tree and must match the committed dump. Live parse alignment ( elements and refs, both engines in one test ): [parser_align]. Comment character ranges on the same tree: [comment_span_align]. | 0.104 | |
| rust_crate_layout | done | Cargo workspace at repo-root `crates/` ( not inside `packages/analytical` ), crates: - `reqlan-parse` — lexer, parser, AST, recovery, parse budget - `reqlan-index` — extract, rusqlite store, mtime sync, diagnostics - `reqlan-search` — fuzzy / contextual / semantic ranking - `reqlan-export` — snapshot + html / md / json / csv writers; embed existing HTML JS assets - `reqlan-analytical` — facade matching `AnalysisApi` + `WorkspaceIndex` operations - `reqlan-napi` — Node binding for the core engine ( [native_bridge] ) - `reqlan-lsp` — editor language server ( [lsp_rust.language_server_rust] ) Mature crates only ( rusqlite, napi ): no experimental parser generators for the lexer. Golden tests compare Rust extract against Langium on the frozen [golden_corpus], plus the language-test fixtures ported into `reqlan-parse` / `reqlan-index` tests. Format: ["../development/commit.rq".rust_fmt]. Root `pnpm test` runs `test:js` then `test:rust` from ["../../package.json"]. `test:rust` is `cargo test --workspace --exclude reqlan-napi`. GitHub CI compiles crates once, then runs `cargo test` as its own step so crate tests reuse that build ( ["../distribution/distribution.rq".ci_gate] ). | 0.138 |
Reference labels
golden_corpus, rust_crate_layout