Repository navigation
Description
Observation
workspace_context's semantic schema retrieval (packages/core/src/ops/context_ops.rs:296-299) has no is_core filter:
Ok(results) => {
let schemas: Vec<SchemaNode> = results
.into_iter()
.filter_map(|(node, _score)| SchemaNode::from_node(node).ok())
.collect(); // ← no is_core filterRetrieval is scoped only by node_type == "schema", and text/task/date are stored schema nodes with embeddable content. The sibling branch writing into the same relevant_schemas vector (packages/daemon/src/services/local_agent_service.rs:1878, the recently-created-schema debounce-bypass injection) does guard:
if schema.is_core {
continue; // skip built-in types
}One branch guards, the branch it augments doesn't.
Why it matters
#1897 (create_node guidance) tells the model to use a bare property key when the node's type appears in the RELEVANT ENTITY TYPES block (treating presence there as proof the type is user-defined), and a custom:-prefixed key on built-in types. If a core type reaches that block via unfiltered retrieval, the model reads it as user-defined and writes a bare key onto a core type — the exact ADR-063 violation #1897 was fixed to prevent (update_schema rejects this; create_node does not currently validate it).
Currently latent, not live
Seeding uses raw store.create_node, which does not queue_root_for_embedding, and backfill_schema_description_subtrees skips schemas without a legacy description field (core schemas have none) — so core schema nodes are likely un-embedded and unretrievable on a fresh DB today. Nothing in the code prevents it, though: any future backfill, re-index, or touch that embeds core schema nodes silently activates this path, with no test failing to catch it.
packages/core/src/ops/skill_ops.rs was also checked as a suggested defense-in-depth site — its unscoped-schema-metadata fallback (around line 207) already guards with !s.is_core, so no change needed there.
Fix
.filter(|s| !s.is_core)on the semantic-search results incontext_ops.rs(mirroringlocal_agent_service.rs:1878)- A test asserting core types never render into the RELEVANT ENTITY TYPES block via semantic schema retrieval, so the Stop create_node from silently discarding user values with no matching schema field (#1866) #1897 guidance's premise (presence in that block implies user-defined) is enforced where it's relied upon, not just true by current accident of what's embedded
Acceptance criteria
-
context_ops.rs's semantic schema retrieval filters outis_coreschemas - Test pins that a core schema, even if embedded/retrievable, never appears in the rendered RELEVANT ENTITY TYPES block from this path
Found during code review of #1897, folded into #1899's investigation and split out per that issue's closing discussion.
Activity
malibio commentedon Aug 1, 2026
Frontend baseline (worktree issue-1900-schema-iscore-filter): all suites passed except the known pre-existing flake core-plugins.test.ts > should resolve viewer components for plugins with viewers (5000ms default timeout in fresh worktrees, passes with headroom given --testTimeout=60000; unrelated to this change).
Address review: exclude core types from related_schemas too, drop iss…