From f1730a1ba0797524880fed7c8d46612fcffaa8d9 Mon Sep 17 00:00:00 2001 From: MechaCat02 Date: Mon, 6 Jul 2026 20:01:34 +0200 Subject: [PATCH] test(cli): fix stale group-email parse assertion The M5.5 shared-group-secret work made a [group] [[triggers.email]] template parse successfully (it materializes per descendant app; the inbound secret is resolved against the group's own store server-side at apply). The unit test still asserted the old parse-time rejection and had been failing on main under `cargo test --workspace`. Update it to assert the current behavior: parse accepts a group email template, like the group cron template above it. Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/picloud-cli/src/manifest.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/crates/picloud-cli/src/manifest.rs b/crates/picloud-cli/src/manifest.rs index 1ccad2f..e82ff8c 100644 --- a/crates/picloud-cli/src/manifest.rs +++ b/crates/picloud-cli/src/manifest.rs @@ -904,13 +904,16 @@ mod tests { ) .expect("group cron template parses"); assert_eq!(cron.triggers.cron.len(), 1); - // ...but an email template on a group is still rejected (per-app secret). - let err = Manifest::parse( + // §4.5 M5.5: a group email template is now ALLOWED too — it materializes + // per descendant app and resolves its `inbound_secret_ref` against the + // GROUP's own secret store at apply (the server rejects it there if the + // secret is unset). Parse no longer refuses it. + let email = Manifest::parse( "[group]\nslug = \"acme\"\nname = \"ACME\"\n\n\ [[triggers.email]]\nscript = \"shared\"\ninbound_secret_ref = \"sig\"\n", ) - .expect_err("group email template is rejected"); - assert!(err.to_string().contains("email"), "got: {err}"); + .expect("group email template parses"); + assert_eq!(email.triggers.email.len(), 1); // Neither / both is rejected. Manifest::parse("[vars]\nx = 1\n").expect_err("no [app] or [group]");