Skip to content

Enable append-only-comments for campaign orchestrators#11244

Closed
Copilot wants to merge 3 commits intomainfrom
copilot/fix-message-update-api
Closed

Enable append-only-comments for campaign orchestrators#11244
Copilot wants to merge 3 commits intomainfrom
copilot/fix-message-update-api

Conversation

Copy link
Contributor

Copilot AI commented Jan 22, 2026

Campaign orchestrators were updating the activation comment on each run, losing historical context. Campaign generators already use append-only-comments: true but orchestrators did not.

Changes

  • Campaign orchestrator configuration (pkg/campaign/orchestrator.go)

    • Added Messages config with AppendOnlyComments: true to SafeOutputsConfig
    • Positioned after other safe output assignments for consistency
  • Test coverage (pkg/campaign/orchestrator_test.go)

    • Added TestBuildOrchestrator_AppendOnlyCommentsEnabled to verify configuration

Behavior

Before: Each campaign run updates the same comment

// Run 1: "Campaign started"
// Run 2: "Campaign in progress" (replaces run 1)
// Run 3: "Campaign complete" (replaces run 2)
// Result: 1 comment with latest state only

After: Each campaign run creates a new comment

// Run 1: "Campaign started"
// Run 2: "Campaign in progress" (new comment)
// Run 3: "Campaign complete" (new comment)
// Result: 3 comments, full audit trail

The JavaScript handler (update_activation_comment.cjs) already supports append-only mode; this change enables it for campaign orchestrators.

Original prompt

Do a ddeep anaylysis of messages safe output and add_comment. It seems that for campaign generation, message updates use the wrong api (update/replace instead of create new comment).


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits January 22, 2026 11:24
…ng existing ones

Enable append-only-comments for campaign orchestrator workflows to ensure
full history of campaign run updates is preserved. Previously, campaign runs
were updating the activation comment, replacing the previous state. Now each
run creates a new comment, providing a complete audit trail.

Changes:
- Add Messages config with AppendOnlyComments=true to orchestrator
- Add test to verify append-only-comments is enabled for campaigns
- Document behavior in code comments

This matches the existing behavior in campaign generator which already
has append-only-comments enabled.

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Improve code organization by moving the Messages configuration to the end
of all safeOutputs assignments, after dispatch_workflow. This makes the
code flow more consistent and easier to read.

Addresses code review feedback.

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix campaign generation message updates API usage Enable append-only-comments for campaign orchestrators Jan 22, 2026
Copilot AI requested a review from mnkiefer January 22, 2026 11:31
@mnkiefer mnkiefer closed this Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants