Skip to content

Commit 4922457

Browse files
committed
fix(catalog): project resource reason fields into semantic diffs
Codex review (P2): normalize_agent projected only /resources/<name>/uri, so edits touching just reason or inactive-reason produced a modified-file marker with no agent semantic field. Emit /reason and optional /inactive-reason alongside /uri so diff consumers can observe explanation and active-state changes.
1 parent b0360ea commit 4922457

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/catalog_transaction.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -767,6 +767,18 @@ fn normalize_agent(spec: &agent_spec::AgentSpec) -> Result<BTreeMap<String, Sema
767767
SemanticType::String,
768768
resource.uri(),
769769
);
770+
insert_value(
771+
&mut fields,
772+
&format!("{root}/reason"),
773+
SemanticType::String,
774+
resource.reason(),
775+
);
776+
insert_optional(
777+
&mut fields,
778+
&format!("{root}/inactive-reason"),
779+
SemanticType::String,
780+
resource.inactive_reason(),
781+
);
770782
}
771783
for task in &spec.tasks {
772784
let kind = match task.kind {

0 commit comments

Comments
 (0)