Problem
cli/schist/sqlite_query.py:9 defines the set of tables the CLI permits in raw_query calls:
ALLOWED_TABLES = {'docs', 'concepts', 'edges', 'docs_fts', 'paper_metadata'}
The concept_aliases table (defined at cli/schist/schema.sql:111-118) is absent. Any CLI query targeting that table is rejected at validation time:
Error: table "concept_aliases" is not allowed (allowed: concepts, docs, docs_fts, edges, paper_metadata)
concept_aliases was added to the schema independently of ALLOWED_TABLES. The MCP tool add_concept_alias (mcp-server/src/sqlite-reader.ts:702-728) can write alias rows, but there is no supported path for CLI users to read them back.
File:line references
cli/schist/sqlite_query.py:9 — ALLOWED_TABLES constant missing concept_aliases
cli/schist/sqlite_query.py:188-192 — table-allowlist check that rejects the query
cli/schist/schema.sql:111-118 — concept_aliases table definition
Why it matters
The add_concept_alias MCP tool is the primary way to record canonical-slug redirects. Operators and agents who want to audit, inspect, or cross-reference aliases via the CLI (e.g. schist query "SELECT * FROM concept_aliases") get a hard error with no obvious workaround. The discrepancy between what the MCP layer can write and what the CLI layer can read is confusing and blocks legitimate diagnostic queries.
Suggested fix
Add 'concept_aliases' to ALLOWED_TABLES in cli/schist/sqlite_query.py:9:
ALLOWED_TABLES = {'docs', 'concepts', 'edges', 'docs_fts', 'paper_metadata', 'concept_aliases'}
Also add a comment noting the table to keep in sync with schema.sql (analogous to the existing REQUIRED_TABLES comment on line 10).
Problem
cli/schist/sqlite_query.py:9defines the set of tables the CLI permits inraw_querycalls:The
concept_aliasestable (defined atcli/schist/schema.sql:111-118) is absent. Any CLI query targeting that table is rejected at validation time:concept_aliaseswas added to the schema independently ofALLOWED_TABLES. The MCP tooladd_concept_alias(mcp-server/src/sqlite-reader.ts:702-728) can write alias rows, but there is no supported path for CLI users to read them back.File:line references
cli/schist/sqlite_query.py:9—ALLOWED_TABLESconstant missingconcept_aliasescli/schist/sqlite_query.py:188-192— table-allowlist check that rejects the querycli/schist/schema.sql:111-118—concept_aliasestable definitionWhy it matters
The
add_concept_aliasMCP tool is the primary way to record canonical-slug redirects. Operators and agents who want to audit, inspect, or cross-reference aliases via the CLI (e.g.schist query "SELECT * FROM concept_aliases") get a hard error with no obvious workaround. The discrepancy between what the MCP layer can write and what the CLI layer can read is confusing and blocks legitimate diagnostic queries.Suggested fix
Add
'concept_aliases'toALLOWED_TABLESincli/schist/sqlite_query.py:9:Also add a comment noting the table to keep in sync with
schema.sql(analogous to the existingREQUIRED_TABLEScomment on line 10).