From 8fe50e2513360cb6c62ba1fef3856f0485296ceb Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Wed, 4 Nov 2026 09:09:22 +0100 Subject: [PATCH] self run: a claimed follow-up's task names its repo, so the first line's 'written into its brief' is true --- crates/mind-body/src/self_run.rs | 6 +++--- crates/mind-body/src/self_run/tests.rs | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/mind-body/src/self_run.rs b/crates/mind-body/src/self_run.rs index 94651c5..6ae49cc 100644 --- a/crates/mind-body/src/self_run.rs +++ b/crates/mind-body/src/self_run.rs @@ -158,7 +158,7 @@ pub fn start_message(instance: &Slug, run: &PipelineRef, plan_quota: &[PlanQuota } /// The task section of the start message: one section per claim, in claim -/// order. A claimed follow-up gives its id, campaign and `item` verbatim, +/// order. A claimed follow-up gives its id, campaign, repo and `item` verbatim, /// because the brief lives in the claim and a run that cannot reach its mind /// would never see its job; a claimed cut spec is named as the task, to be read /// with `huginn view`; a claim the mind does not hold, or of another kind, is @@ -175,8 +175,8 @@ fn task_section(mind: &dyn MindPort, claims: &[PipelineRef]) -> Result { Some(PipelineDocument::FollowUp(follow_up)) => { task.push_str(&format!(" -Task, claimed follow-up `{id}` (campaign `{}`): -{}", follow_up.campaign.0, follow_up.item.0)); +Task, claimed follow-up `{id}` (campaign `{}`, repo `{}`): +{}", follow_up.campaign.0, follow_up.repo.0, follow_up.item.0)); } Some(PipelineDocument::CutSpec(spec)) => { task.push_str(&format!(" diff --git a/crates/mind-body/src/self_run/tests.rs b/crates/mind-body/src/self_run/tests.rs index 3b36761..adfb391 100644 --- a/crates/mind-body/src/self_run/tests.rs +++ b/crates/mind-body/src/self_run/tests.rs @@ -1685,6 +1685,7 @@ fn a_brief_the_run_claims_is_in_the_task_once_and_not_again_under_also_open() { let ran = carry_with(&Seen::of(&mind), vec![Out(echo())], Some(0), false); let start = &ran.written()[0]; assert_eq!(start.matches("claimed follow-up").count(), 1, "{start}"); + assert!(start.contains(", repo `"), "the claimed task names the repo the work belongs to: {start}"); assert!(start.contains("Do the claimed thing.") && !start.contains("Also open for you"), "{start}"); }