Skip to content

Commit 8d5dd13

Browse files
committed
docs(test): align substrate matrix with coverage map
Add calls/coverage to SUBSTRATE_SCENARIO_BY_TABLE; fix glossary architecture anchor; clarify CONTRIBUTING guard scope.
1 parent b2aeded commit 8d5dd13

4 files changed

Lines changed: 5 additions & 3 deletions

File tree

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Then open a PR on GitHub into **`main`**.
3939
- **Public API** — Anything exported from the package entry (`src/index.ts``src/api.ts`, `config.ts`, shared types) should have **JSDoc** that reads well in hovers and in published typings.
4040
- **Layers** — Keep boundaries clear: [architecture.md](../docs/architecture.md) (`cli``application` → infrastructure). Don’t let CLI concerns leak into parsers or the DB layer.
4141
- **Before you open / update a PR**`bun run check` (or at least `bun run test` + `bun run typecheck` while iterating).
42-
- **Golden queries (Tier A)** — If you change `fixtures/minimal/` or schema/query behavior expected by [fixtures/golden/](../fixtures/golden/), run `bun scripts/query-golden.ts --update`, review diffs, and commit updated JSON under `fixtures/golden/minimal/`. Prefer **fixing the indexer** when output changes for the wrong reason; only refresh goldens when the new rows are correct. See [docs/golden-queries.md](../docs/golden-queries.md) and the coverage map [docs/testing-coverage.md](../docs/testing-coverage.md). New tables should add a substrate scenario (or extend `index-table-stats`); `bun run test:scripts` enforces recipe + table coverage.
42+
- **Golden queries (Tier A)** — If you change `fixtures/minimal/` or schema/query behavior expected by [fixtures/golden/](../fixtures/golden/), run `bun scripts/query-golden.ts --update`, review diffs, and commit updated JSON under `fixtures/golden/minimal/`. Prefer **fixing the indexer** when output changes for the wrong reason; only refresh goldens when the new rows are correct. See [docs/golden-queries.md](../docs/golden-queries.md) and the coverage map [docs/testing-coverage.md](../docs/testing-coverage.md). New tables should add a substrate scenario (or extend `index-table-stats`); `bun run test:scripts` runs `query-golden-coverage-matrix.test.mjs` (every bundled recipe + `SUBSTRATE_SCENARIO_BY_TABLE` pin-downs).
4343
- **Golden queries (Tier B)** — Against a **local** clone, use `bun run test:golden:external` with `CODEMAP_ROOT` / `--root`. Copy [fixtures/golden/scenarios.external.example.json](../fixtures/golden/scenarios.external.example.json) to `scenarios.external.json` if you need custom scenarios; goldens under `fixtures/golden/external/` are gitignored — do not commit snapshots from proprietary trees.
4444
- **Style** — Match Oxfmt/Oxlint; prefer **straight-line code** and extracted helpers over long nested blocks.
4545

docs/glossary.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ TS shape for one row of the `type_members` table.
604604

605605
### `unresolved_calls` (table)
606606

607-
Staging queue for call sites that **`resolveCalls`** could not bind after the bindings pass. Rows carry `file_path`, `caller_scope`, `callee_name`, and call-site position; deleted when resolved or when the call row is removed. Bundled recipes: `unresolved-call-sites`, `call-resolution-stats`. See [architecture § Call resolution](./architecture.md#schema).
607+
Staging queue for call sites that **`resolveCalls`** could not bind after the bindings pass. Rows carry `file_path`, `caller_scope`, `callee_name`, and call-site position; deleted when resolved or when the call row is removed. Bundled recipes: `unresolved-call-sites`, `call-resolution-stats`. See [architecture § `calls` / `unresolved_calls`](./architecture.md#calls--function-scoped-call-edges-deduped-per-file-strict).
608608

609609
### `unresolved_calls_residual`
610610

docs/testing-coverage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Every `templates/recipes/<id>.sql` has **≥1** scenario in `fixtures/golden/sce
3434

3535
## Substrate tables — SQL pin-down scenarios
3636

37-
Recipe goldens prove query _behavior_; these scenarios pin **persisted rows** on the minimal corpus:
37+
Recipe goldens prove query _behavior_; these scenarios pin **persisted rows** on the minimal corpus. Pin-down ids enforced in CI: `SUBSTRATE_SCENARIO_BY_TABLE` in `scripts/query-golden-coverage-matrix.test.mjs` (plus every bundled recipe id). `index-table-stats` and `call-resolution-stats` are additional aggregate/residual scenarios on the same corpus.
3838

3939
| Table | Scenario id |
4040
| ------------------------------------- | ------------------------------------------------------- |

scripts/query-golden-coverage-matrix.test.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ const SUBSTRATE_SCENARIO_BY_TABLE = {
2828
function_params: "function-params-createClient",
2929
boundary_rules: "boundary-rules-ui-no-api",
3030
unresolved_calls: "unresolved-call-sites",
31+
calls: "calls-createClient-resolved",
32+
coverage: "coverage-rows-after-ingest",
3133
jsx_elements: "index-table-stats",
3234
jsx_attributes: "index-table-stats",
3335
try_catch: "try-catch-rethrow-heuristics",

0 commit comments

Comments
 (0)