From 634891ded2473b09216f51e95f829d88edaba6e7 Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Sat, 19 Sep 2026 18:39:18 -0400 Subject: [PATCH] Filter the working-directory depth out of the partial include snapshot The include error names the partial relative to the run's working directory, so its `../` run is as long as that directory is deep: eight on this machine's temp dir, three on the CI runner's. Collapse the run to a token before the snapshot compares. Co-Authored-By: Claude Fable 5.1 --- lib/apps/fabro-cli/tests/it/cmd/validate.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/apps/fabro-cli/tests/it/cmd/validate.rs b/lib/apps/fabro-cli/tests/it/cmd/validate.rs index 64de2b6f4..3a3896401 100644 --- a/lib/apps/fabro-cli/tests/it/cmd/validate.rs +++ b/lib/apps/fabro-cli/tests/it/cmd/validate.rs @@ -260,14 +260,21 @@ fn bare_fabro_with_unbound_inputs_in_template_partial_validates_structurally_wit let context = test_context!(); let mut cmd = context.validate(); cmd.arg(fixture("templated_unbound_partial/workflow.fabro")); - fabro_snapshot!(context.filters(), cmd, @r#" + // The include error names the partial relative to the run's working + // directory, so the `../` run is as long as that directory is deep. + let mut filters = context.filters(); + filters.push(( + r"(\.\./)*\.\.\[FIXTURES\]".to_string(), + "[UP][FIXTURES]".to_string(), + )); + fabro_snapshot!(filters, cmd, @r#" success: false exit_code: 1 ----- stdout ----- ----- stderr ----- Workflow: TemplatedUnboundPartial (3 nodes, 2 edges) Graph: [FIXTURES]/templated_unbound_partial/workflow.fabro - error: [FIXTURES]/templated_unbound_partial/workflow.fabro:3:42: node `test_imported_include` `prompt`: template render: could not render include: error in "../../../../../../../..[FIXTURES]/templated_unbound_partial/test-include.partial.md" (in ../../../../../../../..[FIXTURES]/templated_unbound_partial/__petri_root__:1) (attractor.template) + error: [FIXTURES]/templated_unbound_partial/workflow.fabro:3:42: node `test_imported_include` `prompt`: template render: could not render include: error in "[UP][FIXTURES]/templated_unbound_partial/test-include.partial.md" (in [UP][FIXTURES]/templated_unbound_partial/__petri_root__:1) (attractor.template) × Validation failed "#); }