Skip to content
8 changes: 8 additions & 0 deletions changelog.d/embed-schema-authority.breaking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- `omnigraph embed` reads what to embed from the schema's `@embed` declarations.
Replace `--spec` with `--schema <schema.pg>` and a seed manifest's
`embeddings` entry with a `schema` path; unknown manifest keys are refused.
`--vector Type.property` selects declared vectors, and `--json` reports
`vectors` and `schema` instead of `dimension`. See
[the offline file pipeline][embed-schema-authority-pipeline].

[embed-schema-authority-pipeline]: ../docs/user/search/embeddings.md#offline-file-pipeline
5 changes: 5 additions & 0 deletions changelog.d/embed-schema-authority.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- `omnigraph embed` takes each vector's source and dimension from the schema
and refuses a recorded `@embed` model the provider does not resolve. See
[Embeddings][embed-schema-authority-guide].

[embed-schema-authority-guide]: ../docs/user/search/embeddings.md#offline-file-pipeline
9 changes: 5 additions & 4 deletions crates/omnigraph-cli/src/commands/local/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ fn skill_export_delivery_failure_keeps_the_written_files_and_record() {
async fn embed_report_failure_keeps_the_completed_output_file() {
let home = tempfile::tempdir().unwrap();
let input = home.path().join("input.jsonl");
let spec = home.path().join("spec.json");
let schema = home.path().join("schema.pg");
std::fs::write(
&input,
"{\"type\":\"Doc\",\"data\":{\"text\":\"hello\",\"vector\":[1,2]}}\n",
)
.unwrap();
std::fs::write(
&spec,
r#"{"dimension":2,"types":{"Doc":{"target":"vector","fields":["text"]}}}"#,
&schema,
"node Doc {\n text: String?\n vector: Vector(2)? @embed(\"text\")\n}\n",
)
.unwrap();
for json in [false, true] {
Expand All @@ -82,10 +82,11 @@ async fn embed_report_failure_keeps_the_completed_output_file() {
seed: None,
input: Some(input.clone()),
output: Some(output.clone()),
spec: Some(spec.clone()),
schema: Some(schema.clone()),
clean: true,
reembed_all: false,
types: Vec::new(),
vectors: Vec::new(),
selectors: Vec::new(),
json,
};
Expand Down
Loading
Loading