self run: a claimed follow-up's task names its repo, so the first line's 'written into its brief' is true

This commit is contained in:
Meta Vens 2026-11-04 09:09:22 +01:00
commit 8fe50e2513
2 changed files with 4 additions and 3 deletions

View file

@ -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<String> {
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!("

View file

@ -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}");
}