mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-08-28 05:27:41 +00:00
Skip envelope-colliding keys when merging flattened event fields
WorkflowRunStarted and GitCheckpoint have a `run_id` field that collides with the envelope's top-level `run_id`. Filter out `timestamp`, `run_id`, and `event` from event fields to avoid duplicate keys in the JSONL output. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
62b54c8f4d
commit
eb195a0be9
1 changed files with 5 additions and 1 deletions
|
|
@ -222,7 +222,11 @@ pub async fn run_command(args: RunArgs, styles: &'static Styles) -> anyhow::Resu
|
|||
"event".to_string(),
|
||||
serde_json::Value::String(event_name),
|
||||
);
|
||||
envelope.extend(event_fields);
|
||||
for (k, v) in event_fields {
|
||||
if k != "timestamp" && k != "run_id" && k != "event" {
|
||||
envelope.insert(k, v);
|
||||
}
|
||||
}
|
||||
let envelope = serde_json::Value::Object(envelope);
|
||||
// Append to progress.jsonl
|
||||
if let Ok(line) = serde_json::to_string(&envelope) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue