mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-10-08 03:10:26 +00:00
Drop duplicated blob-hash rewrites from the attach normalizer
The [BLOB_HASH] placeholder was defined both here and in the shared json_snapshot_filters regexes, which had to be edited in lockstep. The fabro_json_snapshot! macro always applies the shared filters to the rendered string, so the normalizer copies were redundant. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
ae5c734299
commit
80b99e9b7b
1 changed files with 2 additions and 14 deletions
|
|
@ -66,20 +66,8 @@ fn format_output_snapshot(output: &Output, filters: &[(String, String)]) -> Stri
|
|||
}
|
||||
|
||||
fn normalize_attach_json_progress_event(mut event: Value) -> Value {
|
||||
if let Some(properties) = event.get_mut("properties").and_then(Value::as_object_mut) {
|
||||
if properties.contains_key("manifest_blob") {
|
||||
properties.insert(
|
||||
"manifest_blob".to_string(),
|
||||
Value::String("[BLOB_HASH]".to_string()),
|
||||
);
|
||||
}
|
||||
if properties.contains_key("definition_blob") {
|
||||
properties.insert(
|
||||
"definition_blob".to_string(),
|
||||
Value::String("[BLOB_HASH]".to_string()),
|
||||
);
|
||||
}
|
||||
}
|
||||
// manifest_blob/definition_blob hashes are already rewritten to
|
||||
// [BLOB_HASH] by the shared json_snapshot_filters regexes.
|
||||
// Strip v2-shape server/version fields that the bridge emits,
|
||||
// since the test fixture's socket path is randomised per run.
|
||||
if let Some(settings) = event
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue